Reputation: 583
I'm building an Ionic application, using cordova, in Azure pipelines. Everything is working fine for my simple application, but when I try to run it on an application that has other cordova dependencies I'm getting the errors below during the Xcode archive step. I've added all my current troubleshooting steps and am quite stumped at this point.
❌ error: FirebaseCore does not support provisioning profiles. FirebaseCore does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'FirebaseCore' from project 'Pods')
❌ error: Pods-MyAppName TV does not support provisioning profiles. Pods-MyAppName TV does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'Pods-MyAppName TV' from project 'Pods')
❌ error: leveldb-library does not support provisioning profiles. leveldb-library does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'leveldb-library' from project 'Pods')
❌ error: GoogleUtilities does not support provisioning profiles. GoogleUtilities does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'GoogleUtilities' from project 'Pods')
❌ error: AppAuth does not support provisioning profiles. AppAuth does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'AppAuth' from project 'Pods')
❌ error: FirebaseInstanceID does not support provisioning profiles. FirebaseInstanceID does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'FirebaseInstanceID' from project 'Pods')
❌ error: BoringSSL-GRPC does not support provisioning profiles. BoringSSL-GRPC does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'BoringSSL-GRPC' from project 'Pods')
❌ error: FirebaseInstallations does not support provisioning profiles. FirebaseInstallations does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'FirebaseInstallations' from project 'Pods')
Some things I've tried are:
ionic cordova build ios --buildFlag='-UseModernBuildSystem=0' $(buildEnvParam) --release
macOS-10.14
"cordova-ios": "^5.1.0"
Here is the full archive step it is failing on:
task: Xcode@5
displayName: 'Xcode archive'
inputs:
actions: archive
xcWorkspacePath: 'platforms/ios/**/*.xcworkspace'
scheme: $(buildName)
packageApp: true
signingOption: manual
signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
Other Versions that may be important:
Cordova plugins:
"plugins": {
"cordova-plugin-network-information": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-background-fetch": {},
"cordova-plugin-camera": {},
"cordova-plugin-filechooser": {},
"cordova-plugin-filepath": {},
"cordova-plugin-screen-orientation": {},
"cordova-support-google-services": {},
"cordova-plugin-androidx-adapter": {},
"cordova-plugin-ionic-webview": {},
"sentry-cordova": {
"SENTRY_ANDROID_SDK_VERSION": "1+"
},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-headercolor": {},
"cordova-plugin-firebasex": {
"FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true",
"FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true",
"FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "true",
"ANDROID_ICON_ACCENT": "#FF00FFFF",
"ANDROID_PLAY_SERVICES_AUTH_VERSION": "17.0.0",
"ANDROID_FIREBASE_ANALYTICS_VERSION": "17.2.1",
"ANDROID_FIREBASE_MESSAGING_VERSION": "20.0.0",
"ANDROID_FIREBASE_CONFIG_VERSION": "19.0.3",
"ANDROID_FIREBASE_PERF_VERSION": "19.0.1",
"ANDROID_FIREBASE_AUTH_VERSION": "19.1.0",
"ANDROID_FIREBASE_FIRESTORE_VERSION": "21.4.0",
"ANDROID_CRASHLYTICS_VERSION": "2.10.1",
"ANDROID_CRASHLYTICS_NDK_VERSION": "2.1.1",
"ANDROID_GSON_VERSION": "2.8.6"
}
}
```
Upvotes: 3
Views: 2440
Reputation: 583
So after a while of testing and refactoring our code the solution was a combination of factors that I will try to share cohesively.
The first fix to this issue was to modify our Azure pipeline step to define plist export options. The default value of Automatic
just wouldn't work no matter what we tried. With this we needed to configure some other variables. Here is where we landed with this configuration:
- task: Xcode@5
displayName: 'Xcode archive'
inputs:
actions: archive
xcWorkspacePath: 'platforms/ios/**/*.xcworkspace'
archivePath: '$(buildName).xcarchive'
scheme: $(buildName)
packageApp: true
destinationTypeOption: devices
exportOptions: plist
exportOptionsPlist: '$(system.defaultworkingdirectory)/platforms/ios/exportOptions.plist'
exportPath: '$(system.defaultworkingdirectory)/platforms/ios/output/iphoneos/Release'
signingOption: manual
signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
args: '$(iosCompileArgs)'
Our iosCompileArgs is passing in CODE_SIGNING_ALLOWED=No
which was required as called out in the previous answers, but doesn't get you all the way.
Next we needed to modify our Ionic build a bit. One of the items we changed was adding a build.json file to the repo. We were having issues with the development team not being assigned properly.
Our build.json looks like this:
{
"ios": {
"debug": {
"codeSignIdentity": "iPhone Developer",
"developmentTeam": "XXXXXXXX",
"provisioningProfile": "XXXX-XXXX-XXXX-XXXX",
"packageType": "development",
"buildFlag": ["-allowProvisioningUpdates"]
},
"release": {
"codeSignIdentity": "iPhone Distribution",
"developmentTeam": "XXXXXXXX",
"provisioningProfile": "XXXX-XXXX-XXXX-XXXX",
"packageType": "app-store",
"buildFlag": ["-allowProvisioningUpdates"]
}
}
}
Finally we had a particular cranky package cordova-plugin-firebasex
that needed to be pinned to a specific version "cordova-plugin-firebasex": "9.1.1-cli"
.
The command we run to build the ionic platform in a step prior to archiving is:
ionic cordova build ios $(buildEnvParam)
With the buildEnvParam being --release --device --buildConfig=build.json
Throughout this experience we encountered countless issues. We would open one door and get smashed in the face with another. I'm sorry there isn't a straight forward answer, but honestly we didn't have a straight forward problem. I hope this summary will help someone get over a hurdle in the future.
Upvotes: 3
Reputation: 1403
can you try to specify in CODE_SIGNING_ALLOWED=No
arguments and check the result.
if u are using the classic visual editor u can find the arguments Advance options of the task.
choose **Export options**
to specify
add Team ID
it worked for me :)
Upvotes: 1