I am working on adding a Notification Service Extension to the app I'm working on, and I am having trouble reconfiguring my Fastlane setup to work with the extension.
I don't know how to properly configure my certificates to allow for the new extension.
The error message is as follows:
error: No profile for team 'TEAMID' matching 'App Provisioning Profile' found: Xcode couldn't find any provisioning profiles matching 'TEAMID/App Provisioning Profile'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor. (in target 'NotificationModifier' from project 'Yeshivat Torat Shraga')
Here is the Fastlane Summary:
+------+-----------------------------------------------------+-------------+
| fastlane summary |
+------+-----------------------------------------------------+-------------+
| Step | Action | Time (in s) |
+------+-----------------------------------------------------+-------------+
| 1 | default_platform | 0 |
| 2 | Switch to ios load_asc_api_key lane | 0 |
| 3 | app_store_connect_api_key | 0 |
| 4 | Switch to ios prepare_signing lane | 0 |
| 5 | create_keychain | 0 |
| 6 | match | 2 |
| 7 | Switch to ios fetch_and_increment_build_number lane | 0 |
| 8 | get_version_number | 0 |
| 9 | latest_testflight_build_number | 2 |
| 10 | increment_build_number | 5 |
| 11 | Switch to ios build_release lane <== Crashing lane | 0 |
| 12 | update_code_signing_settings | 0 |
| 💥 | gym | 262 |
+------+-----------------------------------------------------+-------------+
And here is my build_release
lane:
desc "Build the iOS app for release"
lane :build_release do |options|
app_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
app_profile_name = "match AppStore " + app_identifier
profile_name = "App Provisioning Profile" # the name of the profile to use for the build
output_name = "YTS" # specify the name of the .ipa file to generate
export_method = "app-store" # specify the export method
compile_bitcode = true # specify whether to enable bitcode
# turn off automatic signing during build so correct code signing identity is guaranteed to be used
update_code_signing_settings(
use_automatic_signing: false,
targets: ["Yeshivat Torat Shraga", "NotificationModifier"], # specify which targets to update code signing settings for
code_sign_identity: "Apple Distribution", # replace with name of code signing identity if different
# bundle_identifier: app_identifier,
profile_name: profile_name,
build_configurations: ["Release"] # only toggle code signing settings for Release configurations
)
settings_to_override = {
:BUNDLE_IDENTIFIER => "com.appdevname.YTS",
:PROVISIONING_PROFILE_SPECIFIER => app_profile_name,
# Use BUILDCACHE override compiler paths to ensure that the correct compiler paths are used.
:CC => "clang",
:CPLUSPLUS => "clang++",
:LD => "clang",
:LDPLUSPLUS => "clang++",
}
# build the app
gym(
scheme: "Yeshivat Torat Shraga", # replace with name of your project's scheme
output_name: output_name,
configuration: "Release",
xcargs: settings_to_override,
export_options: {
method: export_method,
# provisioningProfiles: {
# app_identifier => app_profile_name
# },
compileBitcode: compile_bitcode
}
)
end
I think the root of the issue is that the certs that fastlane is using don't include the Notification Service Extension that I added, but I have no clue where to start fixing that.
I resolved this issue by removing any references to names of certificates and profiles, and let Fastlane handle the certs by itself. I am still having some issues with entitlements, and I will update this answer if I make progress on this.
Here is a link to the GitHub issue I opened regarding the remaining issue I am facing with certificates.