ios - Ionic Cordova iOS xxx 不支持预配配置文件 Azure Pipelines

标签 ios xcode cordova ionic-framework azure-pipelines

我正在 Azure 管道中使用 cordova 构建 Ionic 应用程序。对于我的简单应用程序来说,一切工作正常,但是当我尝试在具有其他 cordova 依赖项的应用程序上运行它时,我在 Xcode 存档步骤中收到以下错误。我已经添加了当前所有的故障排除步骤,但此时我感到很困惑。

❌  error: FirebaseCore does not support provisioning profiles. FirebaseCore does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'FirebaseCore' from project 'Pods')



❌  error: Pods-MyAppName TV does not support provisioning profiles. Pods-MyAppName TV does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'Pods-MyAppName TV' from project 'Pods')



❌  error: leveldb-library does not support provisioning profiles. leveldb-library does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'leveldb-library' from project 'Pods')



❌  error: GoogleUtilities does not support provisioning profiles. GoogleUtilities does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'GoogleUtilities' from project 'Pods')



❌  error: AppAuth does not support provisioning profiles. AppAuth does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'AppAuth' from project 'Pods')



❌  error: FirebaseInstanceID does not support provisioning profiles. FirebaseInstanceID does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'FirebaseInstanceID' from project 'Pods')



❌  error: BoringSSL-GRPC does not support provisioning profiles. BoringSSL-GRPC does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'BoringSSL-GRPC' from project 'Pods')



❌  error: FirebaseInstallations does not support provisioning profiles. FirebaseInstallations does not support provisioning profiles, but provisioning profile MyAppName Development has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'FirebaseInstallations' from project 'Pods')

我尝试过的一些事情是:

  • 降低 Xcode 版本(当前为 11.3.1
  • 添加“-UseModernBuildSystem=0”构建标志 ionic cordova build ios --buildFlag='-UseModernBuildSystem=0' $(buildEnvParam) --release
  • 更改当前的 MacOS 版本 macOS-10.14
  • 目前正在升级 iOS 平台 "cordova-ios": "^5.1.0"
  • 在平台添加后脚本中手动修改 PodFile(即使它说不这样做)以包含以下建议:https://github.com/Microsoft/azure-pipelines-tasks/issues/9984#issuecomment-483968562
  • 将代码签名设置为“自动”会通过此操作,但不会返回 teamId 错误

这是失败的完整存档步骤:

  task: Xcode@5
  displayName: 'Xcode archive'
  inputs:
    actions: archive
    xcWorkspacePath: 'platforms/ios/**/*.xcworkspace'
    scheme: $(buildName)
    packageApp: true
    signingOption: manual
    signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
    provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'

其他可能重要的版本:

  • <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="20494f4e494360150e140e1116" rel="noreferrer noopener nofollow">[email protected]</a>
  • <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e4878b96808b9285a4ddcad4cad4" rel="noreferrer noopener nofollow">[email protected]</a>

Cordova 插件:

"plugins": {
            "cordova-plugin-network-information": {},
            "cordova-plugin-whitelist": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-device": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-ionic-keyboard": {},
            "cordova-plugin-background-fetch": {},
            "cordova-plugin-camera": {},
            "cordova-plugin-filechooser": {},
            "cordova-plugin-filepath": {},
            "cordova-plugin-screen-orientation": {},
            "cordova-support-google-services": {},
            "cordova-plugin-androidx-adapter": {},
            "cordova-plugin-ionic-webview": {},
            "sentry-cordova": {
                "SENTRY_ANDROID_SDK_VERSION": "1+"
            },
            "cordova-plugin-inappbrowser": {},
            "cordova-plugin-headercolor": {},
            "cordova-plugin-firebasex": {
                "FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true",
                "FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true",
                "FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "true",
                "ANDROID_ICON_ACCENT": "#FF00FFFF",
                "ANDROID_PLAY_SERVICES_AUTH_VERSION": "17.0.0",
                "ANDROID_FIREBASE_ANALYTICS_VERSION": "17.2.1",
                "ANDROID_FIREBASE_MESSAGING_VERSION": "20.0.0",
                "ANDROID_FIREBASE_CONFIG_VERSION": "19.0.3",
                "ANDROID_FIREBASE_PERF_VERSION": "19.0.1",
                "ANDROID_FIREBASE_AUTH_VERSION": "19.1.0",
                "ANDROID_FIREBASE_FIRESTORE_VERSION": "21.4.0",
                "ANDROID_CRASHLYTICS_VERSION": "2.10.1",
                "ANDROID_CRASHLYTICS_NDK_VERSION": "2.1.1",
                "ANDROID_GSON_VERSION": "2.8.6"
            }
        }
    ```

最佳答案

因此,经过一段时间的测试和重构我们的代码后,解决方案是我将尝试连贯地分享的因素的组合。

Azure 管道

此问题的第一个修复是修改我们的 Azure 管道步骤以定义 plist 导出选项。无论我们如何尝试,Automatic 的默认值都不起作用。这样我们就需要配置一些其他变量。这是我们使用此配置的地方:

- task: Xcode@5
  displayName: 'Xcode archive'
  inputs:
    actions: archive
    xcWorkspacePath: 'platforms/ios/**/*.xcworkspace'
    archivePath: '$(buildName).xcarchive'
    scheme: $(buildName)
    packageApp: true
    destinationTypeOption: devices
    exportOptions: plist
    exportOptionsPlist: '$(system.defaultworkingdirectory)/platforms/ios/exportOptions.plist'    
    exportPath: '$(system.defaultworkingdirectory)/platforms/ios/output/iphoneos/Release'
    signingOption: manual
    signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
    provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
    args: '$(iosCompileArgs)'

我们的 iosCompileArgs 正在传入 CODE_SIGNING_ALLOWED=No ,这是前面答案中所要求的,但并不能完全解决您的问题。

ionic

接下来我们需要稍微修改我们的 Ionic 构建。我们更改的项目之一是将 build.json 文件添加到存储库中。我们遇到了开发团队分配不正确的问题。

我们的 build.json 看起来像这样:

{
    "ios": {
        "debug": {
            "codeSignIdentity": "iPhone Developer",
            "developmentTeam": "XXXXXXXX",
            "provisioningProfile": "XXXX-XXXX-XXXX-XXXX",
            "packageType": "development",
            "buildFlag": ["-allowProvisioningUpdates"]
        },
        "release": {
            "codeSignIdentity": "iPhone Distribution",
            "developmentTeam": "XXXXXXXX",
            "provisioningProfile": "XXXX-XXXX-XXXX-XXXX",
            "packageType": "app-store",
            "buildFlag": ["-allowProvisioningUpdates"]
        }
    }
}

最后我们得到了 particular cranky package cordova-plugin-firebasex 需要固定到特定版本 "cordova-plugin-firebasex": "9.1.1-cli"

我们在归档之前的步骤中运行构建 ionic 平台的命令是:

ionic cordova build ios $(buildEnvParam)

buildEnvParam 为 --release --device --buildConfig=build.json

结论

在这段经历中,我们遇到了无数的问题。我们打开一扇门,却被另一扇门砸在脸上。很抱歉没有直接的答案,但老实说我们没有遇到直接的问题。我希望这篇总结能够帮助人们克服 future 的障碍。

关于ios - Ionic Cordova iOS xxx 不支持预配配置文件 Azure Pipelines,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62677014/

相关文章:

ios - 在运行时设置位置模拟器 City/GPX

swift - 在 Vapor 中的哪里创建自己的文件?

cordova - 如何在 ionic 2 中使图标和按钮变大

javascript - 视频方向javascript

animation - 如何停止 Zepto 动画?

ios - 不使用任何 Apple API 加载 GLSL 着色器

ios - 使用 Reactive Cocoa RACSignal 启用 UIButton

ios - 移动谷歌地图但不像优步那样移动标记

ios - UISearchBar 按钮

iPhone 应用程序代码签名