Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Install external dependencies
pod install
# Build and run tests
xcodebuild -workspace <your_project_name>.xcworkspace \
-scheme <your_desired_schema> -configuration <your_desired_configuration> \
-destination 'platform=iOS Simulator,name=iPad Pro (12.9-inch),OS=10.2' \
-derivedDataPath <derived_data_path> BUILD_DIR=<build_directory_path> \
-UseModernBuildSystem=YES clean build -enableCodeCoverage=YES test
# Convert the coverage report to a redable form
xcrun llvm-cov show -instr-profile <path_of_the_Coverage.profdata_file> \
<path_of_the_executable> > <name_of_the_report_file>
# Set the default keychain to the new one
security list-keychains -s <path_to_the_new_keychain>
security default-keychain -s <path_to_the_new_keychain>
# Unlock the keychain
security unlock-keychain -p <my-super-secret-password> <path_to_the_new_keychain>
# Archive the project
xcodebuild -workspace <your_project_name>.xcworkspace \
-scheme <your_desired_schema> -archivePath <path_of_the_archive>\
-configuration <your_desired_configuration> \
PROVISIONING_PROFILE=<the_name_of_the_provisioning_profile> \
archive -UseModernBuildSystem=YES
# Export the archive
xcodebuild -exportArchive -archivePath <path_of_the_archive> \
-exportOptionsPlist <path_of_the_export_plist_file> \
-exportPath <path_of_the_exported_archive_location> -UseModernBuildSystem=YES
# Reset the keychain
security list-keychains -d user -s <path_to_the_old_login_keychain> <path_to_the_new_keychain>
security list-keychains -s <path_to_the_old_login_keychain>
security default-keychain -s <path_to_the_old_login_keychain>
# Distribute the app via Crashlytics
Pods/Crashlytics/submit <id-of-the-fabric-organisation> \
-ipaPath <path_of_the_exported_archive_location>/<your_project_name>.ipa \
-groupAliases <the_alias_of_the_testing_group>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.