Partnerize Mobile SDK Migration Guide

Benefits of Migration

  • Overhauled public API, it's not much clearer what the SDK does, including the errors that can be returned.
  • Additional public methods such as isClickRequest and an async version of handleInboundURL have been added.
  • Better logging with the ability to attach a custom Logger.
  • Timeout configuration options.
  • More features going forward.

Breaking Changes

  • Most methods now return a Swift Result type.
  • beginConversion has been renamed to handleInboundURL. This method now takes additional parameters such as persistClickRef: Bool and an optional completion handler.
  • beginConversion now returns a full Click object (wrapped in a swift Result), rather than a just a destination URL, desinationUrl is accessible via click.destinationUrl.
  • completeConversion now takes a Conversion object as it's first parameter, rather than updating a static conversion property on Partnerize.
  • The completeConversion completion handler now only has one parameter Result<ConversionResult, PartnerizeError>, instead of the previous Bool and Error.
  • There is no longer a static Partnerze.conversion instance, construct a Conversion object and pass into completeConversion.