问题
I have completed a React Native app on my PC which works fine using Android Studio emulators however I now need to create an api file using Xcode on my mac.
I have absolutely ZERO experience with Xcode or creating api files. Please advise how to do this or at least where to find the solution. I have installed Xcode on my mac and when I open it I get a bunch of options to create a new project, however, my app is already finished.
So all I want to be able to do is somehow import my finished react native app into Xcode in order to generate the api file. Is this possible, has anyone done it this way before? Can you please offer some advice or links to sources on how to do this?
回答1:
You mean an ipa file. It is easy.
- Open the xcodeproj file inside ios folder in your react-native application using xcode.
Now check if you have included your provision certificate inside.
Now Product -> Destination -> Select Generic iOS Device.
Select Archive. After archive is finished you will see the following screen.
If your provisioning certificate is only for development export development ipa file.
After this is just about optimising ipa for air cloud. You can skip that export the archive folder to your destination location.
回答2:
1.Navigate to ios folder in your proj directory.Open projname.xcodeproj
2.Generate Certificates by following: https://docs.telerik.com/platform/appbuilder/cordova/code-signing-your-app/configuring-code-signing-for-ios-apps/create-development-certificate
3.Download certificate and double click to install.
4.Now you can follow steps described by @naveen vignesh
来源:https://stackoverflow.com/questions/50958855/finished-react-native-project-on-pc-now-i-want-to-use-xcode-on-my-mac-to-create