fastlane: Gym no longer signs with Xcode 8
New Issue Checklist
- Updated fastlane to the latest version
- I have read the Contribution Guidelines
Issue Description
In previous versions, before Xcode 8, the handy thing about Gym was that you didn’t have to give it a provisioning profile in command line, it found the right one. (compared to xcodebuild command line)
Now, accoring to the release notes of Xcode 8: “Xcode 8 does not automatically copy the aps-environment entitlement from provisioning profiles at build time. This behavior is intentional. To use this entitlement, either enable Push Notifications in the project editor’s Capabilities pane, or manually add the entitlement to your entitlements file.” (https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-DontLinkElementID_49) (I’m curious how this automatic-provisioning-and-certs would work along with fastlane, but that’s probably another question for another ticket)
Furthermore you have to go in and manually uncheck “automatic”, then go and choose a name of the correct provisioning profile manually in xcode, to make gym use the specific mobile provisioning profile, then Gym works.
Complete output when running fastlane, including the stack trace and command used
The following build commands failed:
Check Dependencies
(1 failure)
[16:48:20]: Exit status: 65
Environment
fastlane version (run fastlane -v
): fastlane 1.99.0
Do you use bundler to execute fastlane (i.e. bundle exec fastlane
)? NO
Do you use a Ruby environment manager (e.g. chruby
, rbenv
, rvm
)? NO
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 4
- Comments: 18
thank you @newmarcel 😊 That didn’t work for me, but for anyone else that has my problem, specifying the 2.3 toolchain and
use_legacy_build_api
when building 2.3 fixed it!It appears fastlane wasn’t the problem, it was Xcode 8. Setting all the code signing settings to “Distribution”, which worked before, breaks.
If you uncheck the automatic in general settings, then check it again, it sets the correct settings, 2 “iOS Distribution”, for code signing, and 2 “iOS Developer” under “Any iOS SDK”, in the pbxproj file and in Xcode project build settings.
@pedro380085 isn’t
PROVISIONING_PROFILE
deprecated now? we had some hiccups and weird build errors when having bothPROVISIONING_PROFILE
andPROVISIONING_PROFILE_SPECIFIER
set.Ideally, if you moved on to
PROVISIONING_PROFILE_SPECIFIER
, thePROVISIONING_PROFILE
should be set to blank then.When I run it, the provisioning profile I set through PROVISIONING_PROFILE_SPECIFIER is marked as having the
aps-environment = production
entitlement:However; when I run it on gym, the gym.log outputs that it is not activated:
My current setup:
Someone has any idea what it might be?
I had the same problem, and I could resolve it by leaving out the
--codesigning_identity
parameter and prefix the gym command withPROVISIONING_PROFILE_SPECIFIER
in CI without changing to manual signing:PROVISIONING_PROFILE_SPECIFIER="Team/1234" gym --clean …
It works for my setup at least 😉
@sahandnayebaziz Are you sure it’s not a problem of one of those 3 libraries? Not sure if how it links them in changes in Xcode 8. If a simple example app compiles perhaps that problem should be a different issue.
The natural next question on the provisioning profile problem would be, is there a tool in Fastlane that lists all the mobileprovisions loaded on the machine, so you can set the PROVISIONING_PROFILE and PROVISIONING_PROFILE_SPECIFIER strings in the project.pbxproj without needing “automatic” mode?