My Fastfile:
lane :build do |options|
match(
app_identifier: [
ENV['IOS_APP_ID'],
ENV['SIRI_BUNDLE_ID'],
ENV['PUSH_INTERCEPTOR_BUNDLE_ID'],
ENV['WIDGETS_BUNDLE_ID']
],
shallow_clone: true,
clone_branch_directly: true,
readonly: true
)
update_code_signing_settings(
use_automatic_signing: false,
path: xcodeproj,
targets: ios_target_names
)
gymOptions = ({
silent: true,
export_team_id: ENV['IOS_TEAM_ID'],
export_options: {
signingStyle: "manual",
provisioningProfiles: {
ENV['IOS_APP_ID'] => "match AdHoc #{ENV['IOS_APP_ID']}",
ENV['SIRI_BUNDLE_ID'] => "match AdHoc #{ENV['SIRI_BUNDLE_ID']}",
ENV['PUSH_INTERCEPTOR_BUNDLE_ID'] => "match AdHoc #{ENV['PUSH_INTERCEPTOR_BUNDLE_ID']}",
ENV['WIDGETS_BUNDLE_ID'] => "match AdHoc #{ENV['WIDGETS_BUNDLE_ID']}"
}
}
}).merge(
File.directory?("../#{xcworkspace}") ?
{workspace: xcworkspace} :
{project: xcodeproj}
)
gym(gymOptions)
从输出中,看起来一切都设置正确:
| Installed Provisioning Profile |
+---------------------+---------------------------------------------+---------------------------------------------+
| Parameter | Environment Variable | Value |
+---------------------+---------------------------------------------+---------------------------------------------+
| App Identifier | | com.company.app.SiriAction |
| Type | | adhoc |
| Platform | | ios |
| Profile UUID | sigh_com.company.app.SiriAction_ad | exxxxxx-1xxxx-4xxx-bxxx-7xxxxxxx |
| | hoc | |
| Profile Name | sigh_com.company.app.SiriAction_ad | match AdHoc |
| | hoc_profile-name | com.company.app.SiriAction |
| Profile Path | sigh_com.company.app.SiriAction_ad | /Users/myuser/Library/MobileDevice/Pro |
| | hoc_profile-path | visioning |
| | | Profiles/exxxxxx-1xxxx-4xxx-bxxx-7xxxxxxx |
| | | 6a8.mobileprovision |
| Development Team ID | sigh_com.company.app.SiriAction_ad | 38XXXXXXXX |
| | hoc_team-id | |
+---------------------+---------------------------------------------+---------------------------------------------+
// This repeats for each provisioning profile...
+---------------------------------------------------------------------+---------------------------------------------------------------+
| Summary for gym 2.206.2 |
+---------------------------------------------------------------------+---------------------------------------------------------------+
| silent | true |
| export_team_id | 38XXXXXXXX |
| export_options.signingStyle | manual |
| export_options.provisioningProfiles.com.company.app.staging | match AdHoc com.company.app.staging |
| export_options.provisioningProfiles.com.company.app.SiriAc | match AdHoc com.company.app.SiriAction |
| tion | |
| export_options.provisioningProfiles.com.company.app.PushIntercep | match AdHoc com.company.app.PushInterceptor |
| tor | |
| export_options.provisioningProfiles.com.company.app.Widgets | match AdHoc com.company.app.Widgets |
| workspace | ios/app.xcworkspace |
| export_method | ad-hoc |
| scheme | app |
| clean | false |
| output_directory | dist |
| output_name | app |
| skip_package_ipa | false |
| skip_package_pkg | false |
| build_path | /Users/myuser/Library/Developer/Xcode/Archives/2022-06-24 |
| result_bundle | false |
| buildlog_path | ~/Library/Logs/gym |
| destination | generic/platform=iOS |
| xcodebuild_formatter | xcpretty |
| skip_profile_detection | false |
| xcodebuild_command | xcodebuild |
| skip_package_dependencies_resolution | false |
| disable_package_automatic_updates | false |
| use_system_scm | false |
| xcode_path | /Applications/Xcode.app |
+---------------------------------------------------------------------+---------------------------------------------------------------+
但是我得到错误说它找不到证书:
[12:22:16]: ▸ ❌ error: "PushInterceptor" requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor. (in target 'PushInterceptor' from project 'app')
[12:22:16]: ▸ ❌ error: "SiriAction" requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor. (in target 'SiriAction' from project 'app')
[12:22:16]: ▸ ❌ error: "WidgetsExtension" requires a provisioning profile with the App Groups feature. Select a provisioning profile in the Signing & Capabilities editor. (in target 'WidgetsExtension' from project 'app')
[12:22:16]: ▸ ❌ error: "app" requires a provisioning profile with the Associated Domains, Siri, In-App Purchase, App Groups, Sign in with Apple, and Push Notifications features. Select a provisioning profile in the Signing & Capabilities editor. (in target 'app' from project 'app')
我已经检查了Apple开发者门户中每个证书的功能是否正确,并尝试了我能找到的类似问题的每种答案组合。
这个输出表明一切都是正确的,对吗?我能做些什么来进一步调试或纠正配置吗?
看起来好像我没有本地配置文件,或者我没有正确地指向它们。还有其他想法吗?
设置这些选项可能会有所帮助。Update_project_provisioning和Update_project_provisioning
install_provisioning_profile(
path: "profilename.mobileprovision"
)
update_project_provisioning(
xcodeproj: "Project.xcodeproj",
profile: "./watch_app_store.mobileprovision", # optional if you use sigh
target_filter: ".*WatchKit Extension.*", # matches name or type of a target
build_configuration: "Release",
code_signing_identity: "iPhone Development" # optionally specify the codesigning identity
)