-
Notifications
You must be signed in to change notification settings - Fork 121
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
iOS build fails with "Use of undeclared identifier 'RNNordicDfu'" error #171
Comments
@mtsap it's properly because of node version, you can try node v14.16.1 |
Does not build either with node v14.16.1 @Tale-Dev |
@samuel-gallet thanks, are there any problem with node v14.16.1? |
@samuel-gallet @Tale-Dev for me it buit. It was my mistake. I put the imports below this line: Moved them above and now it works. |
Solution 1) Solution 2)
Patch
|
Hi @CptFabulouso thank you for the explanation of the import problem. I will add a fix to this fork and I will update the readme. |
Ok. Btw I now think the second solution should also work with Flipper. I managed to make work Flipper with newest react-native-firebase, which also needs to use My solution was to add following to Podfile:
And if that does not work, someone found another approach described here. |
This is really promising. Currently struggling to get it to build for an Expo app. I used @manualexSP fork with the readme instructions but it didn't build. If anyone could help, would really appreciate it. If I don't want to lose Flipper functionality, should I try static_frameworks = ['react-native-nordic-dfu'] as per @CptFabulouso suggestion? Podfile
AppDelegate.mm
|
@ervibern I will give it a try to the @CptFabulouso mention and I will come back this week to you guys. |
Ok so I tested on a
I updated the README and I put two solutions one with FlipperConfiguration.disabled and one with FlipperConfiguration.enabled. check here I also added a new section with @ervibern give it a try now and let us know how it works. Also, I never tested this library with Expo and I never worked with it, so I'm not sure how things are going to work for you. |
@manualexSP Can confirm that your current fork builds and works on my app with react native 0.70.8 and expo 47.0.14! :) Flipper is enabled and works together with DFU package. I have to figure out how to add those custom modifications to Podfile and AppDelegate.mm to the Expo project but this is a separate topic. Thanks for your work! |
@ervibern Hi, i am also struggling to make DFU work in an expo project (49.0.0). Have you figured out how to incorporate those modifications to Podfile and AppDelegate.mm? Very much stuck with this and i really hope you can help :) |
Hi @eddyv19 - sorry for the late response but here is how I made it work for my use case. Hope it helps! First, you need to add the following modifications to AppDelegate.mm file.
Then you need to modify the Podfile.
With those modifications the app built fine and I was able to use DFU functionality. However, if you are using Expo Managed workflow and want to generate the native files during the build process, you need to write a custom plugin that writes the modification during build time. The custom plugin needs to be added to your Expo app configuration file app.json (or app.config.js).
Here is the custom plugin file that I added in plugin/nordic-dfu folder (name is arbitrary).
|
Hi @ervibern. Thanks very much for the elaborate reply. I really appreciate it.! I have not had a chance to try it but will do so today. |
Hi @ervibern Wonderful! Even with the plugin defined! Completely wonderful. More people like you in the world! Thank you! :) Will try it out ASAP! |
Once again. Thanks @ervibern. Tested it out and it builds nice in Expo. Small typo above:
|
I think it is related, solutions above do not work? |
I do not, but this is outside my area of experience, so I'm probably doing something completely wrong. I tried disabling flipper and adding the import line, but now RTCBridge is breaking, before it gets to the IOSDFU import.
|
Tried it with this repo as well the one mentioned in the Readme.
Also tried adding the following line to the Podfile
pod "react-native-nordic-dfu", path: "../node_modules/react-native-nordic-dfu"
with no success.
npx react-native info
output:System: OS: macOS 12.4 CPU: (4) x64 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz Memory: 29.89 MB / 8.00 GB Shell: 5.9 - /usr/local/bin/zsh Binaries: Node: 12.19.0 - ~/.nvm/versions/node/v12.19.0/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 6.14.15 - ~/node-projects/arion2-app/node_modules/.bin/npm Watchman: 2022.06.13.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Android NDK: 22.1.7171670 IDEs: Android Studio: 4.2 AI-202.7660.26.42.7486908 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild Languages: Java: 10.0.2 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 react-native-macos: Not Found npmGlobalPackages: *react-native*: Not Found
The text was updated successfully, but these errors were encountered: