xCode 7 update broke Cordova jQuery $.ajax() calls -
this question has answer here:
i updated xcode version 7 , appears update broke $.ajax() call in cordova applicatoin. used http scoop try see type of call being made attempt debug, not trying make web service call. know application worked prior xcode (and ios) update.
the web service using http , did see talk no longer being allowed in ios9. attempted add 'nsallowarbitraryloads=true' string info.plist file not appear make difference.
thanks in advance!
did add correctly? xcode 7 use ios 9 , won't allow http backend calls default unless overridden using nsallowsarbitraryloads stated. (note had spelled incorrectly nsallowarbitraryloads 's' missing)
here's working example of change app's info .plist:
<key>nsapptransportsecurity</key> <dict> <key>nsallowsarbitraryloads</key> <true/> </dict>
and here's script use pre build hook ios automatically:
#!/bin/bash
echo "adjusting plist app transport security exception." val=$(/usr/libexec/plistbuddy -c "add nsapptransportsecurity:nsallowsarbitraryloads bool true" platforms/ios/projectname/projectname-info.plist 2>/dev/null) echo "done"
just swap out projectname name of project.
Comments
Post a Comment