-
-
Save m4rr/bbb674e8182c8860d8b9a6cbb5a380e0 to your computer and use it in GitHub Desktop.
jobs: | |
# ... | |
make_build: | |
macos: | |
xcode: "9.2.0" | |
steps: | |
- checkout | |
# ... | |
- run: | |
name: decode Certificates | |
context: org-global | |
command: base64 -D -o Certificates.p12 <<< $Certificates | |
- run: | |
name: make Provisioning Profiles directory | |
command: mkdir -pv ~/Library/MobileDevice/Provisioning\ Profiles/ | |
- run: | |
name: decode Provisioning Profiles | |
context: org-global | |
command: base64 -D -o ~/Library/MobileDevice/Provisioning\ Profiles/App_Store.mobileprovision <<< $App_Store_Profile | |
# ... |
Hi,
Provisioning Profile also has to be encoded with base64, and put to CircleCI’s variables (same as with Certificate), then decoded to the “Provisioning\ Profiles” dir.
Don't hesitate to comment below if you have any further questions,
see you.
Thanks for your quick answer, Marat! And for taking the time of writing the post.
I did that.
base64 -i MyAPP_App_Store_Provisioning.mobileprovision | pbcopy
Then I create a environment variable with the name App_Store_Profile
and the value of the previous output.
This is the content of my Fastfile
default_platform :ios
platform :ios do
before_all do
setup_circle_ci
import_certificate(
keychain_name: ENV["MATCH_KEYCHAIN_NAME"],
keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"],
certificate_path: 'Certificates.p12',
certificate_password: ENV["CERTIFICATE_PASSWORD"] || "default"
)
end
desc "Build"
lane :test do
build_app(workspace: "MyApp.xcodeproj/project.xcworkspace", scheme: "MyApp")
end
end
And when I run the lane test, here starts the error
[16:33:00]: $ set -o pipefail && xcodebuild -workspace MyApp.xcodeproj/project.xcworkspace -scheme MyApp -destination 'generic/platform=iOS' -archivePath /Users/distiller/Library/Developer/Xcode/Archives/2020-04-16/MyApp\ 2020-04-16\ 16.33.00.xcarchive archive | tee /Users/distiller/project/output/buildlogs/gym/MyApp-MyApp.log | xcpretty
[16:33:20]: ▸ ❌ error: No profiles for 'com.mytestingdomain.ios.myapp' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.mytestingdomain.ios.myapp'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'MyApp' from project 'MyApp')
[16:33:20]: ▸ ** ARCHIVE FAILED **
I also tried passing this to build_app
export_method: "app-store",
export_options: {
provisioningProfiles: {
"com.mytestingdomain.ios.myapp" => "Name of the Provisioning Profile"
}
}
I also tried passing -allowProvisioningUpdates
Any hint? Thanks a lot
But it is not working.
It seems the prov. profile doesn't match to the build step. It should match by bundle id, but also by the purpose of the build. Thus, prov. profile for the App Store distribution cannot be used for testing builds. But only for the App Store distribution.
I have the same issue as you @bunchito did you manage to solve this? I've tried mentioned solutions but had no luck
Thanks for sharing!
I am trying this but I think I am missing something from your article
https://medium.com/@m4rr/circleci-2-0-and-the-ios-code-signing-df434d0086e2
I created an environment variable and paste as its value what we generate
base64 -i Certificates.p12 | pbcopy
I don't know from where that Profile part is coming. Excuse my ignorance, I am a newbie.
Until here everything seems ok.
Then, I see this
I don't know what I am doing wrong. I would appreciate help! Thanks!