Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
XHMM committed Jul 7, 2023
2 parents 6b94ae0 + 2831b26 commit 67e864d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions ios/CloudStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,16 @@ extension CloudStoreModule {

@objc
func onICloudIdentityDidChange(notification:Notification) {
let newToken = FileManager.default.ubiquityIdentityToken
var tokenChanged = false
if let newToken = newToken {
tokenChanged = !newToken.isEqual(icloudCurrentToken)
} else {
tokenChanged = icloudCurrentToken != nil
}
icloudCurrentToken = newToken;

if hasListeners {
let newToken = FileManager.default.ubiquityIdentityToken
var tokenChanged = false
if let newToken = newToken {
tokenChanged = !newToken.isEqual(icloudCurrentToken)
} else {
tokenChanged = icloudCurrentToken != nil
}

sendEvent(withName: "onICloudIdentityDidChange", body: [
"tokenChanged": tokenChanged
])
Expand Down

1 comment on commit 67e864d

@vercel
Copy link

@vercel vercel bot commented on 67e864d Jul 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.