mixpanel / mixpanel-iphone

Official iOS (Objective-C) Tracking Library for Mixpanel Analytics
http://mixpanel.com
Apache License 2.0
1.05k stars 564 forks source link

Bug reading archived data after upgrading from library version 3.9.0 to 4.0.0 #971

Closed MVKostadinov closed 2 years ago

MVKostadinov commented 2 years ago

Integration Method: CocoaPods Xcode Version: 13.2.1 Library Version: 4.0.0 Platform: iOS Language: Objective-C Description: MixpanelPersistence class -> "migrate" method: NSDictionary *properties = [self unarchiveProperties]; (line 270) -> properties is always nil here; the reason is that there is NSSet object in the properties archived by library version 3.9.0 but version 4.0.0 does not allow NSSet when unarchiving data ( +(id)unarchiveFromFile:asClass: -> [NSSet class] should be added to unarchivedObjectOfClasses:fromData:error:) The NSSet object is the "shownNotifications" mutable set available in library version 3.9.0. As a result no previous identifiers are used; also timed events are not working at all (timedEvents dictionary is nil). **Expected Behavior: Properties from saved by previous library version are unarchived and used.