My iOS app (written in Swift and React Native) has a custom URL scheme that allows me to redirect the app, for example. Safari like myappscheme: // https: //www.mywebsite.com/somematerial . If I enable App Transport Security in my application, the routing through the custom URL scheme is blocked, and I get this message:
App Transport Security has blocked the netartext HTTP resource (http: //) because it is unsafe. Temporary exceptions can be configured through your Info.plist application file.
However, if I disable ATS, the application will move as expected. I do not access any link via http in my application, and in my routing I always retrieve data via https. Therefore, I do not know why the ATS blocks this routing. Do you know if I need to provide more information about my URL scheme?
See my ATS configurations in Info.plist:
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoadsInWebContent</key> <true/> <key>NSExceptionDomains</key> <dict> <key>localhost</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> <true/> </dict> </dict> </dict>
I also included my own URL scheme:
<key>LSApplicationQueriesSchemes</key> <array> <string>myappscheme</string> </array>
source share