Extend your existing iOS app with Angular 2 and NativeScript

Vladimir Enchev
2 min readOct 17, 2016

--

Similar to my previous post I’ll show you how to extend your iOS application with NativeScript and Angular 2.

  1. Build your NativeScript app for iOS:
tns build ios

2. Copy your NativeScript app \platforms\ios\YourAppName\app folder to your iOS app:

3. Copy your NativeScript app \platforms\ios\internal folder next to your iOS app:

4. Add reference to NativeScript.framework and TNSWidgets.framework

Note: Both can be found in your NativeScript app \platforms\ios\ and \lib\ios\ folders.

5. Add Run Script and Linker Flags to build and use the metadata:

cd “$PROJECT_DIR/internal/metadata-generator/bin” && ./metadata-generation-build-step
-sectcreate __DATA __TNSMetadata “$(CONFIGURATION_BUILD_DIR)/metadata-$(CURRENT_ARCH).bin”

Note: Run Script should be the first build phase.

6. Present NativeScript view controller from your app:

Get the app from here:
https://github.com/enchev/ios-ng2-tns

--

--

Vladimir Enchev
Vladimir Enchev

Written by Vladimir Enchev

Passionate engineer with 25 years in web, desktop and mobile. Led teams & divisions in @Telerik for a decade. Former @NativeScript lead. Co-Founder of @RadzenHQ

Responses (4)