-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
'CodePush.h' file not found #662
Comments
@sergey-akhalkov I'm having the same issue, have you been able to fix it? |
@SamMatthewsIsACommonName, hi! Could you please try to fix it by installing CodePush plugin manually (look at pt.6)? |
Hi @sergey-akhalkov I ended up using an earlier version of React Native and worked fine. Cheers! |
Due to changes in new release of `react-native@0.40.0` there is `CodePush.h file not found` error occures. To fix it I've added `CodePush.h` header file in `Headers` and `Copy Files` build phases and changed `codePushHeaderImportStatement` variable value from `#import "CodePush.h"` to `#import <CodePush/CodePush.h>` in `postlink.js` file. Fix microsoft#662
Instead of `#import "CodePush.h"`, use `#import "<CodePush/CodePush.h>` and export CodePush.h from our module. * [iOS][Build] Add `Headers` and `Copy Files` build phases Due to changes in new release of `react-native@0.40.0` there is `CodePush.h file not found` error occures. To fix it I've added `CodePush.h` header file in `Headers` and `Copy Files` build phases and changed `codePushHeaderImportStatement` variable value from `#import "CodePush.h"` to `#import <CodePush/CodePush.h>` in `postlink.js` file. Fix #662 * readme: update iOS manual plugin installation/usage documentation Due to changes in React Native v0.40.0 and changes in CodePush project Step 6. of iOS manual plugin installation (add “Header Search Paths”) is not needed anymore. Also changed path to `CodePush.h` file in `AppDelegate.m` to `#import <CodePush/CodePush.h>`
Thanks @anhtuank7c |
Check the Header Search Paths under each target. For me, it was
It should have been
|
Running
|
This was the output I got related to CodePush when I did rnpm-install info Android module react-native-code-push is already linked None of the above solutions worked for me. @anhtuank7c did you uninstall codepush first before manually installing it? If so, how did you go about doing so? I get this when I try to link CodePush.h: warning: skipping file '/Users/jackmead/Documents/Workspace/tesseract-mobile/node_modules/react-native-code-push/ios/CodePush/CodePush.h' (unexpected file type 'sourcecode.c.h' in Frameworks & Libraries build phase) |
Manual configuration worked for me. |
Had to do what you advised @mcrowe to get it running. Thanks for sharing the solution! |
After |
It works for me |
Happened to me today with a fresh install of NPM v12.6.0 via NVM and following the instructions using react-native-link here: https://docs.microsoft.com/en-us/appcenter/distribution/codepush/react-native#getting-started The Library import of CodePush and library binary libz.tbd linking had not been done, but the code transform of return [CodePush bundleURL]; had been done, as well as the Info.plist updates. EDIT: Just followed the manual install instructions and it's still not working. I also did the pod install in the ios folder just for hecks since someone else said it resolved their issues. EDIT 2: After performing the manual steps, I had to clean my build folder and rebuild the project. Seems to be up and running now. |
@vitozyf Could you give a quick run down on how exactly you update the paths? I'm not sure how to do it. |
i faced a similar issue, and fortunately, i could fix it "react-native": "0.72.4",
"react-native-code-push": "^8.2.1" you need just to add
|
react-native init myapp
cd myapp
thennpm install --save react-native-code-push@1.16.1-beta
react-native link react-native-code-push
myapp
using xcode I've got following error:Seems like
react-native link react-native-code-push
command works wrong.Created issue in react-native repo: facebook/react-native#11747
The text was updated successfully, but these errors were encountered: