Upgrade Guide

If you are upgrading from HyprMX 5.x+ SDK to HyprMX 6.0.3 SDK, follow the instructions below.

For CocoaPod Integrations - Update Podfile

To Install the latest HyprMX SDK with CocoaPods, a dependency manager for Swift and Objective-C Cocoa projects, update the HyprMX dependency in your Podfile to:
pod 'HyprMX', '6.0.3'
HyprMX 6.0.0+ supports CocoaPods 1.10+

Manual Installation

To manually update the framework, follow the steps below.
1. Remove the existing HyprMX.xcframework in the project navigation bar on the left side of the screen.
2. Download the SDK here and unzip the file.
3. Drag and drop the HyprMX.xcframework (available in the zip) into your Xcode project, making sure that the files are copied and verify target membership.
4. Select your Project File and the Target. In the "General" tab, drag the HyprMX.xcframework from the File Explorer into the "Frameworks, Libraries, and Embedded Content" section.
5. Set the Embed setting to "Embed & Sign".

iOS 14 Plist Updates

iOS 14 introduced the AppTrackingTransparency framework to allow users control over the use of their Advertising Identifier.
HyprMX SDK 5.4.0+ requires the NSUserTrackingUsageDescription Plist Key to determine the authorization state.
<string>${PRODUCT_NAME} would like to show you personalized ads</string>
HyprMX SDK 5.4.+ supports Apple's new SKAdNetwork for attribution. To add the HyprMX SKAdNetwork ID to your info.plist:
Note: SKAdNetwork Id's are case sensitive. For more information about SKAdNetwork please refer to Apple's documentation.

Please review our required Application Transport Security Settings and Privacy Control Keys defined here.

Removed API: showAd

The 5.4.0 SDK deprecated the showAd API and introduced the showAdFromViewController: API. The iOS 6.0.0 SDK removes the deprecated showAd API.
If you do not wish to provide a View Controller, pass nil to showAdFromViewController:. Providing a UIViewController instance is recommended if your App supports Multi-Window.
placement.showAd(from: self)
[placement showAdFromViewController:self];

(Optional) New Delegate Callback: adDisplayError:placement

The 6.0.0 SDK introduces a new delegate callback for notification of ad display errors. This updated API returns an NSError object with an error code and description, for improved debugging.
func adDisplayError(_ error: Error, placement: HyprMXPlacement)
- (void)adDisplayError:(nonnull NSError *)error
placement:(nonnull HyprMXPlacement *)placement;
This callback will eventually replace the existing callback adDisplayErrorForPlacement: error: which returns an enum HyprMXError, however both callbacks are optional and currently supported by the SDK.
When upgrading your HyprMXPlacementDelegate, you can access the HyprMXError code from the error object's code property:
let nsError = error as NSError
let hyprMXError:HyprMXError = HyprMXError(UInt32(nsError.code))
- (void)adDisplayError:(nonnull NSError *)error
placement:(nonnull HyprMXPlacement *)placement {
// Access error code
HyprMXError hyprError = (HyprMXError)error.code;
// print error description
NSLog(@"Display Error: %@", error.localizedDescription);

New: Banner Ads

To add Banner ads to your application, see our Banner Ads guide.
That's it! You're up and running with the latest version of the HyprMX SDK.