/Audio-Player-Test-Application

To Test the implementation of react-native-ios-network-audio

Primary LanguageObjective-C

Test application for react-native-ios-network-audio


###Screenshot of test application


##Steps I took to install Successfully:

###Step1:

  • Ran 'npm install react-native-ios-network-audio --save'


  • ###Step2:
  • Find the node_modules folder and open the project directore in Xcode



  • Drag the '.h' and '.m' files into Xcode in the same directory as AppDelegate.m/.h
  • Select copy items if needed and click "finish"


  • Your directory should look like this when you finish



  • ###Step3:
  • Modified the Info section of my project
  • Added "Required Background Modes" section with 1 item: "App plays audio or streams ..."
  • Added item to "App Transport Security Settings" to "Allow Arbitrary Loads" (This is required for audio url's that are not secure [http vs. https])



  • ##Things to Note:

    • This test application was written in es6 format as react-native has shifted towards this, but the original documentation for this package is written in pure jsx syntax
    • In order to run the test application you may not need to follow any of these steps

  • For using an audio session to allow for audio to play in the background, refer to my code additions in AppDelegate.m