我正在使用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')
我尝试过的一些事情是:
ionic cordova build ios --buildFlag='-UseModernBuildSystem=0' $(buildEnvParam) --release
macOS-10.14
上的MacOS版本"cordova-ios": "^5.1.0"
上的iOS平台这是失败的完整归档步骤:
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)'
其他可能重要的版本:
ionic@5.4.16
cordova@9.0.0
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"
}
}
```
答案 0 :(得分:2)
因此,在经过一段时间的测试和重构我们的代码后,解决方案是多种因素的组合,我将尝试内聚地共享。
此问题的第一个解决方法是修改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版本。我们更改的一项内容是在仓库中添加一个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 cordova build ios $(buildEnvParam)
buildEnvParam为--release --device --buildConfig=build.json
在这段经历中,我们遇到了无数问题。我们将打开一扇门,然后砸向另一扇。对不起,没有一个直接的答案,但是老实说,我们没有直接的问题。我希望这份摘要能帮助将来克服障碍的人。
答案 1 :(得分:1)
您可以尝试在//You can make this code as function and call it where it is require
$current_user = wp_get_current_user();
if ( 0 == $current_user->ID ) return;
// GET USER ORDERS (COMPLETED + PROCESSING)
$customer_orders = get_posts( array(
'numberposts' => -1,
'meta_key' => '_customer_user',
'meta_value' => $current_user->ID,
'post_type' => wc_get_order_types(),
'post_status' => array_keys( wc_get_is_paid_statuses() ),
) );
// LOOP THROUGH ORDERS AND GET PRODUCT IDS
if ( ! $customer_orders ) return;
$product_ids = array();
foreach ( $customer_orders as $customer_order ) {
$order = wc_get_order( $customer_order->ID );
$items = $order->get_items();
foreach ( $items as $item ) {
$product_id = $item->get_product_id();
$product_ids[] = $product_id;
}
}
$product_ids = array_unique( $product_ids );
if (in_array("11344", $product_ids))
{
wp_redirect("https://siteurl.com/"); // Add redirect URL Here
exit;
}
参数中指定并检查结果吗?
如果您使用的是经典的可视化编辑器,则可以找到参数高级选项 任务。
选择CODE_SIGNING_ALLOWED=No
至**Export options**
加specify
对我有用:)