prebid / prebid-mobile-ios

Prebid Mobile SDK for iOS applications
Apache License 2.0
46 stars 86 forks source link

Proposed SDK 3.0 updates #977

Open bretg opened 1 month ago

bretg commented 1 month ago

Reviewing the SDK in detail for documentation, there are a number of things I think we should consider cleaning up in a major release and a few minor enhancements.

Deprecation or Cleanup

  1. Consider doing at least some of the log work in https://github.com/prebid/prebid-mobile-ios/issues/922
  2. Android 'sendMraidSupportParams' has a couple of problems: first, it's a property when almost everything else in Android is a method. Second, it's a boolean that's hardcoded to api type 3 and 5, completely ignoring api type 6 (MRAID 3.0). Suggest deprecating this boolean and creating an alternate way of setting imp.banner.api more flexibly, and supporting it for both Android and iOS
  3. Remove or deprecate the Android useExternalBrowser and iOS useExternalClickthroughBrowser properties.
  4. Android isCoppaEnabled property is redundant with a similar method. Either make this private or remove entirely.
  5. Remove or deprecate ios impClickbrowserType
  6. Remove or deprecate iOS buyerUID and Android setBuyerId() - it is not appropriate for the SDK to be setting user.buyeruid
  7. Remove or deprecate iOS targeting class userID - this is set in user.userid which is not valid ORTB. It's also not relevant for user.id, which is exchange-specific.
  8. Remove or deprecate iOS userCustomData functions and Android setUserCustomData() - again, not appropriate for SDK to have exchange-specific stuff
  9. Remove or deprecate iOS setCustomParams functions. This is an odd mix of user and app first party data.
  10. Deprecate all gender and YOB/age functions/properties. ORTB has deprecated them.
  11. Android supports addExtData() method. This should be addAppExtData(). Consider deprecating the old name and adding the more descriptive name. (Or should we just let them utilize the new generic ORTB method?)
  12. Deprecate Android addExtKeyword - imp.ext.context.keywords is not a thing.
  13. Remove rubicon and appnexus constants. There are 200+ bidders in Prebid Server. It's time to stop favoring the two founding companies.
  14. Remove or deprecate userData - I don't think this is useful as implemented.
  15. Remove locationPrecision property - it's only used in tests.
  16. There are multiple ways to set user.ext.data: addUserData(), userExt property, new general ORTB setting function. Is this good, or do we want to simplify?
  17. Consider whether the *AppExtData functions are needed now that we have the general ORTB function.
  18. Consider removing iOS setCustomParams(), addCustomParam() methods. The parameterDictionary doesn't appear to affect the OpenRTB.
  19. Deprecate the adunit-level setAppContent, getAppContent, clearAppContent, addAppContentData, removeAppContentData, clearAppContentData, addUserData, getUserData, removeUserData, clearUserData, addContextData, addExtData, updateContextData, updateExtData, removeContextData, removeExtData, clearContextData, clearExtData methods. The app object is not at the adunit level -- this design that will not work when we get to supporting multiple imps in a single auction. There are already equivalents of these functions at the global level.

Inconsistencies between iOS SDK and Android SDK

  1. An equivalent of 'locationUpdatesEnabled' doesn't exist on Android
  2. addCustomHeaders() doesn't exist on Android. Only setCustomHeaders()

Minor enhancements

  1. Send timeoutMillis as ext.tmaxmax. This would mirror what PBJS is doing.
  2. Javadocs and swiftdocs
alexsavelyev commented 1 month ago

@alexsavelyev review it on the PMC call

jsligh commented 1 month ago

Wanted to also add #981 to this.