Upgrade Guide

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

For CocoaPod Integrations - Update Podfile

To Install the latest HyprMX SDK with CocoaPods, update the HyprMX dependency in your Podfile to:
1
pod 'HyprMX', '6.0.0'
Copied!
Note: HyprMX 6.0.0+ supports Cocoapods 1.10+

Manual Installation

Add New HyprMX.xcframework to your Xcode project
    Remove HyprMX.xcframework in the project navigation bar on the left side of the screen.
    Drag and drop the HyprMX.xcframework (available in the SDK zip) into your Xcode project, making sure that the files are copied and verify target membership.
    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.
    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.
1
<key>NSUserTrackingUsageDescription</key>
2
<string>${PRODUCT_NAME} would like to show you personalized ads</string>
Copied!
HyprMX SDK 5.4.+ supports Apple's new SKAdNetwork for attribution. To add the HyprMX SKAdNetwork ID to your info.plist:
1
<key>SKAdNetworkItems</key>
2
<array>
3
<dict>
4
<key>SKAdNetworkIdentifier</key>
5
<string>nu4557a4je.skadnetwork</string>
6
</dict>
7
...
8
</array>
Copied!
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.
Swift
Objective-C
1
placement.showAd(from: self)
Copied!
1
[placement showAdFromViewController:self];
Copied!

(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.
Swift
Objective-C
1
func adDisplayError(_ error: Error, placement: HyprMXPlacement)
Copied!
1
- (void)adDisplayError:(nonnull NSError *)error
2
placement:(nonnull HyprMXPlacement *)placement;
Copied!
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:
Swift
Objective-C
1
let nsError = error as NSError
2
let hyprMXError:HyprMXError = HyprMXError(UInt32(nsError.code))
Copied!
1
- (void)adDisplayError:(nonnull NSError *)error
2
placement:(nonnull HyprMXPlacement *)placement {
3
// Access error code
4
HyprMXError hyprError = (HyprMXError)error.code;
5
6
// print error description
7
NSLog(@"Display Error: %@", error.localizedDescription);
8
}
Copied!

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.
Last modified 2mo ago