Skip to content

Commit 3ecbc1d

Browse files
philIipfacebook-github-bot
authored andcommitted
explicitly enable ATS in app template (#37923)
Summary: Pull Request resolved: #37923 Changelog: [Internal] in this change, i'm looking to make sure our app template will not violate apple best practices and minimize probability of app rejection. this change entails two guardrails: - explicitly marking disabling ATS as disabled with a comment. even though this is already the case, this will make it more unlikely someone will override this - replacing the localhost domain override with the apple provided NSAllowsLocalNetworking key, which is the recommendation Reviewed By: sammy-SC Differential Revision: D46707159 fbshipit-source-id: 8fe407d08767269a18fb15c80fdd83a58cf2a4a8
1 parent d320334 commit 3ecbc1d

File tree

1 file changed

+5
-8
lines changed
  • packages/react-native/template/ios/HelloWorld

1 file changed

+5
-8
lines changed

packages/react-native/template/ios/HelloWorld/Info.plist

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,11 @@
2626
<true/>
2727
<key>NSAppTransportSecurity</key>
2828
<dict>
29-
<key>NSExceptionDomains</key>
30-
<dict>
31-
<key>localhost</key>
32-
<dict>
33-
<key>NSExceptionAllowsInsecureHTTPLoads</key>
34-
<true/>
35-
</dict>
36-
</dict>
29+
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
30+
<key>NSAllowsArbitraryLoads</key>
31+
<false/>
32+
<key>NSAllowsLocalNetworking</key>
33+
<true/>
3734
</dict>
3835
<key>NSLocationWhenInUseUsageDescription</key>
3936
<string></string>

0 commit comments

Comments
 (0)