Gym为您构建和打包iOS应用。它可以处理所有繁重的工作,并且非常容易生成签名ipa或app文件💪
- gym is a replacement for shenzhen.
- Before gym
xcodebuild clean archive -archivePath build/MyApp \
-scheme MyApp
xcodebuild -exportArchive \
-exportFormat ipa \
-archivePath "build/MyApp.xcarchive" \
-exportPath "build/MyApp.ipa" \
-exportProvisioningProfile "ProvisioningProfileName"
- With gym
fastlane gym
- Gymfile
注:没有住在gtmfile文件而是在fastfile文件直接用的gym
lane :beta do
scan
gym(
workspace: "MyApp.xcworkspace",
configuration: "Debug",
scheme: "MyApp",
silent: true,
clean: true,
output_directory: "path/to/dir", # Destination directory. Defaults to current directory.
output_name: "my-app.ipa", # specify the name of the .ipa file to generate (including file extension)
sdk: "iOS 11.1" # use SDK as the name or path of the base SDK when building the project.
export_options("./ExportOptions.plist")
)
crashlytics
end
# error block is executed when a error occurs
error do |lane, exception|
slack(
# message with short human friendly message
message: exception.to_s,
success: false,
# Output containing extended log output
payload: { "Output" => exception.error_info.to_s }
)
end
注 gym 就是对xcodebuild的封装 支持xcodebuild的所有设置 如果不使用gym可以直接使用shenzhen