Skip to content

Commit b95a5e1

Browse files
committed
Create xcodeproj files for the three SDK libraries and follow React Native directory naming convention for native code
1 parent e40ae7b commit b95a5e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1112
-386
lines changed

.gitignore

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
project.xcworkspace
24+
25+
# node.js
26+
#
27+
node_modules/
28+
npm-debug.log

README.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -162,24 +162,23 @@ FBSDKShareAPI.share(photoContent, "/me", "Check out this cat!", (error, result)
162162

163163
## Running the Sample App
164164
- From the Sample folder, run `npm install`
165-
- Download and install the [Facebook SDK for iOS](https://developers.facebook.com/docs/ios).
165+
- Download and install the [Facebook SDK for iOS](https://developers.facebook.com/docs/ios). The XCode projects assume that they're installed in the standard location at ~/Documents/FacebookSDK.
166166
- Open NHSample.xcodeproj
167-
- Drag `FBSDKCoreKit.framework`, `FBSDKLoginKit.framework`, and `FBSDKShareKit.framework` from the ~/Documents/FacebookSDK folder into the Frameworks group in the XCode project navigator.
168167
- Build and run the app to try it out.
169168

170169
## Installation
171-
- Download and install the [Facebook SDK for iOS](https://developers.facebook.com/docs/ios).
170+
- Download and install the [Facebook SDK for iOS](https://developers.facebook.com/docs/ios). The XCode projects assume that they're installed in the standard location at ~/Documents/FacebookSDK.
172171
- Follow the [getting started guide](https://developers.facebook.com/docs/ios/getting-started/) to link your project with the Facebook SDK frameworks and set up the app delegate.
173172
- Depending on what functionality you're looking to integrate, run any combination of the following:
174-
- `npm install react-native-fbsdkcore` for graph requests, app events, etc. `FBSDKCoreKit.framework` must be added to the project.
175-
- `npm install react-native-fbsdkshare` for share buttons, dialogs, etc. `FBSDKCoreKit.framework` and `FBSDKShareKit.framework` must be added to the project.
176-
- `npm install react-native-fbsdklogin` for login button and manager. `FBSDKCoreKit.framework` and `FBSDKLoginKit.framework` must be added to the project.
173+
- `npm install react-native-fbsdkcore` for graph requests, app events, etc.
174+
- `npm install react-native-fbsdkshare` for share buttons, dialogs, etc.
175+
- `npm install react-native-fbsdklogin` for login button and manager.
177176
- Open the Xcode project for your app.
178-
- Drag the folders prefixed with react-native-fbsdk from node_modules into the XCode project navigator.
177+
- Drag the XCode projects from `node_modules/react-native-sdk...` into your XCode project navigator.
179178

180179
### Troubleshooting
181180
- If you get a build error stating that one of the Facebook SDK files was not found -- eg. `FBSDKCoreKit/FBSDKCoreKit.h` -- check two things\:
182-
- Ensure that the Facebook SDK frameworks have been added to the project.
181+
- Ensure that the Facebook SDK frameworks are installed and in the right place.
183182
- Add the folder where the Facebook SDK was to the project's framework search path in Xcode. See Apple's [documentation on including frameworks](https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Tasks/IncludingFrameworks.html).
184183

185184
## License

Sample/NHSample.xcodeproj/project.pbxproj

+150-378
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,299 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 46;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
35A66BAE1B7E7E4C00D5542D /* RCTConvert+FBSDKAccessToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 35A66BA41B7E7E4C00D5542D /* RCTConvert+FBSDKAccessToken.m */; };
11+
35A66BAF1B7E7E4C00D5542D /* RCTFBSDKAccessToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 35A66BA61B7E7E4C00D5542D /* RCTFBSDKAccessToken.m */; };
12+
35A66BB01B7E7E4C00D5542D /* RCTFBSDKAppEvents.m in Sources */ = {isa = PBXBuildFile; fileRef = 35A66BA81B7E7E4C00D5542D /* RCTFBSDKAppEvents.m */; };
13+
35A66BB11B7E7E4C00D5542D /* RCTFBSDKCoreInitializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 35A66BA91B7E7E4C00D5542D /* RCTFBSDKCoreInitializer.m */; };
14+
35A66BB21B7E7E4C00D5542D /* RCTFBSDKGraphRequestConnectionContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = 35A66BAB1B7E7E4C00D5542D /* RCTFBSDKGraphRequestConnectionContainer.m */; };
15+
35A66BB31B7E7E4C00D5542D /* RCTFBSDKGraphRequestManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 35A66BAD1B7E7E4C00D5542D /* RCTFBSDKGraphRequestManager.m */; };
16+
35A66CB31B7EAF8100D5542D /* FBSDKCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35A66CB21B7EAF8100D5542D /* FBSDKCoreKit.framework */; };
17+
/* End PBXBuildFile section */
18+
19+
/* Begin PBXCopyFilesBuildPhase section */
20+
58B511D91A9E6C8500147676 /* CopyFiles */ = {
21+
isa = PBXCopyFilesBuildPhase;
22+
buildActionMask = 2147483647;
23+
dstPath = "include/$(PRODUCT_NAME)";
24+
dstSubfolderSpec = 16;
25+
files = (
26+
);
27+
runOnlyForDeploymentPostprocessing = 0;
28+
};
29+
/* End PBXCopyFilesBuildPhase section */
30+
31+
/* Begin PBXFileReference section */
32+
134814201AA4EA6300B7C361 /* libRCTFBSDKCore.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTFBSDKCore.a; sourceTree = BUILT_PRODUCTS_DIR; };
33+
35A66BA31B7E7E4C00D5542D /* RCTConvert+FBSDKAccessToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "RCTConvert+FBSDKAccessToken.h"; path = "iOS/RCTConvert+FBSDKAccessToken.h"; sourceTree = "<group>"; };
34+
35A66BA41B7E7E4C00D5542D /* RCTConvert+FBSDKAccessToken.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "RCTConvert+FBSDKAccessToken.m"; path = "iOS/RCTConvert+FBSDKAccessToken.m"; sourceTree = "<group>"; };
35+
35A66BA51B7E7E4C00D5542D /* RCTFBSDKAccessToken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RCTFBSDKAccessToken.h; path = iOS/RCTFBSDKAccessToken.h; sourceTree = "<group>"; };
36+
35A66BA61B7E7E4C00D5542D /* RCTFBSDKAccessToken.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RCTFBSDKAccessToken.m; path = iOS/RCTFBSDKAccessToken.m; sourceTree = "<group>"; };
37+
35A66BA71B7E7E4C00D5542D /* RCTFBSDKAppEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RCTFBSDKAppEvents.h; path = iOS/RCTFBSDKAppEvents.h; sourceTree = "<group>"; };
38+
35A66BA81B7E7E4C00D5542D /* RCTFBSDKAppEvents.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RCTFBSDKAppEvents.m; path = iOS/RCTFBSDKAppEvents.m; sourceTree = "<group>"; };
39+
35A66BA91B7E7E4C00D5542D /* RCTFBSDKCoreInitializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RCTFBSDKCoreInitializer.m; path = iOS/RCTFBSDKCoreInitializer.m; sourceTree = "<group>"; };
40+
35A66BAA1B7E7E4C00D5542D /* RCTFBSDKGraphRequestConnectionContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RCTFBSDKGraphRequestConnectionContainer.h; path = iOS/RCTFBSDKGraphRequestConnectionContainer.h; sourceTree = "<group>"; };
41+
35A66BAB1B7E7E4C00D5542D /* RCTFBSDKGraphRequestConnectionContainer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RCTFBSDKGraphRequestConnectionContainer.m; path = iOS/RCTFBSDKGraphRequestConnectionContainer.m; sourceTree = "<group>"; };
42+
35A66BAC1B7E7E4C00D5542D /* RCTFBSDKGraphRequestManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RCTFBSDKGraphRequestManager.h; path = iOS/RCTFBSDKGraphRequestManager.h; sourceTree = "<group>"; };
43+
35A66BAD1B7E7E4C00D5542D /* RCTFBSDKGraphRequestManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RCTFBSDKGraphRequestManager.m; path = iOS/RCTFBSDKGraphRequestManager.m; sourceTree = "<group>"; };
44+
35A66CB21B7EAF8100D5542D /* FBSDKCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBSDKCoreKit.framework; path = "~/Documents/FacebookSDK/FBSDKCoreKit.framework"; sourceTree = "<group>"; };
45+
/* End PBXFileReference section */
46+
47+
/* Begin PBXFrameworksBuildPhase section */
48+
58B511D81A9E6C8500147676 /* Frameworks */ = {
49+
isa = PBXFrameworksBuildPhase;
50+
buildActionMask = 2147483647;
51+
files = (
52+
35A66CB31B7EAF8100D5542D /* FBSDKCoreKit.framework in Frameworks */,
53+
);
54+
runOnlyForDeploymentPostprocessing = 0;
55+
};
56+
/* End PBXFrameworksBuildPhase section */
57+
58+
/* Begin PBXGroup section */
59+
134814211AA4EA7D00B7C361 /* Products */ = {
60+
isa = PBXGroup;
61+
children = (
62+
134814201AA4EA6300B7C361 /* libRCTFBSDKCore.a */,
63+
);
64+
name = Products;
65+
sourceTree = "<group>";
66+
};
67+
35A66CB11B7EAF6900D5542D /* Frameworks */ = {
68+
isa = PBXGroup;
69+
children = (
70+
35A66CB21B7EAF8100D5542D /* FBSDKCoreKit.framework */,
71+
);
72+
name = Frameworks;
73+
sourceTree = "<group>";
74+
};
75+
58B511D21A9E6C8500147676 = {
76+
isa = PBXGroup;
77+
children = (
78+
35A66BA31B7E7E4C00D5542D /* RCTConvert+FBSDKAccessToken.h */,
79+
35A66BA41B7E7E4C00D5542D /* RCTConvert+FBSDKAccessToken.m */,
80+
35A66BA51B7E7E4C00D5542D /* RCTFBSDKAccessToken.h */,
81+
35A66BA61B7E7E4C00D5542D /* RCTFBSDKAccessToken.m */,
82+
35A66BA71B7E7E4C00D5542D /* RCTFBSDKAppEvents.h */,
83+
35A66BA81B7E7E4C00D5542D /* RCTFBSDKAppEvents.m */,
84+
35A66BA91B7E7E4C00D5542D /* RCTFBSDKCoreInitializer.m */,
85+
35A66BAA1B7E7E4C00D5542D /* RCTFBSDKGraphRequestConnectionContainer.h */,
86+
35A66BAB1B7E7E4C00D5542D /* RCTFBSDKGraphRequestConnectionContainer.m */,
87+
35A66BAC1B7E7E4C00D5542D /* RCTFBSDKGraphRequestManager.h */,
88+
35A66BAD1B7E7E4C00D5542D /* RCTFBSDKGraphRequestManager.m */,
89+
35A66CB11B7EAF6900D5542D /* Frameworks */,
90+
134814211AA4EA7D00B7C361 /* Products */,
91+
);
92+
sourceTree = "<group>";
93+
};
94+
/* End PBXGroup section */
95+
96+
/* Begin PBXNativeTarget section */
97+
58B511DA1A9E6C8500147676 /* RCTFBSDKCore */ = {
98+
isa = PBXNativeTarget;
99+
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RCTFBSDKCore" */;
100+
buildPhases = (
101+
58B511D71A9E6C8500147676 /* Sources */,
102+
58B511D81A9E6C8500147676 /* Frameworks */,
103+
58B511D91A9E6C8500147676 /* CopyFiles */,
104+
);
105+
buildRules = (
106+
);
107+
dependencies = (
108+
);
109+
name = RCTFBSDKCore;
110+
productName = RCTDataManager;
111+
productReference = 134814201AA4EA6300B7C361 /* libRCTFBSDKCore.a */;
112+
productType = "com.apple.product-type.library.static";
113+
};
114+
/* End PBXNativeTarget section */
115+
116+
/* Begin PBXProject section */
117+
58B511D31A9E6C8500147676 /* Project object */ = {
118+
isa = PBXProject;
119+
attributes = {
120+
LastUpgradeCheck = 0610;
121+
ORGANIZATIONNAME = Facebook;
122+
TargetAttributes = {
123+
58B511DA1A9E6C8500147676 = {
124+
CreatedOnToolsVersion = 6.1.1;
125+
};
126+
};
127+
};
128+
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RCTFBSDKCore" */;
129+
compatibilityVersion = "Xcode 3.2";
130+
developmentRegion = English;
131+
hasScannedForEncodings = 0;
132+
knownRegions = (
133+
en,
134+
);
135+
mainGroup = 58B511D21A9E6C8500147676;
136+
productRefGroup = 58B511D21A9E6C8500147676;
137+
projectDirPath = "";
138+
projectRoot = "";
139+
targets = (
140+
58B511DA1A9E6C8500147676 /* RCTFBSDKCore */,
141+
);
142+
};
143+
/* End PBXProject section */
144+
145+
/* Begin PBXSourcesBuildPhase section */
146+
58B511D71A9E6C8500147676 /* Sources */ = {
147+
isa = PBXSourcesBuildPhase;
148+
buildActionMask = 2147483647;
149+
files = (
150+
35A66BB11B7E7E4C00D5542D /* RCTFBSDKCoreInitializer.m in Sources */,
151+
35A66BB31B7E7E4C00D5542D /* RCTFBSDKGraphRequestManager.m in Sources */,
152+
35A66BB01B7E7E4C00D5542D /* RCTFBSDKAppEvents.m in Sources */,
153+
35A66BB21B7E7E4C00D5542D /* RCTFBSDKGraphRequestConnectionContainer.m in Sources */,
154+
35A66BAF1B7E7E4C00D5542D /* RCTFBSDKAccessToken.m in Sources */,
155+
35A66BAE1B7E7E4C00D5542D /* RCTConvert+FBSDKAccessToken.m in Sources */,
156+
);
157+
runOnlyForDeploymentPostprocessing = 0;
158+
};
159+
/* End PBXSourcesBuildPhase section */
160+
161+
/* Begin XCBuildConfiguration section */
162+
58B511ED1A9E6C8500147676 /* Debug */ = {
163+
isa = XCBuildConfiguration;
164+
buildSettings = {
165+
ALWAYS_SEARCH_USER_PATHS = NO;
166+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
167+
CLANG_CXX_LIBRARY = "libc++";
168+
CLANG_ENABLE_MODULES = YES;
169+
CLANG_ENABLE_OBJC_ARC = YES;
170+
CLANG_WARN_BOOL_CONVERSION = YES;
171+
CLANG_WARN_CONSTANT_CONVERSION = YES;
172+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
173+
CLANG_WARN_EMPTY_BODY = YES;
174+
CLANG_WARN_ENUM_CONVERSION = YES;
175+
CLANG_WARN_INT_CONVERSION = YES;
176+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
177+
CLANG_WARN_UNREACHABLE_CODE = YES;
178+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
179+
COPY_PHASE_STRIP = NO;
180+
ENABLE_STRICT_OBJC_MSGSEND = YES;
181+
GCC_C_LANGUAGE_STANDARD = gnu99;
182+
GCC_DYNAMIC_NO_PIC = NO;
183+
GCC_OPTIMIZATION_LEVEL = 0;
184+
GCC_PREPROCESSOR_DEFINITIONS = (
185+
"DEBUG=1",
186+
"$(inherited)",
187+
);
188+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
189+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
190+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
191+
GCC_WARN_UNDECLARED_SELECTOR = YES;
192+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
193+
GCC_WARN_UNUSED_FUNCTION = YES;
194+
GCC_WARN_UNUSED_VARIABLE = YES;
195+
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
196+
MTL_ENABLE_DEBUG_INFO = YES;
197+
ONLY_ACTIVE_ARCH = YES;
198+
SDKROOT = iphoneos;
199+
};
200+
name = Debug;
201+
};
202+
58B511EE1A9E6C8500147676 /* Release */ = {
203+
isa = XCBuildConfiguration;
204+
buildSettings = {
205+
ALWAYS_SEARCH_USER_PATHS = NO;
206+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
207+
CLANG_CXX_LIBRARY = "libc++";
208+
CLANG_ENABLE_MODULES = YES;
209+
CLANG_ENABLE_OBJC_ARC = YES;
210+
CLANG_WARN_BOOL_CONVERSION = YES;
211+
CLANG_WARN_CONSTANT_CONVERSION = YES;
212+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
213+
CLANG_WARN_EMPTY_BODY = YES;
214+
CLANG_WARN_ENUM_CONVERSION = YES;
215+
CLANG_WARN_INT_CONVERSION = YES;
216+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
217+
CLANG_WARN_UNREACHABLE_CODE = YES;
218+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
219+
COPY_PHASE_STRIP = YES;
220+
ENABLE_NS_ASSERTIONS = NO;
221+
ENABLE_STRICT_OBJC_MSGSEND = YES;
222+
GCC_C_LANGUAGE_STANDARD = gnu99;
223+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
224+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
225+
GCC_WARN_UNDECLARED_SELECTOR = YES;
226+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
227+
GCC_WARN_UNUSED_FUNCTION = YES;
228+
GCC_WARN_UNUSED_VARIABLE = YES;
229+
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
230+
MTL_ENABLE_DEBUG_INFO = NO;
231+
SDKROOT = iphoneos;
232+
VALIDATE_PRODUCT = YES;
233+
};
234+
name = Release;
235+
};
236+
58B511F01A9E6C8500147676 /* Debug */ = {
237+
isa = XCBuildConfiguration;
238+
buildSettings = {
239+
FRAMEWORK_SEARCH_PATHS = (
240+
"$(inherited)",
241+
"~/Documents/FacebookSDK",
242+
);
243+
HEADER_SEARCH_PATHS = (
244+
"$(inherited)",
245+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
246+
"$(SRCROOT)/../../React/**",
247+
"$(SRCROOT)/../../node_modules/react-native/React/**",
248+
);
249+
LIBRARY_SEARCH_PATHS = "$(inherited)";
250+
OTHER_LDFLAGS = "-ObjC";
251+
PRODUCT_NAME = RCTFBSDKCore;
252+
SKIP_INSTALL = YES;
253+
};
254+
name = Debug;
255+
};
256+
58B511F11A9E6C8500147676 /* Release */ = {
257+
isa = XCBuildConfiguration;
258+
buildSettings = {
259+
FRAMEWORK_SEARCH_PATHS = (
260+
"$(inherited)",
261+
"~/Documents/FacebookSDK",
262+
);
263+
HEADER_SEARCH_PATHS = (
264+
"$(inherited)",
265+
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
266+
"$(SRCROOT)/../../React/**",
267+
);
268+
LIBRARY_SEARCH_PATHS = "$(inherited)";
269+
OTHER_LDFLAGS = "-ObjC";
270+
PRODUCT_NAME = RCTFBSDKCore;
271+
SKIP_INSTALL = YES;
272+
};
273+
name = Release;
274+
};
275+
/* End XCBuildConfiguration section */
276+
277+
/* Begin XCConfigurationList section */
278+
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RCTFBSDKCore" */ = {
279+
isa = XCConfigurationList;
280+
buildConfigurations = (
281+
58B511ED1A9E6C8500147676 /* Debug */,
282+
58B511EE1A9E6C8500147676 /* Release */,
283+
);
284+
defaultConfigurationIsVisible = 0;
285+
defaultConfigurationName = Release;
286+
};
287+
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RCTFBSDKCore" */ = {
288+
isa = XCConfigurationList;
289+
buildConfigurations = (
290+
58B511F01A9E6C8500147676 /* Debug */,
291+
58B511F11A9E6C8500147676 /* Release */,
292+
);
293+
defaultConfigurationIsVisible = 0;
294+
defaultConfigurationName = Release;
295+
};
296+
/* End XCConfigurationList section */
297+
};
298+
rootObject = 58B511D31A9E6C8500147676 /* Project object */;
299+
}

0 commit comments

Comments
 (0)