61 lines
2.6 KiB
Markdown
61 lines
2.6 KiB
Markdown
# Running Skolplattformen iOS
|
|
|
|
## Installing dependencies
|
|
|
|
You will need Node, Watchman, the React Native command line interface, Xcode and CocoaPods.
|
|
|
|
While you can use any editor of your choice to develop your app, you will need to install Xcode in order to set up the necessary tooling to build your React Native app for iOS.
|
|
|
|
### Node & Watchman
|
|
|
|
We recommend installing Node and Watchman using [Homebrew](http://brew.sh/). Run the following commands in a Terminal after installing Homebrew:
|
|
|
|
```shell
|
|
brew install node
|
|
brew install watchman
|
|
```
|
|
|
|
If you have already installed Node on your system, make sure it is Node 12 or newer.
|
|
|
|
[Watchman](https://facebook.github.io/watchman) is a tool by Facebook for watching changes in the filesystem. It is highly recommended you install it for better performance.
|
|
|
|
### Xcode
|
|
|
|
The easiest way to install Xcode is via the [Mac App Store](https://itunes.apple.com/us/app/xcode/id497799835?mt=12). Installing Xcode will also install the iOS Simulator and all the necessary tools to build your iOS app.
|
|
|
|
If you have already installed Xcode on your system, make sure it is version 10 or newer.
|
|
|
|
#### Command Line Tools
|
|
|
|
You will also need to install the Xcode Command Line Tools. Open Xcode, then choose "Preferences..." from the Xcode menu. Go to the Locations panel and install the tools by selecting the most recent version in the Command Line Tools dropdown.
|
|
|
|
![Xcode Command Line Tools](/docs/assets/GettingStartedXcodeCommandLineTools.png)
|
|
|
|
#### Installing an iOS Simulator in Xcode
|
|
|
|
To install a simulator, open <strong>Xcode > Preferences...</strong> and select the <strong>Components</strong> tab. Select a simulator with the corresponding version of iOS you wish to use.
|
|
|
|
#### CocoaPods
|
|
|
|
[CocoaPods](https://cocoapods.org/) is built with Ruby and it will be installable with the default Ruby available on macOS. You can use a Ruby Version manager, however we recommend that you use the standard Ruby available on macOS unless you know what you're doing.
|
|
|
|
Using the default Ruby install will require you to use `sudo` when installing gems. (This is only an issue for the duration of the gem installation, though.)
|
|
|
|
```shell
|
|
sudo gem install cocoapods
|
|
```
|
|
|
|
For more information, please visit [CocoaPods Getting Started guide](https://guides.cocoapods.org/using/getting-started.html).
|
|
|
|
### Running on a device
|
|
|
|
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](https://reactnative.dev/docs/running-on-device).
|
|
|
|
## Running the app
|
|
|
|
Go to the root of the project and run the following command
|
|
|
|
```shell
|
|
yarn run start:ios
|
|
```
|