2

I was reading in a guide that I need to change the Info.plist and AppDelegate.m files before publishing my react-native app to iOS with Xcode.

Is it necessary to change the Info.plist file by deleting this code:

 <key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSExceptionDomains</key>
    <dict>
        <key>localhost</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
        <true/>
        </dict>
    </dict>
</dict>

and by changing in AppDelegate.m this line:

jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];

to this line:

jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

Can someone please explain why should I do that?

Nimesh Neema
  • 1,528
  • 2
  • 17
  • 44
Tal Shani
  • 660
  • 1
  • 9
  • 26
  • 1
    Hey! Please refer to here for your question. As far as I know, detection is automatic when you build your project and manual update is not necessary https://stackoverflow.com/a/38780622/9890122 – Harrison Sep 27 '18 at 18:48
  • 2
    @Harrison manual update can make my app to fail? in case that I already succeeded to archived the app and send it to iTunes connect with no error – Tal Shani Sep 27 '18 at 18:50
  • 1
    In that case you're good to go congratulations! – Harrison Sep 27 '18 at 18:51
  • 2
    @Harrison just want to make sure I understand when I upload my app to iTunes connect and it says upload successful it means that the app will work, I mean during the upload they like "testing" the app and making sure its not crash? – Tal Shani Sep 27 '18 at 19:13
  • I assume when you say that you've uploaded your app for review by Apple means that you've already tested your app in both a debug and user environment right? So if you've tested your app yourself for your target user audience then yes Apple should have no problems testing your app. – Harrison Sep 27 '18 at 19:16
  • 2
    @Harrison only test on debug mode and still waiting to get the links through the testFlight.. theres another way to test it? – Tal Shani Sep 27 '18 at 19:19
  • 2
    yes, as long as you've tested it on a physical device. Please check this page and see if you've performed all the actions that are recommended there: https://facebook.github.io/react-native/docs/running-on-device – Harrison Sep 27 '18 at 19:22
  • 2
    @Harrison yes I did it, and right now I changed to release mode and run it on physical device with no problem... thank you! – Tal Shani Sep 27 '18 at 19:31

0 Answers0