Fastlane Gym Special Distribution

I want to set up fastlane for my project. I have few target apps (app, watchkit app, and watchkit extension) and a few third party projects in my workspace.

My problem is that I cannot load the assembly from crashlytics when I load it with fastlane, but I can do that when I manually archive the assembly.

This is my fastlane

lane :beta do

sh 'bash ./update_version.sh'

gym(scheme: "MyApp", 
  workspace: "MyApp.xcworkspace",
  configuration: "Ad Hoc Distribution")

crashlytics(
  api_token: "d543d4a5b27009b...",
  build_secret: "fafb26aa69fa...",
  groups:"myapp-team",
  notifications: true
)
end

      

I am adding a config property for the gym because it uses Release by default and I want to use the Ad Hoc config for distribution because all the Ad Hoc profiles are configured in that config.

As far as I understand, the gym team with the config property will set Ad Hoc for all goals and projects within the workspace. Right?

I tried to emulate what fastlane would do, and I installed Atchive

Build Configuration

Ad Hoc

manually on all Schematic targets and projects and zipped my project. After that I upload this archive to crashlytics and was able to load this assembly. So my profiles are fine and they turn on my device.

How can I test setup fastlane to use exactly the same config / profiles?

Thank.

UPD

Another additional check that should help with some details.

I zipped the project using Xcode, then create an IPA file and run this command from the doc - https://docs.fabric.io/apple/beta/build-tools.html

/path/to/Crashlytics.framework/submit API_KEY BUILD_SECRET \
-ipaPath path.to/my.ipa \
-groupAliases my-team \
-notifications YES

      

After that, I was able to load the assembly.

Thanks for fastlane's Todd.

UPD 2

This is the last part of my fastlane output

...
Copying myapp/Resources/sound/connection_found.wav
[09:33:52]: ▸ Copying myapp/Resources/sound/connection_lost.wav
[09:33:52]: ▸ Copying myapp.strings
[09:33:52]: ▸ Copying myapp/Resources/sound/kicked.wav
[09:33:56]: ▸ Processing myapp-Info.plist
[09:33:56]: ▸ Generating 'myapp.app.dSYM'
[09:33:59]: ▸ Copying /Users/evgeniitrapeznikov/Library/Developer/Xcode/DerivedData/myapp-dfrdqdmlsgvypadklcuzikqgrnzs/Build/Intermediates/ArchiveIntermediates/myapp/BuildProductsPath/Ad\ Hoc\ Distribution-iphoneos/myapp\ WatchKit\ Extension.appex
[09:33:59]: ▸ skipping copy phase strip, binary is code signed: /Users/evgeniitrapeznikov/Library/Developer/Xcode/DerivedData/myapp-dfrdqdmlsgvypadklcuzikqgrnzs/Build/Intermediates/ArchiveIntermediates/myapp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/myapp WatchKit Extension.appex/myapp WatchKit App.app/_WatchKitStub/WK
[09:33:59]: ▸ skipping copy phase strip, binary is code signed: /Users/evgeniitrapeznikov/Library/Developer/Xcode/DerivedData/myapp-dfrdqdmlsgvypadklcuzikqgrnzs/Build/Intermediates/ArchiveIntermediates/myapp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/myapp WatchKit Extension.appex/myapp WatchKit App.app/myapp WatchKit App
[09:33:59]: ▸ skipping copy phase strip, binary is code signed: /Users/evgeniitrapeznikov/Library/Developer/Xcode/DerivedData/myapp-dfrdqdmlsgvypadklcuzikqgrnzs/Build/Intermediates/ArchiveIntermediates/myapp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/myapp WatchKit Extension.appex/myapp WatchKit Extension
[09:33:59]: ▸ Running script 'Run Script'
[09:33:59]: ▸ Touching myapp.app
[09:33:59]: ▸ Signing /Users/evgeniitrapeznikov/Library/Developer/Xcode/DerivedData/myapp-dfrdqdmlsgvypadklcuzikqgrnzs/Build/Intermediates/ArchiveIntermediates/myapp/InstallationBuildProductsLocation/Applications/myapp.app
[09:34:00]: ▸ Touching myapp.app.dSYM
[09:34:00]: ▸ Archive Succeeded
[09:34:00]: Generated plist file with the following values:
[09:34:00]: ▸ -----------------------------------------
[09:34:00]: ▸ {
[09:34:00]: ▸   "method": "app-store",
[09:34:00]: ▸   "uploadSymbols": true,
[09:34:00]: ▸   "uploadBitcode": false
[09:34:00]: ▸ }
[09:34:00]: ▸ -----------------------------------------
[09:34:00]: $ /usr/bin/xcrun /Users/evgeniitrapeznikov/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.48.0/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/z7/3krkc5211ng2c090_qhd2tlm0000gn/T/gym_config20170726-23446-a2yb0t.plist' -archivePath /Users/evgeniitrapeznikov/Library/Developer/Xcode/Archives/2017-07-26/myapp\ 2017-07-26\ 09.32.18.xcarchive -exportPath '/var/folders/z7/3krkc5211ng2c090_qhd2tlm0000gn/T/gym_output20170726-23446-hafxer'
[09:34:08]: Compressing 2 dSYM(s)
[09:34:08]: $ cd '/Users/evgeniitrapeznikov/Library/Developer/Xcode/Archives/2017-07-26/myapp 2017-07-26 09.32.18.xcarchive/dSYMs' && zip -r '/Users/evgeniitrapeznikov/Desktop/myapp/myapp-ios-client/myapp.app.dSYM.zip' *.dSYM
[09:34:09]: ▸ updating: myapp WatchKit Extension.appex.dSYM/ (stored 0%)
[09:34:09]: ▸ updating: myapp WatchKit Extension.appex.dSYM/Contents/ (stored 0%)
[09:34:09]: ▸ updating: myapp WatchKit Extension.appex.dSYM/Contents/Info.plist (deflated 51%)
[09:34:09]: ▸ updating: myapp WatchKit Extension.appex.dSYM/Contents/Resources/ (stored 0%)
[09:34:09]: ▸ updating: myapp WatchKit Extension.appex.dSYM/Contents/Resources/DWARF/ (stored 0%)
[09:34:09]: ▸ updating: myapp WatchKit Extension.appex.dSYM/Contents/Resources/DWARF/myapp WatchKit Extension (deflated 64%)
[09:34:09]: ▸ updating: myapp.app.dSYM/ (stored 0%)
[09:34:09]: ▸ updating: myapp.app.dSYM/Contents/ (stored 0%)
[09:34:09]: ▸ updating: myapp.app.dSYM/Contents/Info.plist (deflated 52%)
[09:34:09]: ▸ updating: myapp.app.dSYM/Contents/Resources/ (stored 0%)
[09:34:09]: ▸ updating: myapp.app.dSYM/Contents/Resources/DWARF/ (stored 0%)
[09:34:09]: ▸ updating: myapp.app.dSYM/Contents/Resources/DWARF/myapp (deflated 69%)

[09:34:09]: Successfully exported and compressed dSYM file
[09:34:09]: Successfully exported and signed the ipa file:
[09:34:09]: /Users/evgeniitrapeznikov/Desktop/myapp/myapp-ios-client/myapp.ipa
[09:34:09]: -------------------------
[09:34:09]: --- Step: crashlytics ---
[09:34:09]: -------------------------
[09:34:09]: Uploading the build to Crashlytics Beta. Time for some ☕️.
[09:34:26]: Build successfully uploaded to Crashlytics Beta 🌷
[09:34:26]: Visit https://fabric.io/_/beta to add release notes and notify testers.
[09:34:26]: -------------------
[09:34:26]: --- Step: slack ---
[09:34:26]: -------------------
[09:34:28]: Successfully sent Slack notification

+------+---------------------+-------------+
|             fastlane summary             |
+------+---------------------+-------------+
| Step | Action              | Time (in s) |
+------+---------------------+-------------+
| 1    | Verifying required  | 0           |
|      | fastlane version    |             |
| 2    | default_platform    | 0           |
| 3    | bash                | 0           |
|      | ./update_version.sh |             |
| 4    | gym                 | 118         |
| 5    | crashlytics         | 16          |
| 6    | slack               | 1           |
+------+---------------------+-------------+

[09:34:28]: fastlane.tools finished successfully 🎉

      

+3


source to share


1 answer


I just added the t20 to the gym and it works.



+3


source







All Articles