b8ne / react-native-pusher-push-notifications

Manage pusher interest subscriptions and notification events in Javascript.
MIT License
99 stars 86 forks source link

Issues with RN 0.59, cannot find header declartions #37

Closed emilkarl closed 5 years ago

emilkarl commented 5 years ago

Im seeing these errors when trying to compile my project. Anyone seen these and solved it?

No visible @interface for 'PushNotifications' declares the selector 'unsubscribeWithInterest:error:completion:'

image

emilkarl commented 5 years ago

Seems to be when using newer version of https://github.com/pusher/push-notifications-swift

https://github.com/pusher/push-notifications-swift/commit/c827c4654cc7ecad331dbf52d08d1e0effdbc7df

NotTooReact89 commented 5 years ago

Hi I am still seeing this error in the new version of push-notifications-swift. Tried to downgrade it to 2.0.0 and I still see this.

alanpilloud commented 5 years ago

I am also experiencing this issue and tried to downgrade using version 2.0.0 too, without any chance.

@emilkarl Could you explain us how you got rid of these errors ?

emilkarl commented 5 years ago

@alanpilloud I fixed it by using the thing described in #38, specify an older version in the cartfile.

github "pusher/push-notifications-swift" ~> 2.0.0

emilkarl commented 5 years ago

Are you sure you have downgraded to the correct version? This was a really long time ago so I cant really remember, all I know is that #38 solved it for me.

alanpilloud commented 5 years ago

@emilkarl This is what I tried first but using ~> downloads the 2.1.2 version, so I also tried with == to get the exact version.

For react-native-pusher-push-notifications, I use version 2.1.0, so your Pull Request should be included in this version. However, I can't see your modifications in RNPusherPushNotifications.m.

I tried to search for the modifications you did in your PR, but they are not applied in the current version of react-native-pusher-push-notifications (2.1.0) and previous ones.

So I copy/pasted your code in my local RNPusherPushNotifications.m file and it worked. I will probably fork this project.

Now, I am wondering if this is an issue for everybody, or just those using react-native 0.59 ...

Anyway, thanks a lot for your help, this is very kind of you !

emilkarl commented 5 years ago

Hmm hard to say, have you tried? github "pusher/push-notifications-swift" == 1.3.0 Unsure but I dont think 2.1 works.

emilkarl commented 5 years ago

@alanpilloud Had a look in my project now and also read up a little more on it. You cannot use ~>2.0.0 of push-notifications-swift so the latest version you can use is 1.3.0. You can see in the changelog that all the API calls have changed in the library and thats why it's not working: https://github.com/pusher/push-notifications-swift/blob/master/CHANGELOG.md#200---2019-04-12

Here is my files

package.json

"react-native-pusher-push-notifications": "^2.1.0",

Cartfile

github "pusher/push-notifications-swift" == 1.3.0
alanpilloud commented 5 years ago

@emilkarl Thank you, I will try monday.

alanpilloud commented 5 years ago

@emilkarl Thanks a lot, this is working fine ! I've just had to go through the manual installation once again, and it's done.

Thanks again !