Skip to content
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

Support for advertising identifier and adId consent collection #55

Merged
merged 66 commits into from Jun 2, 2022

Conversation

timkimadobe
Copy link
Contributor

@timkimadobe timkimadobe commented Mar 9, 2022

Description

Update for ad ID features, related test cases, and update to Swift test app to use new ad ID features with real-world IDFA implementation example.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…pdate variables/classes to reflect naming convention changes
…executable

Update IdentityConstants with proper values
Update comments/documentation
Update IdentityStateTests assertion data dictionary access to use IdentityConstants enum values
Update copyright year to 2022 in new files
Remove dev comments
SwiftLint whitespace and indentation correction
…d retrieval

Add isAdIdEvent check to handleRequestContent
Simplify reset identities test case, remove persistedAdID all-zeros test case as there is no migration path to Edge Identity from this state
…in isAdIdEvent check

Update documentation for adId
…fication

Update adId logic to only provide value sanitization
Implement functional tests for e2e testing
Rename test file
Add consent event type and source check, and format verification for testGenericIdentityRequest_whenValidAdId_thenEmptyAdId
Remove logging comments from test file
Moved back shouldDispatchConsent check to original position, pending upstream service discussion
* WIP merge with current dev branch

* update enum usage to reflect updated naming scheme

* migrate tests from old feature branch, add new files to test targets

* Update TestableExtensionRuntime to include new method required by ExtensionRuntime protocol

* Migrate remaining test cases from original adID feature branch, and update variables/classes to reflect naming convention changes

* Migrate IdentityTest cases

* Remove commented code and extra spaces

* Update build script for SwiftLint to use PODS_ROOT path to check for executable
Update IdentityConstants with proper values
Update comments/documentation
Update IdentityStateTests assertion data dictionary access to use IdentityConstants enum values
Update copyright year to 2022 in new files
Remove dev comments
SwiftLint whitespace and indentation correction

* Update test cases to handle existing AdID and no AdID with new AdID event and generic Identity event

* Add isAdIdEvent to Event+Identity extension and build in check to adId retrieval
Add isAdIdEvent check to handleRequestContent
Simplify reset identities test case, remove persistedAdID all-zeros test case as there is no migration path to Edge Identity from this state

* Update Event+Identity extension with rationale for String type check in isAdIdEvent check
Update documentation for adId

* Update test case to improve readability and preserve event order verification
Update adId logic to only provide value sanitization

* Remove outdated test for nil adID using direct state.updateAdvertisingIdentifier

* Removing public access status for Event+Identity extension property

* Update naming conventions for test cases
Implement functional tests for e2e testing

* Simplify logical flow for detecting ad ID change
Rename test file
Add consent event type and source check, and format verification for testGenericIdentityRequest_whenValidAdId_thenEmptyAdId

* Remove outdated test case with all-zeros start
Remove logging comments from test file

* Move consent event dispatch to before resetting ECID; should send consent with old ECID

* Update adId type in Event extension to non-optional String
Moved back shouldDispatchConsent check to original position, pending upstream service discussion

* Remove nil coalescing operator for adId after its update to non-optional String

* Remove consent event dispatch from resetIdentifiers flow; the flows should be separate from each other

* Remove consent event check from resetIdentity test; consent is not longer handled as part of the reset flow

* Update test comments and remove commented case
Update comments to better reflect test case goals
Update test cases to use variables to store test strings
Update naming convention of ad ID value from old -> initial
Update required pods for test app target adding: Edge & Edge Consent
Add NSUserTrackingUsageDescription to test app plist
Add get current consent button
Update comment and logs to be more accurate
Adding log for trying to update identifiers for ad ID reserved namespaces
@codecov
Copy link

codecov bot commented Mar 14, 2022

Codecov Report

Merging #55 (7f6820e) into dev (397ef78) will increase coverage by 0.89%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev      #55      +/-   ##
==========================================
+ Coverage   95.75%   96.65%   +0.89%     
==========================================
  Files           6        7       +1     
  Lines         306      328      +22     
==========================================
+ Hits          293      317      +24     
+ Misses         13       11       -2     

Copy link
Contributor

@emdobrin emdobrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending merge conflicts resolved in #66

emdobrin and others added 19 commits May 11, 2022 14:30
Merge latest dev changes -> feature/adidConsent
* Updated dependencies, using staging changes for Edge

* Update testableExtensionRuntime for latest core

* Renaming for environment field

* CircleCI - update to Xcode 12

* Consent 1.0.0
…ing flow; other functionality is handled by other methods in the util class
# Conflicts:
#	Podfile.lock
#	SampleApps/TestApp/ContentView.swift
* Update ad ID view to use ad ID utils and better align with sample app implementation

* Update requestTrackingAuthorization function to be pure request tracking flow; other functionality is handled by other methods in the util class

* Remove get ad ID in request flow; use get ad ID flow instead to fetch or print value

* Update documentation wording to defer to apple docs

* Update documentation to reflect iOS version verbiage

* Updating podfile.lock to use staging

* Update logical flow for setting ad ID to check for tracking authorization and set the value accordingly
# Conflicts:
#	AEPEdgeIdentity.xcodeproj/project.pbxproj
…cene delegates)

Apply swiftlint autocorrect and update Button closure syntax to avoid trailing closure violation
Update Swift Test App for iOS 13 compatibility
* Select test scheme from xcodeproj

* Select project scheme from xcworkspace

* Update test command to use conditional scheme name based on presence of project name conflict or not

* Update name conflict case paren string to use EXTENSION_NAME instead of PROJECT_NAME

* Update scheme variables to appropriate sources

Co-authored-by: Tim Kim <95260439+timkimadobe@users.noreply.github.com>
// TODO: Set up the Environment File ID from your Launch property for the preferred environment
private let LAUNCH_ENVIRONMENT_FILE_ID = ""
// TODO: Set up the preferred Environment File ID from your mobile property configured in Data Collection UI
private let ENVIRONMENT_FILE_ID = ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private let ENVIRONMENT_FILE_ID = "yourAppId"

To match Android.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks Calise, we can update that in a future PR

@emdobrin emdobrin changed the title Merging ad ID update feature branch to dev branch Support for advertising identifier and adId consent collection Jun 2, 2022
@emdobrin emdobrin merged commit 6ff77d9 into dev Jun 2, 2022
@emdobrin emdobrin added the Type: feature Feature development, new functionality added label Jun 3, 2022
@emdobrin emdobrin deleted the feature/adIdConsent branch March 21, 2024 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: feature Feature development, new functionality added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants