I'm sure I'm missing something simple. I have a React Native project working and I'm attempting to get it on the app stores. Following those instructions, after I have created my provisioning profile in the Apple Developer Dashboard, it says to double click the developer provisioning profile to launch xcode. It's these instructions exactly:
Now find the files you just downloaded on your computer, and double-click each of them in turn, causing Xcode to launch. Verify the profiles are there by opening a project or starting a new one for this test.
So I double-click my file, and xcode does launch but no windows open up. I do not have an xcode project for my react native app so I have nothing to open. There is no menus for 'build settings' or 'general' so I'm not sure how to proceed.
For reference, here is my react native directory structure:
my_project/
.expo/
assets/
node_modules/
src/
.bablerc
.gitignore
App.js
app.json
package-lock.json
package.json
README.md
Did I miss a step somewhere? How do I get an xcode project from this?
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.
Plug in your device via USB xcworkspace , within it using Xcode. If this is your first time running an app on your iOS device, you may need to register your device for development. Open the Product menu from Xcode's menubar, then go to Destination. Look for and select your device from the list.
Importing into XcodeOpen Xcode and select Open Another Project or File, Open. Open the folder you unzipped from your Dropsource download and locate the file with “. xcodeproj” extension in the root directory. Select the file and click Open.
If you intend to run it on an iOS device or simulator, the use of Xcode is often required. You can build a React Native app either using the React Native CLI, which allows you to run build commands from your terminal, or Xcode. I prefer to use Xcode for the following reasons:
Run xed ios when inside your react-native project root directory. It opens Xcode at the ios directory. Or open ios/PROJECT_NAME.xcworkspace. xed is the Xcode text editor invocation tool. I added this because even though the author uses expo, this question was first on my non-expo search results.
If you are new to mobile development, the easiest way to get started is with Expo CLI. Expo is a set of tools built around React Native and, while it has many features, the most relevant feature for us right now is that it can get you writing a React Native app within minutes.
npx react-native run-ios is one way to run your app. You can also run it directly from within Xcode. If you can't get this to work, see the Troubleshooting page. The above command will automatically run your app on the iOS Simulator by default. If you want to run the app on an actual physical iOS device, please follow the instructions here.
For normal (not expo) react-native cli projects:
Run xed ios
when inside your react-native project root directory. It opens Xcode at the ios directory. Or open ios/PROJECT_NAME.xcworkspace
. xed
is the Xcode text editor invocation tool.
I added this because even though the author uses expo, this question was first on my non-expo search results. You might find using Xcode more convenient than editing PLIST, XML or other configuration files directly, as well as 'archiving' your application to then upload onto the App Store. I remember when I first learning React Native, and thought I wouldn't need to use XCode. I was very wrong.
For "fully managed" expo projects, you don't actually have access to the native code (ios or android files). To have access to/ modify the native code, you need to go into the 'bare workflow'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With