Closed devcsomnicg closed 1 year ago
@roninopf Could you please start review for this ?
@devcsomnicg Will do! Would you like to look over the tests as well?
@roninopf updated code and tests, could you please run the tests again
Will have to resolve the conflict. But looks like its replacing the existing method with one with additional parameter. As like for other SDKs, we should have additional methods for the ones with completionHandlers. This is to avoid breakages for developers who would just update to newer versions of SDK
@Ayyanchira done, added additional methods.
@Ayyanchira Updated this with suggestions on PR. please review
@Ayyanchira Updated this with suggestions on PR. please review
Checked and its working well. So lets go ahead with current changes as it is for now until other methods also start needing success and failure callback handlers.
Test methods are failing @devcsomnicg . It looks like setEmail leads to AppExtensionHelper.application?.registerForRemoteNotifications()
, but that doesn't lead to registerDevice Flow.
Test methods are failing @devcsomnicg . It looks like setEmail leads to
AppExtensionHelper.application?.registerForRemoteNotifications()
, but that doesn't lead to registerDevice Flow.
I am not sure about where this code is AppExtensionHelper.application.registerForRemoteNotifications() but, to give you a example when you do registerForRemoteNotifications it calls this function didRegisterForRemoteNotificationsWithDeviceToken here https://github.com/Iterable/swift-sdk/blob/5c033ded01e200acee52c9bd1fca377dbdcbbbce/sample-apps/swift-sample-app/swift-sample-app/AppDelegate.swift#L105.
Added a call to registerDevice() with no success failure callback after setEmail -> here in this PR. This commit. Verified that it eventually triggers the callbacks. This means the test assumes that registerDevice will eventually get called. And it checks if the handlers set while setting the credentials still remain active or not.
🔹 Jira Ticket(s)
✏️ Description