ITSAppUsesNonExemptEncryption Cordova Build

2020-03-08 12:20发布

Acknowledging a similar question in the link below does anyone know how to add the information to the config.xml file in Cordova?

ITSAppUsesNonExemptEncryption export compliance while internal testing?

I need to have a true value in the plist:

ITSAppUsesNonExemptEncryption ITSEncryptionExportComplianceCode [ Key Value ]

Does anyone know the correct syntax to add this information?

9条回答
甜甜的少女心
2楼-- · 2020-03-08 12:26

The correct answer is actually:

<config-file platform="ios" target="*-Info.plist" parent="ITSAppUsesNonExemptEncryption">
    <false/>
</config-file>

Taken from Add hint that this won't work in phonegap build

查看更多
狗以群分
3楼-- · 2020-03-08 12:27

November 2019, next is working for me:

<platform name="ios">
...
    <config-file parent="ITSAppUsesNonExemptEncryption" target="*-Info.plist">
        <false />
    </config-file>

NOTE: DON'T FORGET TO REMOVE platforms/ios folder and build again with ionic cordova prepare ios. Without that plist file may stay unchanged.

查看更多
在下西门庆
4楼-- · 2020-03-08 12:31

I have create a simple empty plugin to set this ITSAppUsesNonExemptEncryption to false.

Simply add the following to your config.xml

<plugin name="cordova-ios-plugin-no-export-compliance" spec="0.0.5" />

or run

cordova plugin add cordova-ios-plugin-no-export-compliance

If you need to set it to true you can fork the plugin and change the plugin.xml file accordingly then add the plugin from the forked repository.

See the plugin on NPM for more info.

查看更多
闹够了就滚
5楼-- · 2020-03-08 12:37

As of 2/7/2019, the correct way to do this is to add this snippet to your <platform name="ios"> section:

<edit-config file="*-Info.plist" mode="add" target="ITSAppUsesNonExemptEncryption">
    <false/>
</edit-config>
查看更多
Juvenile、少年°
6楼-- · 2020-03-08 12:38

I can across this issue using ionic.

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 0.0.48
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: macOS Sierra
Node Version: v7.1.0
Xcode version: Xcode 8.2.1 Build version 8C1002

After more research than expected I learned that plugins have the ability to update the config. To that end I just added the plugin "cordova-plugin-ios-non-exempt-encryption" to my package.json, rebuilt and it works!

查看更多
forever°为你锁心
7楼-- · 2020-03-08 12:41

If you want to append that config in the *-Info.plist file, you need to use config-file in this way:

<platform name="ios">
    <config-file parent="ITSAppUsesNonExemptEncryption" target="*-Info.plist">
        <false />
    </config-file>
    ....
</platform>

The edit-config is to modify an existing config, and that config doesn't exist by default.

查看更多
登录 后发表回答