mirror of
https://github.com/zhigang1992/facebook-ios-sdk.git
synced 2026-05-12 19:59:13 +08:00
Modernized FBSDKShareKit
Summary: This diff modernizes the `FBSDKShareKit` to support modern Objective-C syntax to increase type safety with both ObjC and Swift. **General Changes** * Removed Deprecated Methods, Classes, Properties * Typedefs for all Objective-C blocks * Used `instancetype` for inits * Updated Xcode Projects/Schemes via. "Validate Project" option in Xcode * Made `init`/`new` unavailable where/when possible * Confirm `NSError **` throws on Swift * Used `NS_SWIFT_UNAVAILABLE` where makes sense * Ensured `NS_DESIGNATED_INITIALIZER` is used * Added `NS_TYPED_EXTENSIBLE_ENUM` where made sense **Updated Properties** * Changed getter methods to `readonly` properties * Changed getter/setter methods to `readwrite` properties * Changed singletons to class properties * Used dot notation for access to properties * Added `getter=` for certain properties (e.g. `BOOL`) **Added Nullability Annotations** * Used `NS_ASSUME_NONNULL_BEGIN` & `NS_ASSUME_NONNULL_END` for files * Used `_Nullable` for typedef blocks * Used `nullable` & `null_resettable` * Collections/Dictionaries `nonnull` when at all possible **Added Generics** * `NSArray` & `NSMutableArray` * `NSSet` & `NSMutableSet` * `NSDictionary` & `NSMutableDictionary` **Added `NS_SWIFT_NAME`** * Removed prefixes in favor of Swift namespaces * `FB` prefix for UI elements * Added Dot notation where makes sense * Swift init for class method creation methods Differential Revision: D9843539 fbshipit-source-id: d15f5ccadbad1b3b07b482f068e799a112ec52d2
This commit is contained in:
committed by
Facebook Github Bot
parent
5dcf2c484b
commit
9b682bb292
@@ -86,7 +86,6 @@ Pod::Spec.new do |s|
|
||||
'FBSDKShareKit/FBSDKShareKit/FBSDKShareMessengerURLActionButton.h',
|
||||
'FBSDKShareKit/FBSDKShareKit/Internal/FBSDKShareDefines.h',
|
||||
'FBSDKShareKit/FBSDKShareKit/Internal/FBSDKShareError.{h,m}',
|
||||
'FBSDKShareKit/FBSDKShareKit/Internal/FBSDKShareLinkContent+Internal.h',
|
||||
'FBSDKShareKit/FBSDKShareKit/Internal/FBSDKShareOpenGraphValueContainer+Internal.h',
|
||||
'FBSDKShareKit/FBSDKShareKit/Internal/FBSDKShareUtility.{h,m}',
|
||||
'FBSDKShareKit/FBSDKShareKit/Internal/FBSDKVideoUploader.{h,m}'
|
||||
|
||||
Reference in New Issue
Block a user