apptentive / apptentive-react-native

Apptentive SDK module for React Native

Home Page:https://learn.apptentive.com/article-categories/react-native/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iOS crashing after the apptentive-kit-ios update to version 6.0.5

richardkomarcheski opened this issue · comments

after the latest update of the apptentive-kit-ios to version 6.0.5 when I try to run the iOS app version it will instantly crash when the plugin tries to get the sdkVersion it will return this error
ios/Pods/ApptentiveKit/Sources/ApptentiveKit/Model/Environment.swift:187: Fatal error: Unable to read SDK version from ApptentiveKit's Info.plist file
when I change the apptentive-kit-ios from s.dependency 'ApptentiveKit', '~> 6.0.2' to s.dependency 'ApptentiveKit', '6.0.2'
it will work fine because I'm avoiding using the latest version of apptentive-kit-ios 6.0.5.

looking further at the latest update for apptentive-kit-ios I find out that they made some changes to how the plugin verifies the sdkVersion and also changed the name of the Version.plist file to Distribution.plist
here are two screenshots doing some comparison between the apptentive-kit-ios Environment.swift file and the renamed file Version.plist to Distribution.plist both comparisons are between the apptentive-kit-ios version 6.0.5 and 6.0.2
image
image

Thank you for the report. In 6.0.5 we moved the version "source of truth" from our framework's Info.plist (which some customers were standardizing to their app version) to this new Distribution.plist file.

The Distribution.plist needed to be added to our podspec, but this wasn't caught due to an error in our test setup.

If you have a minute, I've pushed a fix to a branch (fix-podspec). You can specify it in your podfile as follows:

pod 'ApptentiveKit', :git => 'https://github.com/apptentive/apptentive-kit-ios', :branch => 'fix-podspec'

In the meantime I'll work on getting it merged to main and tagged appropriately.

This is fixed in ApptentiveKit v6.0.6, however it looks like it may take some time for CocoaPods to index the update after pushing the new spec.

Thank you for the help, I've tested today and it's already getting the ApptentiveKit v6.0.6 and there's no crashing on iOS anymore, so I will close the issue.

@frankus anyway to publish also new package for react native?

the latest package in npm is 6.0.3, and it crashes for iOS.

Hi @Melchek, have you tried a pod update to get the latest version of ApptentiveKit, and if so, are you still having this issue?

Thanks! Trying to track down if this is now working.

I believe that this pr will solve it

#210

Thanks!

Hi @Melchek , sorry but to confirm, we heard from another customer seeing this issue that running “pod update ApptentiveKit” fixed this for them and brought the version to 6.0.6.

When you do this, are you still seeing 6.0.5?

Sure, that can works, but why not to ask a working version in .podspec?

Sorry for all the confusion. My team left it this way so that you could better control your upgrade timeline, since us not hardcoding a version in there will give you the flexibility to control that yourself.

We did add some additional wording to our docs to help better explain that: https://learn.apptentive.com/knowledge-base/react-native-integration-reference/#dependencies

Will that free you up?

Hi @Melchek, I wanted to circle back. Are you still seeing issues? Has running "pod update ApptentiveKit" worked for you?

Hi @CaseyApptentive we resorted to using yarn patch to get AppTentive to 6.0.6, and as of this morning we're seeing the crash again. On iOS, we're getting Illegal callback invocation from native module on launch. The names in the stack trace are obfuscated, but it's some sort of AppTentiveKit registerWithCompletion call that appears to be the cause.

Update: Patched the Swift code via yarn patch to only call resolve or reject once, which seems to have solved the problem.

Thanks for the update @kellyschrock ! It sounds like you're now freed up, is that right?

If that's the case, my team says that it sounds like this PR may not be necessary. If that's right, we'll go ahead and close it.

#210