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:
- Navigate to the folder where our iOS project is: <project_folder>/ios/.
- Double-click on guitarTuner.xcodeproj, which should open XCode.
- Right-click on the guitarTuner folder and click on Add Files to "guitarTuner"... ...