Created
October 15, 2015 04:48
-
-
Save stan229/1f0705b4b4f443def8ae to your computer and use it in GitHub Desktop.
Communicating with React Native app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) mediaPicker:(MPMediaPickerController *)mediaPicker didPickMediaItems:(MPMediaItemCollection *)mediaItemCollection { | |
MPMediaItem *mediaItem = mediaItemCollection.items[0]; | |
NSURL *assetURL = [mediaItem valueForProperty:MPMediaItemPropertyAssetURL]; | |
[self.bridge.eventDispatcher sendAppEventWithName:@"SongPlaying" body:[mediaItem valueForProperty:MPMediaItemPropertyTitle]]; | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment