Browse Source

add iOS setup step 3b. remove RCTBridgeDelegate from AppDelegate.h (#4868)

Chen Zhao 5 years ago
parent
commit
f9aabf2ee9
1 changed files with 13 additions and 1 deletions
  1. 13
    1
      docs/docs/Installing.md

+ 13
- 1
docs/docs/Installing.md View File

43
 	@end
43
 	@end
44
 	```
44
 	```
45
 
45
 
46
-3a. If, in Xcode, you see the following error message in `AppDelegate.m` next to `#import "RCTBundleURLProvider.h": 
46
+3a. If, in Xcode, you see the following error message in `AppDelegate.m` next to `#import "RCTBundleURLProvider.h"`: 
47
 ```
47
 ```
48
 ! 'RCTBundleURLProvider.h' file not found
48
 ! 'RCTBundleURLProvider.h' file not found
49
 ```
49
 ```
51
 
51
 
52
 To make the `React` scheme available to your project, run `npm install -g react-native-git-upgrade` followed by `react-native-git-upgrade`. Once this is done, you can click back to the menu in Xcode: `Product -> Scheme -> Manage Schemes`, then click '+' to add a new scheme. From the `Target` menu, select "React", and click the checkbox to make the scheme `shared`. This should make the error disappear.
52
 To make the `React` scheme available to your project, run `npm install -g react-native-git-upgrade` followed by `react-native-git-upgrade`. Once this is done, you can click back to the menu in Xcode: `Product -> Scheme -> Manage Schemes`, then click '+' to add a new scheme. From the `Target` menu, select "React", and click the checkbox to make the scheme `shared`. This should make the error disappear.
53
 
53
 
54
+3b. If, in Xcode, you see the following warning message in `AppDelegate.m` next to `#import "@implementation AppDelegate"`:
55
+```
56
+Class 'AppDelegate' does not conform to protocol 'RCTBridgeDelegate'
57
+```
58
+You can remove `RCTBridgeDelegate` from this file: `AppDelegate.h`:
59
+```diff
60
+- #import <React/RCTBridgeDelegate.h>
61
+- @interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
62
++ @interface AppDelegate : UIResponder <UIApplicationDelegate>
63
+	...
64
+```
65
+
54
 ## Android
66
 ## Android
55
 
67
 
56
 > Make sure your Android Studio installation is updated. We recommend editing `gradle` and `java` files in Android Studio as the IDE will suggest fixes and point out errors, this way you avoid most common pitfalls.
68
 > Make sure your Android Studio installation is updated. We recommend editing `gradle` and `java` files in Android Studio as the IDE will suggest fixes and point out errors, this way you avoid most common pitfalls.