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"... ...

Get React Native Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.