mikaoelitiana / cordova-ios-plugin-no-export-compliance Goto Github PK
View Code? Open in Web Editor NEWSet ITSAppUsesNonExemptEncryption to false for Cordova based iOS apps
Set ITSAppUsesNonExemptEncryption to false for Cordova based iOS apps
Hello, thanks for this great plugin. I am receiving an error during "ionic platform add ios" which essentially calls cordova's platform add:
notarget Valid install targets:
npm ERR! notarget 0.0.1-security
npm ERR! notarget
Any idea what is causing this?
Thanks a lot for the great plugin, but why is there a second *-Info.plist key which sets a "Required background mode" to remote-notification
as explained here?
In my opinion this doesn't belong to this plugin and is nowhere explained. So either the plugin name is misleading or this shouldn't be included.
This plugin installs improperly due to the name inconsistencies between NPM, Github (this repo), package.json
and config.xml
.
Example: install actual plugin, then try running npm
and cordova build
commands.
$ ionic cordova plugin add cordova-ios-plugin-no-export-compliance
# Cordova installs plugin for platforms, saves to package.json and config.xml
$ cat package.json | grep export
"cordova-ios-plugin-no-export-compliance": "0.0.2",
"cordova-plugin-ios-no-export-compliance": {}
$ cat config.xml | grep export
<plugin name="cordova-plugin-ios-no-export-compliance" spec="~0.0.2" />
$ cordova plugins | grep export
cordova-plugin-ios-no-export-compliance 0.0.2 "iOS No Export Compliance"
The last lines from package.json
and config.xml
are the problem - this is not the same plugin any more. Now when we try npm install
or build steps we get failures because NPM will attempt to install cordova-plugin-ios-no-export-compliance (which doesn't exist):
$ npm install
pm ERR! code ETARGET
npm ERR! notarget No matching version found for cordova-plugin-ios-no-export-compliance@~0.0.2
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'my-app'
npm ERR! notarget
$ npm ls | grep export
├── [email protected]
├── UNMET DEPENDENCY cordova-plugin-ios-no-export-compliance@~0.0.2
npm ERR! missing: cordova-plugin-ios-no-export-compliance@~0.0.2, required by [email protected]
npm ERR! peer dep missing: ajv@>=5.0.0, required by [email protected]
npm ERR! extraneous: [email protected] /Users/emcniece/Code/ionic/my-app/node_modules/cordova-ios/node_modules/node-uuid
npm ERR! extraneous: [email protected] /Users/emcniece/Code/ionic/my-app/node_modules/cordova-ios/node_modules/pegjs
npm ERR! extraneous: [email protected] /Users/emcniece/Code/ionic/my-app/node_modules/cordova-ios/node_modules/simple-plist
npm ERR! peer dep missing: ajv@>=5.0.0, required by [email protected]
$ cat package.json | grep export
"cordova-ios-plugin-no-export-compliance": "0.0.2",
"cordova-plugin-ios-no-export-compliance": "~0.0.2"
"cordova-plugin-ios-no-export-compliance": {}
So we see that cordova-ios-plugin-no-export-compliance
is the desired plugin, and cordova-plugin-ios-no-export-compliance
is not good.
I think that this repo needs to be renamed, and the plugin name across all files and NPM should be unified.
My environment:
$ ionic info
@ionic/cli-plugin-cordova : 1.6.2
@ionic/cli-plugin-ionic-angular : 1.4.1
@ionic/cli-utils : 1.7.0
ionic (Ionic CLI) : 3.7.0
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 2.0.2
Cordova Platforms : android 6.2.3 browser 4.1.0 ios 4.4.0
Ionic Framework : ionic-angular 3.5.2
System:
Android SDK Tools : 25.2.5
Node : v8.0.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : 1.9.1
npm : 5.3.0
Error: Failed to fetch plugin git+https://github.com/mikaoelitiana/cordova-plugin-ios-no-export-compliance.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module
It could be worth noting in the README that this plugin fails to work in phonegap build.
Apart from that, are you sure that setting CFBundleURLTypes
as the parent node really works?
I tried setting this using the method outlined in phonegap/build#512 and http://stackoverflow.com/questions/35966608/adding-custom-parameter-phonegap-build/36496628.
Trying this with a real app against itunes connect showed, however, that only setting the flag directly in the root (and not as a child entry of CFBundleURLTypes
) had the desired effect.
I am pretty sure that your plugin needs to use
<config-file platform="ios" target="*-Info.plist" parent="ITSAppUsesNonExemptEncryption">
<false/>
</config-file>
instead of
<platform name="ios">
<config-file target="*-Info.plist" parent="CFBundleURLTypes">
<array>
<dict>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
</dict>
</array>
</config-file>
</platform>
Note that I found out that omitting the explicit platform="ios"
in the config-file
tag fails at least for phonegap build: http://stackoverflow.com/questions/35798375/itsappusesnonexemptencryption-cordova-build/36498075#36498075.
Could you check/verify if this kind of nesting actually works in a plain cordova (not phonegap builder) environment?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.