
- 392 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
NativeScript for Angular Mobile Development
About this book
Learn NativeScript to build native mobile applications with Angular, TypeScript, JavaScriptAbout This Book• Power packed hands-on guide to help you become pro-efficient with NativeScript• Harness the power of your web development skills with JavaScript and Angular to build cross-platform mobile apps• Create highly maintainable and feature-rich apps with TypeScript and NativeScript APIsWho This Book Is ForThis book assumes you have a general understanding of TypeScript, have heard of NativeScript and know what it's about, and are familiar with Angular (2.0). You don't need to be an expert in any of these technologies, but having some sense of them before reading is recommended this book, which is ideal for intermediate to advanced users.What You Will Learn• Bootstrap a NativeScript for Angular app• Best practices for project organization• Style your app with CSS/SASS• Use Angular together with NativeScript to create cross-platform mobile apps• Take advantage of powerful Angular features, such as Dependency Injection, Components, Directives, Pipes, and NgModules right within your NativeScript apps•Gain insight into great project organization and best practices•Use Objective C/Swift and Java APIs directly from TypeScript•Use rich framework features and third-party plugins•Style your app with CSS/SASS•Integrate @ngrx/store + @ngrx/effects to help with state management•Test your app with Karma and AppiumIn DetailNativeScript is an open source framework that is built by Progress in order to build truly native mobile apps with TypeScript, JavaScript or just Angular which is an open source framework built by Google that offers declarative templates, dependency injection, and fully featured modules to build rich applications. Angular's versatile view handling architecture allows your views to be rendered as highly performant UI components native to iOS and Android mobile platforms. This decoupling of the view rendering layer in Angular combined with the power of native APIs with NativeScript have together created the powerful and exciting technology stack of NativeScript for Angular.This book focuses on the key concepts that you will need to know to build a NativeScript for Angular mobile app for iOS and Android. We'll build a fun multitrack recording studio app, touching on powerful key concepts from both technologies that you may need to know when you start building an app of your own. The structure of the book takes the reader from a void to a deployed app on both the App Store and Google Play, serving as a reference guide and valuable tips/tricks handbook.By the end of this book, you'll know majority of key concepts needed to build a successful NativeScript for Angular app.Style and approachThis step-by-step advanced tutorial focuses on the key concepts you need to know to build a NativeScript for Angular mobile app for iOS and Android.
Trusted by 375,005 students
Access to over 1 million titles for a fair monthly price.
Study more efficiently using our study tools.
Information
Building an Audio Recorder
- Building a feature rich cross-platform audio recorder for iOS and Android with a consistent API
- Integrating iOS framework libraries, such as AudioKit (http://audiokit.io), which was built entirely with Swift
- How to convert Swift/Objective C methods to NativeScript
- Building custom reusable NativeScript view components based on native APIs, as well as how to use them inside Angular
- Configuring a reusable Angular Component that can both be used via routing and opened via a popup modal
- Integrate Android Gradle libraries
- How to convert Java methods to NativeScript
- Using multiple item templates with NativeScript's ListView
Phase 1 – Building an audio recorder for iOS
Challenge detour – Integrate Swift based library into NativeScript
This bridging header is auto generated when the Swift codebase is compiled into a framework. Swift offers rich language features, some of which do not have a direct correlation to Objective C. Full featured support for the latest Swift language enhancements will likely come to NativeScript eventually however at the time of this writing there are a couple considerations to keep in mind.
https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Enumerations.html
// From AudioKit's Swift 3.x codebase
public enum ExportFormat {
case wav
case aif
case mp4
case m4a
case caf
fileprivate var UTI: CFString {
switch self {
case .wav:
return AVFileTypeWAVE as CFString
case .aif:
return AVFileTypeAIFF as CFString
case .mp4:
return AVFileTypeAppleM4A as CFString
case .m4a:
return AVFileTypeAppleM4A as CFString
case .caf:
return AVFileTypeCoreAudioFormat as CFString
}
}
static var supportedFileExtensions: [String] {
return ["wav", "aif", "mp4", "m4a", "caf"]
}
}
public enum ExportFormat: Int {
case wav
case aif
case mp4
case m4a
case caf
}
static public func stringUTI(type: ExportFormat) -> CFString {
switch type {
case .wav:
return AVFileTypeWAVE as CFString
case .aif:
return AVFileTypeAIFF as CFString
case .mp4:
return AVFileTypeAppleM4A as CFString
case .m4a:
return AVFileTypeAppleM4A as CFString
case .caf:
return AVFileTypeCoreAudioFormat as CFString
}
}
static public var supportedFileExtensions: [String] {
return ["wav", "aif", "mp4", "m4a", "caf"]
} Integrating a custom-built iOS framework into NativeScri...
Table of contents
- Title Page
- Copyright
- Credits
- Foreword
- About the Authors
- About the Reviewer
- www.PacktPub.com
- Customer Feedback
- Preface
- Get Into Shape with @NgModule
- Feature Modules
- Our First View via Component Building
- A prettier view with CSS
- Routing and Lazy Loading
- Running the App on iOS and Android
- Building the Multitrack Player
- Building an Audio Recorder
- Empowering Your Views
- @ngrx/store + @ngrx/effects for State Management
- Polish with SASS
- Unit Testing
- Integration Testing with Appium
- Deployment Preparation with webpack Bundling
- Deploying to the Apple App Store
- Deploying to Google Play
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app