-
Notifications
You must be signed in to change notification settings - Fork 266
OSConsistencyManager
& IAM fetch read-your-write consistency implementation
#1486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
fa3c750
OSReadYourWriteData Implementation
eb45946
OSConsistencyManager & related classes
05d327d
IamFetch consistency use-case implementation
6f40409
Update project.pbxproj
b07df39
Move `getTimeFocusedElapsed` from `OneSignalTracker` to `OSSessionMan…
e7d65f6
Modify `OSRequestGetInAppMessages` method to include new header values
9ac1053
OSMessagingController Retry Logic
d09d464
Update executors to set offsets on consistency manager
924d8a1
Flush delta queue on start
b8aeed2
Update UnitTestApp TestPlan xctestplan
82e468b
Update OSIamFetchReadyCondition to sharedInstance to waist on sub update
4f7a9dd
Update OneSignalClient to include headers
663edc1
Run swiftlint --fix
75eab0f
Clarifying comment re: why we track RYW tokens for user create as well
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
283 changes: 282 additions & 1 deletion
283
iOS_SDK/OneSignalSDK/OneSignal.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
37 changes: 37 additions & 0 deletions
37
iOS_SDK/OneSignalSDK/OneSignalOSCore/Source/Consistency/IamFetch/OSIamFetchOffsetKey.swift
This file contains hidden or 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,37 @@ | ||
/* | ||
Modified MIT License | ||
|
||
Copyright 2024 OneSignal | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
1. The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
2. All copies of substantial portions of the Software may only be used in connection | ||
with services provided by OneSignal. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
*/ | ||
|
||
import Foundation | ||
|
||
public enum OSIamFetchOffsetKey: Int, OSConsistencyKeyEnum { | ||
// We track user create tokens as well because on fresh installs, we don't have a user or subscription | ||
// to update, which would lead to a 5 second delay until the subsequent user & subscription update calls | ||
// give us RYW tokens | ||
case userCreate = 0 | ||
case userUpdate = 1 | ||
case subscriptionUpdate = 2 | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.