Skip to content

Instantly share code, notes, and snippets.

@nazrdogan
Created June 30, 2020 00:30
Show Gist options
  • Save nazrdogan/f418000fc7f1bc26c1407f281fb87528 to your computer and use it in GitHub Desktop.
Save nazrdogan/f418000fc7f1bc26c1407f281fb87528 to your computer and use it in GitHub Desktop.
//
// ViewController.m
// RNClip
//
// Created by Nazir Dogan on 30.06.2020.
//
#import "ViewController.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
@interface ViewController ()
@end
@implementation ViewController
- (void)loadView {
NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.appclip" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"AppClip"
initialProperties:nil
launchOptions:nil];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.view = rootView;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment