我的 Apple 证书最近过期了,因此我必须将其与配置文件一起刷新。我决定使用 Fastlane 和 Match(带有 GitHub 存储)。
我的 Fastfile 如下所示:
fastlane_version '2.216.0'
platform :ios do
desc 'Fetch certificates and provisioning profiles'
lane :certificates do
match(app_identifier: 'com.quietmobile', type: 'appstore', readonly: true)
end
desc 'Build the iOS application.'
lane :build do
certificates
gym
end
end
一切顺利,直到存档导出开始。 这是
gym
输出的尾部:
INFO [2023-09-22 11:50:55.22]: ▸ Archive Succeeded
DEBUG [2023-09-22 11:50:55.26]: Stored the archive in: /Users/apple/Library/Developer/Xcode/Archives/2023-09-22/Quiet 2023-09-22 11.42.18.xcarchive
WARN [2023-09-22 11:50:55.26]: Generated plist file with the following values:
INFO [2023-09-22 11:50:55.26]: ▸ -----------------------------------------
INFO [2023-09-22 11:50:55.26]: ▸ {
INFO [2023-09-22 11:50:55.26]: ▸ "provisioningProfiles": {
INFO [2023-09-22 11:50:55.26]: ▸ "com.quietmobile": "match AppStore com.quietmobile"
INFO [2023-09-22 11:50:55.26]: ▸ },
INFO [2023-09-22 11:50:55.26]: ▸ "method": "app-store",
INFO [2023-09-22 11:50:55.26]: ▸ "signingStyle": "manual"
INFO [2023-09-22 11:50:55.26]: ▸ }
INFO [2023-09-22 11:50:55.26]: ▸ -----------------------------------------
INFO [2023-09-22 11:50:55.26]: This results in the following plist file:
INFO [2023-09-22 11:50:55.26]: ▸ -----------------------------------------
INFO [2023-09-22 11:50:55.27]: ▸ <?xml version="1.0" encoding="UTF-8"?>
INFO [2023-09-22 11:50:55.27]: ▸ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
INFO [2023-09-22 11:50:55.27]: ▸ <plist version="1.0">
INFO [2023-09-22 11:50:55.27]: ▸ <dict>
INFO [2023-09-22 11:50:55.27]: ▸ <key>method</key>
INFO [2023-09-22 11:50:55.27]: ▸ <string>app-store</string>
INFO [2023-09-22 11:50:55.27]: ▸ <key>provisioningProfiles</key>
INFO [2023-09-22 11:50:55.27]: ▸ <dict>
INFO [2023-09-22 11:50:55.27]: ▸ <key>com.quietmobile</key>
INFO [2023-09-22 11:50:55.27]: ▸ <string>match AppStore com.quietmobile</string>
INFO [2023-09-22 11:50:55.27]: ▸ </dict>
INFO [2023-09-22 11:50:55.27]: ▸ <key>signingStyle</key>
INFO [2023-09-22 11:50:55.27]: ▸ <string>manual</string>
INFO [2023-09-22 11:50:55.27]: ▸ </dict>
INFO [2023-09-22 11:50:55.27]: ▸ </plist>
INFO [2023-09-22 11:50:55.27]: ▸ -----------------------------------------
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Generated Package Command |
+------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+
| Option | Value |
+------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+
| /usr/bin/xcrun | |
| /usr/local/Cellar/fastlane/2.216.0/libexec/gems/fastlane-2.216.0/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh | |
| -exportArchive | |
| -exportOptionsPlist | /var/folders/b6/dx33qf4s6s910wblq_5n2w2c0000gn/T/gym_config20230922-29144-scv0bk.plist |
| -archivePath /Users/apple/Library/Developer/Xcode/Archives/2023-09-22/Quiet\ 2023-09-22\ 11.42.18.xcarchive | |
| -exportPath | /var/folders/b6/dx33qf4s6s910wblq_5n2w2c0000gn/T/gym_output20230922-29144-aejs4j |
+------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------+
INFO [2023-09-22 11:50:55.27]: $ /usr/bin/xcrun /usr/local/Cellar/fastlane/2.216.0/libexec/gems/fastlane-2.216.0/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/b6/dx33qf4s6s910wblq_5n2w2c0000gn/T/gym_config20230922-29144-scv0bk.plist' -archivePath /Users/apple/Library/Developer/Xcode/Archives/2023-09-22/Quiet\ 2023-09-22\ 11.42.18.xcarchive -exportPath '/var/folders/b6/dx33qf4s6s910wblq_5n2w2c0000gn/T/gym_output20230922-29144-aejs4j'
INFO [2023-09-22 11:50:55.33]: ▸ rbenv detected, removing env variables
INFO [2023-09-22 11:50:55.36]: ▸ rbenv: shell integration not enabled. Run `rbenv init' for instructions.
INFO [2023-09-22 11:50:55.36]: ▸ + xcodebuild -exportArchive -exportOptionsPlist /var/folders/b6/dx33qf4s6s910wblq_5n2w2c0000gn/T/gym_config20230922-29144-scv0bk.plist -archivePath '/Users/apple/Library/Developer/Xcode/Archives/2023-09-22/Quiet 2023-09-22 11.42.18.xcarchive' -exportPath /var/folders/b6/dx33qf4s6s910wblq_5n2w2c0000gn/T/gym_output20230922-29144-aejs4j
INFO [2023-09-22 11:50:56.90]: ▸ 2023-09-22 11:50:56.904 xcodebuild[31196:263612] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/b6/dx33qf4s6s910wblq_5n2w2c0000gn/T/Quiet_2023-09-22_11-50-56.902.xcdistributionlogs".
我等了3个小时,但没有再等。 我尝试手动运行导出命令。结果是相同的,但如果前缀为
sudo
,则表示:
error: exportArchive: No "iOS App Store" profiles for team 'Zbay LLC' matching 'match AppStore com.quietmobile' are installed.
我的证书(通过匹配生成的证书)安装在我的钥匙串中。 Xcode 中的发布签名配置设置如下:
我认为 Fastlane 和 Match 都不是这里的重要因素,问题在于签名配置本身,但我还是提到了它,因为它是我目前的确切设置。
==========
快车道2.216.0
Xcode 14.3.1
macOS 文图拉 13.4.1