How to create a distributive react-native app for iOS? - ios

I have created a react-native app using the tools - VS Code, expo, react-native.
I am able to run the app on expo client as well as xcode simulator easily on my laptop. What I want now is to make a distributive file for iOS like we have .apk for androids for this app.
I referred to this question How to build .ipa application for react-native-ios?
and tried
react-native run-ios --configuration=release
but I get an error:
Error iOS project folder not found. Are you sure this is a React Native project?
Don't know what I am missing here? I am a beginner with react-native, would really appreciate any help on this.

You have to run expo build:ios that will then ask you your account and certificates, once you have all that figured out it will give you a link where you can see how the build is doing, after it's complete you can download the .ipa file and use the app transporter from the app store to send you app to apple servers.
(All this if you are using expo, if you aren't it's a hole different conversation and a lot more difficult)

Related

Where is the iOS build folder located for React Native apps?

I have just built an iOS React Native app, but I can't locate the app or .ipa file.
Google doesn't seem to have many answers and in Xcode, the folder is just labelled as 'build'.
I need to upload the .ipa file to Microsoft App Center. Where should I look for the app?
Update
I found this: How to build .ipa application for react-native-ios?
Seems like they missed some bits out int the RN docs!

Xcode archive error after successful build of app

Currently I'm using Ionic Framework and trying to build an iOS mobile App. In order do that I did the following steps:
To add the platform,
$ ionic cordova platform add android
2.To build the app
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
After it successfully generated .xcodeproject file, I imported the file into Xcode.
After importing the project, cleaned the project folder in xcode itself.
Then I added the Apple ID account to my Xcode.
After adding the account I'm trying to archive the project, in order to do that I checked the following URL's
Official Documentation to generate the IOS app
Stackoverflow answer to .ipa file.
In the Archiving process I'm getting the following error:
error: Your development team, does not support the Push Notifications capability. (in target 'folder')
I tried to rectify it in the following way:
DISABLE_PUSH_NOTIFICATIONS=1
in the preprocessor macros. Unfortunately it didn't solve my problem.
I don't have any Apple developer ID
How to solve this problem, in order to archive the project? Could any one help me in this regard?
I tried all the solutions which are available solutions but they didn't solve any answer. I am stuck since the past 2 days.
Are you using any plugins that require push notifications?
See ios push notification development on free apple account.
It is not possible to use push notifications without a paid Apple Developer ID.
If not,
Try removing and adding the ios platform again.

How to generate ipa file without xcode from windows? if possible

I am trying to create ipa without mac and xcode. I have iphone to test app. I never used expo for development purpose. Is this possible with expo or any online resource which can generate this ipa for testing purpose only? Its a React native app
Yes it'll be possible with Expo.
You need to create a new project with create-react-native-app or exp init, then move your existing code over and execute exp build:ios, which will build the ipa on Expo's servers for you to download.
You will not be able to include any third party native libraries (i.e. libraries that aren't 100% Javascript, that you had to link with react-native link).
However, Expo provides an extensive list of native API for you to use.

How to build reactnative v0.45 project to ios realse

I'm using the latest reactnative verion 0.45 and I didn't get a clue on the official doc about how to build the ios release.
About how to the running on ios device section of the doc quoted here:
Connect your iOS device to your Mac using a USB to Lightning cable.
Navigate to the ios folder in your project, then open the .xcodeproj
file within it using Xcode.
But there is no ios folder found after running command npm ios. And most StackOverflow answers like this one require a command like react-native-bundle which was not found either.
I have already got Xcode and an app develop member account and Really want to build my first reactnative app to my iphone before I could do more stuff on it.
I know this might be a very newbie question. If someone could just give some guide or throw some docs about this?
I stuck on this problem since a few days too, unless you will not get an ios or android folder any more with React Native 0.45.
You can build your standalone app by using Expo: https://docs.expo.io/versions/v17.0.0/guides/building-standalone-apps.html
As I understand, they build your app for you online, so it takes some time and require an free expo-account, but after it finised, you can download your .apk or .ipa to submit it to Play Store or AppStore.
When you want to add more custom (non javascript) code to your project and edit it in Andoid Studio or Xcode, so you have to eject your from Reative Native: https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md
After that, you can test your App by building for your own in the simulator, with no need of the Expo-App.
Open the ios folder of your project using xcode
Connect your phone and select your phone from the device selection dropdown
Select the first tab in the explorer and go to signing area, select your development team
Click play and it will install the app in your phone on development mode
For Production build, you can do the same. However, you would need to change your scheme to production:
Open scheme menu under product. From the dropdown, look all the way down, you'll find the menu Edit Scheme, select this.
Select the Release scheme, hit close and re-run your project in your phone.
Note: if you are building for release, make sure your target device is Generic iOS Device
Hope it helps! :)

Cordova iOS app

I'm trying to create a Cordova app for learning purposes to deploy to my iPhone 5 for personal testing.
For the life of me however I can't seem to understand what I have to do. I have Xcode installed as all the tutorials have mentioned. How do I create a provisioning profile (with a free developer account)? How do I sign my device?
Nothing I've found online seems to explain in clearly, or for beginners such as myself.
Also, is there a way to create all of this but not use Xcode as my IDE for developing my app?
You don't need to use XCode to develop your Cordova app, as the app is just CSS, JavaScript, and HTML. I like to use WebStorm, but you can use whatever suits you. However, in order to deploy your app to a device, you do need XCode. Here's a link to an answer for a similar question. This is in regards to XCode 7 and I'm not sure what version you have, or if this still holds for XCode 8.
You only deploy after you do a build for iOS with Cordova, by running $ cordova build. Here is a link to Cordova's docs.

Resources