1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
| # This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:ios)
platform :ios do
desc "build project"
lane :buildDebug do
#配置工程基本信息
update_app_identifier(
xcodeproj: "TooWellMerchant.xcodeproj", # Optional path to xcodeproj, will use the first .xcodeproj if not set
plist_path: "TooWellMerchant/Info.plist", # Path to info plist file, relative to xcodeproj
app_identifier: "com.xxxxxx.xxxxxx" # The App Identifier
)
#配置签名以及证书
automatic_code_signing(
path: "TooWellMerchant.xcodeproj",
#启用自动签名
use_automatic_signing: true,
code_sign_identity: "Apple Development",
#根据证书拿到团队ID或者直接去苹果开发者官方查阅
team_id:"K4T4XXXXXX",
)
#配置生成包的类型以及发布渠道
gym(scheme: "TooWellMerchant",
workspace: "TooWellMerchant.xcworkspace",
configuration: "Debug",
clean: true,
output_name:"TooWellMerchant.ipa",
#只打Arm64,缩小包体积
xcargs:"ARCHS='arm64'",
#IOS 9适配
export_xcargs:"-allowProvisioningUpdates",
export_method: "development" # app-store, ad-hoc, package, enterprise, development, developer-id
)
end
lane :buildRelease do
update_app_identifier(
xcodeproj: "TooWellMerchant.xcodeproj", # Optional path to xcodeproj, will use the first .xcodeproj if not set
plist_path: "TooWellMerchant/Info.plist", # Path to info plist file, relative to xcodeproj
app_identifier: "com.xxxxxx.xxxxxx" # The App Identifier
)
automatic_code_signing(
path: "TooWellMerchant.xcodeproj",
use_automatic_signing: true,
code_sign_identity: "Apple Development",
team_id:"K4T4XXXXXX",
)
gym(scheme: "TooWellMerchant",
workspace: "TooWellMerchant.xcworkspace",
configuration: "Release",
clean: true,
output_name:"TooWellMerchant.ipa",
#只打Arm64,缩小包体积
xcargs:"ARCHS='arm64'",
#IOS 9适配
export_xcargs:"-allowProvisioningUpdates",
export_method: "development" # app-store, ad-hoc, package, enterprise, development, developer-id
)
end
end
|