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.
- 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