I would try "https://stackoverflow.com/questions/41970435" But I'cant get .ipa file.
Can any one explain how to get the .ipa file?
I would try "https://stackoverflow.com/questions/41970435" But I'cant get .ipa file.
Can any one explain how to get the .ipa file?
Get the .app
file:
react-native run-ios --configuration=release
.app
file path Build/Products/Release/"<Your_Filename>.app"
.
Convert .app
to .ipa
:
Payload
..app
file into Payload
folder.Payload
folder..ipa
.react-native run-ios --configuration=release
if everything is fine you'll have the following line info Installing "/Users/"<Your_Username>"/Library/Developer/Xcode/DerivedData/"<Your_Filename>"-gpyqutyfhaccnvgoneubfmtbglgw/Build/Products/Release-iphonesimulator/"<Your_Filename>".app"
that's the release. But my question is that how do I compress Payload ? Is it a simple zip compression or another and specific one ?
Jun 17, 2020 at 12:54
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
You can run these commands in the ios directory.
xcodebuild clean archive -scheme <Scheme> -configuration Release -archivePath ../builds/<App>.xcarchive DEVELOPMENT_TEAM=<DevTeam> PROVISIONING_PROFILE=<PROVISIONING_PROFILE> CODE_SIGN_IDENTITY=<CODE_SIGN_IDENTITY>
xcodebuild -exportArchive -archivePath ../builds/<App>.xcarchive -exportPath ../builds/ -exportOptionsPlist ./iosExportOptions.plist
and iosExportOptions.plist can be something like
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>teamID</key>
<string>{TEAM_ID}</string>
</dict>
</plist>
It is important to note that if you are using cocoapods then you need to build using the workspace and not the project. Adding this flag to the first command will make sure you are targeting the workspace -workspace <AppName>.xcworkspace
.
You can also checkout fastlane. https://fastlane.tools/
OR
You can fill in all the details such as DEVELOPMENT_TEAM etc in Xcode and Product -> Archive https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/TestingYouriOSApp/TestingYouriOSApp.html
.app
as pointed out by the other answer
Mar 10, 2018 at 5:45