Can't build on Ionic Hub - CODE_SIGN_IDENTITY

Hi

I’m trying to build my Ionic 5 application on Ionic Hub, but I’m getting errors:

[10:26:03]: $ set -o pipefail && xcodebuild -workspace /Users/ionic/builds/project-0/platforms/ios/Bonzo.xcworkspace -scheme Bonzo -destination 'generic/platform=iOS' -archivePath /Users/ionic/Library/Developer/Xcode/Archives/2019-08-21/350bb1c0-002e-45c4-93a6-f80c573f4c06-development\ 2019-08-21\ 10.26.03.xcarchive archive CODE_SIGN_IDENTITY=iPhone\ Developer:\ Jakub\ K\ PLC\ \(5M6HG295PD\) | tee /Users/ionic/Library/Logs/gym/Bonzo-Bonzo.log | xcpretty
[10:26:06]: ▸ ❌  error: No certificate matching 'iPhone Developer: Jakub K PLC (5M6HG295PD)' found: Select a different signing certificate for CODE_SIGN_IDENTITY, a team that matches your selected certificate, or switch to automatic provisioning. (in target 'Bonzo')
[10:26:06]: ▸ ❌  error: Provisioning profile "Bonzo Provisioning Profile" doesn't support the Push Notifications capability. (in target 'Bonzo')
[10:26:06]: ▸ ❌  error: Provisioning profile "Bonzo Provisioning Profile" doesn't include the aps-environment entitlement. (in target 'Bonzo')
[10:26:06]: ▸ The iOS deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.2.99. (in target 'FirebaseCore')
[10:26:06]: ▸ The iOS deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.2.99. (in target 'FirebaseInstanceID')
[10:26:06]: ▸ The iOS deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.2.99. (in target 'FirebaseAnalytics')
[10:26:06]: ▸ The iOS deployment target is set to 4.3, but the range of supported deployment target versions for this platform is 8.0 to 12.2.99. (in target 'nanopb')
[10:26:06]: ▸ The iOS deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.2.99. (in target 'Protobuf')
[10:26:06]: ▸ The iOS deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.2.99. (in target 'FirebaseMessaging')
[10:26:06]: ▸ ** ARCHIVE FAILED **

❌  error: No certificate matching 'iPhone Developer: Jakub K PLC (5M6HG295PD)' found: Select a different signing certificate for CODE_SIGN_IDENTITY, a team that matches your selected certificate, or switch to automatic provisioning. (in target 'Bonzo')



❌  error: Provisioning profile "Bonzo Provisioning Profile" doesn't support the Push Notifications capability. (in target 'Bonzo')



❌  error: Provisioning profile "Bonzo Provisioning Profile" doesn't include the aps-environment entitlement. (in target 'Bonzo')

[10:26:06]: ▸ Build system information
[10:26:06]: ▸ warning: The iOS deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.2.99. (in target 'Protobuf')
[10:26:06]: ▸ Build system information
[10:26:06]: ▸ warning: The iOS deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.2.99. (in target 'FirebaseMessaging')
[10:26:06]: 
[10:26:06]: ⬆️  Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error
[10:26:06]: 📋  For the complete and more detailed error log, check the full log at:
[10:26:06]: 📋  /Users/ionic/Library/Logs/gym/Bonzo-Bonzo.log
[10:26:06]: 
[10:26:06]: Your `export_method` in gym is defined as `development`
[10:26:06]: which might cause problems when signing your application
[10:26:06]: Are you sure want to build and export for development?
[10:26:06]: Please make sure to define the correct export methods when calling
[10:26:06]: gym in your Fastfile or from the command line
[10:26:06]: 
[10:26:06]: 
[10:26:06]: Looks like fastlane ran into a build/archive error with your project
[10:26:06]: It's hard to tell what's causing the error, so we wrote some guides on how
[10:26:06]: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
[10:26:06]: Before submitting an issue on GitHub, please follow the guide above and make
[10:26:06]: sure your project is set up correctly.
[10:26:06]: fastlane uses `xcodebuild` commands to generate your binary, you can see the
[10:26:06]: the full commands printed out in yellow in the above log.
[10:26:06]: Make sure to inspect the output above, as usually you'll find more error information there
[10:26:06]: 

My previous apps were building without any problems, so it may be a problem with new Ionic version. I have no idea how to fix it. Please help.

EDIT:

There was also an error:

[10:26:29]: Installing provisioning profile...
[10:26:29]: --------------------------------
[10:26:29]: --- Step: import_certificate ---
[10:26:29]: --------------------------------
[10:26:29]: security: SecKeychainItemImport: MAC verification failed during PKCS12 import (wrong password?)
[10:26:29]: ---------------------------
[10:26:29]: --- Step: build_pro_app ---
[10:26:29]: ---------------------------

May it be related?

I found that my provisioning profile in Apple Developer was invalid, I edited it and checked certificate checkbox, also regenerated certificate with password (previous had empty password).

Now errors disapeared. I’m not sure if app builds successfully because I need to deal with other errors, but I’m making progress :slight_smile:

1 Like