-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1418 from OneSignal/use_central_identity_model_repo
[Bug] Some pending properties can be sent to new user incorrectly, when users change
- Loading branch information
Showing
27 changed files
with
624 additions
and
171 deletions.
There are no files selected for viewing
289 changes: 244 additions & 45 deletions
289
iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# in tests, we may want to force cast and throw any errors | ||
disabled_rules: | ||
- force_cast | ||
- identifier_name |
24 changes: 24 additions & 0 deletions
24
iOS_SDK/OneSignalSDK/OneSignalCoreMocks/Extensions/NSDictionary+UnitTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
extension NSDictionary { | ||
func contains(key: String, value: Any) -> Bool { | ||
guard let dictVal = self[key] else { | ||
return false | ||
} | ||
|
||
return equals(dictVal, value) | ||
} | ||
|
||
func contains(_ dict: [String: Any]) -> Bool { | ||
for (key, value) in dict { | ||
if !contains(key: key, value: value) { | ||
return false | ||
} | ||
} | ||
return true | ||
} | ||
|
||
private func equals(_ x: Any, _ y: Any) -> Bool { | ||
guard x is AnyHashable else { return false } | ||
guard y is AnyHashable else { return false } | ||
return (x as! AnyHashable) == (y as! AnyHashable) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.