react-native-audio-streaming: undefined is not an object (evaluating 'ReactNativeAudioStreaming.getStatus')

I’m trying to add the player to the sample app that react creates and am getting an exception when running iOS. I installed react-native-audio-streaming using the cocoapod technique and specified the background audio setting.

My component looks like:

import React, { Component } from 'react';
import {
  StyleSheet,
  Text,
  View
} from 'react-native';
import { Player } from 'react-native-audio-streaming';

export default class App extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>
          Welcome to React Native!
        </Text>
        <Text style={styles.instructions}>
          To get started, edit index.ios.js
        </Text>
        <Text style={styles.instructions}>
          Press Cmd+R to reload,{'\n'}
          Cmd+D or shake for dev menu
        </Text>
        <Player url={"http://lacavewebradio.chickenkiller.com:8000/stream.mp3"} />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
});

I’m very new to react-native and ios development, so I could very well be missing something trivial 😃

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Reactions: 1
  • Comments: 23 (2 by maintainers)

Most upvoted comments

any updates on this? i’m getting the same error

@tb9jen Hey, this worked for me. So, thanks. I think many folks here are getting stuck up with the libPods-ReactNativeAudioStreaming vs lib-ReactNativeAudioStreaming.

FYI - I used install option #2.

Same issue

use the manual way (3rd option) to solve this

Tried all installation types and I still get same error fatal error: ‘React/RCTBridgeModule.h’ file not found #import <React/RCTBridgeModule.h>

@tb9jen you saved me 😃 Dragging ReactNativeAudioStreaming.xcodeproj inside project did the trick. Thanks!