A tiny release tool to support multi distribution(IPA) on iOS development.
Relax is a tiny release tool for iOS developers who don't want to be bothering with code signing and Xcode stuffs!!
You just configure scheme
and provisioning_profile
to build archive and IPA files.
Relax will save your time. It's hard to understand xcodebuild
stuff, for example, code signing mechanism. Relax takes care of much of the hassle of them. so you can focus on development.
Mutli distribution
Less configuration
Easy & Simple
$ brew install scenee/formulae/relax
$ curl -fsSL https://raw.githubusercontent.com/SCENEE/relax/master/install.sh | bash
NOTE: You don't need to take care of a host environment(i.e. ruby version and gem settings).
$ relax dist /path/to/xcodeproj_or_xcworkspace --scheme scheme_name --profile profile_name
$ # OR
$ relax dist /path/to/xcodeproj_or_xcworkspace -s scheme_name -p profile_name
Or use Relfile.
$ relax init
$ relax dist adhoc
relax profile add
and relax keychain add
help you to install them and resolve permissions for your identities in your keychain. I highly recommend to use those commands. See here and here.Relfile is a configuration file for Relax. The declarative file will really make you easy to understand how to customize Info.plist and build settings for a distribution. See here for detail.
Here is an example.
version: '2'
workspace: SampleApp
distributions:
adhoc:
# Required
scheme: SampleApp
provisioning_profile: 'Relax Adhoc'
# Optional
version: '1.0.1'
configuration: Debug
bundle_identifier: com.scenee.SampleApp.dev
bundle_version: '$BUILD_NUMBER' # You can use shell environment variables!
info_plist:
CFBundleName: 'SmapleApp(Debug)'
UISupportedExternalAccessoryProtocols:
- com.example.test-accessory
build_settings:
OTHER_SWIFT_FLAGS:
- '-DMOCK'
export_options:
compileBitcode: false
ent:
# Required
scheme: SampleApp
provisioning_profile: 'Relax Enterprise'
# Optional
bundle_identifier: com.scenee.SampleApp
bundle_version: '%b-%h-$c' # See 'Bundle Version Format section'
info_plist:
UISupportedExternalAccessoryProtocols:
- com.example.accessory
framework:
# Required
scheme: Sample Framework
# Optional
configuration: Release
log_formatter: xcpretty # Optional
You can use Environment variables in Relfile. That's much useful in CI services. For example,
development2:
scheme: Sample App
bundle_version: $BUILD_NUMBER
....
$ BUILD_NUMBER=11 relax archive development2
or
$ export BUILD_NUMBER=11
$ relax archive development2
But, you know, you can't use Xcode build setting variables (like PRODUCT_NAME etc.) in Relfile because they can be overridden by Relfile's definitions.
Option | Response status |
---|---|
compileBitcode | OK |
embedOnDemandResourcesAssetPacksInBundle | Not supported |
iCloudContainerEnvironment | Not supported |
manifest | Not supported |
method | Auto-assigned 'ad-hoc', 'app-store', 'development' or 'enterprise' from provisioning_profile . |
onDemandResourcesAssetPacksBaseURL | Not supported |
teamID | Auto-assigned from provisioning_profile . |
provisioningProfiles | Auto-assigned from provisioning_profile . |
signingCertificate | Auto-assigned 'iPhone Developer' or 'iPhone Distribution' from provisioning_profile . |
signingStyle | Auto-assigned 'automatic' or 'manual' determined from provisioning_profile . |
thinning | OK |
uploadBitcode | OK |
uploadSymbols | OK |
You can use specific format characters in a value of bundle_version
field.
The characters and their meanings are as follows.
Character | Meaning |
---|---|
%c | Build configuration |
%h | Git abbreviated commit hash |
%b | Git branch name |
$ relax archive dev
$ relax export "/path/to/xcarchive"
$ # OR
$ relax export dev
Check a IPA file if it has a correct code signing and entitlements.
$ relax validate "$(relax show adhoc ipa)"
You can also validate an archive file.
Resign a IPA file for a distribution by a provisioning profile. The related identity is selected automatically from active keychains.
$ relax resign -i "com.mycompany.SampleApp" -p "<enterprise-provisioning-profile>" /path/to/ipa
keychain
commandsThe keychain
module commands make you free from keychain stuff and prevent a build break!
Actually this is an useful wrapper of security
command.
Run here and see this script for detail.
$ relax help keychain
profile
commandsThe profile
module commands make it easy to find, use or remove provisioning profiles without Xcode Preferences.
Run here and see this script for detail.
$ relax help profile
$ relax symbolicate sampleapp.crash SampleApp.xcarchive
brewe update
.stty: stdin isn't a terminal
can be printed on a CI build server, but Relax is working well.