Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build .ipa application for react-native-ios? [closed]

I would try "https://stackoverflow.com/questions/41970435" But I'cant get .ipa file.

Can any one explain how to get the .ipa file?

like image 884
Saravana Kumar Avatar asked Feb 08 '17 10:02

Saravana Kumar


People also ask

Can I use React Native without Xcode?

If you are already familiar with mobile development, you may want to use React Native CLI. It requires Xcode or Android Studio to get started. If you already have one of these tools installed, you should be able to get up and running within a few minutes.


2 Answers

  1. Get the .app file:

     react-native run-ios --configuration=release 
  2. .app file path Build/Products/Release/"<Your_Filename>.app".

  3. Convert .app to .ipa :

    • Create folder Payload.
    • paste .app file into Payload folder.
    • compress the Payload folder.
    • change the name you want and put extension as .ipa.
like image 97
Saravana Kumar Avatar answered Oct 08 '22 10:10

Saravana Kumar


  • Delete localhost item from info.plist

    App transport security settings -> Exception domains

  • Bundle ios

    react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios 
  • In Xcode

    Products->Scheme->Edit scheme -> Change build configuration to RELEASE

  • In AppDelegate.m 

    Replace

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

    with

    #ifdef DEBUG   jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; #else   jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; #endif 
  • Change device -> Generic iOS device

  • Product -> Clean

  • Product -> Build

  • .app file can be found at

    ~/Library/Developer/Xcode/DerivedData/<app name>/Build/Products/Release-iphoneos/<appname> 
  • Create folder Payload.


  • Paste .app file into Payload folder.


  • Compress the Payload folder.


  • Change the name you want and put extension as .ipa

like image 27
aleena1995 Avatar answered Oct 08 '22 10:10

aleena1995