O'Reilly logo

React Native Blueprints by Emilio Rodriguez Martinez

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

Writing the native module

We need XCode to write the native module, which will use the microphone to record samples and to analyze those samples to calculate the main frequency. As we are not interested in how these calculations are made, we will use an open source library to delegate most of the recording and FFT calculations. The library is named SCListener and a fork of it can be found at https://github.com/emilioicai/sc_listener.

We need to download the library and add its files to the project following these steps:

  1. Navigate to the folder where our iOS project is: <project_folder>/ios/.
  2. Double-click on guitarTuner.xcodeproj, which should open XCode.

 

  1. Right-click on the guitarTuner folder and click on Add Files to "guitarTuner"... ...

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