I'm working on a development environment without HTTPS setup. Is it possible to automatically disable ATS just for the development (debug) mode?
相关问题
- Xcode UI Testing - Finding element in Webview by i
- iOS Framework issue: Class is implemented in both
- WCSession Failing to Activate
- ios9 self signed certificate and app transport sec
- Segmentation fault 11 when code coverage is turned
相关文章
- Using the device simulator for iOS 8 with Xcode 7
- How do I clear a warning for xcassets unassigned c
- How to create IOS .IPA file and share it, using FR
- iOS 9 New Launch Images and Icons Sizes, has anyon
- Files in Xcode not working (names in red)
- Xcode 7 beta 5, Swift 2: UITableViewCell's sub
- How to force a new CNContact into a Local CNContai
- Over the air app installation is stopped working o
Another solution. By using
INFOPLIST_PREPROCESS = YES
andINFOPLIST_PREPROCESSOR_DEFINITIONS = DEBUG=1
,it can be conditional preprocess like C code using
#ifdef
or#if
directly in Info.plist.Cons: Unable to open Xcode's property list editor because it is not well-formed XML :(
My solution is to keep ATS disable option at the default NO value and add a New Run Script Phase to change it in the app bundle's Info.plist when building the app.
This is the script:
Yes, you can configure your project settings to use different Info.plist file for Debug, Release or whatever configuration you use in your project (similar to the way Provisioning Profiles are set), so in your Debug plist you can disable ATS totally.
Go to Project -> Your Target -> Build Settings -> Info.plist File