login-kit-sample icon indicating copy to clipboard operation
login-kit-sample copied to clipboard

React native, building error -> "No known class method for selector 'fetchUserDataWithQuery:variables:success:failure:"

Open clementinoux opened this issue 4 years ago • 5 comments

Hello,

I'm experiencing difficulties installing the "@snapchat/snap-kit-react-native" with the last version of React Native.

A constant error when building the application is showing : "No known class method for selector 'fetchUserDataWithQuery:variables:success:failure:" (LoginKitModule.m line 151)

**_"@snapchat/snap-kit-react-native": "^0.3.0",
"react": "17.0.2",
"react-native": "0.68.1",_**

👇👇👇 Screen Shot 2022-05-03 at 19 27 32

The lib works well with an older version of React native, but there is a warning on the same line : "'fetchUserDataWithQuery:variables:success:failure:' is deprecated"

_**"@snapchat/snap-kit-react-native": "^0.3.0",
"react": "16.13.1",
"react-native": "^0.63.2",**_

👇👇👇 Screen Shot 2022-05-03 at 19 33 48

Any easy fix? (me not speaking objective C/swift) 🥲 @ramanpreetSinghKhinda @safaiyeh @tphillipssc @eberglundsc @mwestergaardsc-zz

Thxxxxxxxx

clementinoux avatar May 04 '22 02:05 clementinoux

anyone?

lockieluke avatar May 10 '22 17:05 lockieluke

I guess downgrading the SnapSDK directly in the Podfile is a temporary work around but... you know :)

The last pod version I used which was working for me is SnapSDK 1.15.0 pod 'SnapSDK/SCSDKCoreKit', '1.15.0' pod 'SnapSDK/SCSDKLoginKit', '1.15.0' pod 'SnapSDK/SCSDKCreativeKit', '1.15.0'

clementinoux avatar May 12 '22 18:05 clementinoux

thank you very much!

lockieluke avatar May 13 '22 00:05 lockieluke

Hi @clementinoux ,

There are a couple of changes made in the recent version of Snap SDKs that are not ported into Snap React Native bindings.

It should not be a problem for Android because we have a fix version of Snap Android SDK with every release of React Native plugin(ref1, ref2).

However, for iOS snap-kit-react-native.podspec file adds the Snapkit SDK cocoapod as a dependency and because it doesn't have a version provided so it will download the latest available version.

I would suggest you to downgrade for now because we don't have any immediate plans to update the React Native bindings. That being said I'll ask Tamer from iOS team to see if there's something else we can do.

Note: I refer to a private branch in the comment

ramanpreetSinghKhinda avatar May 13 '22 17:05 ramanpreetSinghKhinda

Hi @clementinoux and @lockieluke ,

We've released a new version of the @snapchat/snap-kit-react-native plugin (0.4.0). This update will force the pod install for the SnapSDK to go up to 1.15.0 which is the latest working version with our current react native bindings. We have plans in the near future to update the bindings to support up to 2.1.0. I hope this helps unblock anyone who may have been facing this same issue.

tamerbader avatar Jun 30 '22 20:06 tamerbader