react-native-zendesk icon indicating copy to clipboard operation
react-native-zendesk copied to clipboard

Module compiled with Swift 5.1.2 cannot be imported by the Swift 5.2 compiler

Open react-native-engineer opened this issue 5 years ago • 10 comments

react-native-engineer avatar Apr 07 '20 03:04 react-native-engineer

Is there any fix available for this issue ??

ghost avatar May 28 '20 11:05 ghost

Anybody get the PR to work?

thedarkcder avatar Jul 09 '20 23:07 thedarkcder

I was able to get it to work. I took the changes from PR #24 in my locally installed version of react-native-zendesk, but had to then re-run pod install. Then, there was a build issue where I had to comment out a line that would hide the support -- this should be easy to find.

Meegul avatar Jul 14 '20 21:07 Meegul

Me to - needed to update Xcode to latest.

But I'm using another updated fork

thedarkcder avatar Jul 14 '20 21:07 thedarkcder

What's the fork? Not too keen on managing a fork myself, and I will need to use one until this library gets updated.

Meegul avatar Jul 14 '20 21:07 Meegul

There you go

https://github.com/thanx/react-native-zendesk

No offence jacky

thedarkcder avatar Jul 14 '20 21:07 thedarkcder

Just a note, before #24 is merged I had to do this for a workaround with the Swift 5.2 changes: https://github.com/maxhungry/react-native-zendesk/commit/572e65f73dd6c60f136cfdc81a9f95b179321a95

maxhungry avatar Jul 14 '20 21:07 maxhungry

Do we need to use swift 5.2 in order to use the library ( zendesk supportSdk ) ? Dang, then I would need to upgrade to Catalina

pentolbakso avatar Jul 15 '20 09:07 pentolbakso

I couldn't get many things to work properly with out upgrading.

I had to upgrade to Catalina, now I need to figure out how to run my 32bit apps.

thedarkcder avatar Jul 15 '20 09:07 thedarkcder

I had the same issue after updating to catalina OS / xCode 11.5, swift compiler 5.2 couldn't compile swift 5.1 modules in the zendesk sdk, finally i followed @maxhungry PR #24 and it worked finally, important task is to build your local node_modules/react-native-zendesk folder with yarn build or npm build only then you can import the js files from lib folder.

FInally i automated the react-native-zendesk build it with yarn's post-build hook command which is less pain for frequent builds.

you need to do yarn install or npm install, cd ios && pod install again to make this work.

Hope this will help someone who is facing this issue here, cheers 👍

ravindranpandu avatar Jul 21 '20 03:07 ravindranpandu