Skip to content

Commit

Permalink
Fix compilation on Xcode 13b3 (#1811)
Browse files Browse the repository at this point in the history
Summary:
While this is not a proper fix, it allows you to compile Facebook SDK with Xcode 13b3 and up.

Kind of a fix for #1799

Pull Request resolved: #1811

Reviewed By: jawwad

Differential Revision: D29961451

Pulled By: joesus

fbshipit-source-id: 8c659809785292bd3fcc4c9e2592b76bf06bc120
  • Loading branch information
S2Ler authored and facebook-github-bot committed Jul 29, 2021
1 parent 5ac21a3 commit 0e1d877
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## Unreleased

### Fixed

- Support for building with Xcode 13 beta 4 due to change in optionality for NS_EXTENSION_UNAVAILABLE. More information in the [Xcode release notes](https://developer.apple.com/documentation/xcode-release-notes/xcode-13-beta-release-notes) and in issue [#1799](https://github.com/facebook/facebook-ios-sdk/issues/1799). Resolved by [@S2Ler](https://github.com/S2Ler) in [#1768](https://github.com/facebook/facebook-ios-sdk/pull/1811)

[Full Changelog](https://github.com/facebook/facebook-ios-sdk/compare/v11.1.0...HEAD)

## 11.1.0
Expand Down
3 changes: 3 additions & 0 deletions FBSDKCoreKit/FBSDKCoreKit/AppEvents/FBSDKAppEvents.m
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ @interface FBSDKAppEvents ()

@end

#if FBSDK_SWIFT_PACKAGE
NS_EXTENSION_UNAVAILABLE("The Facebook iOS SDK is not currently supported in extensions")
#endif
@implementation FBSDKAppEvents
{
FBSDKServerConfiguration *_serverConfiguration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ @interface FBSDKCodelessIndexer ()

@end

#if FBSDK_SWIFT_PACKAGE
NS_EXTENSION_UNAVAILABLE("The Facebook iOS SDK is not currently supported in extensions")
#endif
@implementation FBSDKCodelessIndexer

static BOOL _isCodelessIndexing;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ @interface FBSDKEventBindingManager ()

@end

#if FBSDK_SWIFT_PACKAGE
NS_EXTENSION_UNAVAILABLE("The Facebook iOS SDK is not currently supported in extensions")
#endif
@implementation FBSDKEventBindingManager

- (instancetype)initWithSwizzler:(Class<FBSDKSwizzling>)swizzling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ @interface FBSDKSuggestedEventsIndexer ()

@end

#if FBSDK_SWIFT_PACKAGE
NS_EXTENSION_UNAVAILABLE("The Facebook iOS SDK is not currently supported in extensions")
#endif
@implementation FBSDKSuggestedEventsIndexer

- (instancetype)init
Expand Down
15 changes: 10 additions & 5 deletions FBSDKCoreKit/FBSDKCoreKit/AppLink/FBSDKWebViewAppLinkResolver.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ @interface FBSDKWebViewAppLinkResolverWebViewDelegate : NSObject <WKNavigationDe

@end

#if FBSDK_SWIFT_PACKAGE
NS_EXTENSION_UNAVAILABLE("The Facebook iOS SDK is not currently supported in extensions")
#endif
@implementation FBSDKWebViewAppLinkResolverWebViewDelegate

- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation
{
if (self.didFinishLoad) {
Expand Down Expand Up @@ -112,6 +114,9 @@ @interface FBSDKWebViewAppLinkResolver ()

@end

#if FBSDK_SWIFT_PACKAGE
NS_EXTENSION_UNAVAILABLE("The Facebook iOS SDK is not currently supported in extensions")
#endif
@implementation FBSDKWebViewAppLinkResolver

- (instancetype)init
Expand Down Expand Up @@ -179,17 +184,17 @@ - (void)appLinkFromURL:(NSURL *)url handler:(FBSDKAppLinkBlock)handler
{
[self followRedirects:url handler:^(NSDictionary<NSString *,id> *result, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{

if (error) {
handler(nil, error);
return;
}

NSData *responseData = result[@"data"];
NSHTTPURLResponse *response = result[@"response"];

WKWebView *webView = [WKWebView new];

FBSDKWebViewAppLinkResolverWebViewDelegate *listener = [FBSDKWebViewAppLinkResolverWebViewDelegate new];
__block FBSDKWebViewAppLinkResolverWebViewDelegate *retainedListener = listener;
listener.didFinishLoad = ^(WKWebView *view) {
Expand Down
3 changes: 3 additions & 0 deletions FBSDKCoreKit/FBSDKCoreKit/FBSDKApplicationDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ @interface FBSDKApplicationDelegate ()

@end

#if FBSDK_SWIFT_PACKAGE
NS_EXTENSION_UNAVAILABLE("The Facebook iOS SDK is not currently supported in extensions")
#endif
@implementation FBSDKApplicationDelegate

#pragma mark - Class Methods
Expand Down
3 changes: 3 additions & 0 deletions FBSDKCoreKit/FBSDKCoreKit/FBSDKBridgeAPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ @interface FBSDKBridgeAPI () <FBSDKContainerViewControllerDelegate>

@end

#if FBSDK_SWIFT_PACKAGE
NS_EXTENSION_UNAVAILABLE("The Facebook iOS SDK is not currently supported in extensions")
#endif
@implementation FBSDKBridgeAPI
{
NSObject<FBSDKBridgeAPIRequestProtocol> *_pendingRequest;
Expand Down
3 changes: 3 additions & 0 deletions FBSDKCoreKit/FBSDKCoreKit/FBSDKBridgeAPIRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
NSString *const FBSDKBridgeAPISchemeSuffixKey = @"scheme_suffix";
NSString *const FBSDKBridgeAPIVersionKey = @"version";

#if FBSDK_SWIFT_PACKAGE
NS_EXTENSION_UNAVAILABLE("The Facebook iOS SDK is not currently supported in extensions")
#endif
@implementation FBSDKBridgeAPIRequest

#pragma mark - Class Methods
Expand Down
3 changes: 3 additions & 0 deletions FBSDKCoreKit/FBSDKCoreKit/FBSDKInternalUtility.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ @interface FBSDKInternalUtility ()

@end

#if FBSDK_SWIFT_PACKAGE
NS_EXTENSION_UNAVAILABLE("The Facebook iOS SDK is not currently supported in extensions")
#endif
@implementation FBSDKInternalUtility

static Class<FBSDKLogging> _loggerType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ @interface FBSDKViewImpressionTracker ()

@end

#if FBSDK_SWIFT_PACKAGE
NS_EXTENSION_UNAVAILABLE("The Facebook iOS SDK is not currently supported in extensions")
#endif
@implementation FBSDKViewImpressionTracker
{
NSMutableSet *_trackedImpressions;
Expand Down
3 changes: 3 additions & 0 deletions FBSDKCoreKit/FBSDKCoreKit/Internal/WebDialog/FBSDKWebDialog.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
@interface FBSDKWebDialog () <FBSDKWebDialogViewDelegate>
@end

#if FBSDK_SWIFT_PACKAGE
NS_EXTENSION_UNAVAILABLE("The Facebook iOS SDK is not currently supported in extensions")
#endif
@implementation FBSDKWebDialog
{
UIView *_backgroundView;
Expand Down
3 changes: 3 additions & 0 deletions FBSDKLoginKit/FBSDKLoginKit/FBSDKTooltipView.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@

#pragma mark -

#if FBSDK_SWIFT_PACKAGE
NS_EXTENSION_UNAVAILABLE("The Facebook iOS SDK is not currently supported in extensions")
#endif
@implementation FBSDKTooltipView
{
CGPoint _positionInView;
Expand Down
3 changes: 3 additions & 0 deletions FBSDKShareKit/FBSDKShareKit/FBSDKShareDialog.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ static inline void FBSDKShareDialogValidateShareExtensionSchemeRegisteredForCanO
@interface FBSDKShareDialog () <FBSDKWebDialogDelegate>
@end

#if FBSDK_SWIFT_PACKAGE
NS_EXTENSION_UNAVAILABLE("The Facebook iOS SDK is not currently supported in extensions")
#endif
@implementation FBSDKShareDialog
{
FBSDKWebDialog *_webDialog;
Expand Down

0 comments on commit 0e1d877

Please sign in to comment.