iOS app crashing after update to library version 3.3

Hello, I have an iOS app deployed to users that uses version 3.1 of the Tealium iOS library. We are currently developing enhancements to the app and in the course of development, we found that version 3.1 causes wild memory usage patterns on iOS 8. So we chose to update the library to version 3.3. The memory usage issue on iOS 8 is resolved. However, we found that on devices that have the old version installed (utilizing Tealium 3.1), updating to the new version (utilizing Tealium 3.3) will cause the app to crash on Tealium initialization. The console reports the error is from NSJSONSerialization: "Invalid type in JSON write (_NSDate)" and the stack trace includes internal Tealium methods. If we remove the old version of the app from a device before installing the new version, the app functions fine. In addition, if we delete the app after updating and reinstall the new version, the app functions fine. It seems to have something to do with updating in-place from 3.1 to 3.3. Does anyone have any insight into what we could do to resolve this issue? Thank you, Vincent Dominguez
4 REPLIES 4

iOS app crashing after update to library version 3.3

Rookie Contributor
Vincent, I believe we had the same issue in our mobile app. Please sync with me. Tealium's recommendation is to upgrade to 4.0.

iOS app crashing after update to library version 3.3

Tealium Employee
Hi Vincent, This isn't something that I'm aware of. However, since version 3.3, we have released version 4.01 of the iOS library and version 4 of the Android library. I would suggest trying to update again to the latest version and seeing if that solves the problem. You can find the updated version of the library in our GitHub repository: https://github.com/Tealium/ios-library/ Craig.
Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated
documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.

iOS app crashing after update to library version 3.3

Employee Emeritus
Vincent, yes Sebastian is correct. The issue lies in 3.1 to 3.2+ cleaning the data at different points in the process. Unfortunately if there were cached events in the queue in 3.1 and then the app is updated to >3.2 and <4.0, the data gets passed in an unstable state causing the crash. Version 4.x+ handles the unstable data in a more stable manner. So our suggestion is to update to 4.x. As a note, this only happens to users who have queued events (typically form being offline) and then when coming online then updating the app prior to opening the app.

iOS app crashing after update to library version 3.3

Thanks all! Using 4.0.1 instead mitigated the issue.