O'Reilly logo

React Native - Building Mobile Apps with JavaScript by Vladimir Novick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Diving into iOS and Objective-C

Let's, for instance, give our app the ability to use authorize with Siri. On iOS, by default, we are using Objective-C. When working in Objective-C, we need to perform the following steps:

  1. Create the ios/SpeechManager folder.
  2. Create a header file. In our example, we will simply create the SpeechManager native module, which will use the iOS speech API for transforming text to speech.
  3. We will create a folder under the iOS folder and call it SpeechManager.
  4. Create an Objective-C file for our SpeechManager implementation; we will call it SpeechManager.m.
  1. Open a XCode project and drag and drop the SpeechManager files into the project:
  1. When we drop them, XCode will display the following prompt, asking us whether ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required