Closed mrsasuu closed 4 years ago
I ran into the same issues, even if it used to works before. I tried deleting build / derived data / pod / nodes_modules but nothings worked.
I find a way to make it works : Error 1: Uncheck pushwoosh-react-native-plugin (Red Arrow) then click on the second error (first blue arrow), red arrow again. Do it again with the second arrow. run again.
The error should appear again so you need to do it again. (2 or 3 times in total i think)
Then it should works. (it did for me).
The first time, i had the error n°2, i changed the import to
I found several interface Pushwoosh on the node_modules, because there is a public and a private folder. I don't know what does it do. I might come from here.
I hope i was clear enough. Good luck
Edit : it seems that Pushwoosh is not undefined when using react-native run-ios but works fine when using Xcode
same issue here
@mrsasuu, @zigoval, @piotr-marat
Checking it.
same, after trying @zigoval suggestion build was successful but pushwoosh has become undefined
@mrsasuu, @zigoval, @piotr-marat, @makarkotlov,
Got it reproduced, will be fixed with the next release.
Meanwhile, you can use the following workaround - open your iOS project in Xcode, Edit -> refactor -> rename class ".../node_modules/pushwoosh-react-native-plugin/src/ios/PushwooshPlugin/Pushwoosh.h" to PushwooshPlugin.
@wfhm
this workaround did half the job for me(perhaps i was doing it wrong) I managed to compile but still Pushwoosh was null in my app
after some digging the trick that fixed that was inserting Pushwoosh into RCT_EXPORT_MODULE:
RCT_EXPORT_MODULE(Pushwoosh); in
node_modules/pushwoosh-react-native-plugin/src/ios/PushwooshPlugin/Pushwoosh.m
The new update fixed it !! thanks a lot !
Fixed with the latest release.
Description
Build fail due to 2 errors right after installing the package as explained here.
Error 1:
<pathToProject>/<react-native-app>/node_modules/pushwoosh-react-native-plugin/src/ios/PushwooshPlugin/Pushwoosh.h:28:1: Duplicate interface definition for class 'Pushwoosh'
Error 2:
<pathToProject>/<react-native-app>/node_modules/pushwoosh-react-native-plugin/src/ios/PushwooshPlugin/Pushwoosh.m:34:17: Definition of 'Pushwoosh' must be imported from module 'Pushwoosh.Pushwoosh' before it is required
Steps To Reproduce
Create a new react-native project => Install pushwoosh-react-native-plugin => install ios pods => open Xcode => build debug on device
Additional Information