-
Notifications
You must be signed in to change notification settings - Fork 36
Differentiates DEBUG and TestFlight builds. Resolves #26 #38
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
Conversation
- If the current build is a debug build, SignalPayload.isTestFlight will now return false. - Adds an `isDebug` payload key
|
|
|
||
| static var isTestFlight: Bool { | ||
| guard let path = Bundle.main.appStoreReceiptURL?.path else { | ||
| guard !isDebug, let path = Bundle.main.appStoreReceiptURL?.path else { |
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.
re-iterating from general PR comment: It is possible (but probably rare) that a developer would make a testflight build in a Debug configuration (by changing the Archive setting in the scheme from Release to Debug). This would defeat the debug/testflight detection implemented in this patch.
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.
This is smart! I like it!
| var appVersion: String = Self.appVersion | ||
| var buildNumber: String = Self.buildNumber | ||
| var isSimulator: String = "\(Self.isSimulator)" | ||
| var isDebug: String = "\(Self.isDebug)" |
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.
re-iterating from general PR comment: I'm not sure how necessary it is to add an isDebug key to the payload b/c presumably it will only be relevant for a very small number of signals actually sent to the server (and can be inferred from other payload key values). I am happy to remove that isDebug key addition if would make more sense.
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.
It doesn't hurt -- in fact I had an isDebug key in the payload for a long time and only recently removed it. It'll help people filter between debug and non debug signals
|
Thanks a lot for this contribution <3 |
isDebugpayload key