AMP iOS v3.49 Changelog

Protocol Methods Name Change

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:

Other change that was required to be done, is that the compiler would crash when adding a CGRect as a protocol method parameter, so we had to remove these, the affected methods are: So, you can now access all the frames used if needed as follows: Some other protocol methods were not changed (we didn’t add the prefix) because they will only exist (and make sense) in their own module. For the complete list of supported protocol methods, please look into the API documentation. NOTE: If you don’t update your protocol methods, you won’t receive an error because most of them are optional, they just won’t be called.

Inversion of Control Between AmpPlayer and AmpPlayerManager

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)

Media Analytics Standardization

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) {}

Optional Properties in AmpPlayerManager

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.