react-native-code-push icon indicating copy to clipboard operation
react-native-code-push copied to clipboard

IOS: question about setup react native code push on IOS

Open emclab opened this issue 1 year ago • 2 comments

Not a bug. This is a question about setup code push on React Native. 0.68 I am following doc to setup code push. Here is the step in doc:

Open up the AppDelegate.m file, and add an import statement for the CodePush headers:

#import <CodePush/CodePush.h>
Find the following line of code, which sets the source URL for bridge for production releases:

return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
Replace it with this line:

return [CodePush bundleURL];

But my AppDelegate.m file is very simple and there is no return [[NSBundle mainBundle] :

#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>

@property (nonatomic, strong) UIWindow *window;

@end

Where can I replace and add return [CodePush bundleURL];?

emclab avatar Jul 19 '22 23:07 emclab

Hi @emclab, Does code push supports react native version 0.68.1. Because as per the documentation only these versions are mentioned

image

geekyoperand avatar Jul 26 '22 22:07 geekyoperand

That is AppDelegate.h, i.e. the header file for AppDelegate, not AppDelegate.m, the implementation file.

fendorio avatar Sep 16 '22 13:09 fendorio

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.

ghost avatar Nov 15 '22 17:11 ghost

This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.

ghost avatar Nov 30 '22 18:11 ghost