All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Introduced Xcodegen for generating project files. Moving forward, We will now use Xcodegen to generate the project files that are used to build the SDK releases. There should be no impact to SDK users. However, some build settings were restored to Xcode defaults as a result of this change, and output binaries may be affected in unpredictable ways. Contributors to the SDK should run the new, top-level script
generate-projects.sh
to ensure that the project files they are using are the same as those being used in CI and for releases. The next major version will remove the project files from version control. If you experience any of these issues, please open an issue and we will look into it.
- Building the frameworks using Carthage. Carthage is a dependency manager that typically works by building a third party framework using Xcode schemes shared from a
.xcodeproj
file. We are planning to remove the.xcodeproj
files in the next major release as they will be generated on an as needed basis using Xcodegen. There is a strong likelihood that this change will break several integrations that use Carthage. You will still be able to use Carthage by pulling the pre-built binaries or XCFrameworks directly from the release. If this does not work for your use case, we recommend checking out Swift Package Manager as an alternative. - FBSDKGamingServicesKit's
GamingServiceResultCompletionHandler
. Replaced byGamingServiceResultCompletion
which passes a dictionary instead of a string for the result. Additionally the following methods have been updated:uploadImageWithConfiguration:andResultCompletionHandler
is replaced byuploadImageWithConfiguration:andResultCompletion
uploadImageWithConfiguration:completionHandler:andProgressHandler
is replaced byuploadImageWithConfiguration:completion:andProgressHandler:
uploadVideoWithConfiguration:completionHandler:andProgressHandler:
is replaced byuploadVideoWithConfiguration:completion:andProgressHandler:
uploadVideoWithConfiguration:andResultCompletionHandler
is replaced byuploadVideoWithConfiguration:andResultCompletion
- Add background refresh status logging
- No longer automatically showing UI for GraphErrorRecoveryProcessor
ATTENTION: The Platform SDK v11.0 release introduces a few key changes to how dependencies will be managed moving forward. These changes are being implemented to drive more efficiency in our development process and reduce an over-reliance on singletons and tight coupling.. As part of these changes, we are currently in the process of converting existing types to use injected dependencies. As a result, many types will no longer be usable until the SDK is initialized. In order to ensure that types are configured correctly before being used, you will need to call FBSDKApplicationDelegate.application:didFinishLaunchingWithOptions:
first before attempting to (i) get or set any properties, or (ii) invoke any methods on the SDK.
The source code has been updated to include reminders in the form of exceptions in DEBUG
builds across several locations. These reminders will serve as pointers for Developers to call FBSDKApplicationDelegate.application:didFinishLaunchingWithOptions:
before using the SDK. For more information see: facebook#1763.
- Login with Facebook iOS app now populates a shared
AuthenticationToken
instance. - Added Limited Login support for
user_hometown
,user_location
,user_gender
anduser_link
permissions under public beta. - Updated Profile on Limited Login to include first, middle and last name as separate fields.
- Released
user_messenger_contact
permission to enable Login Connect with Messenger. This new feature allows people to opt in to being contacted by a business on Messenger following the FB Login flow. - Added ability to add
messenger_page_id
param toFBSDKLoginButton
andFBSDKLoginConfiguration
- Added
FBSDKApplicationObserving
- a protocol for describing types that can optional respond to lifecycle events propagated byApplicationDelegate
- Added
addObserver:
andremoveObserver:
toFBSDKApplicationDelegate
- Added
startWithCompletion:
toFBSDKGraphRequest
. ReplacesstartWithCompletionHandler:
- Added
addRequest:completion
toFBSDKGraphRequestConnection
. ReplacesaddRequest:completionHandler:
. - Added
addRequest:name:completion:
toFBSDKGraphRequestConnection
. ReplacesaddRequest:batchEntryName:completionHandler:
. - Added
addRequest:parameters:completion:
toFBSDKGraphRequestConnection
. ReplacesaddRequest:batchParameters:completionHandler:
. - Added instance method
activateApp
toAppEvents
.
FBSDKGraphRequestBlock
. Replaced byFBSDKGraphRequestCompletion
which returns an abstractFBSDKGraphRequestConnection
in the formid<FBSDKGraphRequestConnecting>
(ObjC) orGraphRequestConnecting
(Swift)FBSDKGraphRequest
'sstartWithCompletionHandler:
replaced bystartWithCompletion:
FBSDKGraphRequestConnection
'saddRequest:completionHandler:
replaced byaddRequest:completion:
FBSDKGraphRequestConnection
'saddRequest:batchEntryName:completionHandler:
replaced byaddRequest:name:completion:
FBSDKGraphRequestConnection
'saddRequest:batchParameters:completionHandler:
replaced byaddRequest:parameters:completion:
FBSDKGraphRequestBlock
- Class method
AppEvents.activateApp
. It is replaced by an instance method of the same name.
FBSDKApplicationDelegate.initializeSDK:launchOptions:
. The replacement method isFBSDKApplicationDelegate.application:didFinishLaunchingWithOptions:
FBSDKAppEvents
'updateUserProperties:handler:
method.FBSDKAppEvents
'supdateUserProperties:handler:
method.FBSDKAppLinkReturnToRefererControllerDelegate
FBSDKAppLinkReturnToRefererController
FBSDKIncludeStatusBarInSize
FBSDKAppLinkReturnToRefererViewDelegate
FBAppLinkReturnToRefererView
FBSDKErrorRecoveryAttempting
'sattemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:
FBSDKProfile
'sinitWithUserID:firstName:middleName:lastName:name:linkURL:refreshDate:imageURL:email:
FBSDKProfile
'sinitWithUserID:firstName:middleName:lastName:name:linkURL:refreshDate:imageURL:email:friendIDs:birthday:ageRange:isLimited:
FBSDKProfile
'sinitWithUserID:firstName:middleName:lastName:name:linkURL:refreshDate:imageURL:email:friendIDs:
FBSDKProfile
'sinitWithUserID:firstName:middleName:lastName:name:linkURL:refreshDate:imageURL:email:friendIDs:birthday:ageRange:
FBSDKAccessTokensBlock
FBSDKTestUsersManager
FBSDKGraphErrorRecoveryProcessor
'sdelegate
propertyFBSDKGraphErrorRecoveryProcessor
'sdidPresentErrorWithRecovery:contextInfo:
FBSDKGamingVideoUploader
'suploadVideoWithConfiguration:andCompletionHandler:
FBSDKGamingImageUploader
'suploadImageWithConfiguration:andCompletionHandler:
NOT RELEASED
Reason: The SDK is primarily a means of interacting with the Graph API. The decision was made to skip this version in order to maintain major version parity. Since Graph API is on v11, it did not make sense to release a v10 then immediately release a v11.
Performance Improvements
- Cocoapods: FBSDKCoreKit rebuilds FacebookSDKStrings.bundle so xcode processes the strings files into binary plist format. This strips comments and saves ~181KB in disk space for apps. #1713
- Added AEM (Aggregated Events Measurement) support under public beta.
- Added
external_id
support in advanced matching. GamingServicesKit
changed the Game Request feature flow where if the user has the facebook app installed, they will not see a webview to complete a game request. Instead they will switch to the facebook app and app switch back once the request is sent or the user cancels the dialog.
- Fix for shadowing swift type. #1721
- Optimization for cached token fetching. See the commit message for more details.
- Cocoapods with generate_multiple_pod_projects #1709
- Added Limited Login support for
user_friends
,user_birthday
anduser_age_range
permissions under public beta. - Shared Profile instance will be populated with
birthday
andageRange
fields using the claims from theAuthenticationToken
. (NOTE: birthday and ageRange fields are in public beta mode) - Added a convenience initializer to
Profile
as part of fixing a bug where upgrading from limited to regular login would fail to fetch the profile using the newly available access token. GamingServicesKit
added an observer class where if developers set the delegate we will trigger the delegate method with aGamingPayload
object if any urls contain gaming payload data. (NOTE: This feature is currently under development)
Performance Improvements
- Added in memory cache for carrier and timezone so they are not dynamically loaded on every
didBecomeActive
- Added cached
ASIdentifierManager
to avoid dynamic loading on everydidBecomeActive
- Backgrounds the expensive property creation that happens during AppEvents class initialization.
- Added thread safety for incrementing the serial number used by the logging utility.
- Added early return to Access Token to avoid unnecessary writes to keychain which can cause performance issues.
Bug Fixes
- Fixed using CocoaPods with the
generate_multiple_pod_projects
flag. #1707 - Adhere to flush behavior for logging completion. Will now only flush events if the flush behavior is
explicitOnly
. - Static library binaries are built with
BITCODE_GENERATION_MODE = bitcode
to fix errors where Xcode is unable to build apps with bitcode enabled. #1698
TestUsersManager
. The APIs that back this convenience type still exist but there is no compelling reason to have this be part of the core SDK. See the commit message for more on the rationale.
- Internal type
AudioResourceLoader
.
friendIDs
property added toFBSDKProfile
(NOTE: We are building out thefriendIDs
property in Limited Login with the intention to roll it out in early spring)FBSDKProfile
initializer that includes optionalfriendIDs
argumentclaims
property of typeFBSDKAuthenticationTokenClaims
added toFBSDKAuthenticationToken
- Build Warnings for SPM with Xcode 12.5 Beta 2 #1661
- Memory leak in
FBSDKGraphErrorRecoveryProcessor
- Name conflict for Swift version of
FBSDKURLSessionTask
- Avoids call to
AppEvents
singleton when setting overriding app ID #1647 - CocoaPods now compiles
FBSDKDynamicFrameworkLoader
with ARC. - CocoaPods now uses static frameworks as the prebuilt libraries for the aggregate FacebookSDK podspec
- App Events use the correct token if none have been provided manually (@ptxmac#1670
FBSDKGraphErrorRecoveryProcessor
'sdelegate
propertyFBSDKGraphErrorRecoveryProcessor
'sdidPresentErrorWithRecovery:contextInfo:
methodFBSDKAppLinkReturnToRefererView
FBSDKAppLinkReturnToRefererController
- Internal type
FBSDKErrorRecoveryAttempter
- Add control support for the key FacebookSKAdNetworkReportEnabled in the info.plist
- Add APIs to control SKAdNetwork Report
- Fix deadlock issue between SKAdNetwork Report and AAM/Codeless
- Fix default ATE sync for the first app launch
- Fix build error caused by LoginButton nonce property (@kmcbride in #1616)
- Fix crash on FBSDKWebViewAppLinkResolverWebViewDelegate (@Kry256 in #1624)
- Fix XCFrameworks build issue (#1628)
- Fix deadlock when AppEvents ActivateApp is called without initializing the SDK (#1636)
We have a number of exciting changes in this release! For more information on the v9 release please read our associated blog post!
- Swift Package Manager now supports Mac Catalyst
- Limited Login. Please read the blog post and docs for a general overview and implementation details.
- The default Graph API version is updated to v9.0
- The
linkURL
property ofFBSDKProfile
will only be populated if the user has granted theuser_link
permission. - FBSDKGamingServicesKit will no longer embed FBSDKCoreKit as a dependency. This may affect you if you are manually integrating pre-built binaries.
- The aggregate CocoaPod
FacebookSDK
now vendors XCFrameworks. Note: this may cause conflicts with other CocoaPods that have dependencies on the our libraries, ex: Audience Network. If you encounter a conflict it is easy to resolve by using one or more of the individual library pods instead of the aggregate pod.
- The
autoInitEnabled
option is removed from the SDK. From here on, developers are required to initialize the SDK explicitly with theinitializeSDK
method or implicitly by calling it inapplicationDidFinishLaunching
.
- Swift Package Manager Mac Catalyst support #1577
- Remove SignalHandler to avoid hiding root cause of crashes caused by fatal signals.
- Expose functions in
FBSDKUserDataStore
as public for apps using Audience Network SDK only to use advanced matching.
- Introduced
AppLinkResolverRequestBuilder
for use in cleaning up and adding tests aroundAppLinkResolver
- Removed version checks for iOS 9 since it’s the default version now.
- Refactored
AppLinkResolver
to use a request builder - Refactored and added tests around
FBSDKProfile
andFBSDKProfilePictureView
- Updated
FBSDKSettings
to useADIdentifierManager
for tracking status - Removes usages of deprecated
UI_USER_INTERFACE_IDIOM()
- Issues with Swift names causing warnings - #1522
- Fixes bugs related to crash handling - #1444
- Fixes Carthage distribution to include the correct binary slices when building on Xcode12 - #1484
- Fixes duplicate symbol for
FBSDKVideoUploader
bug #1512 - GET requests now default to having a 'fields' parameter to avoid warnings about missing fields #1403
- Fixes Multithreading issue related to crash reporting - #1550
- Added timestamp for install event in iOS 14
- Added method
setAdvertiserTrackingEnabled
to overwrite theadvertiser_tracking_enabled
flag - Added
SKAdNetwork
support for installs - Added
SKAdNetwork
support for conversion value in iOS 14 - Added
FBSDKReferralManager
for integrating with the web referral dialog - Added method
loginWithURL
toFBSDKLoginManager
for supporting deep link authentication - Added E2E tests for all in-market versions of the SDK that run on server changes to avoid regressions
- Event handling in iOS 14: will drop events if
setAdvertiserTrackingEnabled
is called withfalse
in iOS 14 FBSDKProfile - imageURLForPictureMode:size:
- User profile images will only be available when an access or client token is available
FBSDKSettings - isAutoInitEnabled
- Auto-initialization flag. Will be removed in the next major release. Future versions of the SDK will not utilize the+ load
method to automatically initialize the SDK.
- #1444 - Update crash handling to use sigaction in signal handler and respect SIG_IGN
- #1447 - Login form automatically closing when SDK is not initialized on startup
- #1478 - Minimum iOS deployment target is now 9.0
- #1485 - StoreKit is now added as a weak framework for CocoaPods
- Bug fix for Advanced Matching, which was not working on iOS 14
- Fix data processing options issue
- Introduce DataProcessingOptions
- Remove UserProperties API
🚨🚨🚨Attention! 🚨🚨🚨
This release fixes the ability to parse bad server configuration data. Please upgrade to at least this version to help avoid major outtages such as #1374 and #1427
- Added additional unit tests for FBSDKRestrictiveDataFilterManager
- Added integration test for building with xcodebuild
- Added safer implementation of
NSJSONSerialization
methods toFBSDKTypeUtility
and changed callsites - Added 'fuzz' testing class to test our network response parsing won't crash from bad/unexpected values
- Issue #1401
- Issue #1380
- Previously, we could not remove AAM data if we opt out some rules. Now, we align with Android AAM and add an internalUserData to save AAM data. And we only send back the data of enabled AAM rules.
- Fix a bug where we were not updating Event Deactivation or Restrictive Data Filtering if the
enable()
function was called after theupdate()
function - Restrictive data filtering bug where updating filters would exit early on an empty eventInfo parameter.
- Enabling bitcode by default; we used to disable bitcode globally and enable it for certain versions of iphoneos due to Xcode 6 issue, given we've dropped the support for Xcode 6, it's cleaner to enable bitcode by default.
- Now using
FBSDKTypeUtility
to provide type safety for Dictionaries and Arrays - Updates code so that
NSKeyedUnarchiver
method calls will continue to work no matter what the iOS deployment target is set to. - Skips sending back app events when there are no encoded events.
- MarketingKit
- Using version 7.0 of the Facebook Graph API
- Dropping support for Xcode versions below 11. This is in line with Apple's plans to disallow submission of Apps that do not include the iOS 13 SDK. This means that from v7.0 on, all SDK kits will be built using Xcode 11 and Swift 5.1.
- Include the enhanced Swift interfaces
This primarily matters for how you include CocoaPods
Distribution Channel | Old way | New Way |
---|---|---|
CocoaPods | pod 'FBSDKCoreKit/Swift' |
pod 'FBSDKCoreKit' |
Swift Package Manager | No change | No change |
Carthage | No change | No change |
- FBSDKMarketingKit
- Various bug fixes
- The Swift interface for SharingDelegate should not have a nullable error in the callback.
- Fixes issue with login callback during backgrounding.
- Minor fixes related to Integrity
- More usecase for Integrity is supported.
FBSDKMessageDialog now accepts FBSDKSharePhotoContent.
FBSDKGamingServicesKit/FBSDKGamingImageUploader.h
uploadImageWithConfiguration:andResultCompletionHandler:
uploadImageWithConfiguration:completionHandler:andProgressHandler:
FBSDKGamingServicesKit/FBSDKGamingVideoUploader.h
uploadVideoWithConfiguration:andResultCompletionHandler:
uploadVideoWithConfiguration:completionHandler:andProgressHandler:
FBSDKGamingServicesKit/FBSDKGamingImageUploader.h
uploadImageWithConfiguration:andCompletionHandler:
FBSDKGamingServicesKit/FBSDKGamingVideoUploader.h
uploadVideoWithConfiguration:andCompletionHandler:
Various bug fixes, CI improvements
- Support new event type for suggested events
- Support for Gaming Video Uploads
- Allow Gaming Image Uploader to accept a callback
- Messenger Sharing
- Uses API version 6.0 by default
FBSDKShareDialog
delegate callbacks on apps using iOS 13
- Facebook Messenger Template and OpenGraph Sharing
FBSDKMessengerActionButton
FBSDKShareMessengerGenericTemplateContent
FBSDKShareMessengerGenericTemplateElement
FBSDKShareMessengerMediaTemplateMediaType
FBSDKShareMessengerMediaTemplateContent
FBSDKShareMessengerOpenGraphMusicTemplateContent
FBSDKShareMessengerURLActionButton
FBSDKShareAPI
since it exists to make sharing of open graph objects easier. It also requires the deprecatedpublish_actions
permission which is deprecated.- Property
pageID
fromFBSDKSharingContent
since it only applies to sharing to Facebook Messenger FBSDKShareOpenGraphAction
FBSDKShareOpenGraphContent
FBSDKShareOpenGraphObject
FBSDKShareOpenGraphValueContainer
FBSDKSettings
propertyinstrumentEnabled
- Sharing of open graph objects. This is because the "publish_actions" permission is deprecated so we should not be providing helper methods that encourage its use. For more details see: https://developers.facebook.com/docs/sharing/opengraph
FBSDKAppEventNameSubscriptionHeartbeat
FBSDKLoginBehavior
Login flows no longer support logging in through the native application. This change reflects that.
- fix multi-thread issue for Crash Report
- fix write to file issue for Crash Report
- fix for CocoaPods (i.e. macro
FBSDKCOCOAPODS
) - fixes a bug in for sharing callbacks for apps using SceneDelegate
- SPM Support for tvOS
- fix for CocoaPods static libs (i.e. no
use-frameworks!
) - various bug fixes and unit test additions
- bug fix for address inferencer weights load
- Parameter deactivation
- Update ML model to support non-English input
- Updated suggested events
- Accelerate automatically linked for SPM installs 6c1a7e
- Fixes building for Unity 6a83270
- Updates build scripts, various bug fixes
- Launch event suggestions
- Various bugfixes with SPM implementation
- Support for Swift Package Manager
- Using Graph API version 5.0
- Launch automatic advanced matching: https://www.facebook.com/business/help/2445860982357574
- Nullability annotation in FBSDKCoreKit
- Various bug fixes
- Build scripts (for documentation and to support libraries that include Swift)
- Fixed FB Login for multi-window apps that created via Xcode 11
- Added support for generate_multiple_pod_projects for cocoapods 1.7.0
- Improved performance and stability of crash reporting
- Added user agent suffix for macOS
- Various bug fixes
- Replaced UIWebView with WKWebView as Apple will stop accepting submissions of apps that use UIWebView APIs
- Added support for Catalyst
- Various bug fixes
- Deprecated
+[FBSDKSettings isInstrumentEnabled]
, please use+[FBSDKSettings isAutoLogEnabled]
instead
- Fix Facebook Login for iOS 13 beta
- Various bug fixes
- Add handling for crash and error to make SDK more stable
- Graph API update to v4.0
- Fixed Facebook Login issues
- Fixed Facebook Login on iOS 13 beta
- Various bug fixes
- Various bug fixes
- Fixed a crash caused by sensitive data filtering
- Fixed FB Login for iOS 13
- Various bug fixes
- Various bug fixes
- support manual SDK initialization
- extend coverage of AutoLogAppEventsEnabled flag to all internal analytics events
- Typedefs for public Objective-C blocks
NS_DESIGNATED_INITIALIZER
for required initsNS_TYPED_EXTENSIBLE_ENUM
where made sensegetter
name for certain properties, like booleansNS_ASSUME_NONNULL_BEGIN
,NS_ASSUME_NONNULL_END
, and other nullability annotations- Generics for Arrays, Sets, and Dictionaries
NS_SWIFT_NAME
to remove theFBSDK
prefix where necessary (leftFB
prefix for UI elements)FBSDKLoginManager -logInWithPermissions:fromViewController:handler:
FBSDKLoginButton permissions
FBSDKDeviceLoginButton permissions
FBSDKDeviceLoginViewController permissions
- New
FBSDKAppEventName
values
- Using
instancetype
for inits - All
NSError **
translate to throws on Swift - Updated Xcode Projects and Schemes to most Valid Project settings
- Getter methods changed to
readonly
properties - Getter/Setter methods changed to
readwrite
properties - Dot notation for access to properties
- Collections/Dictionaries became non null when at all possible
- Class creation methods become Swift inits
- Used
NS_REFINED_FOR_SWIFT
where advisable
FBSDKLoginManager -logInWithReadPermissions:fromViewController:handler:
FBSDKLoginManager -logInWithWritePermissions:fromViewController:handler:
FBSDKLoginButton readPermissions
FBSDKLoginButton writePermissions
FBSDKDeviceLoginButton readPermissions
FBSDKDeviceLoginButton writePermissions
FBSDKDeviceLoginViewController readPermissions
FBSDKDeviceLoginViewController writePermissions
FBSDKUtility SHA256HashString
FBSDKUtility SHA256HashData
- Deprecated methods
- Deprecated classes
- Deprecated properties
- Made
init
andnew
unavailable where necessary - Used
NS_SWIFT_UNAVAILABLE
where necessary
- Various bug fixes
- Light-weight generics have been added for Arrays, Sets, and Dictionaries. Make sure you're passing in the proper types.
- Some methods used to have closures as arguments, but did not have them as the final argument. All these methods have been rearranged to have the closure as the final argument.
- Certain string values, like App Event Names and HTTP Method, have been made NSString typedef with the
NS_TYPED_EXTENSIBLE_ENUM
attribute. All your existing code should work just fine.
NS_SWIFT_NAME
was applied where applicable. Most of these changes Xcode can fix automatically.- The
FBSDK
prefix for UI elements has been replaced with the simplerFB
prefix. - The
FBSDK
prefix for all other types has been removed. FBSDKError
is nowCoreError
.
- The
NS_ERROR_ENUM
is used to handling errors now. For more details, view Apple's documentation on Handling Cocoa Errors in Swift.- Certain string values, like App Event Names and HTTP Method, have been made extensible structs with the
NS_TYPED_EXTENSIBLE_ENUM
attribute:FBSDKAppEventNamePurchased
->AppEvents.Name.purchased
"custom_app_event"
->AppEvents.Name("custom_app_event")
- Certain values have been annotated with
NS_REFINED_FOR_SWIFT
and can be customized via either:- The Facebook SDK in Swift (Beta)
- Implementing custom extensions
// Custom extensions
public extension AccessToken {
var permissions: Set<String> {
return Set(__permissions)
}
}
extension AppEvents.Name {
static let customAppEvent = AppEvents.Name("custom_app_event")
}
extension ShareDialog.Mode: CustomStringConvertible {
public var description: String {
return __NSStringFromFBSDKShareDialogMode(self)
}
}
// Later in code
let perms: Set<String> = AccessToken(...).permissions
let event: AppEvents.Name = .customAppEvent
let mode: ShareDialog.Mode = .native
let description: String = "\(mode)"
_inBackground
now indicates correct application state
- Add parameter
_inBackground
for app events
- Various bug fixes
- Support for Xcode 10.2
FBSDKLoginBehaviorNative
FBSDKLoginBehaviorSystemAccount
FBSDKLoginBehaviorWeb
[FBSDKLoginManager renewSystemCredentials]
- Various bug fixes
- Moved directory structure for better separation
- Various bug fixes
- Resolved issues with the release process
- Various bug fixes
- Resolved build failures with Carthage and Cocoapods
- Various bug fixes
- Various bug fixes
- Various bug fixes
2019-01-08 | Full Changelog | Facebook Developer Docs Changelog