Eloy Durán 2d9b0803e0
feat(macOS): Make podspec compatible with macOS (#1328)
* [apple] Move iOS/macOS src into common apple dir

* [apple] Enable macOS as platform in podspec

* [example] Use CocoaPods & auto-linking on macOS

* [docs] Update setup for macOS

* [package] Include apple dir in distribution
2020-04-24 19:54:17 +02:00

33 lines
823 B
Objective-C

#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
@interface AppDelegate () <RCTBridgeDelegate>
@end
@implementation AppDelegate
- (void)awakeFromNib {
[super awakeFromNib];
_bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:nil];
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// Insert code here to initialize your application
}
- (void)applicationWillTerminate:(NSNotification *)aNotification {
// Insert code here to tear down your application
}
#pragma mark - RCTBridgeDelegate Methods
- (NSURL *)sourceURLForBridge:(__unused RCTBridge *)bridge {
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"example/index" fallbackResource:@"main"]; // .jsbundle;
}
@end