|
| 1 | +--- |
| 2 | +title: Extend existing iOS app |
| 3 | +description: Learn how to your existing iOS app with Angular 2 and NativeScript |
| 4 | +position: 12 |
| 5 | +slug: extend-existing-ios-app |
| 6 | +environment: angular |
| 7 | +--- |
| 8 | + |
| 9 | + |
| 10 | +# Extend your existing iOS app with Angular 2 and NativeScript |
| 11 | + |
| 12 | +## This article provides step-by-stem instructions, how to extend existing iOS app with Angular 2 and NativeScript |
| 13 | + |
| 14 | +1.Build your NativeScript app for iOS: |
| 15 | +`tns build ios` |
| 16 | + |
| 17 | +2.Copy your NativeScript app `\platforms\ios\YourAppName\app` folder to your iOS app: |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +3.Copy your NativeScript app `\platforms\ios\internal` folder next to your iOS app: |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +> Note: Both can be found in your NativeScript app `\platforms\ios\`and `\lib\ios\` folders. |
| 26 | +
|
| 27 | +4.Add reference to **NativeScript.framework** and **TNSWidgets.framework** |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +> Note: Both can be found in your NativeScript app `\platforms\ios\` and `\lib\ios\` folders. |
| 32 | +
|
| 33 | + |
| 34 | +5.Add **Run Script** and **Linker Flags** to build and use the metadata: |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | +`cd “$PROJECT_DIR/internal/metadata-generator/bin” && ./metadata-generation-build-step` |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | +`-sectcreate __DATA __TNSMetadata “$(CONFIGURATION_BUILD_DIR)/metadata-$(CURRENT_ARCH).bin”` |
| 43 | + |
| 44 | +> Note: Run Script should be the first build phase. |
| 45 | +
|
| 46 | +6.Present NativeScript view controller from your app: |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
0 commit comments