info.plist - iOS plist.info: where should I put additional keys with a nested dict tag? -
in nativescript app (compiles native including plist.info file) i'm trying add key plist.info solve ios 9 transport security issues.
the solution i'm trying apply comes https://blog.nraboy.com/2015/12/fix-ios-9-app-transport-security-issues-in-nativescript/
specifically it's adding following key plist.info file:
<key>nsapptransportsecurity</key> <dict> <key>nsallowsarbitraryloads</key> <true /> </dict>
however during building process following error:
code-info.plist': data couldn’t read because isn’t in correct format.
since i'm new ios development guess due syntax error in xml file (specifically where put code above: before closing plist tag or whatever)
my original plist file (build works) is:
<?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> <string>en</string> <key>cfbundledevelopmentregion</key> <string>en</string> <key>cfbundledisplayname</key> <string>${product_name}</string> <key>cfbundleexecutable</key> <string>${executable_name}</string> <key>cfbundleidentifier</key> <string>com.company.myapp</string> <key>cfbundleinfodictionaryversion</key> <string>6.0</string> <key>cfbundlename</key> <string>${product_name}</string> <key>cfbundlepackagetype</key> <string>appl</string> <key>cfbundleshortversionstring</key> <string>1.0</string> <key>cfbundlesignature</key> <string>????</string> <key>cfbundleversion</key> <string>1.0</string> <key>lsrequiresiphoneos</key> <true/> <key>uilaunchstoryboardname</key> <string>launchscreen</string> <key>uirequireddevicecapabilities</key> <array> <string>armv7</string> </array> <key>uisupportedinterfaceorientations</key> <array> <string>uiinterfaceorientationportrait</string> <string>uiinterfaceorientationlandscapeleft</string> <string>uiinterfaceorientationlandscaperight</string> </array> <key>uisupportedinterfaceorientations~ipad</key> <array> <string>uiinterfaceorientationportrait</string> <string>uiinterfaceorientationportraitupsidedown</string> <string>uiinterfaceorientationlandscapeleft</string> <string>uiinterfaceorientationlandscaperight</string> </array> </dict> </plist>
it plist syntax error
please use xml.open plist in texteditor , replace xml code it.
<?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>cfbundledevelopmentregion</key> <string>en</string> <key>cfbundledisplayname</key> <string>${product_name}</string> <key>cfbundleexecutable</key> <string>${executable_name}</string> <key>cfbundleidentifier</key> <string>com.company.myapp</string> <key>cfbundleinfodictionaryversion</key> <string>6.0</string> <key>cfbundlename</key> <string>${product_name}</string> <key>cfbundlepackagetype</key> <string>appl</string> <key>cfbundleshortversionstring</key> <string>1.0</string> <key>cfbundlesignature</key> <string>????</string> <key>cfbundleversion</key> <string>1.0</string> <key>lsrequiresiphoneos</key> <true/> <key>uilaunchstoryboardname</key> <string>launchscreen</string> <key>uirequireddevicecapabilities</key> <array> <string>armv7</string> </array> <key>uisupportedinterfaceorientations</key> <array> <string>uiinterfaceorientationportrait</string> <string>uiinterfaceorientationlandscapeleft</string> <string>uiinterfaceorientationlandscaperight</string> </array> <key>uisupportedinterfaceorientations~ipad</key> <array> <string>uiinterfaceorientationportrait</string> <string>uiinterfaceorientationportraitupsidedown</string> <string>uiinterfaceorientationlandscapeleft</string> <string>uiinterfaceorientationlandscaperight</string> </array> <key>nsapptransportsecurity</key> <dict> <key>nsallowsarbitraryloads</key> <true/> </dict> </dict> </plist>
Comments
Post a Comment