Gym builds and packages iOS apps for you. It handles all the heavy lifting and is very easy to generate signed IPA or app files 💪
- 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"
Copy the code
- With gym
fastlane gym
Copy the code
- Gymfile
Note: Don’t live in gTMFile file but in FastFile file directly use 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
Copy the code
Note Gym is the package of XcodeBuild. It supports all Settings of XcodeBuild. If you do not use GYM, you can directly use Shenzhen