-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates react native to 0.34 and cleans up the dev menu #4453
Changes from 10 commits
28d04ee
bc26ecd
ad23dc0
8eb0944
eafa2e1
9d03cc8
0c81d35
77c2cb4
1ca8f63
a7e97e6
d1c2b96
3ac4e6a
ca15c63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,11 +33,6 @@ public class MainActivity extends ReactActivity { | |
@TargetApi(Build.VERSION_CODES.KITKAT) | ||
protected void onCreate(Bundle savedInstanceState) { | ||
logFile = this.getFileStreamPath("android.log"); | ||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M && !Settings.canDrawOverlays(this) && this.getUseDeveloperSupport()) { | ||
Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION, Uri.parse("package:" + getPackageName())); | ||
startActivityForResult(intent, -1); | ||
} | ||
|
||
initOnce(this.getFilesDir().getPath(), logFile.getAbsolutePath(), "staging", false); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seemingly works fine without this. This is setup in other RN code so i think we don't need to do this ourselves anymore |
||
|
||
try { | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// AppDelegate.h | ||
// Keybase | ||
// | ||
// Created by Chris Nojima on 9/28/16. | ||
// Copyright © 2016 Keybase. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@class Engine; | ||
|
||
@interface AppDelegate : UIResponder <UIApplicationDelegate> | ||
|
||
@property (nonatomic, strong) UIWindow *window; | ||
@property (nonatomic, strong) Engine * engine; | ||
|
||
@end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// | ||
// AppDelegate.m | ||
// Keybase | ||
// | ||
// Created by Chris Nojima on 9/28/16. | ||
// Copyright © 2016 Keybase. All rights reserved. | ||
// | ||
|
||
#import "AppDelegate.h" | ||
|
||
#import "RCTBundleURLProvider.h" | ||
#import "RCTRootView.h" | ||
#import "KeyListener.h" | ||
#import "Engine.h" | ||
#import "LogSend.h" | ||
|
||
@interface AppDelegate () | ||
|
||
@property (nonatomic, strong) LogSend * logSender; | ||
|
||
@end | ||
|
||
@implementation AppDelegate | ||
|
||
- (void) setupGo | ||
{ | ||
|
||
NSNumber * SecurityAccessGroupOverride = | ||
#if SIMULATOR | ||
@YES; | ||
#else | ||
@NO; | ||
#endif | ||
|
||
NSString * home = NSHomeDirectory(); | ||
|
||
#if TESTING | ||
#else | ||
NSString * logFile = [home stringByAppendingPathComponent:@"ios.log"]; | ||
|
||
NSError * err; | ||
self.engine = [[Engine alloc] initWithSettings:@{ | ||
@"runmode": @"staging", | ||
@"homedir": home, | ||
@"logFile": logFile, | ||
@"serverURI": @"", | ||
@"SecurityAccessGroupOverride": SecurityAccessGroupOverride | ||
} error:&err]; | ||
|
||
self.logSender = [[LogSend alloc] initWithPath:logFile]; | ||
#endif | ||
|
||
} | ||
|
||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | ||
{ | ||
[self setupGo]; | ||
|
||
NSURL *jsCodeLocation; | ||
|
||
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. way simpler |
||
|
||
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation | ||
moduleName:@"Keybase" | ||
initialProperties:nil | ||
launchOptions:launchOptions]; | ||
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; | ||
|
||
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; | ||
KeyListener *rootViewController = [KeyListener new]; | ||
rootViewController.bridge = rootView.bridge; | ||
rootViewController.view = rootView; | ||
self.window.rootViewController = rootViewController; | ||
[self.window makeKeyAndVisible]; | ||
return YES; | ||
} | ||
|
||
@end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is pretty slow so i removed it. less safe but takes half the time to webpack build