Skip to content

Commit 46e385c

Browse files
joesusfacebook-github-bot
authored andcommitted
Fix Build Warnings for SPM with Xcode 12.5 Beta 2 (#1661)
Summary: Pull Request resolved: #1661 Swift Package Manager (SPM) by convention will treat any files in the `include` directory of a target as public. Therefore they need to be present in the umbrella header. Typically this is the header with the target name, ex: `FBSDKCoreKit.h`. For the target `FBSDKCoreKit_Basics` this means removing the internal header `FBSDKUserDataStore+Internal.h` since internal headers should not go in the `include` directory. Some internal methods are used by the meta indexer class but these were already declared in a private extension. Long term we will want to make these methods public but for now it makes sense to avoid adding them to the public interface. For the target `FBSDKCoreKit` we have two types that are only compiled for tvOS. Since we already have them compilation-gated inline, it is not necessary to exclude them from compilation in the umbrella header. It would be better to do this but it is not strictly necessary and this fixes the warning. The part I really don't like about this fix is that it forces us to make those headers public in the Xcode project for targets that they really shouldn't be public for. Reviewed By: jingping2015 Differential Revision: D26609865 fbshipit-source-id: 060a383b4f2d9c10564817a6cf944e69afc63d0e
1 parent e7dcb3d commit 46e385c

4 files changed

Lines changed: 12 additions & 42 deletions

File tree

FBSDKCoreKit/FBSDKCoreKit.xcodeproj/project.pbxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,10 @@
10281028
F496E5FE24E5D0D5006231A2 /* FakeTokenCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = F496E5FD24E5D0D5006231A2 /* FakeTokenCache.swift */; };
10291029
F496E60F24E5D195006231A2 /* SampleAccessToken.swift in Sources */ = {isa = PBXBuildFile; fileRef = F496E60E24E5D195006231A2 /* SampleAccessToken.swift */; };
10301030
F496E61224E6049A006231A2 /* AppDelegateObserverFake.swift in Sources */ = {isa = PBXBuildFile; fileRef = F496E61124E6049A006231A2 /* AppDelegateObserverFake.swift */; };
1031+
F4A2B1A525E56BF400DE13D9 /* FBSDKDeviceButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D9E16AA1CB46C7D00C8B68F /* FBSDKDeviceButton.h */; settings = {ATTRIBUTES = (Public, ); }; };
1032+
F4A2B1BA25E56BF500DE13D9 /* FBSDKDeviceButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D9E16AA1CB46C7D00C8B68F /* FBSDKDeviceButton.h */; settings = {ATTRIBUTES = (Public, ); }; };
1033+
F4A2B1D525E56C3200DE13D9 /* FBSDKDeviceViewControllerBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D10A68B1CB38D5D00F42AC1 /* FBSDKDeviceViewControllerBase.h */; settings = {ATTRIBUTES = (Public, ); }; };
1034+
F4A2B1E325E56C3300DE13D9 /* FBSDKDeviceViewControllerBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D10A68B1CB38D5D00F42AC1 /* FBSDKDeviceViewControllerBase.h */; settings = {ATTRIBUTES = (Public, ); }; };
10311035
F4A826B724EC6FAD00EB2CD4 /* FBSDKProfileTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F4A826B624EC6FAC00EB2CD4 /* FBSDKProfileTests.m */; };
10321036
F4AE435225508FEA00FA9DE6 /* FBSDKProfilePictureView+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = B301910D253622A2001A8DB0 /* FBSDKProfilePictureView+Internal.h */; };
10331037
F4BD4024241EEDE500B45D39 /* FBSDKTestCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = F4BD4023241EEDE500B45D39 /* FBSDKTestCoder.m */; };
@@ -2947,6 +2951,7 @@
29472951
81B71D4B1D19C87400933E93 /* FBSDKBridgeAPIResponse.h in Headers */,
29482952
FDAF4A8E2395D27900711C4C /* FBSDKModelUtility.h in Headers */,
29492953
F9A06DB82510FAD3007E6386 /* FBSDKAppEventsConfiguration.h in Headers */,
2954+
F4A2B1A525E56BF400DE13D9 /* FBSDKDeviceButton.h in Headers */,
29502955
81B71D4C1D19C87400933E93 /* FBSDKCoreKit+Internal.h in Headers */,
29512956
BFC02453237B6B8E00A596EE /* FBSDKTensor.hpp in Headers */,
29522957
F441659325CAFED900DAB0A5 /* FBSDKURLSessionTask.h in Headers */,
@@ -3005,6 +3010,7 @@
30053010
81B71D651D19C87400933E93 /* FBSDKBridgeAPIRequest.h in Headers */,
30063011
81B71D671D19C87400933E93 /* FBSDKWebDialogView.h in Headers */,
30073012
81B71D681D19C87400933E93 /* FBSDKServerConfiguration+Internal.h in Headers */,
3013+
F4A2B1E325E56C3300DE13D9 /* FBSDKDeviceViewControllerBase.h in Headers */,
30083014
81B71D6A1D19C87400933E93 /* FBSDKCloseIcon.h in Headers */,
30093015
F441659125CAFED900DAB0A5 /* FBSDKLibAnalyzer.h in Headers */,
30103016
5DBC72D22373793400A9D859 /* FBSDKModelManager.h in Headers */,
@@ -3166,8 +3172,10 @@
31663172
C5696F83209BBC35009C931F /* FBSDKViewHierarchy.h in Headers */,
31673173
C5EAFA5E255283C100458DF5 /* FBSDKUserDataStore+Internal.h in Headers */,
31683174
5E3AFFE7258C191200BE46AB /* FBSDKAuthenticationTokenHeader.h in Headers */,
3175+
F4A2B1BA25E56BF500DE13D9 /* FBSDKDeviceButton.h in Headers */,
31693176
9DA81AF61AA4EF3300B9FE0B /* FBSDKProfile.h in Headers */,
31703177
5DBC72D12373793300A9D859 /* FBSDKModelManager.h in Headers */,
3178+
F4A2B1D525E56C3200DE13D9 /* FBSDKDeviceViewControllerBase.h in Headers */,
31713179
C4FC99D9202CD5590038C5ED /* FBSDKHybridAppEventsScriptMessageHandler.h in Headers */,
31723180
52963A94215992F400C7B252 /* FBSDKWebViewAppLinkResolver.h in Headers */,
31733181
5D4360DB23219F7900254DF7 /* FBSDKCrashObserver.h in Headers */,

FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
#import <FBSDKCoreKit/FBSDKButton.h>
2828
#import <FBSDKCoreKit/FBSDKConstants.h>
2929
#import <FBSDKCoreKit/FBSDKCopying.h>
30+
#import <FBSDKCoreKit/FBSDKDeviceButton.h>
31+
#import <FBSDKCoreKit/FBSDKDeviceViewControllerBase.h>
3032
#import <FBSDKCoreKit/FBSDKGraphRequest.h>
3133
#import <FBSDKCoreKit/FBSDKGraphRequestConnection.h>
3234
#import <FBSDKCoreKit/FBSDKGraphRequestDataAttachment.h>
@@ -51,9 +53,6 @@
5153
#import <FBSDKCoreKit/FBSDKProfilePictureView.h>
5254
#import <FBSDKCoreKit/FBSDKURL.h>
5355
#import <FBSDKCoreKit/FBSDKWebViewAppLinkResolver.h>
54-
#else
55-
#import <FBSDKCoreKit/FBSDKDeviceButton.h>
56-
#import <FBSDKCoreKit/FBSDKDeviceViewControllerBase.h>
5756
#endif
5857

5958
#else
@@ -65,6 +64,8 @@
6564
#import "FBSDKButton.h"
6665
#import "FBSDKConstants.h"
6766
#import "FBSDKCopying.h"
67+
#import "FBSDKDeviceButton.h"
68+
#import "FBSDKDeviceViewControllerBase.h"
6869
#import "FBSDKGraphRequest.h"
6970
#import "FBSDKGraphRequestConnection.h"
7071
#import "FBSDKGraphRequestDataAttachment.h"
@@ -89,9 +90,6 @@
8990
#import "FBSDKProfilePictureView.h"
9091
#import "FBSDKURL.h"
9192
#import "FBSDKWebViewAppLinkResolver.h"
92-
#else
93-
#import "FBSDKDeviceButton.h"
94-
#import "FBSDKDeviceViewControllerBase.h"
9593
#endif
9694

9795
#endif

Sources/FBSDKCoreKit_Basics/FBSDKUserDataStore.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1818

1919
#import "FBSDKUserDataStore.h"
20-
#import "FBSDKUserDataStore+Internal.h"
2120

2221
#import "FBSDKBasicUtility.h"
2322
#import "FBSDKTypeUtility.h"

Sources/FBSDKCoreKit_Basics/include/FBSDKUserDataStore+Internal.h

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)