AMP iOS v3.52 use as a dependecy SwiftyBeaver to bring better log experience, please make sure to include on your project, you can check and find the current version Here
Due the fact that we have support for Objective-C projects, we can’t have two protocol methods with the same name, even though they have different parameters, so we decided to standardize the protocol methods to include their “subject” in their name, for example:
Before you would instantiate the AmpPlayer and AmpPlayerManager instances as follows:
self.ampPlayerManager = AmpPlayerManager(parentView: self.playerView, playerFrame: self.playerView.bounds)
self.ampPlayer = self.ampPlayerManager.ampPlayer
This was giving some issues related to deallocation, and it was tough to properly manage this relationship memory-wise, due to their implementation. We inverted the control of these classes, and now the AmpPlayerManager requires an AmpPlayer to be given in its initializer, for example:
self.ampPlayer = AmpPlayer()
self.ampPlayerManager = AmpPlayerManager(ampPlayer: ampPlayer, parentView: self.playerView, playerFrame: self.playerView.bounds)
We’ve made some slight changes in our iOS Media Analytics module, due to a standardization in our different offerings of the Akamai Adaptive Media Player, we performed some name changes, shown below:
public init(ampPlayer: AmpPlayer, configUrl: String, customDimensions: Dictionary<String, String> = [:], viewerId: String = "AMP IOS") {}
public func addDimension(key: String, value: String) {}
Some properties were changed in the AmpPlayerManager class, from implicitly unwrapped optionals to plain optionals (using the exclamation mark) to avoid bad access exceptions and other kind of problems. You’ll notice that the following properties suffered that change:
NOTE: From now on, every other API change will include first a deprecation stage, and after a couple of releases (a month, give or take), we will enter the elimination stage, we will remove the deprecated method and make sure it’s stated in the respective changelog.
If you have any doubts or comments, feel free to contact amp-sdk-support@akamai.com and we’ll gladly assist you.