-
Notifications
You must be signed in to change notification settings - Fork 316
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
Update deprecations #1544
Closed
Closed
Update deprecations #1544
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
eb2e57a
Move deprecated methods to Deprecations.swift, make some things internal
e8a6858
Revert "Move deprecated methods to Deprecations.swift, make some thin…
20c60bf
Add missing @objc to deprecated functions, add docs to allowSharingAp…
cc22a0a
fix lint
f05ae66
undo adding @objc to checktrial eligibility because of naming conflicts
68a680d
fix more unit tests
8fda903
Revert "fix more unit tests"
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2182,42 +2182,6 @@ class PurchasesTests: XCTestCase { | |
expect(invokedMethodParams.appUserID) == identityManager.currentAppUserID | ||
} | ||
|
||
func testAttributionDataDontSendNetworkAppUserIdIfNotProvided() throws { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do these need to be removed now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i thought i was on the adservices branch 🤦♀️ reverted |
||
let data = ["yo": "dog", "what": 45, "is": ["up"]] as [String: Any] | ||
|
||
Purchases.deprecated.addAttributionData(data, fromNetwork: AttributionNetwork.appleSearchAds) | ||
|
||
setupPurchases() | ||
|
||
let invokedMethodParams = try XCTUnwrap(self.backend.invokedPostAttributionDataParameters) | ||
for key in data.keys { | ||
expect(invokedMethodParams.data?.keys.contains(key)) == true | ||
} | ||
|
||
expect(invokedMethodParams.data?.keys.contains("rc_idfa")) == true | ||
expect(invokedMethodParams.data?.keys.contains("rc_idfv")) == true | ||
expect(invokedMethodParams.data?.keys.contains("rc_attribution_network_id")) == false | ||
expect(invokedMethodParams.network) == AttributionNetwork.appleSearchAds | ||
expect(invokedMethodParams.appUserID) == identityManager.currentAppUserID | ||
} | ||
|
||
func testAdClientAttributionDataIsAutomaticallyCollected() throws { | ||
setupPurchases(automaticCollection: true) | ||
|
||
let invokedMethodParams = try XCTUnwrap(self.backend.invokedPostAttributionDataParameters) | ||
|
||
expect(invokedMethodParams).toNot(beNil()) | ||
expect(invokedMethodParams.network) == AttributionNetwork.appleSearchAds | ||
|
||
let obtainedVersionData = try XCTUnwrap(invokedMethodParams.data?["Version3.1"] as? NSDictionary) | ||
expect(obtainedVersionData["iad-campaign-id"]).toNot(beNil()) | ||
} | ||
|
||
func testAdClientAttributionDataIsNotAutomaticallyCollectedIfDisabled() { | ||
setupPurchases(automaticCollection: false) | ||
expect(self.backend.invokedPostAttributionDataParameters).to(beNil()) | ||
} | ||
|
||
func testAttributionDataPostponesMultiple() { | ||
let data = ["yo": "dog", "what": 45, "is": ["up"]] as [String: Any] | ||
|
||
|
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.
I'm confused, why do these need
@objc
? it's anasync
version (so Swift only), the non-async is above, and that one doesn't have@objc
?