BranchMetrics / ios-branch-deep-linking-attribution

The Branch iOS SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
https://help.branch.io/developers-hub/docs/ios-sdk-overview
MIT License
728 stars 229 forks source link

[SDK-2035] Remove unnecessary fields from v1/url requests #1271

Closed nsingh-branch closed 1 year ago

nsingh-branch commented 1 year ago

Reference

SDK-2035 -- Remove unnecessary fields from v1/url requests

Summary

Added a section of code to preparePostRequest() in BNCServerInterface.m which removes 10 fields from v1/url requests which are no longer necessary. This change also adds a constant for anon_id.

Motivation

The motivation for this change is to reduce the number of fields in v1/url requests down to only what's required or used.

Type Of Change

Testing Instructions

Create short url's and observe the outgoing requests. They should not contain any of the 10 removed fields.

SESSION_ID, 
OPTED_IN_STATUS, 
RANDOMIZED_DEVICE_TOKEN, 
RANDOMIZED_BUNDLE_TOKEN, 
IS_HARDWARE_ID_REAL, 
IOS_VENDOR_ID, 
HARDWARE_ID_TYPE, 
HARDWARE_ID, 
AD_TRACKING_ENABLED, 
ANON_ID

cc @BranchMetrics/saas-sdk-devs for visibility.

codecov[bot] commented 1 year ago

Codecov Report

Merging #1271 (d90dd72) into master (e760484) will increase coverage by 0.18%. Report is 95 commits behind head on master. The diff coverage is 93.05%.

@@            Coverage Diff             @@
##           master    #1271      +/-   ##
==========================================
+ Coverage   51.26%   51.44%   +0.18%     
==========================================
  Files          78       78              
  Lines       11156    11181      +25     
  Branches     4316     4328      +12     
==========================================
+ Hits         5719     5752      +33     
+ Misses       5174     5166       -8     
  Partials      263      263              
Files Changed Coverage Δ
BranchSDK/BranchInstallRequest.m 67.18% <ø> (ø)
BranchSDK/BranchOpenRequest.m 63.13% <ø> (ø)
BranchSDK/BNCServerInterface.m 66.27% <66.66%> (-0.16%) :arrow_down:
BranchSDK/Branch.m 39.26% <90.00%> (+1.17%) :arrow_up:
Branch-TestBed/Branch-TestBed/AppDelegate.m 42.66% <100.00%> (ø)
BranchSDK/BNCPreferenceHelper.m 79.78% <100.00%> (ø)
BranchSDK/BranchPluginSupport.m 83.33% <100.00%> (ø)

... and 3 files with indirect coverage changes

echo-branch commented 1 year ago

We'll probably want to look at this holistically with other network calls as part of our data minimization efforts. Should be in the next sprint.

echo-branch commented 1 year ago

@nsingh-branch Let's close this PR. I'm thinking that handling of data within BNCServerInterface needs to change.