Skip to content
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

Merged
merged 13 commits into from
Oct 3, 2016
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion desktop/test/render-visdiff.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import fs from 'fs'
import _ from 'lodash'
import {app, BrowserWindow, ipcMain} from 'electron'
import {resolveRoot, resolveRootAsURL} from '../resolve-root'
import dumbComponentMap from '../shared/dev/dumb-component-map.desktop'
import dumbComponentMap from '../shared/dev/dumb-sheet/component-map.desktop'

const WORKER_COUNT = 10
const CANVAS_SIZE = 1000
Expand Down
6 changes: 1 addition & 5 deletions desktop/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ module.exports = {
loader: 'json',
}, {
test: /\.(gif|png)$/,
loader: 'file',
query: {
emitFile: false,
name: 'NOT_USED_[name].[ext]',
},
loader: 'null',
Copy link
Contributor Author

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

}],
},
output: {
Expand Down
1 change: 1 addition & 0 deletions desktop/webpack.config.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ config.plugins.push(new UnusedFilesWebpackPlugin({
'../shared/test/**',
// Misc
'../shared/packager/wipe-cache.js',
'../shared/dev/log-send/index.js',
],
},
}))
Expand Down
1 change: 0 additions & 1 deletion react-native/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ dependencies {
compile 'com.android.support:appcompat-v7:23.0.1'
compile "com.facebook.react:react-native:+" // From node_modules
compile project(':ReactNativeBarcodescanner')
compile project(':RNPermissionsModule')
compile 'org.slf4j:slf4j-api:1.7.21'
compile 'com.github.tony19:logback-android-core:1.1.1-5'
compile('com.github.tony19:logback-android-classic:1.1.1-5') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import android.util.Log;
import android.view.KeyEvent;

import com.burnweb.rnpermissions.RNPermissionsPackage;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactRootView;
Expand All @@ -33,11 +32,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);

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 {
Expand All @@ -62,12 +56,6 @@ public boolean onKeyUp(int keyCode, KeyEvent event) {
}
return super.onKeyUp(keyCode, event);
}
// For dealing with permissions using RNPermissionsPackage
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
RNPermissionsPackage.onRequestPermissionsResult(requestCode, permissions, grantResults);
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
}

/**
* Returns the name of the main component registered from JavaScript.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import android.util.Log;
import android.view.KeyEvent;

import com.burnweb.rnpermissions.RNPermissionsPackage;
import com.eguma.barcodescanner.BarcodeScannerPackage;
import com.facebook.react.ReactApplication;

Expand Down Expand Up @@ -52,7 +51,6 @@ protected List<ReactPackage> getPackages() {
return Arrays.asList(
new MainReactPackage(),
new BarcodeScannerPackage(),
new RNPermissionsPackage(),
new KBReactPackage(logFile.getAbsolutePath()));
}

Expand Down
2 changes: 1 addition & 1 deletion react-native/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.github.triplet.gradle:play-publisher:1.1.4' // To publish from gradle

// NOTE: Do not place your application dependencies here; they belong
Expand Down
2 changes: 0 additions & 2 deletions react-native/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ rootProject.name = 'Keybase'
include ':app', ':keybaselib'
include ':ReactNativeBarcodescanner', ':app'
project(':ReactNativeBarcodescanner').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-barcodescanner/android')
include ':RNPermissionsModule', ':app'
project(':RNPermissionsModule').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-permissions/android')
51 changes: 19 additions & 32 deletions react-native/ios/Keybase.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
DB1D5FEC1CA99E67006DC784 /* kb.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DB1D5FE21CA99E67006DC784 /* kb.ttf */; };
DB27DE571D747A6C003DE8BC /* Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = DB27DE561D747A6C003DE8BC /* Utils.m */; };
DB7538FD1D776CC400AFA61B /* Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = DB27DE561D747A6C003DE8BC /* Utils.m */; };
DB7539021D776CC400AFA61B /* AppDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = E94938FF1BCC1E4300137015 /* AppDefault.swift */; };
DB7539031D776CC400AFA61B /* App.swift in Sources */ = {isa = PBXBuildFile; fileRef = E94938C61BCC082C00137015 /* App.swift */; };
DB7539041D776CC400AFA61B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E964581C1BC8542000902F39 /* AppDelegate.swift */; };
DB7539071D776CC400AFA61B /* libRCTCamera.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DBF20EBA1BB34AD00048BC26 /* libRCTCamera.a */; };
DB7539081D776CC400AFA61B /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
DB7539091D776CC400AFA61B /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
Expand All @@ -50,6 +47,9 @@
DB75391D1D776CC400AFA61B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DBDCF3081B8D03DD00BA95D8 /* Images.xcassets */; };
DB7539351D777E7100AFA61B /* Engine-Test.m in Sources */ = {isa = PBXBuildFile; fileRef = DB7539341D777E7100AFA61B /* Engine-Test.m */; };
DB7539371D777E8400AFA61B /* LogSend-Test.m in Sources */ = {isa = PBXBuildFile; fileRef = DB7539361D777E8400AFA61B /* LogSend-Test.m */; };
DBBCC6131D9C4A8100312652 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DBBCC6121D9C4A8100312652 /* AppDelegate.m */; };
DBBCC6161D9C4BA700312652 /* KeyListener.m in Sources */ = {isa = PBXBuildFile; fileRef = DBBCC6151D9C4BA700312652 /* KeyListener.m */; };
DBBCC6181D9C5C6A00312652 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DBBCC6171D9C5C6A00312652 /* main.m */; };
DBC44FCE1CD3AF9400A226BC /* Lato_bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DBC44FC71CD3AA1000A226BC /* Lato_bold.ttf */; };
DBC44FCF1CD3AF9400A226BC /* Lato_italic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DBC44FC81CD3AA1000A226BC /* Lato_italic.ttf */; };
DBC44FD01CD3AF9400A226BC /* Lato-Semi_bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DBC44FC91CD3AA1000A226BC /* Lato-Semi_bold.ttf */; };
Expand All @@ -59,13 +59,7 @@
DBC44FD41CD3AF9400A226BC /* SourceCodePro.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DBC44FCD1CD3AA1000A226BC /* SourceCodePro.ttf */; };
DBCE36251B90F14800ECADDE /* Engine.m in Sources */ = {isa = PBXBuildFile; fileRef = DBCE36241B90F14800ECADDE /* Engine.m */; };
DBDCF30E1B8D03DD00BA95D8 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DBDCF3081B8D03DD00BA95D8 /* Images.xcassets */; };
DBDCF3531B8D04FD00BA95D8 /* ObjcTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDCF3501B8D04FD00BA95D8 /* ObjcTest.m */; };
DBDCF3541B8D04FD00BA95D8 /* ReactBridge.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDCF3511B8D04FD00BA95D8 /* ReactBridge.m */; };
DBDCF3551B8D04FD00BA95D8 /* SwiftTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBDCF3521B8D04FD00BA95D8 /* SwiftTest.swift */; };
DBF20EC41BB34AF00048BC26 /* libRCTCamera.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DBF20EBA1BB34AD00048BC26 /* libRCTCamera.a */; };
E94938C71BCC082C00137015 /* App.swift in Sources */ = {isa = PBXBuildFile; fileRef = E94938C61BCC082C00137015 /* App.swift */; };
E94939001BCC1E4300137015 /* AppDefault.swift in Sources */ = {isa = PBXBuildFile; fileRef = E94938FF1BCC1E4300137015 /* AppDefault.swift */; };
E964581D1BC8542000902F39 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E964581C1BC8542000902F39 /* AppDelegate.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -182,6 +176,11 @@
DB7539311D77753600AFA61B /* Keybase_For_Tests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Keybase_For_Tests-Bridging-Header.h"; sourceTree = "<group>"; };
DB7539341D777E7100AFA61B /* Engine-Test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Engine-Test.m"; sourceTree = "<group>"; };
DB7539361D777E8400AFA61B /* LogSend-Test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "LogSend-Test.m"; sourceTree = "<group>"; };
DBBCC6111D9C4A8100312652 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
DBBCC6121D9C4A8100312652 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
DBBCC6141D9C4BA700312652 /* KeyListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyListener.h; sourceTree = "<group>"; };
DBBCC6151D9C4BA700312652 /* KeyListener.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KeyListener.m; sourceTree = "<group>"; };
DBBCC6171D9C5C6A00312652 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
DBC44FC71CD3AA1000A226BC /* Lato_bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = Lato_bold.ttf; path = ../../../desktop/renderer/fonts/Lato_bold.ttf; sourceTree = "<group>"; };
DBC44FC81CD3AA1000A226BC /* Lato_italic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = Lato_italic.ttf; path = ../../../desktop/renderer/fonts/Lato_italic.ttf; sourceTree = "<group>"; };
DBC44FC91CD3AA1000A226BC /* Lato-Semi_bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Lato-Semi_bold.ttf"; path = "../../../desktop/renderer/fonts/Lato-Semi_bold.ttf"; sourceTree = "<group>"; };
Expand All @@ -194,14 +193,7 @@
DBDCF3081B8D03DD00BA95D8 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
DBDCF3091B8D03DD00BA95D8 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
DBDCF3441B8D04FC00BA95D8 /* Keybase-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Keybase-Bridging-Header.h"; sourceTree = "<group>"; };
DBDCF34F1B8D04FD00BA95D8 /* ObjcTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjcTest.h; sourceTree = "<group>"; };
DBDCF3501B8D04FD00BA95D8 /* ObjcTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjcTest.m; sourceTree = "<group>"; };
DBDCF3511B8D04FD00BA95D8 /* ReactBridge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReactBridge.m; sourceTree = "<group>"; };
DBDCF3521B8D04FD00BA95D8 /* SwiftTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftTest.swift; sourceTree = "<group>"; };
DBF20EB41BB34AD00048BC26 /* RCTCamera.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTCamera.xcodeproj; path = "../node_modules/react-native-camera/ios/RCTCamera.xcodeproj"; sourceTree = "<group>"; };
E94938C61BCC082C00137015 /* App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = App.swift; sourceTree = "<group>"; };
E94938FF1BCC1E4300137015 /* AppDefault.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDefault.swift; sourceTree = "<group>"; };
E964581C1BC8542000902F39 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -418,20 +410,18 @@
children = (
DB1D5FD61CA99DF4006DC784 /* Fonts */,
005BF9961BB9C6B000BD8953 /* Keybase.entitlements */,
E94938FF1BCC1E4300137015 /* AppDefault.swift */,
E964581C1BC8542000902F39 /* AppDelegate.swift */,
E94938C61BCC082C00137015 /* App.swift */,
DBBCC6111D9C4A8100312652 /* AppDelegate.h */,
DBBCC6121D9C4A8100312652 /* AppDelegate.m */,
DBBCC6141D9C4BA700312652 /* KeyListener.h */,
DBBCC6151D9C4BA700312652 /* KeyListener.m */,
DBDCF3081B8D03DD00BA95D8 /* Images.xcassets */,
DBDCF3091B8D03DD00BA95D8 /* Info.plist */,
DBCE36231B90F14800ECADDE /* Engine.h */,
DBCE36241B90F14800ECADDE /* Engine.m */,
DBBCC6171D9C5C6A00312652 /* main.m */,
DB7539341D777E7100AFA61B /* Engine-Test.m */,
DBDCF34F1B8D04FD00BA95D8 /* ObjcTest.h */,
DBDCF3501B8D04FD00BA95D8 /* ObjcTest.m */,
DBDCF3511B8D04FD00BA95D8 /* ReactBridge.m */,
DB27DE551D747A6B003DE8BC /* Utils.h */,
DB27DE561D747A6C003DE8BC /* Utils.m */,
DBDCF3521B8D04FD00BA95D8 /* SwiftTest.swift */,
A969A4161CF65CB200F273F2 /* LogSend.h */,
A969A4091CF65C9C00F273F2 /* LogSend.m */,
DB7539361D777E8400AFA61B /* LogSend-Test.m */,
Expand Down Expand Up @@ -523,6 +513,7 @@
};
13B07F861A680F5B00A75B9A = {
DevelopmentTeam = 99229SGT5K;
LastSwiftMigration = 0800;
SystemCapabilities = {
com.apple.ApplicationGroups.iOS = {
enabled = 1;
Expand Down Expand Up @@ -779,13 +770,10 @@
files = (
DB27DE571D747A6C003DE8BC /* Utils.m in Sources */,
A969A40A1CF65C9C00F273F2 /* LogSend.m in Sources */,
DBDCF3531B8D04FD00BA95D8 /* ObjcTest.m in Sources */,
DBBCC6181D9C5C6A00312652 /* main.m in Sources */,
DBCE36251B90F14800ECADDE /* Engine.m in Sources */,
DBDCF3551B8D04FD00BA95D8 /* SwiftTest.swift in Sources */,
E94939001BCC1E4300137015 /* AppDefault.swift in Sources */,
E94938C71BCC082C00137015 /* App.swift in Sources */,
E964581D1BC8542000902F39 /* AppDelegate.swift in Sources */,
DBDCF3541B8D04FD00BA95D8 /* ReactBridge.m in Sources */,
DBBCC6131D9C4A8100312652 /* AppDelegate.m in Sources */,
DBBCC6161D9C4BA700312652 /* KeyListener.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -794,11 +782,8 @@
buildActionMask = 2147483647;
files = (
DB7538FD1D776CC400AFA61B /* Utils.m in Sources */,
DB7539021D776CC400AFA61B /* AppDefault.swift in Sources */,
DB7539371D777E8400AFA61B /* LogSend-Test.m in Sources */,
DB7539351D777E7100AFA61B /* Engine-Test.m in Sources */,
DB7539031D776CC400AFA61B /* App.swift in Sources */,
DB7539041D776CC400AFA61B /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -886,6 +871,7 @@
PROVISIONING_PROFILE = "";
SWIFT_OBJC_BRIDGING_HEADER = "Keybase/Keybase-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand Down Expand Up @@ -922,6 +908,7 @@
PRODUCT_NAME = Keybase;
PROVISIONING_PROFILE = "";
SWIFT_OBJC_BRIDGING_HEADER = "Keybase/Keybase-Bridging-Header.h";
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand Down
42 changes: 0 additions & 42 deletions react-native/ios/Keybase/App.swift

This file was deleted.

30 changes: 0 additions & 30 deletions react-native/ios/Keybase/AppDefault.swift

This file was deleted.

18 changes: 18 additions & 0 deletions react-native/ios/Keybase/AppDelegate.h
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
Loading