-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS build fails with: "Xcode couldn't find any iOS App Development provisioning profiles matching..." #49
Comments
This is a very common yet frustrating error. For some reason the provisioning profiles are not linked to the build on XCode and they fail during CI/CD. Give this , this and this a thorough read. Try to build locally once with XCode and remove and then re-apply the provisioning again in the settings. It's mostly a try and error kind of a problem. I remember, I had this error a few years back and I had to re-create profiles and re-apply everything from the start. The issue is basically with Apple here. Let me know if you solve it by closing this issue. |
Unfortunately, it doesn't work for me. I think there is a problem with the I have tested on |
Just chiming in that I've also tried those steps and have no success. I get the same error. My setup and environment is very similar. |
I see, I am so confused. It works for our deployments. I will re-open this issue, if anyone from the community can shed some light. I do not have a Mac so, I cannot test anything much. |
This is the pool named in my azure-pipelines.yml
Which one do you use? I will try anything at this point. |
I have tried with Maybe @hey24sheep can you share your |
I do not have access to the DevOps anymore (I am looking for better jobs) so I do not know the settings. I can confirm one thing, we use I can recommend one thing, Try local hosted agent? Check if that works, if anyone can. I can give you these details about the builds I setup in my org are as follows: (These worked before I was left from DevOps, few months back) export_option.plist looks like this <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>provisioningProfiles</key>
<dict>
<key>co.organization.app</key>
<string>Organization iOS Distribution</string>
</dict>
</dict>
</plist> 1 - add Flutter install 2 - pod repo update After that these steps follow To generate IOS steps:
- task: Hey24sheep.flutter.flutter-build.FlutterBuild@0
displayName: 'Flutter Build ios'
inputs:
target: ios
projectDirectory: project
buildFlavour: your_flavor
buildNumber: '$(Build.BuildNumber)'
buildName: '$(buildTimeStamp)'
entryPoint: 'lib/main_flavor.dart'
iosCodesign: false
extraArgs: '--no-tree-shake-icons' To install Apple Cert steps:
- task: InstallAppleCertificate@2
displayName: 'Install an Apple certificate'
inputs:
certSecureFile: 'xyz_distribution.p12'
certPwd: xyz
setUpPartitionIdACLForPrivateKey: false To install Apple Provisioning Profile steps:
- task: InstallAppleProvisioningProfile@1
displayName: 'Install an Apple provisioning profile'
inputs:
provProfileSecureFile: 'your_Distribution.mobileprovision' To bump bundle version /usr/libexec/Plistbuddy -c "Set CFBundleVersion $BUILD_BUILDNUMBER" Info.plist To generate Archive xcodebuild -workspace ios/Runner.xcworkspace -scheme Runner archive -sdk iphoneos -configuration Release-development -archivePath Runner CODE_SIGN_STYLE=Manual CODE_SIGN_IDENTITY="iPhone Distribution: XYZ(ABC)" PROVISIONING_PROFILE= XYZ-GUID-HERE
PROVISIONING_PROFILE_SPECIFIER="SPECIFIER HERE" To generate IPA xcodebuild -exportArchive -archivePath Runner.xcarchive -exportPath Runner -exportOptionsPlist ios/export_options.plist (if any) The only issues related to Provisioning Profiles got solved by deleting and recreating profiles and then re-linking them in XCode and uploading the same new profiles to Azure Devops. I know this build system is old but this is all I can give for IOS. I hope it can help you people. If your apps are building locally on XCode or Flutter on Mac. Then something is definitely wrong with Azure or how it is interacting with this extension. Looking at a higher look (if you read the code), this extension just wraps the 'Flutter CLI' in fancy UI for Azure. I wish I can help more but this is all I got right now. I have added 'HelpWanted', if someone from the community is kind enough to shed some light or solution. |
You can also have a look here. but, I know this isn't working for some of you. |
I'm facing the same issue, here are my pipeline steps:
|
Are these builds working on local or other CI/CD? I have shared my pipeline/workflow above, is any of that helpful? As I stated above, I have no access to the DevOps server or a Mac. I can only ask community to help here, sorry. |
Azure DevOps Pipelines CI/CD I'm trying some of this suggestions, I'll keep you informed |
The only way to solve this is using the xcode task too 1 - Install Apple Certificate My yaml:
|
@humanolaranja - Could you show us your ios/exportOptions.plist? Thank you |
|
Thank you @humanolaranja! What is configuration: ${{parameters.config}} ? |
@MiroLiebschner Hi, Miro. Could you fix it? |
|
Thank you @humanolaranja For anyone still interested, I have another solution that may be better suited for some - it's certainly simpler and more robust for me. The key issue appears to be that the compile stage of the xcode task is code signing with what is configured in the pbxproj (even though "iosCodeSign=false") and that signature is then overwritten by the signing that occurs during the IPA export step. It means that you have to be careful to make sure that your xcode project is set up to work both on your dev machine, and during the various flavours of your CI builds (adhoc, appstore, etc) - threading the needle if you will. So, all we need to do is disable the first codesign so that during CI, only the 'exportOptions.plist' file matters.
Note: The With this, I can have my "debug" xcode project use automatic signing to allow direct USB deployment and debugging on my device or simulator, but when built by CI, it will skip the code signing during compilation, and sign as per my It's also nice to know that I can mess about with my signing settings in the xcode project without having any effect on CI whatsoever. |
@humanolaranja This worked for me as well. Thanks a bunch for sharing. This is very much appreciated. |
I am assuming this issue is solved, I am closing this issue. Please, feel free to reopen in case it is not yet solved. |
The pipeline fails at the iOS build step. This is the error output:
Error (Xcode): No profiles for 'com.addiscaTraining' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.addiscaTraining'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.
My export options file:
and my pipeline was created with the help of this medium article.
This is my pipeline:
Any help is highly appreciated, trying to get this to work for 2 days now :D
The text was updated successfully, but these errors were encountered: