0

tiapp.xml 文件包含生产和开发环境的密钥。

我想我可以复制/粘贴并在那里切换,但这是测试生产环境的更简单方法吗?像 xml 文件中的某些标签,例如“production=true”之类的?

4

1 回答 1

0

tiapp.xml应该看起来像:

<property name="appc-app-id" type="string">123</property>
<property name="acs-authbase-url-development" type="string">https://secure-identity.cloud.appcelerator.com</property>
<property name="acs-base-url-development" type="string">https://api.cloud.appcelerator.com</property>
<property name="acs-oauth-secret-development" type="string">123</property>
<property name="acs-oauth-key-development" type="string">123</property>
<property name="acs-api-key-development" type="string">123</property>
<property name="acs-username-development" type="string">appc_app_user_dev</property>
<property name="acs-password-development" type="string">123</property>
<property name="acs-authbase-url-production" type="string">https://secure-identity.cloud.appcelerator.com</property>
<property name="acs-base-url-production" type="string">https://api.cloud.appcelerator.com</property>
<property name="acs-oauth-secret-production" type="string">123</property>
<property name="acs-oauth-key-production" type="string">123</property>
<property name="acs-api-key-production" type="string">123</property>
<property name="acs-username-production" type="string">appc_app_user</property>
<property name="acs-password-production" type="string">123</property>
<property name="appc-org-id" type="string">123</property>
<property name="appc-creator-user-id" type="string">123</property>

如您所见,-development-production后缀确定了它的值将用于的环境。您也可以省略后缀以在所有环境中使用它。

于 2016-05-30T18:38:32.140 回答