Back to News for Developers

Introducing Facebook Platform SDK v13.0 & Related Updates

Today we are releasing Facebook SDK v13.0 and additional updates to our Facebook Platform SDKs. This post outlines these updates and the required steps developers should take to avoid disruption, where necessary, for their application(s) integration with our platform. Here is a quick overview of some of the updates included as part of the SDK v13.0 release:

  • Graph API v13.0 Support: We are adding support for Graph API v13.0 and the Marketing API v13.0.
  • Embedded Permission Request for Android Advertiser ID in Facebook SDK for Android: Android SDK v13.0 will now include a permission request for the Android Advertiser ID by default in line with the Google Play Services policy on Advertiser IDs. All developers who utilize the Facebook SDK for Android will need to take action before Google’s planned enforcement begins in April 2022 in order to avoid service disruption.
  • Requirement to embed Client Token in SDK takes effect: With the release of Facebook SDK v13.0, developers are now required to embed Client Tokens in the SDK.
  • Requirement to use Java 8 bytecode takes effect: We are now requiring developers to use Java 8 bytecode in order to avoid app compilation errors.
  • Deprecation Announcements: SDK v12 (including v12.1, v12.2 etc.) is now in a deprecated state. Beginning today, developers should begin migrating to v13.0 in order to avoid using deprecated SDKs for their application(s).

Please find additional details on these updates below.

Release of SDK v13.0

Today Platform SDK v13.0 is launching across Android and iOS platforms. As part of this release, we are adding SDK support for the Facebook Graph API v13.0 and Marketing API v13.0. We have created this blog post to highlight additional announcements, product updates and reminders related to the Graph API v13.0 and Marketing API v13.0 release.

Other Key Updates

Below is an overview of other updates and changes included as part of the SDK v13.0 release:

SDK Modernization: Conversion from Objective-C to Swift

We are converting our SDK code from Objective-C to Swift in line with modernizing our Platform SDKs. The SDK v13.0 release includes several changes from the conversion effort that may require action by Developers. These changes include:

  • A number of types have been converted from Objective-C to Swift. Developers may need to use modular import statements when using GamingServicesKit and majority of ShareKit in order to avoid encountering compilation errors in Objective-C. In such cases Developers will need to use @import instead of #import in Objective-C files when using symbols from these kits. Developers can also reference the changelog for more details on how to use modular import statements.
  • Additionally, we are further reducing the use of Objective-C value-type practices in ShareKit. Starting with the release of SDK v13.0, ShareKit content types will no longer implement the following behaviors: conformance to the NSCopying protocol, custom hashability and equatability, and conformance to NSSecureCoding. Developers can see the changelog for additional details.
  • We have also made more updates to the types of app event reporting interfaces so they now use formal app event and parameter names. Developers working in Swift code are required to use AppEvents.Name and AppEvents.ParameterName instances to represent app event names and parameter names, respectively. Developers working in Objective-C code can continue using string values to reference Reporting Interfaces. Developers can see the changelog for additional details.

Migration of Gaming components from ShareKit to GamingServicesKit:

As part of the SDK v13.0 release, we have migrated six gaming component public types from ShareKit to GamingServicesKit, and these public types have also been converted from Objective-C to Swift. The six migrated public types are: GameRequestActionType, GameRequestContent, GameRequestDialog, GameRequestDialogDelegate, GameRequestFilter and GameRequestURLProvider.

Deprecations & Breaking Changes:

Embedded Permission Request for Android Advertiser ID in Facebook SDK for Android:

Android SDK v13.0 now includes an Android Advertiser ID permission request by default. We are making this change in line with the Google Play Services policy on Advertiser IDs. We are requiring that Developers take the actions below before April 2022 in order to avoid service disruption on their app:

  • All developers using Android SDK v12.1 and below should upgrade to v13.0
  • Developers that utilize App Events should take the following steps:
    • If using v12.1 or below – upgrade to v13.0
    • If using v12.2 or 12.3 – include an Android Advertiser ID permission request in the App Manifest file to receive a valid Advertiser ID (learn more here)
    • If using v13.0 and higher – no action required, Android Advertiser ID permission request included by default
  • Developers that do not utilize App Events should take the following steps:
    • If using v12.3 or below – ensure the App Events flag is disabled (learn more here)
    • If using v13.0 and higher – ensure the App Events flag is disabled (learn more here) and remove the Android Advertiser ID permission request (learn more here)

Requirement to embed Client Tokens in the SDK takes effect:

Starting with the release of Platform SDK v13.0, developers are now required to embed a Client Token in the SDK for Graph API calls. The inclusion of Client Tokens in the SDK enables us to analyze platform issues more effectively and enhance the performance of the platform as a whole. With the launch of Platform SDK v13.0, we will now use Client Tokens for processing Graph API calls when an Access or Authentication Token is unavailable. As a result, any apps using SDK v13.0 and above that do not include a Client Token will raise an exception upon initialization of the SDK. Developers can learn more about how to embed their App’s Client Token in the Android SDK here and in the iOS SDK here to avoid any service disruption.

Requirement to use Java 8 bytecode takes effect:

In line with the Kotlin announcement that the Kotlin/JVM compiler will produce Java 8 bytecode by default, we are now requiring developers using the Facebook SDK for Android to upgrade to Java 8 bytecode in order to avoid encountering any issues during app compilation. Developers can learn more about upgrading to Java 8 bytecode here.

Deprecation of Platform SDK v12.0:

With the release of SDK v13.0, we are announcing that SDK v12.0 is now in a deprecated state for a 2-year period. During this deprecation period, there will be no formal maintenance support provided for any issues raised on SDK v12.0. At the end of the 2-year deprecation period, SDK v12.0 will be discontinued and no longer operational. In light of the deprecation of SDK v12.0, developers are encouraged to begin the process of migrating to SDK v13.0 as soon as possible to use the latest and greatest SDK with formal maintenance support.

Version Deprecations:

Below are the deprecated versions of the Facebook Platform SDKs and associated dates:

  • February 24, 2022: iOS & Android SDK v12 (Deprecated)
  • October 21, 2021: iOS & Android SDK v11 (Deprecated)
  • June 8, 2021: iOS, Android & Unity SDK v9 (Deprecated)
  • January 19, 2021: iOS, Android & Unity SDK v8.2 and below (Deprecated)

Changelog:

Visit our Changelogs to review specific changes to the SDKs and stay informed on planned improvements: