Skip to content

Commit

Permalink
Fixing issue with Cocoapods used in Unity (#1122)
Browse files Browse the repository at this point in the history
Summary:
Thanks for proposing a pull request!

To help us review the request, please complete the following:

- [x] sign [contributor license agreement](https://developers.facebook.com/opensource/cla)
- [x] I've ensured that all existing tests pass and added tests (when/where necessary)
- [x] I've updated the documentation (when/where necessary) and [Changelog](CHANGELOG.md) (when/where necessary)
- [x] I've added the proper label to this pull request (e.g. `bug` for bug fixes)

## Pull Request Details

Fixing import errors when using Unity.
Pull Request resolved: #1122

Test Plan: Open a new unity project that includes the SDK. Open the generated Xcode workspace. It should compile without error about improper header import syntax.

Reviewed By: Mxiim

Differential Revision: D18572442

Pulled By: joesus

fbshipit-source-id: bddea9a5b97d18f8b27b583dfcce6866c382aea0
  • Loading branch information
joesus authored and facebook-github-bot committed Nov 18, 2019
1 parent 2fc11f3 commit 6a83270
Show file tree
Hide file tree
Showing 23 changed files with 23 additions and 22 deletions.
1 change: 1 addition & 0 deletions FBSDKCoreKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Pod::Spec.new do |s|

s.default_subspecs = 'Core', 'Basics'
s.swift_version = '5.0'
s.xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) FBSDKCOCOAPODS=1' }

s.subspec 'Basics' do |ss|
ss.source_files = 'FBSDKCoreKit/FBSDKCoreKit/Basics/*.{h,m}',
Expand Down
2 changes: 1 addition & 1 deletion FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <UIKit/UIKit.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <Foundation/Foundation.h>

#ifdef BUCK
#if defined BUCK || defined FBSDKCOCOAPODS
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/FBSDKAppGroupContent.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <Foundation/Foundation.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/FBSDKAppInviteContent.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <Foundation/Foundation.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/FBSDKCameraEffectArguments.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <Foundation/Foundation.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/FBSDKCameraEffectTextures.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <UIKit/UIKit.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/FBSDKGameRequestContent.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <Foundation/Foundation.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/FBSDKHashtag.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <Foundation/Foundation.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/FBSDKSendButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <UIKit/UIKit.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/FBSDKShareAPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#import <AssetsLibrary/AssetsLibrary.h>
#endif

#ifdef BUCK
#if defined BUCK || defined FBSDKCOCOAPODS
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/FBSDKShareButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <UIKit/UIKit.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <Foundation/Foundation.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <Foundation/Foundation.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <Foundation/Foundation.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/FBSDKShareOpenGraphObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <Foundation/Foundation.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/FBSDKSharePhoto.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <UIKit/UIKit.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/FBSDKShareVideo.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#import <Photos/Photos.h>
#import <UIKit/UIKit.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/FBSDKSharingContent.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <Foundation/Foundation.h>

#if defined BUCK || defined __cplusplus
#if defined BUCK || defined FBSDKCOCOAPODS || defined __cplusplus
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import "FBSDKGameRequestFrictionlessRecipientCache.h"

#ifdef BUCK
#if defined BUCK || defined FBSDKCOCOAPODS
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#import <QuartzCore/QuartzCore.h>

#ifdef BUCK
#if defined BUCK || defined FBSDKCOCOAPODS
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/Internal/FBSDKVideoUploader.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import <Foundation/Foundation.h>

#ifdef BUCK
#if defined BUCK || defined FBSDKCOCOAPODS
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down
2 changes: 1 addition & 1 deletion FBSDKShareKit/FBSDKShareKit/Internal/FBSDKVideoUploader.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#import <Foundation/Foundation.h>

#ifdef BUCK
#if defined BUCK || defined FBSDKCOCOAPODS
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#else
@import FBSDKCoreKit;
Expand Down

0 comments on commit 6a83270

Please sign in to comment.