Conversation
| ], | ||
| dependencies: [ | ||
| .package(url: "https://github.com/WeTransfer/Mocker", from: "3.0.1"), | ||
| .package(url: "https://github.com/iwill/generic-json-swift", from: "2.0.2"), |
There was a problem hiding this comment.
Hey @eligutovsky , have we had any discussion about adding new dependencies to the SDK?
Some clients are a little sensitive to the size/dependency footprint, and dependencies can make integration more tricky if there are conflicting versions.
Just a thought, we should consider it carefully.
There was a problem hiding this comment.
This dependency was copy-pasted to the source code previously. I will remove this dependency and will keep it copy-pasted.
There was a problem hiding this comment.
Sorry not sure I understand, you mean we already depend on it? (if so, fair enough, might propose the inverse of dependency simplification in the future, but that's another topic 😅)
There was a problem hiding this comment.
Yes, we're already depend on it. See OptimoveSDK/Sources/Classes/JSON/JSON.swift -- in removed files of this PR.
There was a problem hiding this comment.
Ah, clear!
Next question: do you know why we 'vendored' this library code into the SDK in the past, does it matter?
There was a problem hiding this comment.
It was added previously because the SDK allows to get [String: Any] as a parameter of an event.
See #97 (comment)
It might worth to replace JSON with Data by using JSONSerialization.
There was a problem hiding this comment.
Ideally, we need to decode any internal json to a Codable model.
| private(set) var dismissedAt: Date? | ||
| private(set) var sentAt: Date | ||
| private(set) var data: NSDictionary? | ||
| private(set) var data: ObjcJSON? |
There was a problem hiding this comment.
Are these 'breaking' API changes / do we expose/leak the type from a library to the consumer app?
There was a problem hiding this comment.
The CoreData entity model is only meant for internal use and should not be accessed by consumer apps.
This change has been made to fix the issue of NSDictionary not conforming to the Codable protocol. It is important to ensure that values stored in the CoreData are Codable before they are stored. This will help ensure that the data is ready to be send through network.
There was a problem hiding this comment.
Great, all for these kind of things in general, Codable will be simpler, but I think this model InAppInboxItem is not the Core Data entity, it is the model we expose to consumers, so changing this field could be breaking/leaky.
There was a problem hiding this comment.
Hmm, this class cannot be exposed to a consumer -- it is not public
7c8ccb6 to
8fe602c
Compare
Description of Changes
Use
GenericJSONthat conforms toCodableBreaking Changes
Release Checklist
Prepare:
pod lib lintpassesBump versions in:
OptimoveCore.podspecOptimoveNotificationServiceExtension.podspecOptimoveSDK.podspecOptimoveCore/Sources/Classes/Constants/SDKVersion.swiftREADME.mdCHANGELOG.mdUpdate major version numbers in wiki (basic integration + push guides)
Integration tests
T&T Only
Mobile Only
Deferred Deep Links
Combined
Release:
pod trunk pushto publish to CocoaPodsPost Release: