-
-
Couldn't load subscription status.
- Fork 197
Closed
Description
Please, provide the details below:
Did you verify this is a real problem by searching [Stack Overflow]
No
Tell us about the problem
I developed a custom {N} plugin and added a platform/ios/Info.plist file with the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>org.nativescript.foo</string>
<key>CFBundleURLSchemes</key>
<array>
<string>bar</string>
</array>
</dict>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict>
</plist>
Then I installed the plugin into a newly created {N} app with:
tns create myapp
cd my app
tns plugin add /work/myplugin
tns build ios
The resulting application doesn't appear to take into account the CFBundleURLTypes setting from the plugin. On the other hand the NSAppTransportSecurity works fine.
Which platform(s) does your issue occur on?
iOS
Please provide the following version numbers that your issue occurs with:
- CLI: 3.1.1
- Cross-platform modules: 3.1.0
- Runtime(s): tns-android: 3.0.0 and tns-ios: 3.0.0
- Plugin(s):
Please tell us how to recreate the issue in as much detail as possible.
mkdir myplugin
cd myplugin/
mkdir platforms
mkdir platforms/ios
echo '{
"name": "MyPlugin",
"version": "1.0.0",
"nativescript": {
"platforms": {
"android": "3.0.0",
"ios": "3.0.0"
}
}
}' > package.json
echo '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>org.nativescript.foo</string>
<key>CFBundleURLSchemes</key>
<array>
<string>bar</string>
</array>
</dict>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict>
</plist>' > ./platforms/ios/Info.plist
cd ..
tns create foo && cd foo && tns plugin add ../myplugin && tns build ios
cat platforms/ios/foo/foo-Info.plist