mixpanel/mixpanel-iphone

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

MVKostadinov opened this issue · 0 comments

**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.