-
Notifications
You must be signed in to change notification settings - Fork 290
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
Purchases.logIn
: log warning if attempting to use a static appUserID
#1958
Merged
Conversation
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
NachoSoto
force-pushed
the
log-in-static-string
branch
from
October 14, 2022 19:00
91b8344
to
e465d52
Compare
vegaro
approved these changes
Oct 20, 2022
NachoSoto
pushed a commit
that referenced
this pull request
Oct 26, 2022
**This is an automatic release.** ### Bugfixes * Fixed Xcode 13.2.x / Swift 5.5 compatibility (#1994) via NachoSoto (@NachoSoto) ### Other Changes * Update `fastlane` (#1998) via NachoSoto (@NachoSoto) * Documentation: fixed missing docs from inherited symbols (#1997) via NachoSoto (@NachoSoto) * CI: added job to test compilation with `Xcode 13.2.1` / `Swift 5.5` (#1990) via NachoSoto (@NachoSoto) * Extracted `TrialOrIntroPriceEligibilityCheckerType` (#1983) via NachoSoto (@NachoSoto) * CI: removed redundant `swiftlint` installation (#1993) via NachoSoto (@NachoSoto) * `Nimble`: use a fixed version (#1991) via NachoSoto (@NachoSoto) * Update fastlane-plugin-revenuecat_internal (#1989) via Cesar de la Vega (@vegaro) * `Purchases.logIn`: log warning if attempting to use a static `appUserID` (#1958) via NachoSoto (@NachoSoto) * Created `InternalAPI` for "health" request (#1971) via NachoSoto (@NachoSoto) Co-authored-by: RCGitBot <dev+RCGitBot@revenuecat.com>
NachoSoto
added a commit
that referenced
this pull request
Oct 26, 2022
These became ambiguous after #1958.
NachoSoto
added a commit
that referenced
this pull request
Jan 20, 2023
Fixes this warning: These started happening after #1958. I assumed it was an Xcode bug, because they were showing up on the wrong file. Turns out that by itself was an Xcode bug (filed as `FB11959877`): But the underlying warning was correct, which this fixes. We just needed to fix the reference to `logIn` to point to the specific overload.
2 tasks
MarkVillacampa
added a commit
that referenced
this pull request
Mar 28, 2023
…rID (#2385) ### Checklist - [X] If applicable, unit tests - [X] If applicable, create follow-up issues for `purchases-android` and hybrids ### Motivation Hardcoding the user id is not desirable in almost any scenario, so we want to warn the developer when that happens. ### Description Following what we did for `Purchases.logIn` in #1958, detect when `Builder.with(appUserId:)` is called with a static string and log a warning. --------- Co-authored-by: NachoSoto <NachoSoto@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This only works in
Swift
, but it can be useful to catch incorrect usages oflogIn
, where a user might accidentally pass the api key, or some other key known at compile time.