Skip to content

Instantly share code, notes, and snippets.

@GaborWnuk
Created September 22, 2018 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GaborWnuk/e846538bee9813512563258ac2b83c39 to your computer and use it in GitHub Desktop.
Save GaborWnuk/e846538bee9813512563258ac2b83c39 to your computer and use it in GitHub Desktop.
RNChannels.m for React Native Car Play
#import "AppDelegate.h"
#import "RNChannels.h"
@interface RNChannels()
@end
@implementation RNChannels
RCT_EXPORT_MODULE()
- (dispatch_queue_t)methodQueue
{
return dispatch_get_main_queue();
}
RCT_EXPORT_METHOD(setChannels:(nonnull NSArray *)channels) {
AppDelegate *delegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
delegate.channels = channels;
[[MPPlayableContentManager sharedContentManager] reloadData];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment