Skip to content

Commit

Permalink
Merge pull request #402 from cordova-rtc/task/improve-hook-cycle
Browse files Browse the repository at this point in the history
Task/improve hook cycle
  • Loading branch information
hthetiot committed Oct 9, 2019
2 parents 54fbe02 + 450848a commit 75952f7
Show file tree
Hide file tree
Showing 4 changed files with 250 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@ script:
- "gulp"
# Test Plugin platform build
- "ionic start myApp blank; cd myApp;"
- "ionic cordova plugin add https://github.com/$REPO_SLUG.git#$BRANCH --verbose"
- "ionic cordova platform add $CORDOVA_PLATFORM"
- "ionic cordova plugin add https://github.com/$REPO_SLUG.git#$BRANCH --verbose"
- "ionic cordova build $CORDOVA_PLATFORM"
21 changes: 10 additions & 11 deletions docs/Building.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
# Building


### Building Steps

An iOS Cordova application including the *cordova-plugin-iosrtc* plugin can be built using the [cordova-cli](https://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-Line%20Interface) or Xcode.

The plugin provides a ["hook"](../extra/hooks/iosrtc-swift-support.js) to automate required modifications in both *cordova-cli* and Xcode generated projects. It is no longer necessary to add the "hook" manually, it is installed when platform is removed and added again.
The plugin provides a ["hook"](../extra/hooks/iosrtc-swift-support.js) to automate required modifications in both *cordova-cli* and Xcode generated projects. It is no longer necessary to add the "hook" manually or add and remove the platform again, it is executed before and after cordova is preparing your application.

* Make sure you have the NPM [xcode](https://www.npmjs.com/package/xcode) package installed (locally or globally):
```bash
$ npm install -g xcode
```
* Remove the iOS platform and add it again:
```bash
$ cordova platform remove ios
$ cordova platform add ios
```
* You have two options right now:
* Open the Xcode project and compile your application.
Expand All @@ -23,6 +14,8 @@ $ cordova platform add ios
$ cordova build ios
```

For more details about Cordova hook life cycle see: [Hooks Guide - Apache Cordova](https://cordova.apache.org/docs/en/latest/guide/appdev/hooks/)


#### Bridging Header

Expand All @@ -43,7 +36,13 @@ It may happen that your Cordova application uses more than a single plugin coded
And then set `Unified-Bridging-Header.h` as the value of the "Objective-C Bridging Header" build setting in your Xcode project. For more information check this [issue](https://github.com/cordova-rtc/cordova-plugin-iosrtc/issues/9).


#### Xcode
#### Minimum Xcode Version

You need to use minimum Xcode version 10.2 otherwise the build will fail due Apple Xcode know Bugs that have been fixed only on version above Xcode 10.2.

See: [Xcode 10.2 Release Notes](https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_release_notes)

#### Configuring Xcode manually

If you still prefer to do it manually open it with Xcode and follow these steps:

Expand Down
Loading

0 comments on commit 75952f7

Please sign in to comment.