Ios Setup

Capacitor iOS Documentation

Capacitor features a native iOS runtime that enables developers to communicate between JavaScript and Native Swift or Objective-C code.

Capacitor iOS apps are configured and managed with Xcode and CocoaPodsarrow-up-right.

iOS 13+ is supported. Xcode 13+ is required (see Environment Setuparrow-up-right). Capacitor uses WKWebViewarrow-up-right, not the deprecated UIWebViewarrow-up-right.

Adding the iOS Platformarrow-up-right

First, install the @capacitor/ios package.

npm install @capacitor/ios

Copy

Then, add the iOS platform.

npx cap add ios

Copy

Opening the iOS Projectarrow-up-right

To open the project in Xcode, run:

npx cap open ios

Copy

Alternatively, you can open Xcode manually by running:

Copy

Running Your Apparrow-up-right

You can either run your app on the command-line or with Xcode.

Running on the Command-Linearrow-up-right

To run the project on a device or simulator, run:

Copy

The command will prompt you to select a target. Learn more about runarrow-up-right.

Running in Xcodearrow-up-right

In Xcode, first select the device or simulator and then click the play button to run your app.

Running your app

Troubleshootingarrow-up-right

If you encountered any issues while getting started, you can consult the iOS Troubleshooting Guidearrow-up-right. Feel free to open a discussionarrow-up-right if you need help.

You are now ready to continue developing and building your app. Use the various APIs available, Capacitor or Cordova plugins, or custom native code to build out the rest of your app.

Further Readingarrow-up-right

Follow these guides for more information on each topic:

Last updated

Was this helpful?