Skip to content

Commit

Permalink
Add native linking logic for ios
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonpage committed Nov 16, 2016
1 parent c861cc8 commit fddf95e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ios/Magnet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../node_modules/react-native/React/**",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS",
);
INFOPLIST_FILE = Magnet/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
Expand Down Expand Up @@ -1006,6 +1007,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../node_modules/react-native/React/**",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS",
);
INFOPLIST_FILE = Magnet/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
Expand Down Expand Up @@ -1063,6 +1065,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../node_modules/react-native/React/**",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS/RCTLinkingManager.h",
);
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
MTL_ENABLE_DEBUG_INFO = YES;
Expand Down Expand Up @@ -1105,6 +1108,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../node_modules/react-native/React/**",
"$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient",
"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS/RCTLinkingManager.h",
);
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
MTL_ENABLE_DEBUG_INFO = NO;
Expand Down
6 changes: 6 additions & 0 deletions ios/Magnet/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#import "RCTBundleURLProvider.h"
#import "RCTRootView.h"
#import "RCTBridge.h"
#import "RCTLinkingManager.h"

// Include the project headers for swift code. (<project-name>-Swift.h)
#import "magnet-Swift.h"
Expand Down Expand Up @@ -67,4 +68,9 @@ -(void)application:(UIApplication *)application didReceiveLocalNotification:(UIL
[self.bridge.eventDispatcher sendDeviceEventWithName:@"notification:applaunch" body:nil];
}

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [RCTLinkingManager application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
}


@end
11 changes: 11 additions & 0 deletions ios/Magnet/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
<string>1.2.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>org.mozilla.magnet</string>
<key>CFBundleURLSchemes</key>
<array>
<string>mozilla-magnet</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>7</string>
<key>LSRequiresIPhoneOS</key>
Expand Down
2 changes: 1 addition & 1 deletion lib/store/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Dependencies
*/

const debug = require('../debug')('reducer', 1);
const debug = require('../debug')('reducer');
const config = require('../../config');

const {
Expand Down

0 comments on commit fddf95e

Please sign in to comment.