yukiarrr / ios-build-action

Build iOS project (.xcodeproj, .xcworkspace), and export ipa
MIT License
279 stars 135 forks source link

The provisioning profile does not include the signing cert but in the xcode it is included #122

Closed LayMui closed 4 months ago

LayMui commented 4 months ago

::error file=/Users/runner/work/sh-usermanagement-native-app/sh-usermanagement-native-app/ios/nativeIntegration.xcodeproj::Provisioning profile "usermanagementapp" doesn't include signing certificate "iPhone Distribution: xxxxx (Txxxxxx)". (in target 'nativeIntegration' from project 'nativeIntegration')

full log

Run yukiarrr/ios-build-action@v1.11.2 /bin/bash /Users/runner/work/_actions/yukiarrr/ios-build-action/v1.11.2/dist/../build.sh ==> Downloading https://ghcr.io/v2/homebrew/core/fastlane/manifests/2.220.0 ==> Fetching dependencies for fastlane: ruby and terminal-notifier ==> Downloading https://ghcr.io/v2/homebrew/core/ruby/manifests/3.3.0 ==> Fetching ruby ==> Downloading https://ghcr.io/v2/homebrew/core/ruby/blobs/sha256:f1df6988bf95afc9fd2f0f3c81f5ebbc44c329e0256e0cb9e6d1ff0afa87042c ==> Downloading https://ghcr.io/v2/homebrew/core/terminal-notifier/manifests/2.0.0 ==> Fetching terminal-notifier ==> Downloading https://ghcr.io/v2/homebrew/core/terminal-notifier/blobs/sha256:9814bfe9969788afd44c03f4469cf732ab61931a645da58a00b33f95126a381c ==> Fetching fastlane ==> Downloading https://ghcr.io/v2/homebrew/core/fastlane/blobs/sha256:e3be53e4fd58f2708b592714adcb0c984069f183dea610abe420cf1060ad49f7 ==> Installing dependencies for fastlane: ruby and terminal-notifier ==> Installing fastlane dependency: ruby ==> Downloading https://ghcr.io/v2/homebrew/core/ruby/manifests/3.3.0 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/ad5286c3745392cf1071b19f938bf3343140a0cf750450ac22a1d613c23f4539--ruby-3.3.0.bottle_manifest.json ==> Pouring ruby--3.3.0.arm64_sonoma.bottle.tar.gz 🍺 /opt/homebrew/Cellar/ruby/3.3.0: 19,656 files, 51.4MB ==> Installing fastlane dependency: terminal-notifier ==> Downloading https://ghcr.io/v2/homebrew/core/terminal-notifier/manifests/2.0.0 Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/c53a2cdc1a8fa72534a1c00445c5d0ddbf51a3afc7bb26f8ac0e2a85e3b17d66--terminal-notifier-2.0.0.bottle_manifest.json ==> Pouring terminal-notifier--2.0.0.arm64_sonoma.bottle.tar.gz 🍺 /opt/homebrew/Cellar/terminal-notifier/2.0.0: 13 files, 503.2KB ==> Installing fastlane ==> Pouring fastlane--2.220.0.arm64_sonoma.bottle.tar.gz Warning: Cask fastlane was renamed to homebrew/core/fastlane. 🍺 /opt/homebrew/Cellar/fastlane/2.220.0: 3,895 files, 43.5MB 05:28:34: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile 05:28:34: Sending anonymous analytics information 05:28:34: Learn more at https://docs.fastlane.tools/#metrics 05:28:34: No personal or sensitive data is sent. 05:28:34: You can disable this by adding opt_out_usage at the top of your Fastfile

05:28:34: --- Step: default_platform ---

05:28:34: Driving the lane 'ios export_ipa' 🚀 05:28:34: creating ../ios-build-1.mobileprovision

05:28:34: --- Step: create_keychain ---

05:28:34: $ security list-keychains -d user

05:28:34: Found keychain '/Users/runner/Library/Keychains/ios-build.keychain-db' in list-keychains, adding to search list skipped

05:28:34: --- Step: import_certificate ---

05:28:34: $ security import ios-build.p12 -k '/Users/runner/Library/Keychains/ios-build.keychain-db' -P **** -T /usr/bin/codesign -T /usr/bin/security -T /usr/bin/productbuild -T /usr/bin/productsign 05:28:34: ▸ 1 identity imported. 05:28:34: Setting key partition list... (this can take a minute if there are a lot of keys installed) 05:28:34: $ security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k **** /Users/runner/Library/Keychains/ios-build.keychain-db 1> /dev/null

05:28:35: --- Step: install_provisioning_profile ---

05:28:35: Installing provisioning profile...

05:28:35: --- Step: update_code_signing_settings ---

+---------------------------------------------------------+ | Summary for code signing settings | +-----------------------+---------------------------------+ | use_automatic_signing | false | | path | ios/nativeIntegration.xcodeproj | | code_sign_identity | iPhone Distribution | +-----------------------+---------------------------------+

05:28:35: Updating the Automatic Codesigning flag to disabled for the given project '/Users/runner/work/sh-usermanagement-native-app/sh-usermanagement-native-app/ios/nativeIntegration.xcodeproj/project.pbxproj' 05:28:35: Set Code Sign identity to: iPhone Distribution for target: nativeIntegration for build configuration: Debug 05:28:35: Set Code Sign identity to: iPhone Distribution for target: nativeIntegration for build configuration: Release 05:28:35: Set Code Sign identity to: iPhone Distribution for target: nativeIntegrationTests for build configuration: Debug 05:28:35: Set Code Sign identity to: iPhone Distribution for target: nativeIntegrationTests for build configuration: Release 05:28:35: Successfully updated project settings to use Code Sign Style = 'Manual' 05:28:35: Modified Targets: 05:28:35: nativeIntegration 05:28:35: nativeIntegrationTests 05:28:35: Modified Build Configurations: 05:28:35: Debug 05:28:35: Release 05:28:35: Debug 05:28:35: Release

05:28:35: --- Step: update_project_provisioning ---

05:28:35: You’re updating provisioning profiles directly in your project, but have you considered easier ways to do code signing?

05:28:35: Downloading root certificate from (https://www.apple.com/appleca/AppleIncRootCertificate.cer) to path '/tmp/AppleIncRootCertificate.cer' 05:28:35: Parsing mobile provisioning profile from 'ios-build-1.mobileprovision' 05:28:35: Going to update project 'ios/nativeIntegration.xcodeproj' with UUID 05:28:35: Updating target nativeIntegration... 05:28:35: Updating configuration Debug... 05:28:35: Updating configuration Release... 05:28:35: Updating target nativeIntegrationTests... 05:28:35: Updating configuration Debug... 05:28:35: Updating configuration Release... 05:28:35: Successfully updated project settings in 'ios/nativeIntegration.xcodeproj'

05:28:35: --- Step: update_project_team ---

05:28:35: Updating development team (TQ4CEX59HD) for target nativeIntegration in the project 'ios/nativeIntegration.xcodeproj' 05:28:35: Successfully updated project settings to use Developer Team ID 'TQ4CEX59HD' for target nativeIntegration 05:28:35: Updating development team (TQ4CEX59HD) for target nativeIntegrationTests in the project 'ios/nativeIntegration.xcodeproj' 05:28:35: Successfully updated project settings to use Developer Team ID 'TQ4CEX59HD' for target nativeIntegrationTests

05:28:35: --- Step: increment_build_number ---

Current version of project nativeIntegration is: 1

/Users/runner/work/sh-usermanagement-native-app/sh-usermanagement-native-app 05:28:36: $ cd /Users/runner/work/sh-usermanagement-native-app/sh-usermanagement-native-app/ios && agvtool next-version -all && cd - 05:28:36: ▸ Setting version of project nativeIntegration to: 05:28:36: ▸ 2. 05:28:36: ▸ Also setting CFBundleVersion key (assuming it exists) 05:28:36: ▸ Updating CFBundleVersion in Info.plist(s)... 05:28:36: ▸ Updated CFBundleVersion in "nativeIntegration.xcodeproj/../nativeIntegration/Info.plist" to 2 05:28:36: ▸ Updated CFBundleVersion in "nativeIntegration.xcodeproj/../nativeIntegrationTests/Info.plist" to 2 05:28:36: ▸ /Users/runner/work/sh-usermanagement-native-app/sh-usermanagement-native-app

05:28:36: --- Step: build_app ---

05:28:36: Resolving Swift Package Manager dependencies... 05:28:36: $ xcodebuild -resolvePackageDependencies -workspace ios/nativeIntegration.xcworkspace -scheme nativeIntegration -configuration Release 05:28:36: ▸ Command line invocation: 05:28:36: ▸ /Applications/Xcode_15.2.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace ios/nativeIntegration.xcworkspace -scheme nativeIntegration -configuration Release 05:28:36: ▸ User defaults from command line: 05:28:36: �� IDEPackageSupportUseBuiltinSCM = YES [05:28:39]: ▸ resolved source packages: [05:28:39]: $ xcodebuild -showBuildSettings -workspace ios/nativeIntegration.xcworkspace -scheme nativeIntegration -configuration Release 2>&1 [05:28:41]: Detected provisioning profile mapping: {:"com.yara.usermanagement.testapp"=>"usermanagementapp"}

+---------------------------------------------------------------------------------------------------------------------------------+ | Summary for gym 2.220.0 | +---------------------------------------------------------------------+-----------------------------------------------------------+ | workspace | ios/nativeIntegration.xcworkspace | | configuration | Release | | scheme | nativeIntegration | | output_directory | ios | | output_name | nativeIntegration | | clean | true | | export_method | ad-hoc | | export_options.provisioningProfiles.com.yara.usermanagement.testapp | usermanagementapp | | skip_profile_detection | false | | destination | generic/platform=iOS | | build_path | /Users/runner/Library/Developer/Xcode/Archives/2024-04-22 | | silent | false | | skip_package_ipa | false | | skip_package_pkg | false | | result_bundle | false | | buildlog_path | ~/Library/Logs/gym | | xcodebuild_formatter | xcbeautify | | build_timing_summary | false | | xcodebuild_command | xcodebuild | | skip_package_dependencies_resolution | false | | disable_package_automatic_updates | false | | use_system_scm | false | | xcode_path | /Applications/Xcode_15.2.app | +---------------------------------------------------------------------+-----------------------------------------------------------+

[05:28:41]: $ set -o pipefail && xcodebuild -workspace ios/nativeIntegration.xcworkspace -scheme nativeIntegration -configuration Release -destination 'generic/platform=iOS' -archivePath /Users/runner/Library/Developer/Xcode/Archives/2024-04-22/nativeIntegration\ 2024-04-22\ 05.28.41.xcarchive clean archive | tee /Users/runner/Library/Logs/gym/nativeIntegration-nativeIntegration.log | xcbeautify [05:28:44]: ▸ Clean Succeeded

05:28:51]: ▸ ::error file=/Users/runner/work/sh-usermanagement-native-app/sh-usermanagement-native-app/ios/nativeIntegration.xcodeproj::Provisioning profile "usermanagementapp" doesn't include signing certificate "iPhone Distribution: xxx (Txxxx)”. (in target 'nativeIntegration' from project 'nativeIntegration')