diff --git a/.gitignore b/.gitignore index 6f1bc0b9c1b082..3ca4e76ebeaf1c 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,6 @@ DerivedData # Node node_modules + +# CocoaPods +Pods diff --git a/Examples/PodExample/PodExample.xcodeproj/project.pbxproj b/Examples/PodExample/PodExample.xcodeproj/project.pbxproj new file mode 100644 index 00000000000000..3c613fea7cbb0e --- /dev/null +++ b/Examples/PodExample/PodExample.xcodeproj/project.pbxproj @@ -0,0 +1,343 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 78177ED11A8D4B3700E0AFE1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 78177ED01A8D4B3700E0AFE1 /* main.m */; }; + 78177ED41A8D4B3700E0AFE1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 78177ED31A8D4B3700E0AFE1 /* AppDelegate.m */; }; + 78177EDC1A8D4B3700E0AFE1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 78177EDB1A8D4B3700E0AFE1 /* Images.xcassets */; }; + 78177EDF1A8D4B3700E0AFE1 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 78177EDD1A8D4B3700E0AFE1 /* LaunchScreen.xib */; }; + DF2469C724861FE771BCD8A6 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 521F5B3DA781F61552C7E4D4 /* libPods.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 433456BB819840A1FE0F7264 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; + 521F5B3DA781F61552C7E4D4 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 78177ECB1A8D4B3700E0AFE1 /* PodExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PodExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 78177ECF1A8D4B3700E0AFE1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 78177ED01A8D4B3700E0AFE1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 78177ED21A8D4B3700E0AFE1 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 78177ED31A8D4B3700E0AFE1 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 78177EDB1A8D4B3700E0AFE1 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 78177EDE1A8D4B3700E0AFE1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 7B809FB4F0D3354D334F4555 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 78177EC81A8D4B3700E0AFE1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + DF2469C724861FE771BCD8A6 /* libPods.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 52188DC2B166B2452CE8C29F /* Frameworks */ = { + isa = PBXGroup; + children = ( + 521F5B3DA781F61552C7E4D4 /* libPods.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 78177EC21A8D4B3700E0AFE1 = { + isa = PBXGroup; + children = ( + 78177ECD1A8D4B3700E0AFE1 /* PodExample */, + 78177ECC1A8D4B3700E0AFE1 /* Products */, + B7084313F6720084B1AC1745 /* Pods */, + 52188DC2B166B2452CE8C29F /* Frameworks */, + ); + sourceTree = ""; + }; + 78177ECC1A8D4B3700E0AFE1 /* Products */ = { + isa = PBXGroup; + children = ( + 78177ECB1A8D4B3700E0AFE1 /* PodExample.app */, + ); + name = Products; + sourceTree = ""; + }; + 78177ECD1A8D4B3700E0AFE1 /* PodExample */ = { + isa = PBXGroup; + children = ( + 78177ED21A8D4B3700E0AFE1 /* AppDelegate.h */, + 78177ED31A8D4B3700E0AFE1 /* AppDelegate.m */, + 78177EDB1A8D4B3700E0AFE1 /* Images.xcassets */, + 78177EDD1A8D4B3700E0AFE1 /* LaunchScreen.xib */, + 78177ECE1A8D4B3700E0AFE1 /* Supporting Files */, + ); + path = PodExample; + sourceTree = ""; + }; + 78177ECE1A8D4B3700E0AFE1 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 78177ECF1A8D4B3700E0AFE1 /* Info.plist */, + 78177ED01A8D4B3700E0AFE1 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + B7084313F6720084B1AC1745 /* Pods */ = { + isa = PBXGroup; + children = ( + 433456BB819840A1FE0F7264 /* Pods.debug.xcconfig */, + 7B809FB4F0D3354D334F4555 /* Pods.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 78177ECA1A8D4B3700E0AFE1 /* PodExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 78177EEE1A8D4B3700E0AFE1 /* Build configuration list for PBXNativeTarget "PodExample" */; + buildPhases = ( + 6FA6CB893060CFF5DDAC569B /* Check Pods Manifest.lock */, + 78177EC71A8D4B3700E0AFE1 /* Sources */, + 78177EC81A8D4B3700E0AFE1 /* Frameworks */, + 78177EC91A8D4B3700E0AFE1 /* Resources */, + 7E4773525C7F8471669B7AB5 /* Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PodExample; + productName = PodExample; + productReference = 78177ECB1A8D4B3700E0AFE1 /* PodExample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 78177EC31A8D4B3700E0AFE1 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0620; + ORGANIZATIONNAME = Facebook; + TargetAttributes = { + 78177ECA1A8D4B3700E0AFE1 = { + CreatedOnToolsVersion = 6.2; + }; + }; + }; + buildConfigurationList = 78177EC61A8D4B3700E0AFE1 /* Build configuration list for PBXProject "PodExample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 78177EC21A8D4B3700E0AFE1; + productRefGroup = 78177ECC1A8D4B3700E0AFE1 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 78177ECA1A8D4B3700E0AFE1 /* PodExample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 78177EC91A8D4B3700E0AFE1 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 78177EDF1A8D4B3700E0AFE1 /* LaunchScreen.xib in Resources */, + 78177EDC1A8D4B3700E0AFE1 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 6FA6CB893060CFF5DDAC569B /* Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 7E4773525C7F8471669B7AB5 /* Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 78177EC71A8D4B3700E0AFE1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 78177ED41A8D4B3700E0AFE1 /* AppDelegate.m in Sources */, + 78177ED11A8D4B3700E0AFE1 /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 78177EDD1A8D4B3700E0AFE1 /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 78177EDE1A8D4B3700E0AFE1 /* Base */, + ); + name = LaunchScreen.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 78177EEC1A8D4B3700E0AFE1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 78177EED1A8D4B3700E0AFE1 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 78177EEF1A8D4B3700E0AFE1 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 433456BB819840A1FE0F7264 /* Pods.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = PodExample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 78177EF01A8D4B3700E0AFE1 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7B809FB4F0D3354D334F4555 /* Pods.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = PodExample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 78177EC61A8D4B3700E0AFE1 /* Build configuration list for PBXProject "PodExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 78177EEC1A8D4B3700E0AFE1 /* Debug */, + 78177EED1A8D4B3700E0AFE1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 78177EEE1A8D4B3700E0AFE1 /* Build configuration list for PBXNativeTarget "PodExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 78177EEF1A8D4B3700E0AFE1 /* Debug */, + 78177EF01A8D4B3700E0AFE1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 78177EC31A8D4B3700E0AFE1 /* Project object */; +} diff --git a/Examples/PodExample/PodExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Examples/PodExample/PodExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000000..4e7c25159faaf9 --- /dev/null +++ b/Examples/PodExample/PodExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Examples/PodExample/PodExample.xcworkspace/contents.xcworkspacedata b/Examples/PodExample/PodExample.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000000..d2eee78ba1e6f7 --- /dev/null +++ b/Examples/PodExample/PodExample.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Examples/PodExample/PodExample/AppDelegate.h b/Examples/PodExample/PodExample/AppDelegate.h new file mode 100644 index 00000000000000..1d9bb4f76a099b --- /dev/null +++ b/Examples/PodExample/PodExample/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// PodExample +// +// Created by James Ide on 2/12/15. +// Copyright (c) 2015 Facebook. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/Examples/PodExample/PodExample/AppDelegate.m b/Examples/PodExample/PodExample/AppDelegate.m new file mode 100644 index 00000000000000..518b971358875c --- /dev/null +++ b/Examples/PodExample/PodExample/AppDelegate.m @@ -0,0 +1,51 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "AppDelegate.h" + +#import + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + NSURL *jsCodeLocation; + RCTRootView *rootView = [[RCTRootView alloc] init]; + + // Loading JavaScript code - uncomment the one you want. + + // OPTION 1 + // Load from development server. Start the server from the repository root: + // + // $ npm start + // + // To run on device, change `localhost` to the IP address of your computer, and make sure your computer and + // iOS device are on the same Wi-Fi network. + jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/Examples/PodExample/PodExampleApp.includeRequire.runModule.bundle?dev=true"]; + + // OPTION 2 + // Load from pre-bundled file on disk. To re-generate the static bundle, run + // + // $ curl http://localhost:8081/Examples/PodExample/PodExampleApp.includeRequire.runModule.bundle -o main.jsbundle + // + // and uncomment the next following line + // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; + + rootView.scriptURL = jsCodeLocation; + rootView.moduleName = @"PodExampleApp"; + + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + UIViewController *rootViewController = [[UIViewController alloc] init]; + rootViewController.view = rootView; + self.window.rootViewController = rootViewController; + [self.window makeKeyAndVisible]; + return YES; +} + +@end diff --git a/Examples/PodExample/PodExample/Base.lproj/LaunchScreen.xib b/Examples/PodExample/PodExample/Base.lproj/LaunchScreen.xib new file mode 100644 index 00000000000000..48d21706b1090c --- /dev/null +++ b/Examples/PodExample/PodExample/Base.lproj/LaunchScreen.xib @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/PodExample/PodExample/Images.xcassets/AppIcon.appiconset/Contents.json b/Examples/PodExample/PodExample/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000000000..118c98f7461bf9 --- /dev/null +++ b/Examples/PodExample/PodExample/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Examples/PodExample/PodExample/Info.plist b/Examples/PodExample/PodExample/Info.plist new file mode 100644 index 00000000000000..1c298405ac3722 --- /dev/null +++ b/Examples/PodExample/PodExample/Info.plist @@ -0,0 +1,38 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + com.facebook.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/Examples/PodExample/PodExample/main.m b/Examples/PodExample/PodExample/main.m new file mode 100644 index 00000000000000..b547c5a92c10fe --- /dev/null +++ b/Examples/PodExample/PodExample/main.m @@ -0,0 +1,10 @@ +// Copyright 2004-present Facebook. All Rights Reserved. + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/Examples/PodExample/PodExampleApp.js b/Examples/PodExample/PodExampleApp.js new file mode 100644 index 00000000000000..39ef8082f2953e --- /dev/null +++ b/Examples/PodExample/PodExampleApp.js @@ -0,0 +1,47 @@ +/** + * Copyright 2004-present Facebook. All Rights Reserved. + * + * @providesModule PodExampleApp + * @flow + */ +'use strict'; + +var React = require('react-native'); +var { + AppRegistry, + NavigatorIOS, + StyleSheet, + Text, + View, +} = React; + +var styles = StyleSheet.create({ + container: { + flex: 1, + padding: 10, + backgroundColor: 'white', + justifyContent: 'center', + }, + title: { + fontFamily: 'HelveticaNeue-UltraLight', + fontSize: 32, + textAlign: 'center', + } +}); + +var PodExampleApp = React.createClass({ + render: function() { + console.log('REDNERING'); + return ( + + + Running React Native as a CocoaPod + + + ); + } +}); + +AppRegistry.registerComponent('PodExampleApp', () => PodExampleApp); + +module.exports = PodExampleApp; diff --git a/Examples/PodExample/Podfile b/Examples/PodExample/Podfile new file mode 100644 index 00000000000000..1b0e77831d3990 --- /dev/null +++ b/Examples/PodExample/Podfile @@ -0,0 +1,3 @@ +source 'https://github.com/CocoaPods/Specs.git' + +pod 'React', :path => '../..' diff --git a/Examples/PodExample/Podfile.lock b/Examples/PodExample/Podfile.lock new file mode 100644 index 00000000000000..431fcd4e311003 --- /dev/null +++ b/Examples/PodExample/Podfile.lock @@ -0,0 +1,14 @@ +PODS: + - React (0.0.1) + +DEPENDENCIES: + - React (from `../..`) + +EXTERNAL SOURCES: + React: + :path: ../.. + +SPEC CHECKSUMS: + React: 9e9999bdfc2fde31407e61057f34a99788d27c2f + +COCOAPODS: 0.36.0 diff --git a/React.podspec b/React.podspec new file mode 100644 index 00000000000000..b8fc48c038b3d5 --- /dev/null +++ b/React.podspec @@ -0,0 +1,16 @@ +Pod::Spec.new do |spec| + spec.name = 'React' + spec.version = '0.0.1' + spec.summary = 'An implementation of React that targets UIKit for iOS' + spec.description = <<-DESC + Our first React Native implementation is targeting iOS. We are also working on an Android implementation which we will release later. ReactKit apps are built using the React JS framework, and render directly to native UIKit elements using a fully asynchronous architecture. There is no browser and no HTML. We have picked what we think is the best set of features from these and other technologies to build what we hope to become the best product development framework available, with an emphasis on iteration speed, developer delight, continuity of technology, and absolutely beautiful and fast products with no compromises in quality or capability. + DESC + spec.homepage = 'https://facebook.github.io/react-native/' + spec.license = { :type => 'BSD' } + spec.author = 'Facebook' + spec.platform = :ios, '7.0' + spec.requires_arc = true + spec.source_files = '{ReactKit,Libraries}/**/*.{h,m,c}' + spec.exclude_files = 'Libraries/RCTTest' + spec.libraries = 'icucore' +end diff --git a/ReactKit/ReactKit.podspec b/ReactKit/ReactKit.podspec deleted file mode 100644 index 3e1a8a6e25259f..00000000000000 --- a/ReactKit/ReactKit.podspec +++ /dev/null @@ -1,16 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'ReactKit' - spec.version = '0.0.1' - spec.summary = 'An implementation of React that targets UIKit for iOS' - spec.description = <<-DESC - Our first React Native implementation is ReactKit, targeting iOS. We are also working on an Android implementation which we will release later. ReactKit apps are built using the React JS framework, and render directly to native UIKit elements using a fully asynchronous architecture. There is no browser and no HTML. We have picked what we think is the best set of features from these and other technologies to build what we hope to become the best product development framework available, with an emphasis on iteration speed, developer delight, continuity of technology, and absolutely beautiful and fast products with no compromises in quality or capability. - DESC - spec.homepage = 'https://facebook.github.io/react-native/' - spec.license = { :type => 'BSD' } - spec.author = 'Facebook' - spec.platform = :ios, '7.0' - spec.requires_arc = true - spec.source_files = '**/*.{h,m,c}' - spec.public_header_files = "**/*.h" - #spec.library = "ReactKit" -end