-
Notifications
You must be signed in to change notification settings - Fork 16
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
Firebase and Segment integration #291
Merged
Merged
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
a6fc40d
chore: added abstract layer for push notifications
rnr 077ae85
Merge pull request #2 from touchapp/push_notifications_abstract
rnr c87f7cb
chore: abstract layer for deep linking
rnr 3f4049c
chore: test braze experiment
rnr 8bc62e7
chore: added segment package
rnr 2d2ade2
chore: returned back default values
rnr dfdf6a4
Merge branch 'develop' into test/test_braze
rnr c164495
chore: added firebase as swift package
rnr f9c6813
chore: fixed upload crashlytic dsym build phase script
rnr 53f73d5
Merge branch 'develop' into test/segment_plus_firebase
rnr 5a61d28
chore: added AnalyticsService protocol and instances
rnr 5d9dd2b
chore: cleanup code
rnr c48416c
chore: renamed google analytics to firebase analitics. added checking…
rnr 59b5be7
chore: added FirebaseManager to setup standalone Firebase in separate…
rnr 78a4f3d
chore: moved analytics segment var into SegmentManager
rnr 81984f9
chore: moved AnalyticsService protocol implementation into Firebase a…
rnr 70285cc
chore: moved setup into managers init methods, renamed managers
rnr 17b8ee7
chore: added check if services are enabled while init
rnr 1c4939b
chore: renamed managers group
rnr 5eb6e20
chore: cleanup code
rnr d5d27ae
Merge branch 'develop' into test/segment_plus_firebase
rnr af25b64
chore: re-added Segment package through https source
rnr 7c67115
chore: generated mocks
rnr f40b7f2
refactor: address review feedback, added test for segment config
rnr 00a6c86
Merge branch 'develop' into test/segment_plus_firebase
rnr fb22073
chore: auto-generated mocks
rnr 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
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
272 changes: 260 additions & 12 deletions
272
Authorization/AuthorizationTests/AuthorizationMock.generated.swift
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
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,31 @@ | ||
// | ||
// SegmentConfig.swift | ||
// Core | ||
// | ||
// Created by Anton Yarmolenka on 02/02/2024. | ||
// | ||
|
||
import Foundation | ||
|
||
private enum SegmentKeys: String, RawStringExtractable { | ||
case enabled = "ENABLED" | ||
case writeKey = "SEGMENT_IO_WRITE_KEY" | ||
} | ||
|
||
public final class SegmentConfig: NSObject { | ||
public var enabled: Bool = false | ||
public var writeKey: String = "" | ||
|
||
init(dictionary: [String: AnyObject]) { | ||
super.init() | ||
writeKey = dictionary[SegmentKeys.writeKey] as? String ?? "" | ||
enabled = dictionary[SegmentKeys.enabled] as? Bool == true && !writeKey.isEmpty | ||
} | ||
} | ||
|
||
private let segmentKey = "SEGMENT_IO" | ||
extension Config { | ||
public var segment: SegmentConfig { | ||
SegmentConfig(dictionary: self[segmentKey] as? [String: AnyObject] ?? [:]) | ||
} | ||
} |
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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about moving the
analytics.identify(.....)
call toshowMainOrWhatsNewScreen
so you don't have to worry about from where the main screen is being shown? At the moment it's being called from multiple places.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really like the idea of passing User variable inside the router. However, we may come back to this question when we work with analytics (this is not part of this PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok