Cordova:Android和iOS平台可能有不同的应用ID吗? [英] Cordova: Is it possible to have different app IDs for android and ios platforms?

查看:155
本文介绍了Cordova:Android和iOS平台可能有不同的应用ID吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个Cordova应用程序,其ID为com.StackOverflowExample.MyQuestion,它是使用CLI( cordova create )与Cordova 3创建的。我为我的应用添加了iOS和Android平台,并已将应用提交给Apple和Google Play。然而,现在,在将我的应用提交给Play后,我似乎错过了我用于签署APK文件的密钥库的密码。我已经尝试了一切,并且我无法恢复它。



因为Google Play不允许我在相同的应用程序ID下签署随后提交给Play的APK作为一个先前的APK由不同的密钥库签名,我知道我需要创建一个新的应用程序ID并从Android重新开始。我意识到这将需要我的用户下载一个新的应用程序,但我现在没有其他选择。



我想避免的是,有这个问题溢出转换到Apple,我已经创建了我的所有证书,配置文件,密钥,签名请求等,并上传了IPA,其捆绑标识与我提交给Google Play的第一个APK的应用ID相同。 p>

默认情况下,当使用CLI时,Cordova会使用您提供的单个应用ID添加您指定的任何平台,当您运行 cordova create



我想知道的是:运行 cordova平台添加自定义应用程序ID下添加新平台,并因此让不同的平台在同一个Cordova应用程序中拥有不同的应用程序ID?

解决方案

现在已经内置到CLI中(最终):

r config.xml文件 -



示例:

 < widget 
android-packageName =com.example.android
ios-CFBundleIdentifier =com.example.ios>

来源:

https://github.com/apache/cordova-lib/blob/master/ cordova-common / src / ConfigParser / ConfigParser.js#L99


Let's say I have a Cordova application with an id of com.StackOverflowExample.MyQuestion, which I created with Cordova 3 using the CLI (cordova create). I have added iOS and Android platforms for my app, and have submitted the app to Apple and to Google Play. Now, however, after submitting my app to Play, I seem to have misplaced my password for the keystore I used to sign my APK file. I have tried everything, and there is no way I will recover it.

Because Google Play does not allow me to sign a subsequent APK submitted to Play under the same app ID as a prior APK signed by a different keystore, I know I need to create a new app ID and start over in Android. I realize this will require my users to download a new application, but I have no other choice at this point.

What I would like to avoid, is having this problem spill over into Apple, where I have already created all of my certificates, provisioning profiles, keys, signing requests, etc. and uploaded an IPA with a bundle identifier the same as the app ID of the first APK I submitted to Google Play.

By default, when using the CLI, Cordova adds whatever platforms you specify using a single app ID, which you supply when you run cordova create.

What I'd like to know is: Is it possible, when running cordova platform add to add a new platform under a custom app ID, and, as a result, to have different platforms have different app IDs within the same Cordova application?

解决方案

This is now built into CLI (finally):

In you your config.xml file-

Example:

<widget
    android-packageName="com.example.android"
    ios-CFBundleIdentifier="com.example.ios">

Source:

https://github.com/apache/cordova-lib/blob/master/cordova-common/src/ConfigParser/ConfigParser.js#L99

这篇关于Cordova:Android和iOS平台可能有不同的应用ID吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆