Customize Fonts for In-App Messages on iOS

By default, in-app messages use your device’s system font. You can override the default font face to customize the appearance of an in-app message’s title, body, button, and tertiary text labels. However, you can’t change the font size because it’s defined by the design of the message.

To set the display font, use the setInAppMessageFont method to pass the SDK a valid font name. The font you specify must be installed on the device or be present in your app’s custom fonts.

Use this code to customize fonts in version 11 of the SDK for iOS.

1InAppMessagingFeature.requestSdk { iam in
2    iam?.setInAppMessageFont(name: "Zapfino")
3}

Use this code to customize fonts in version 10 of the SDK for iOS.

1MarketingCloudSdk.requestSdk { mc in
2  mc?.setInAppMessage(fontName: "Zapfino")
3}

Use this code to customize fonts in version 8.1 of the SDK for iOS.

1SFMCSdk.requestPushSdk { mp in
2  mp.setInAppMessage(fontName: "Zapfino")
3}

Use this code to customize fonts in version 8.0 of the SDK for iOS.

1// Make sure the SDK is operational
2SFMCSdk.mp.setInAppMessage(fontName: "Zapfino")

Use this code to customize fonts in version 7 of the SDK for iOS.

1MarketingCloudSDK.sharedInstance().sfmc_set(inAppMessageFontName: "Zapfino")

If the font isn’t found, the SDK returns false and uses the system font.