Skip to content

Commit 0fbebb5

Browse files
committed
Clean up formatting
1 parent 860745c commit 0fbebb5

3 files changed

Lines changed: 15 additions & 9 deletions

File tree

chapter-13/ios-specific/InvokeFromNative/index.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,24 @@ import {
1414
} from 'react-native';
1515

1616
class InvokeFromNative extends Component {
17+
state = {
18+
status: 'App Running'
19+
}
20+
1721
componentWillMount() {
18-
this.setState({
19-
status: 'App Running'
20-
});
2122
Linking.addEventListener('url', this.onAppInvoked);
2223
}
24+
2325
componentWillUnmount() {
24-
Linking.removeEventListener('url', this.onAppInvoked);
26+
Linking.removeEventListener('url', this.onAppInvoked);
2527
}
28+
2629
onAppInvoked = (event) => {
2730
this.setState({
28-
status: `App Invoked by ${event.url}`
31+
status: `App Invoked by ${ event.url }`
2932
});
3033
}
34+
3135
render() {
3236
return (
3337
<View style={styles.container}>

chapter-13/ios-specific/InvokeFromNative/ios/InvokeFromNative.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,6 +1208,7 @@
12081208
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
12091209
CURRENT_PROJECT_VERSION = 1;
12101210
DEAD_CODE_STRIPPING = NO;
1211+
HEADER_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native/Libraries/**";
12111212
INFOPLIST_FILE = InvokeFromNative/Info.plist;
12121213
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
12131214
OTHER_LDFLAGS = (
@@ -1226,6 +1227,7 @@
12261227
buildSettings = {
12271228
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
12281229
CURRENT_PROJECT_VERSION = 1;
1230+
HEADER_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native/Libraries/**";
12291231
INFOPLIST_FILE = InvokeFromNative/Info.plist;
12301232
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
12311233
OTHER_LDFLAGS = (

chapter-13/ios-specific/InvokeFromNative/ios/InvokeFromNative/AppDelegate.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
3434
return YES;
3535
}
3636

37-
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
38-
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
37+
- (BOOL)application:(UIApplication *)application
38+
openURL:(NSURL *)url
39+
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
3940
{
40-
return [RCTLinkingManager application:application openURL:url
41-
sourceApplication:sourceApplication annotation:annotation];
41+
return [RCTLinkingManager application:application openURL:url options:options];
4242
}
4343

4444
@end

0 commit comments

Comments
 (0)