diff --git a/Examples/2048/2048.xcodeproj/project.pbxproj b/Examples/2048/2048.xcodeproj/project.pbxproj deleted file mode 100644 index e463eeae8f1..00000000000 --- a/Examples/2048/2048.xcodeproj/project.pbxproj +++ /dev/null @@ -1,489 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 1461632D1AC3E23900C2F5AD /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1461632C1AC3E22900C2F5AD /* libReact.a */; }; - 5F82F1781B85785200FAE87E /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F82F1771B85784500FAE87E /* libRCTWebSocket.a */; }; - 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; - E730D7501D4EE4E2000B7DA8 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E730D74C1D4EE4D0000B7DA8 /* libRCTNetwork.a */; }; - E730D7571D4EE538000B7DA8 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E730D7561D4EE534000B7DA8 /* libRCTImage.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1461632B1AC3E22900C2F5AD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146163271AC3E22900C2F5AD /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; - remoteInfo = React; - }; - 5F82F1761B85784500FAE87E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5F82F1721B85784500FAE87E /* RCTWebSocket.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3C86DF461ADF2C930047B81A; - remoteInfo = RCTWebSocket; - }; - 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B5119B1A9E6C1200147676; - remoteInfo = RCTText; - }; - E730D74B1D4EE4D0000B7DA8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = E730D7471D4EE4D0000B7DA8 /* RCTNetwork.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B511DB1A9E6C8500147676; - remoteInfo = RCTNetwork; - }; - E730D7551D4EE534000B7DA8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = E730D7511D4EE534000B7DA8 /* RCTImage.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B5115D1A9E6B3D00147676; - remoteInfo = RCTImage; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 13B07F961A680F5B00A75B9A /* 2048.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = 2048.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = 2048/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = 2048/AppDelegate.m; sourceTree = ""; }; - 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = 2048/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = 2048/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = 2048/main.m; sourceTree = ""; }; - 146163271AC3E22900C2F5AD /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = ../../React/React.xcodeproj; sourceTree = ""; }; - 5F82F1721B85784500FAE87E /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = ../../Libraries/WebSocket/RCTWebSocket.xcodeproj; sourceTree = ""; }; - 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = ../../Libraries/Text/RCTText.xcodeproj; sourceTree = ""; }; - E730D7471D4EE4D0000B7DA8 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = ../../Libraries/Network/RCTNetwork.xcodeproj; sourceTree = ""; }; - E730D7511D4EE534000B7DA8 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = ../../Libraries/Image/RCTImage.xcodeproj; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - E730D7571D4EE538000B7DA8 /* libRCTImage.a in Frameworks */, - E730D7501D4EE4E2000B7DA8 /* libRCTNetwork.a in Frameworks */, - 5F82F1781B85785200FAE87E /* libRCTWebSocket.a in Frameworks */, - 1461632D1AC3E23900C2F5AD /* libReact.a in Frameworks */, - 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 13B07FAE1A68108700A75B9A /* 2048 */ = { - isa = PBXGroup; - children = ( - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.m */, - 13B07FB51A68108700A75B9A /* Images.xcassets */, - 13B07FB61A68108700A75B9A /* Info.plist */, - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, - 13B07FB71A68108700A75B9A /* main.m */, - ); - name = 2048; - sourceTree = ""; - }; - 146163281AC3E22900C2F5AD /* Products */ = { - isa = PBXGroup; - children = ( - 1461632C1AC3E22900C2F5AD /* libReact.a */, - ); - name = Products; - sourceTree = ""; - }; - 5F82F1731B85784500FAE87E /* Products */ = { - isa = PBXGroup; - children = ( - 5F82F1771B85784500FAE87E /* libRCTWebSocket.a */, - ); - name = Products; - sourceTree = ""; - }; - 832341AE1AAA6A7D00B99B32 /* Libraries */ = { - isa = PBXGroup; - children = ( - E730D7511D4EE534000B7DA8 /* RCTImage.xcodeproj */, - E730D7471D4EE4D0000B7DA8 /* RCTNetwork.xcodeproj */, - 5F82F1721B85784500FAE87E /* RCTWebSocket.xcodeproj */, - 146163271AC3E22900C2F5AD /* React.xcodeproj */, - 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, - ); - name = Libraries; - sourceTree = ""; - }; - 832341B11AAA6A8300B99B32 /* Products */ = { - isa = PBXGroup; - children = ( - 832341B51AAA6A8300B99B32 /* libRCTText.a */, - ); - name = Products; - sourceTree = ""; - }; - 83CBB9F61A601CBA00E9B192 = { - isa = PBXGroup; - children = ( - 13B07FAE1A68108700A75B9A /* 2048 */, - 832341AE1AAA6A7D00B99B32 /* Libraries */, - 83CBBA001A601CBA00E9B192 /* Products */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - }; - 83CBBA001A601CBA00E9B192 /* Products */ = { - isa = PBXGroup; - children = ( - 13B07F961A680F5B00A75B9A /* 2048.app */, - ); - name = Products; - sourceTree = ""; - }; - E730D7481D4EE4D0000B7DA8 /* Products */ = { - isa = PBXGroup; - children = ( - E730D74C1D4EE4D0000B7DA8 /* libRCTNetwork.a */, - ); - name = Products; - sourceTree = ""; - }; - E730D7521D4EE534000B7DA8 /* Products */ = { - isa = PBXGroup; - children = ( - E730D7561D4EE534000B7DA8 /* libRCTImage.a */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 13B07F861A680F5B00A75B9A /* 2048 */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "2048" */; - buildPhases = ( - 13B07F871A680F5B00A75B9A /* Sources */, - 13B07F8C1A680F5B00A75B9A /* Frameworks */, - 13B07F8E1A680F5B00A75B9A /* Resources */, - 68ACCCD51D2BE2D2008E368A /* Run Script */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = 2048; - productName = "Hello World"; - productReference = 13B07F961A680F5B00A75B9A /* 2048.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 83CBB9F71A601CBA00E9B192 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0700; - ORGANIZATIONNAME = Facebook; - }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "2048" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 83CBB9F61A601CBA00E9B192; - productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = E730D7521D4EE534000B7DA8 /* Products */; - ProjectRef = E730D7511D4EE534000B7DA8 /* RCTImage.xcodeproj */; - }, - { - ProductGroup = E730D7481D4EE4D0000B7DA8 /* Products */; - ProjectRef = E730D7471D4EE4D0000B7DA8 /* RCTNetwork.xcodeproj */; - }, - { - ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; - ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; - }, - { - ProductGroup = 5F82F1731B85784500FAE87E /* Products */; - ProjectRef = 5F82F1721B85784500FAE87E /* RCTWebSocket.xcodeproj */; - }, - { - ProductGroup = 146163281AC3E22900C2F5AD /* Products */; - ProjectRef = 146163271AC3E22900C2F5AD /* React.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 13B07F861A680F5B00A75B9A /* 2048 */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 1461632C1AC3E22900C2F5AD /* libReact.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libReact.a; - remoteRef = 1461632B1AC3E22900C2F5AD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 5F82F1771B85784500FAE87E /* libRCTWebSocket.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTWebSocket.a; - remoteRef = 5F82F1761B85784500FAE87E /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTText.a; - remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - E730D74C1D4EE4D0000B7DA8 /* libRCTNetwork.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTNetwork.a; - remoteRef = E730D74B1D4EE4D0000B7DA8 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - E730D7561D4EE534000B7DA8 /* libRCTImage.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTImage.a; - remoteRef = E730D7551D4EE534000B7DA8 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 13B07F8E1A680F5B00A75B9A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 68ACCCD51D2BE2D2008E368A /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n$SRCROOT/../../packager/react-native-xcode.sh Examples/2048/Game2048.js\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 13B07F871A680F5B00A75B9A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 13B07FB21A68108700A75B9A /* Base */, - ); - name = LaunchScreen.xib; - path = 2048; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 13B07F941A680F5B00A75B9A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../../React/**", - ); - INFOPLIST_FILE = "$(SRCROOT)/2048/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(inherited)"; - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = 2048; - }; - name = Debug; - }; - 13B07F951A680F5B00A75B9A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../../React/**", - ); - INFOPLIST_FILE = "$(SRCROOT)/2048/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(inherited)"; - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = 2048; - }; - name = Release; - }; - 83CBBA201A601CBA00E9B192 /* 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; - ENABLE_TESTABILITY = 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; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../../React/**", - ); - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 83CBBA211A601CBA00E9B192 /* 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 = YES; - 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; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../../React/**", - ); - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "2048" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13B07F941A680F5B00A75B9A /* Debug */, - 13B07F951A680F5B00A75B9A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "2048" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83CBBA201A601CBA00E9B192 /* Debug */, - 83CBBA211A601CBA00E9B192 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} diff --git a/Examples/2048/2048/AppDelegate.h b/Examples/2048/2048/AppDelegate.h deleted file mode 100644 index 1a4317567ce..00000000000 --- a/Examples/2048/2048/AppDelegate.h +++ /dev/null @@ -1,21 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -@interface AppDelegate : UIResponder - -@property (nonatomic, strong) UIWindow *window; - -@end diff --git a/Examples/2048/2048/AppDelegate.m b/Examples/2048/2048/AppDelegate.m deleted file mode 100644 index 9e3c01b8111..00000000000 --- a/Examples/2048/2048/AppDelegate.m +++ /dev/null @@ -1,39 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "AppDelegate.h" - -#import "RCTBundleURLProvider.h" -#import "RCTRootView.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"Examples/2048/Game2048" fallbackResource:nil]; - - RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation - moduleName:@"Game2048" - initialProperties:nil - launchOptions:launchOptions]; - - self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; - UIViewController *rootViewController = [UIViewController new]; - rootViewController.view = rootView; - self.window.rootViewController = rootViewController; - [self.window makeKeyAndVisible]; - return YES; -} - -@end diff --git a/Examples/2048/2048/Base.lproj/LaunchScreen.xib b/Examples/2048/2048/Base.lproj/LaunchScreen.xib deleted file mode 100644 index 351e21c59cc..00000000000 --- a/Examples/2048/2048/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Examples/2048/2048/Images.xcassets/AppIcon.appiconset/Contents.json b/Examples/2048/2048/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 118c98f7461..00000000000 --- a/Examples/2048/2048/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "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/2048/2048/Info.plist b/Examples/2048/2048/Info.plist deleted file mode 100644 index 6105445463d..00000000000 --- a/Examples/2048/2048/Info.plist +++ /dev/null @@ -1,43 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Examples/2048/2048/main.m b/Examples/2048/2048/main.m deleted file mode 100644 index b2a6473023a..00000000000 --- a/Examples/2048/2048/main.m +++ /dev/null @@ -1,23 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/Examples/2048/Game2048.js b/Examples/2048/Game2048.js deleted file mode 100644 index c19e7cf2deb..00000000000 --- a/Examples/2048/Game2048.js +++ /dev/null @@ -1,325 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * @providesModule Game2048 - * @flow - */ -'use strict'; - -var React = require('react'); -var ReactNative = require('react-native'); -var { - AppRegistry, - StyleSheet, - Text, - View, -} = ReactNative; - -var Animated = require('Animated'); -var GameBoard = require('GameBoard'); -var TouchableBounce = require('TouchableBounce'); - -var BOARD_PADDING = 3; -var CELL_MARGIN = 4; -var CELL_SIZE = 60; - -class Cell extends React.Component { - render() { - return ; - } -} - -class Board extends React.Component { - render() { - return ( - - - - - - {this.props.children} - - ); - } -} - -class Tile extends React.Component { - state: any; - - static _getPosition(index): number { - return BOARD_PADDING + (index * (CELL_SIZE + CELL_MARGIN * 2) + CELL_MARGIN); - } - - constructor(props: {}) { - super(props); - - var tile = this.props.tile; - - this.state = { - opacity: new Animated.Value(0), - top: new Animated.Value(Tile._getPosition(tile.toRow())), - left: new Animated.Value(Tile._getPosition(tile.toColumn())), - }; - } - - calculateOffset(): {top: number; left: number; opacity: number} { - var tile = this.props.tile; - - var offset = { - top: this.state.top, - left: this.state.left, - opacity: this.state.opacity, - }; - - if (tile.isNew()) { - Animated.timing(this.state.opacity, { - duration: 100, - toValue: 1, - }).start(); - } else { - Animated.parallel([ - Animated.timing(offset.top, { - duration: 100, - toValue: Tile._getPosition(tile.toRow()), - }), - Animated.timing(offset.left, { - duration: 100, - toValue: Tile._getPosition(tile.toColumn()), - }), - ]).start(); - } - return offset; - } - - render() { - var tile = this.props.tile; - - var tileStyles = [ - styles.tile, - styles['tile' + tile.value], - this.calculateOffset(), - ]; - - var textStyles = [ - styles.value, - tile.value > 4 && styles.whiteText, - tile.value > 100 && styles.threeDigits, - tile.value > 1000 && styles.fourDigits, - ]; - - return ( - - {tile.value} - - ); - } -} - -class GameEndOverlay extends React.Component { - render() { - var board = this.props.board; - - if (!board.hasWon() && !board.hasLost()) { - return ; - } - - var message = board.hasWon() ? - 'Good Job!' : 'Game Over'; - - return ( - - {message} - - Try Again? - - - ); - } -} - -class Game2048 extends React.Component { - startX: number; - startY: number; - state: any; - - constructor(props: {}) { - super(props); - this.state = { - board: new GameBoard(), - }; - this.startX = 0; - this.startY = 0; - } - - restartGame() { - this.setState({board: new GameBoard()}); - } - - handleTouchStart(event: Object) { - if (this.state.board.hasWon()) { - return; - } - - this.startX = event.nativeEvent.pageX; - this.startY = event.nativeEvent.pageY; - } - - handleTouchEnd(event: Object) { - if (this.state.board.hasWon()) { - return; - } - - var deltaX = event.nativeEvent.pageX - this.startX; - var deltaY = event.nativeEvent.pageY - this.startY; - - var direction = -1; - if (Math.abs(deltaX) > 3 * Math.abs(deltaY) && Math.abs(deltaX) > 30) { - direction = deltaX > 0 ? 2 : 0; - } else if (Math.abs(deltaY) > 3 * Math.abs(deltaX) && Math.abs(deltaY) > 30) { - direction = deltaY > 0 ? 3 : 1; - } - - if (direction !== -1) { - this.setState({board: this.state.board.move(direction)}); - } - } - - render() { - var tiles = this.state.board.tiles - .filter((tile) => tile.value) - .map((tile) => ); - - return ( - this.handleTouchStart(event)} - onTouchEnd={(event) => this.handleTouchEnd(event)}> - - {tiles} - - this.restartGame()} /> - - ); - } -} - -var styles = StyleSheet.create({ - container: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - }, - board: { - padding: BOARD_PADDING, - backgroundColor: '#bbaaaa', - borderRadius: 5, - }, - overlay: { - position: 'absolute', - top: 0, - bottom: 0, - left: 0, - right: 0, - backgroundColor: 'rgba(221, 221, 221, 0.5)', - flex: 1, - flexDirection: 'column', - justifyContent: 'center', - alignItems: 'center', - }, - overlayMessage: { - fontSize: 40, - marginBottom: 20, - }, - tryAgain: { - backgroundColor: '#887761', - padding: 20, - borderRadius: 5, - }, - tryAgainText: { - color: '#ffffff', - fontSize: 20, - fontWeight: '500', - }, - cell: { - width: CELL_SIZE, - height: CELL_SIZE, - borderRadius: 5, - backgroundColor: '#ddccbb', - margin: CELL_MARGIN, - }, - row: { - flexDirection: 'row', - }, - tile: { - position: 'absolute', - width: CELL_SIZE, - height: CELL_SIZE, - backgroundColor: '#ddccbb', - borderRadius: 5, - flex: 1, - justifyContent: 'center', - alignItems: 'center', - }, - value: { - fontSize: 24, - color: '#776666', - fontFamily: 'Verdana', - fontWeight: '500', - }, - tile2: { - backgroundColor: '#eeeeee', - }, - tile4: { - backgroundColor: '#eeeecc', - }, - tile8: { - backgroundColor: '#ffbb87', - }, - tile16: { - backgroundColor: '#ff9966', - }, - tile32: { - backgroundColor: '#ff7755', - }, - tile64: { - backgroundColor: '#ff5533', - }, - tile128: { - backgroundColor: '#eecc77', - }, - tile256: { - backgroundColor: '#eecc66', - }, - tile512: { - backgroundColor: '#eecc55', - }, - tile1024: { - backgroundColor: '#eecc33', - }, - tile2048: { - backgroundColor: '#eecc22', - }, - whiteText: { - color: '#ffffff', - }, - threeDigits: { - fontSize: 20, - }, - fourDigits: { - fontSize: 18, - }, -}); - -AppRegistry.registerComponent('Game2048', () => Game2048); - -module.exports = Game2048; diff --git a/Examples/2048/GameBoard.js b/Examples/2048/GameBoard.js deleted file mode 100644 index 6ed92e6b578..00000000000 --- a/Examples/2048/GameBoard.js +++ /dev/null @@ -1,201 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * @providesModule GameBoard - * @flow - */ -'use strict'; - -// NB: Taken straight from: https://github.com/IvanVergiliev/2048-react/blob/master/src/board.js -// with no modification except to format it for CommonJS and fix lint/flow errors - -var rotateLeft = function (matrix) { - var rows = matrix.length; - var columns = matrix[0].length; - var res = []; - for (var row = 0; row < rows; ++row) { - res.push([]); - for (var column = 0; column < columns; ++column) { - res[row][column] = matrix[column][columns - row - 1]; - } - } - return res; -}; - -var Tile = function (value?: number, row?: number, column?: number) { - this.value = value || 0; - this.row = row || -1; - - this.column = column || -1; - this.oldRow = -1; - this.oldColumn = -1; - this.markForDeletion = false; - this.mergedInto = null; - this.id = Tile.id++; -}; - -Tile.id = 0; - -Tile.prototype.moveTo = function (row, column) { - this.oldRow = this.row; - this.oldColumn = this.column; - this.row = row; - this.column = column; -}; - -Tile.prototype.isNew = function () { - return this.oldRow === -1 && !this.mergedInto; -}; - -Tile.prototype.hasMoved = function () { - return (this.fromRow() !== -1 && (this.fromRow() !== this.toRow() || this.fromColumn() !== this.toColumn())) || - this.mergedInto; -}; - -Tile.prototype.fromRow = function () { - return this.mergedInto ? this.row : this.oldRow; -}; - -Tile.prototype.fromColumn = function () { - return this.mergedInto ? this.column : this.oldColumn; -}; - -Tile.prototype.toRow = function () { - return this.mergedInto ? this.mergedInto.row : this.row; -}; - -Tile.prototype.toColumn = function () { - return this.mergedInto ? this.mergedInto.column : this.column; -}; - -var Board = function () { - this.tiles = []; - this.cells = []; - for (var i = 0; i < Board.size; ++i) { - this.cells[i] = [this.addTile(), this.addTile(), this.addTile(), this.addTile()]; - } - this.addRandomTile(); - this.setPositions(); - this.won = false; -}; - -Board.prototype.addTile = function () { - var res = new Tile(); - Tile.apply(res, arguments); - this.tiles.push(res); - return res; -}; - -Board.size = 4; - -Board.prototype.moveLeft = function () { - var hasChanged = false; - for (var row = 0; row < Board.size; ++row) { - var currentRow = this.cells[row].filter(function (tile) { return tile.value !== 0; }); - var resultRow = []; - for (var target = 0; target < Board.size; ++target) { - var targetTile = currentRow.length ? currentRow.shift() : this.addTile(); - if (currentRow.length > 0 && currentRow[0].value === targetTile.value) { - var tile1 = targetTile; - targetTile = this.addTile(targetTile.value); - tile1.mergedInto = targetTile; - var tile2 = currentRow.shift(); - tile2.mergedInto = targetTile; - targetTile.value += tile2.value; - } - resultRow[target] = targetTile; - this.won = this.won || (targetTile.value === 2048); - hasChanged = hasChanged || (targetTile.value !== this.cells[row][target].value); - } - this.cells[row] = resultRow; - } - return hasChanged; -}; - -Board.prototype.setPositions = function () { - this.cells.forEach(function (row, rowIndex) { - row.forEach(function (tile, columnIndex) { - tile.oldRow = tile.row; - tile.oldColumn = tile.column; - tile.row = rowIndex; - tile.column = columnIndex; - tile.markForDeletion = false; - }); - }); -}; - -Board.fourProbability = 0.1; - -Board.prototype.addRandomTile = function () { - var emptyCells = []; - for (var r = 0; r < Board.size; ++r) { - for (var c = 0; c < Board.size; ++c) { - if (this.cells[r][c].value === 0) { - emptyCells.push({r: r, c: c}); - } - } - } - var index = Math.floor(Math.random() * emptyCells.length); - var cell = emptyCells[index]; - var newValue = Math.random() < Board.fourProbability ? 4 : 2; - this.cells[cell.r][cell.c] = this.addTile(newValue); -}; - -Board.prototype.move = function (direction) { - // 0 -> left, 1 -> up, 2 -> right, 3 -> down - this.clearOldTiles(); - for (var i = 0; i < direction; ++i) { - this.cells = rotateLeft(this.cells); - } - var hasChanged = this.moveLeft(); - for (var i = direction; i < 4; ++i) { - this.cells = rotateLeft(this.cells); - } - if (hasChanged) { - this.addRandomTile(); - } - this.setPositions(); - return this; -}; - -Board.prototype.clearOldTiles = function () { - this.tiles = this.tiles.filter(function (tile) { return tile.markForDeletion === false; }); - this.tiles.forEach(function (tile) { tile.markForDeletion = true; }); -}; - -Board.prototype.hasWon = function () { - return this.won; -}; - -Board.deltaX = [-1, 0, 1, 0]; -Board.deltaY = [0, -1, 0, 1]; - -Board.prototype.hasLost = function () { - var canMove = false; - for (var row = 0; row < Board.size; ++row) { - for (var column = 0; column < Board.size; ++column) { - canMove = canMove || (this.cells[row][column].value === 0); - for (var dir = 0; dir < 4; ++dir) { - var newRow = row + Board.deltaX[dir]; - var newColumn = column + Board.deltaY[dir]; - if (newRow < 0 || newRow >= Board.size || newColumn < 0 || newColumn >= Board.size) { - continue; - } - canMove = canMove || (this.cells[row][column].value === this.cells[newRow][newColumn].value); - } - } - } - return !canMove; -}; - -module.exports = Board; diff --git a/Examples/Movies/MovieCell.js b/Examples/Movies/MovieCell.js deleted file mode 100644 index d67c777eb56..00000000000 --- a/Examples/Movies/MovieCell.js +++ /dev/null @@ -1,105 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * @flow - * @providesModule MovieCell - */ -'use strict'; - -var React = require('react'); -var ReactNative = require('react-native'); -var { - Image, - Platform, - StyleSheet, - Text, - TouchableHighlight, - TouchableNativeFeedback, - View -} = ReactNative; - -var getStyleFromScore = require('./getStyleFromScore'); -var getImageSource = require('./getImageSource'); -var getTextFromScore = require('./getTextFromScore'); - -class MovieCell extends React.Component { - render() { - var criticsScore = this.props.movie.ratings.critics_score; - var TouchableElement = TouchableHighlight; - if (Platform.OS === 'android') { - TouchableElement = TouchableNativeFeedback; - } - return ( - - - - - - - {this.props.movie.title} - - - {this.props.movie.year} - {' '}•{' '} - - Critics {getTextFromScore(criticsScore)} - - - - - - - ); - } -} - -var styles = StyleSheet.create({ - textContainer: { - flex: 1, - }, - movieTitle: { - flex: 1, - fontSize: 16, - fontWeight: '500', - marginBottom: 2, - }, - movieYear: { - color: '#999999', - fontSize: 12, - }, - row: { - alignItems: 'center', - backgroundColor: 'white', - flexDirection: 'row', - padding: 5, - }, - cellImage: { - backgroundColor: '#dddddd', - height: 93, - marginRight: 10, - width: 60, - }, - cellBorder: { - backgroundColor: 'rgba(0, 0, 0, 0.1)', - height: StyleSheet.hairlineWidth, - marginLeft: 4, - }, -}); - -module.exports = MovieCell; diff --git a/Examples/Movies/MovieScreen.js b/Examples/Movies/MovieScreen.js deleted file mode 100644 index 2f013f08ed8..00000000000 --- a/Examples/Movies/MovieScreen.js +++ /dev/null @@ -1,165 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * @flow - * @providesModule MovieScreen - */ -'use strict'; - -var React = require('react'); -var ReactNative = require('react-native'); -var { - Image, - ScrollView, - StyleSheet, - Text, - View, -} = ReactNative; - -var getImageSource = require('./getImageSource'); -var getStyleFromScore = require('./getStyleFromScore'); -var getTextFromScore = require('./getTextFromScore'); - -class MovieScreen extends React.Component { - render() { - return ( - - - - - {this.props.movie.title} - {this.props.movie.year} - - - {this.props.movie.mpaa_rating} - - - - - - - - {this.props.movie.synopsis} - - - - - ); - } -} - -class Ratings extends React.Component { - render() { - var criticsScore = this.props.ratings.critics_score; - var audienceScore = this.props.ratings.audience_score; - - return ( - - - Critics: - - {getTextFromScore(criticsScore)} - - - - Audience: - - {getTextFromScore(audienceScore)} - - - - ); - } -} - -class Cast extends React.Component { - render() { - if (!this.props.actors) { - return null; - } - - return ( - - Actors - {this.props.actors.map(actor => - - • {actor.name} - - )} - - ); - } -} - -var styles = StyleSheet.create({ - contentContainer: { - padding: 10, - }, - rightPane: { - justifyContent: 'space-between', - flex: 1, - }, - movieTitle: { - flex: 1, - fontSize: 16, - fontWeight: '500', - }, - rating: { - marginTop: 10, - }, - ratingTitle: { - fontSize: 14, - }, - ratingValue: { - fontSize: 28, - fontWeight: '500', - }, - mpaaWrapper: { - alignSelf: 'flex-start', - borderColor: 'black', - borderWidth: 1, - paddingHorizontal: 3, - marginVertical: 5, - }, - mpaaText: { - fontFamily: 'Palatino', - fontSize: 13, - fontWeight: '500', - }, - mainSection: { - flexDirection: 'row', - }, - detailsImage: { - width: 134, - height: 200, - backgroundColor: '#eaeaea', - marginRight: 10, - }, - separator: { - backgroundColor: 'rgba(0, 0, 0, 0.1)', - height: StyleSheet.hairlineWidth, - marginVertical: 10, - }, - castTitle: { - fontWeight: '500', - marginBottom: 3, - }, - castActor: { - marginLeft: 2, - }, -}); - -module.exports = MovieScreen; diff --git a/Examples/Movies/Movies.xcodeproj/project.pbxproj b/Examples/Movies/Movies.xcodeproj/project.pbxproj deleted file mode 100644 index 9087fa7ac65..00000000000 --- a/Examples/Movies/Movies.xcodeproj/project.pbxproj +++ /dev/null @@ -1,520 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1341801E1AA91750003F314A /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1341801B1AA91740003F314A /* libRCTNetwork.a */; }; - 13442C061AA90EA00037E5B0 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 13442C051AA90E7D0037E5B0 /* libRCTImage.a */; }; - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 140D9B661AC36C42004F25EE /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 14312D241AC3654D00CDC950 /* libRCTLinking.a */; }; - 14A2D4421AC3E43800CC738A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 14A2D4411AC3E41A00CC738A /* libReact.a */; }; - 58C5726B1AA6239E00CDF9C8 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58C5725B1AA6236500CDF9C8 /* libRCTText.a */; }; - 67C95F201B0E64A30040BCE2 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 67C95F1E1B0E647A0040BCE2 /* libRCTWebSocket.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1341801A1AA91740003F314A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 134180151AA91740003F314A /* RCTNetwork.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B511DB1A9E6C8500147676; - remoteInfo = RCTNetwork; - }; - 13442C041AA90E7D0037E5B0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 13442C001AA90E7D0037E5B0 /* RCTImage.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B5115D1A9E6B3D00147676; - remoteInfo = RCTImage; - }; - 14312D231AC3654D00CDC950 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 14312D1E1AC3654D00CDC950 /* RCTLinking.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTLinking; - }; - 14A2D4401AC3E41A00CC738A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 14A2D43C1AC3E41A00CC738A /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; - remoteInfo = React; - }; - 58C5725A1AA6236500CDF9C8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 587650F61A9EB120008B8F17 /* RCTText.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B5119B1A9E6C1200147676; - remoteInfo = RCTText; - }; - 67C95F1D1B0E647A0040BCE2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 67C95F151B0E647A0040BCE2 /* RCTWebSocket.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3C86DF461ADF2C930047B81A; - remoteInfo = RCTWebSocket; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 134180151AA91740003F314A /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = ../../Libraries/Network/RCTNetwork.xcodeproj; sourceTree = ""; }; - 13442C001AA90E7D0037E5B0 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = ../../Libraries/Image/RCTImage.xcodeproj; sourceTree = ""; }; - 13B07F961A680F5B00A75B9A /* Movies.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Movies.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Movies/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Movies/AppDelegate.m; sourceTree = ""; }; - 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Movies/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Movies/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Movies/main.m; sourceTree = ""; }; - 14312D1E1AC3654D00CDC950 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = ../../Libraries/LinkingIOS/RCTLinking.xcodeproj; sourceTree = ""; }; - 14A2D43C1AC3E41A00CC738A /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = ../../React/React.xcodeproj; sourceTree = ""; }; - 587650F61A9EB120008B8F17 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = ../../Libraries/Text/RCTText.xcodeproj; sourceTree = SOURCE_ROOT; }; - 67C95F151B0E647A0040BCE2 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = ../../Libraries/WebSocket/RCTWebSocket.xcodeproj; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 67C95F201B0E64A30040BCE2 /* libRCTWebSocket.a in Frameworks */, - 14A2D4421AC3E43800CC738A /* libReact.a in Frameworks */, - 140D9B661AC36C42004F25EE /* libRCTLinking.a in Frameworks */, - 1341801E1AA91750003F314A /* libRCTNetwork.a in Frameworks */, - 13442C061AA90EA00037E5B0 /* libRCTImage.a in Frameworks */, - 58C5726B1AA6239E00CDF9C8 /* libRCTText.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 134180161AA91740003F314A /* Products */ = { - isa = PBXGroup; - children = ( - 1341801B1AA91740003F314A /* libRCTNetwork.a */, - ); - name = Products; - sourceTree = ""; - }; - 13442C011AA90E7D0037E5B0 /* Products */ = { - isa = PBXGroup; - children = ( - 13442C051AA90E7D0037E5B0 /* libRCTImage.a */, - ); - name = Products; - sourceTree = ""; - }; - 13B07FAE1A68108700A75B9A /* Movies */ = { - isa = PBXGroup; - children = ( - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.m */, - 13B07FB51A68108700A75B9A /* Images.xcassets */, - 13B07FB61A68108700A75B9A /* Info.plist */, - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, - 13B07FB71A68108700A75B9A /* main.m */, - ); - name = Movies; - sourceTree = ""; - }; - 14312D1F1AC3654D00CDC950 /* Products */ = { - isa = PBXGroup; - children = ( - 14312D241AC3654D00CDC950 /* libRCTLinking.a */, - ); - name = Products; - sourceTree = ""; - }; - 14A2D43D1AC3E41A00CC738A /* Products */ = { - isa = PBXGroup; - children = ( - 14A2D4411AC3E41A00CC738A /* libReact.a */, - ); - name = Products; - sourceTree = ""; - }; - 58C571FC1AA6124500CDF9C8 /* Libraries */ = { - isa = PBXGroup; - children = ( - 67C95F151B0E647A0040BCE2 /* RCTWebSocket.xcodeproj */, - 14A2D43C1AC3E41A00CC738A /* React.xcodeproj */, - 14312D1E1AC3654D00CDC950 /* RCTLinking.xcodeproj */, - 134180151AA91740003F314A /* RCTNetwork.xcodeproj */, - 13442C001AA90E7D0037E5B0 /* RCTImage.xcodeproj */, - 587650F61A9EB120008B8F17 /* RCTText.xcodeproj */, - ); - name = Libraries; - sourceTree = ""; - }; - 58C572571AA6236500CDF9C8 /* Products */ = { - isa = PBXGroup; - children = ( - 58C5725B1AA6236500CDF9C8 /* libRCTText.a */, - ); - name = Products; - sourceTree = ""; - }; - 67C95F161B0E647A0040BCE2 /* Products */ = { - isa = PBXGroup; - children = ( - 67C95F1E1B0E647A0040BCE2 /* libRCTWebSocket.a */, - ); - name = Products; - sourceTree = ""; - }; - 83CBB9F61A601CBA00E9B192 = { - isa = PBXGroup; - children = ( - 13B07FAE1A68108700A75B9A /* Movies */, - 58C571FC1AA6124500CDF9C8 /* Libraries */, - 83CBBA001A601CBA00E9B192 /* Products */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - }; - 83CBBA001A601CBA00E9B192 /* Products */ = { - isa = PBXGroup; - children = ( - 13B07F961A680F5B00A75B9A /* Movies.app */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 13B07F861A680F5B00A75B9A /* Movies */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Movies" */; - buildPhases = ( - 13B07F871A680F5B00A75B9A /* Sources */, - 13B07F8C1A680F5B00A75B9A /* Frameworks */, - 13B07F8E1A680F5B00A75B9A /* Resources */, - 68ACCCEE1D2BE57F008E368A /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Movies; - productName = "Hello World"; - productReference = 13B07F961A680F5B00A75B9A /* Movies.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 83CBB9F71A601CBA00E9B192 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0700; - ORGANIZATIONNAME = Facebook; - }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Movies" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 83CBB9F61A601CBA00E9B192; - productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 13442C011AA90E7D0037E5B0 /* Products */; - ProjectRef = 13442C001AA90E7D0037E5B0 /* RCTImage.xcodeproj */; - }, - { - ProductGroup = 14312D1F1AC3654D00CDC950 /* Products */; - ProjectRef = 14312D1E1AC3654D00CDC950 /* RCTLinking.xcodeproj */; - }, - { - ProductGroup = 134180161AA91740003F314A /* Products */; - ProjectRef = 134180151AA91740003F314A /* RCTNetwork.xcodeproj */; - }, - { - ProductGroup = 58C572571AA6236500CDF9C8 /* Products */; - ProjectRef = 587650F61A9EB120008B8F17 /* RCTText.xcodeproj */; - }, - { - ProductGroup = 67C95F161B0E647A0040BCE2 /* Products */; - ProjectRef = 67C95F151B0E647A0040BCE2 /* RCTWebSocket.xcodeproj */; - }, - { - ProductGroup = 14A2D43D1AC3E41A00CC738A /* Products */; - ProjectRef = 14A2D43C1AC3E41A00CC738A /* React.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 13B07F861A680F5B00A75B9A /* Movies */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 1341801B1AA91740003F314A /* libRCTNetwork.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTNetwork.a; - remoteRef = 1341801A1AA91740003F314A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 13442C051AA90E7D0037E5B0 /* libRCTImage.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTImage.a; - remoteRef = 13442C041AA90E7D0037E5B0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 14312D241AC3654D00CDC950 /* libRCTLinking.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTLinking.a; - remoteRef = 14312D231AC3654D00CDC950 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 14A2D4411AC3E41A00CC738A /* libReact.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libReact.a; - remoteRef = 14A2D4401AC3E41A00CC738A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 58C5725B1AA6236500CDF9C8 /* libRCTText.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTText.a; - remoteRef = 58C5725A1AA6236500CDF9C8 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 67C95F1E1B0E647A0040BCE2 /* libRCTWebSocket.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTWebSocket.a; - remoteRef = 67C95F1D1B0E647A0040BCE2 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 13B07F8E1A680F5B00A75B9A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 68ACCCEE1D2BE57F008E368A /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n$SRCROOT/../../packager/react-native-xcode.sh Examples/Movies/MoviesApp.ios.js\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 13B07F871A680F5B00A75B9A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 13B07FB21A68108700A75B9A /* Base */, - ); - name = LaunchScreen.xib; - path = Movies; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 13B07F941A680F5B00A75B9A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../../React/**", - ); - INFOPLIST_FILE = "$(SRCROOT)/Movies/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(inherited)"; - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = Movies; - USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../Libraries/**"; - }; - name = Debug; - }; - 13B07F951A680F5B00A75B9A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../../React/**", - ); - INFOPLIST_FILE = "$(SRCROOT)/Movies/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(inherited)"; - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = Movies; - USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/../../Libraries/**"; - }; - name = Release; - }; - 83CBBA201A601CBA00E9B192 /* 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; - ENABLE_TESTABILITY = 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; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../../React/**", - ); - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 83CBBA211A601CBA00E9B192 /* 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 = YES; - 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; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../../React/**", - ); - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Movies" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13B07F941A680F5B00A75B9A /* Debug */, - 13B07F951A680F5B00A75B9A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Movies" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83CBBA201A601CBA00E9B192 /* Debug */, - 83CBBA211A601CBA00E9B192 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} diff --git a/Examples/Movies/Movies.xcodeproj/xcshareddata/xcschemes/Movies.xcscheme b/Examples/Movies/Movies.xcodeproj/xcshareddata/xcschemes/Movies.xcscheme deleted file mode 100644 index f1006908055..00000000000 --- a/Examples/Movies/Movies.xcodeproj/xcshareddata/xcschemes/Movies.xcscheme +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Examples/Movies/Movies/AppDelegate.h b/Examples/Movies/Movies/AppDelegate.h deleted file mode 100644 index 55c38cc0bb6..00000000000 --- a/Examples/Movies/Movies/AppDelegate.h +++ /dev/null @@ -1,22 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -@interface AppDelegate : UIResponder - -@property (nonatomic, strong) UIWindow *window; - -@end - diff --git a/Examples/Movies/Movies/AppDelegate.m b/Examples/Movies/Movies/AppDelegate.m deleted file mode 100644 index 94f5d2ae944..00000000000 --- a/Examples/Movies/Movies/AppDelegate.m +++ /dev/null @@ -1,51 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "AppDelegate.h" - -#import "RCTBundleURLProvider.h" -#import "RCTLinkingManager.h" -#import "RCTRootView.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"Examples/Movies/MoviesApp.ios" fallbackResource:nil]; - - RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation - moduleName:@"MoviesApp" - initialProperties:nil - launchOptions:launchOptions]; - - self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; - UIViewController *rootViewController = [UIViewController new]; - rootViewController.view = rootView; - self.window.rootViewController = rootViewController; - [self.window makeKeyAndVisible]; - return YES; -} - -- (BOOL)application:(UIApplication *)application - openURL:(NSURL *)url - sourceApplication:(NSString *)sourceApplication - annotation:(id)annotation -{ - return [RCTLinkingManager application:application - openURL:url - sourceApplication:sourceApplication - annotation:annotation]; -} - -@end diff --git a/Examples/Movies/Movies/Base.lproj/LaunchScreen.xib b/Examples/Movies/Movies/Base.lproj/LaunchScreen.xib deleted file mode 100644 index d3f0b52a88a..00000000000 --- a/Examples/Movies/Movies/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Examples/Movies/Movies/Images.xcassets/AppIcon.appiconset/Contents.json b/Examples/Movies/Movies/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 118c98f7461..00000000000 --- a/Examples/Movies/Movies/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "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/Movies/Movies/Info.plist b/Examples/Movies/Movies/Info.plist deleted file mode 100644 index 4ecf97f7044..00000000000 --- a/Examples/Movies/Movies/Info.plist +++ /dev/null @@ -1,56 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleURLTypes - - - CFBundleTypeRole - Editor - CFBundleURLSchemes - - movies - - - - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/Examples/Movies/Movies/main.m b/Examples/Movies/Movies/main.m deleted file mode 100644 index 9c58a39a483..00000000000 --- a/Examples/Movies/Movies/main.m +++ /dev/null @@ -1,22 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/Examples/Movies/MoviesApp.android.js b/Examples/Movies/MoviesApp.android.js deleted file mode 100644 index c6f78a3d1fc..00000000000 --- a/Examples/Movies/MoviesApp.android.js +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright (c) 2013-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. - * - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * @providesModule MoviesApp - * @flow - */ -'use strict'; - -var React = require('react'); -var ReactNative = require('react-native'); - -var nativeImageSource = require('nativeImageSource'); -var { - AppRegistry, - BackAndroid, - Navigator, - StyleSheet, - ToolbarAndroid, - View, -} = ReactNative; - -var MovieScreen = require('./MovieScreen'); -var SearchScreen = require('./SearchScreen'); - -var _navigator; -BackAndroid.addEventListener('hardwareBackPress', () => { - if (_navigator && _navigator.getCurrentRoutes().length > 1) { - _navigator.pop(); - return true; - } - return false; -}); - -var RouteMapper = function(route, navigationOperations, onComponentRef) { - _navigator = navigationOperations; - if (route.name === 'search') { - return ( - - ); - } else if (route.name === 'movie') { - return ( - - - - - ); - } -}; - -class MoviesApp extends React.Component { - render() { - var initialRoute = {name: 'search'}; - return ( - Navigator.SceneConfigs.FadeAndroid} - renderScene={RouteMapper} - /> - ); - } -} - -var styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: 'white', - }, - toolbar: { - backgroundColor: '#a9a9a9', - height: 56, - }, -}); - -AppRegistry.registerComponent('MoviesApp', () => MoviesApp); - -module.exports = MoviesApp; diff --git a/Examples/Movies/MoviesApp.ios.js b/Examples/Movies/MoviesApp.ios.js deleted file mode 100644 index 99ba1d3783b..00000000000 --- a/Examples/Movies/MoviesApp.ios.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * @providesModule MoviesApp - * @flow - */ -'use strict'; - -var React = require('react'); -var ReactNative = require('react-native'); -var { - AppRegistry, - NavigatorIOS, - StyleSheet, -} = ReactNative; - -var SearchScreen = require('./SearchScreen'); - -class MoviesApp extends React.Component { - render() { - return ( - - ); - } -} - -var styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: 'white', - }, -}); - -AppRegistry.registerComponent('MoviesApp', () => MoviesApp); - -module.exports = MoviesApp; diff --git a/Examples/Movies/README.md b/Examples/Movies/README.md deleted file mode 100644 index f2ad9befac5..00000000000 --- a/Examples/Movies/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# Movies app - -The Movies app is a demonstration of basic concepts, such as fetching data, rendering a list of data including images, and navigating between different screens. - -## Running this app - -Before running the app, make sure you ran: - - git clone https://github.com/facebook/react-native.git - cd react-native - npm install - -### Running on iOS - -Mac OS and Xcode are required. - -- Open `Examples/Movies/Movies.xcodeproj` in Xcode -- Hit the Run button - -See [Running on device](https://facebook.github.io/react-native/docs/running-on-device.html) if you want to use a physical device. - -### Running on Android - -You'll need to have all the [prerequisites](https://github.com/facebook/react-native/tree/master/ReactAndroid#prerequisites) (SDK, NDK) for Building React Native installed. - -Start an Android emulator ([Genymotion](https://www.genymotion.com) is recommended). - - cd react-native - ./gradlew :Examples:Movies:android:app:installDebug - ./packager/packager.sh - -_Note: Building for the first time can take a while._ - -Open the Movies app in your emulator. - -See [Running on Device](https://facebook.github.io/react-native/docs/running-on-device.html) in case you want to use a physical device. - -### Running with Buck - -Follow the same setup as running with gradle. - -Install Buck from [here](https://buckbuild.com/setup/install.html). - -Run the following commands from the react-native folder: - - ./gradlew :ReactAndroid:packageReactNdkLibsForBuck - buck fetch movies - buck install -r movies - ./packager/packager.sh - -_Note: The native libs are still built using gradle. Full build with buck is coming soon(tm)._ - -## Built from source - -Building the app on both iOS and Android means building the React Native framework from source. This way you're running the latest native and JS code the way you see it in your clone of the github repo. - -This is different from apps created using `react-native init` which have a dependency on a specific version of React Native JS and native code, declared in a `package.json` file (and `build.gradle` for Android apps). diff --git a/Examples/Movies/SearchBar.android.js b/Examples/Movies/SearchBar.android.js deleted file mode 100644 index 1a889d7fbeb..00000000000 --- a/Examples/Movies/SearchBar.android.js +++ /dev/null @@ -1,113 +0,0 @@ -/** - * Copyright (c) 2013-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. - * - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * @providesModule SearchBar - * @flow - */ -'use strict'; - -var React = require('react'); -var ReactNative = require('react-native'); - -var nativeImageSource = require('nativeImageSource'); -var { - Image, - Platform, - ActivityIndicator, - TextInput, - StyleSheet, - TouchableNativeFeedback, - View, -} = ReactNative; - -var IS_RIPPLE_EFFECT_SUPPORTED = Platform.Version >= 21; - -class SearchBar extends React.Component { - render() { - var background = IS_RIPPLE_EFFECT_SUPPORTED ? - TouchableNativeFeedback.SelectableBackgroundBorderless() : - TouchableNativeFeedback.SelectableBackground(); - return ( - - this.refs.input && this.refs.input.focus()}> - - - - - - - - ); - } -} - -var styles = StyleSheet.create({ - searchBar: { - flexDirection: 'row', - alignItems: 'center', - backgroundColor: '#a9a9a9', - height: 56, - }, - searchBarInput: { - flex: 1, - fontSize: 20, - fontWeight: 'bold', - color: 'white', - height: 50, - padding: 0, - backgroundColor: 'transparent' - }, - spinner: { - width: 30, - height: 30, - marginRight: 16, - }, - icon: { - width: 24, - height: 24, - marginHorizontal: 8, - }, -}); - -module.exports = SearchBar; diff --git a/Examples/Movies/SearchBar.ios.js b/Examples/Movies/SearchBar.ios.js deleted file mode 100644 index c168d40184d..00000000000 --- a/Examples/Movies/SearchBar.ios.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * @providesModule SearchBar - * @flow - */ -'use strict'; - -var React = require('react'); -var ReactNative = require('react-native'); -var { - ActivityIndicator, - TextInput, - StyleSheet, - View, -} = ReactNative; - -class SearchBar extends React.Component { - render() { - return ( - - - - - ); - } -} - -var styles = StyleSheet.create({ - searchBar: { - marginTop: 64, - padding: 3, - paddingLeft: 8, - flexDirection: 'row', - alignItems: 'center', - }, - searchBarInput: { - fontSize: 15, - flex: 1, - height: 30, - }, - spinner: { - width: 30, - }, -}); - -module.exports = SearchBar; diff --git a/Examples/Movies/SearchScreen.js b/Examples/Movies/SearchScreen.js deleted file mode 100644 index 57fa82885f7..00000000000 --- a/Examples/Movies/SearchScreen.js +++ /dev/null @@ -1,370 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * @flow - * @providesModule SearchScreen - */ -'use strict'; - -var React = require('react'); -var ReactNative = require('react-native'); -var { - ActivityIndicator, - ListView, - Platform, - StyleSheet, - Text, - View, -} = ReactNative; -var TimerMixin = require('react-timer-mixin'); - -var invariant = require('fbjs/lib/invariant'); -var dismissKeyboard = require('dismissKeyboard'); - -var MovieCell = require('./MovieCell'); -var MovieScreen = require('./MovieScreen'); -var SearchBar = require('SearchBar'); - -/** - * This is for demo purposes only, and rate limited. - * In case you want to use the Rotten Tomatoes' API on a real app you should - * create an account at http://developer.rottentomatoes.com/ - */ -var API_URL = 'http://api.rottentomatoes.com/api/public/v1.0/'; -var API_KEYS = [ - '7waqfqbprs7pajbz28mqf6vz', - // 'y4vwv8m33hed9ety83jmv52f', Fallback api_key -]; - -// Results should be cached keyed by the query -// with values of null meaning "being fetched" -// and anything besides null and undefined -// as the result of a valid query -var resultsCache = { - dataForQuery: {}, - nextPageNumberForQuery: {}, - totalForQuery: {}, -}; - -var LOADING = {}; - -var SearchScreen = React.createClass({ - mixins: [TimerMixin], - - timeoutID: (null: any), - - getInitialState: function() { - return { - isLoading: false, - isLoadingTail: false, - dataSource: new ListView.DataSource({ - rowHasChanged: (row1, row2) => row1 !== row2, - }), - filter: '', - queryNumber: 0, - }; - }, - - componentDidMount: function() { - this.searchMovies(''); - }, - - _urlForQueryAndPage: function(query: string, pageNumber: number): string { - var apiKey = API_KEYS[this.state.queryNumber % API_KEYS.length]; - if (query) { - return ( - API_URL + 'movies.json?apikey=' + apiKey + '&q=' + - encodeURIComponent(query) + '&page_limit=20&page=' + pageNumber - ); - } else { - // With no query, load latest movies - return ( - API_URL + 'lists/movies/in_theaters.json?apikey=' + apiKey + - '&page_limit=20&page=' + pageNumber - ); - } - }, - - searchMovies: function(query: string) { - this.timeoutID = null; - - this.setState({filter: query}); - - var cachedResultsForQuery = resultsCache.dataForQuery[query]; - if (cachedResultsForQuery) { - if (!LOADING[query]) { - this.setState({ - dataSource: this.getDataSource(cachedResultsForQuery), - isLoading: false - }); - } else { - this.setState({isLoading: true}); - } - return; - } - - LOADING[query] = true; - resultsCache.dataForQuery[query] = null; - this.setState({ - isLoading: true, - queryNumber: this.state.queryNumber + 1, - isLoadingTail: false, - }); - - fetch(this._urlForQueryAndPage(query, 1)) - .then((response) => response.json()) - .then((responseData) => { - LOADING[query] = false; - resultsCache.totalForQuery[query] = responseData.total; - resultsCache.dataForQuery[query] = responseData.movies; - resultsCache.nextPageNumberForQuery[query] = 2; - - if (this.state.filter !== query) { - // do not update state if the query is stale - return; - } - - this.setState({ - isLoading: false, - dataSource: this.getDataSource(responseData.movies), - }); - }) - .catch((error) => { - LOADING[query] = false; - resultsCache.dataForQuery[query] = undefined; - - this.setState({ - dataSource: this.getDataSource([]), - isLoading: false, - }); - }) - .done(); - }, - - hasMore: function(): boolean { - var query = this.state.filter; - if (!resultsCache.dataForQuery[query]) { - return true; - } - return ( - resultsCache.totalForQuery[query] !== - resultsCache.dataForQuery[query].length - ); - }, - - onEndReached: function() { - var query = this.state.filter; - if (!this.hasMore() || this.state.isLoadingTail) { - // We're already fetching or have all the elements so noop - return; - } - - if (LOADING[query]) { - return; - } - - LOADING[query] = true; - this.setState({ - queryNumber: this.state.queryNumber + 1, - isLoadingTail: true, - }); - - var page = resultsCache.nextPageNumberForQuery[query]; - invariant(page != null, 'Next page number for "%s" is missing', query); - fetch(this._urlForQueryAndPage(query, page)) - .then((response) => response.json()) - .catch((error) => { - console.error(error); - LOADING[query] = false; - this.setState({ - isLoadingTail: false, - }); - }) - .then((responseData) => { - var moviesForQuery = resultsCache.dataForQuery[query].slice(); - - LOADING[query] = false; - // We reached the end of the list before the expected number of results - if (!responseData.movies) { - resultsCache.totalForQuery[query] = moviesForQuery.length; - } else { - for (var i in responseData.movies) { - moviesForQuery.push(responseData.movies[i]); - } - resultsCache.dataForQuery[query] = moviesForQuery; - resultsCache.nextPageNumberForQuery[query] += 1; - } - - if (this.state.filter !== query) { - // do not update state if the query is stale - return; - } - - this.setState({ - isLoadingTail: false, - dataSource: this.getDataSource(resultsCache.dataForQuery[query]), - }); - }) - .done(); - }, - - getDataSource: function(movies: Array): ListView.DataSource { - return this.state.dataSource.cloneWithRows(movies); - }, - - selectMovie: function(movie: Object) { - if (Platform.OS === 'ios') { - this.props.navigator.push({ - title: movie.title, - component: MovieScreen, - passProps: {movie}, - }); - } else { - dismissKeyboard(); - this.props.navigator.push({ - title: movie.title, - name: 'movie', - movie: movie, - }); - } - }, - - onSearchChange: function(event: Object) { - var filter = event.nativeEvent.text.toLowerCase(); - - this.clearTimeout(this.timeoutID); - this.timeoutID = this.setTimeout(() => this.searchMovies(filter), 100); - }, - - renderFooter: function() { - if (!this.hasMore() || !this.state.isLoadingTail) { - return ; - } - - return ; - }, - - renderSeparator: function( - sectionID: number | string, - rowID: number | string, - adjacentRowHighlighted: boolean - ) { - var style = styles.rowSeparator; - if (adjacentRowHighlighted) { - style = [style, styles.rowSeparatorHide]; - } - return ( - - ); - }, - - renderRow: function( - movie: Object, - sectionID: number | string, - rowID: number | string, - highlightRowFunc: (sectionID: ?number | string, rowID: ?number | string) => void, - ) { - return ( - this.selectMovie(movie)} - onHighlight={() => highlightRowFunc(sectionID, rowID)} - onUnhighlight={() => highlightRowFunc(null, null)} - movie={movie} - /> - ); - }, - - render: function() { - var content = this.state.dataSource.getRowCount() === 0 ? - : - ; - - return ( - - - this.refs.listview && this.refs.listview.getScrollResponder().scrollTo({ x: 0, y: 0 })} - /> - - {content} - - ); - }, -}); - -class NoMovies extends React.Component { - render() { - var text = ''; - if (this.props.filter) { - text = `No results for "${this.props.filter}"`; - } else if (!this.props.isLoading) { - // If we're looking at the latest movies, aren't currently loading, and - // still have no results, show a message - text = 'No movies found'; - } - - return ( - - {text} - - ); - } -} - -var styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: 'white', - }, - centerText: { - alignItems: 'center', - }, - noMoviesText: { - marginTop: 80, - color: '#888888', - }, - separator: { - height: 1, - backgroundColor: '#eeeeee', - }, - scrollSpinner: { - marginVertical: 20, - }, - rowSeparator: { - backgroundColor: 'rgba(0, 0, 0, 0.1)', - height: 1, - marginLeft: 4, - }, - rowSeparatorHide: { - opacity: 0.0, - }, -}); - -module.exports = SearchScreen; diff --git a/Examples/Movies/__tests__/getImageSource-test.js b/Examples/Movies/__tests__/getImageSource-test.js deleted file mode 100644 index 2061312f020..00000000000 --- a/Examples/Movies/__tests__/getImageSource-test.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright 2004-present Facebook. All Rights Reserved. - */ -'use strict'; - -jest.unmock('../getImageSource'); - -var getImageSource = require('../getImageSource'); - -describe('getImageSource', () => { - it('returns null for invalid input', () => { - expect(getImageSource().uri).toBe(null); - }); - - it('returns a movie thumbnail', () => { - var uri = 'https://facebook.com'; - var source = { - posters: { - thumbnail: uri, - }, - }; - expect(getImageSource(source).uri).toBe(uri); - }); - - it('returns a movie thumbnail with kind', () => { - var uri = 'https://facebook.com?tmb'; - var source = { - posters: { - thumbnail: uri, - }, - }; - expect(getImageSource(source, 'kind').uri).toBe( - 'https://facebook.com?kind' - ); - }); -}); diff --git a/Examples/Movies/android/app/BUCK b/Examples/Movies/android/app/BUCK deleted file mode 100644 index bed62bb7a7e..00000000000 --- a/Examples/Movies/android/app/BUCK +++ /dev/null @@ -1,31 +0,0 @@ -include_defs("//ReactAndroid/DEFS") - -android_binary( - name = "app", - keystore = "//keystores:debug", - manifest = "src/main/AndroidManifest.xml", - deps = [ - ":movies-lib", - ], -) - -android_library( - name = "movies-lib", - srcs = glob(["src/main/java/**/*.java"]), - deps = [ - ":res", - react_native_dep("third-party/java/jsr-305:jsr-305"), - react_native_target("java/com/facebook/react:react"), - react_native_target("java/com/facebook/react/modules/core:core"), - react_native_target("java/com/facebook/react/shell:shell"), - react_native_target("jni/prebuilt:android-jsc"), - # .so files are prebuilt by Gradle with `./gradlew :ReactAndroid:packageReactNdkLibsForBuck` - react_native_target("jni/prebuilt:reactnative-libs"), - ], -) - -android_resource( - name = "res", - package = "com.facebook.react.movies", - res = "src/main/res", -) diff --git a/Examples/Movies/android/app/build.gradle b/Examples/Movies/android/app/build.gradle deleted file mode 100644 index 6bc71ffda74..00000000000 --- a/Examples/Movies/android/app/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -apply plugin: 'com.android.application' - -android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" - - defaultConfig { - applicationId "com.facebook.react.movies" - minSdkVersion 16 - targetSdkVersion 22 - versionCode 1 - versionName "1.0" - ndk { - abiFilters "armeabi-v7a", "x86" - } - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:23.0.1' - - // Build React Native from source - compile project(':ReactAndroid') -} diff --git a/Examples/Movies/android/app/gradle.properties b/Examples/Movies/android/app/gradle.properties deleted file mode 100644 index dfbe478748b..00000000000 --- a/Examples/Movies/android/app/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -android.useDeprecatedNdk=true diff --git a/Examples/Movies/android/app/proguard-rules.pro b/Examples/Movies/android/app/proguard-rules.pro deleted file mode 100644 index a92fa177ee4..00000000000 --- a/Examples/Movies/android/app/proguard-rules.pro +++ /dev/null @@ -1,17 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/Examples/Movies/android/app/src/main/AndroidManifest.xml b/Examples/Movies/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 34f5b0bc47e..00000000000 --- a/Examples/Movies/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/Examples/Movies/android/app/src/main/java/com/facebook/react/movies/MoviesActivity.java b/Examples/Movies/android/app/src/main/java/com/facebook/react/movies/MoviesActivity.java deleted file mode 100644 index da1d7fc5b8f..00000000000 --- a/Examples/Movies/android/app/src/main/java/com/facebook/react/movies/MoviesActivity.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -package com.facebook.react.movies; - -import com.facebook.react.ReactActivity; - -public class MoviesActivity extends ReactActivity { - @Override - protected String getMainComponentName() { - return "MoviesApp"; - } -} diff --git a/Examples/Movies/android/app/src/main/java/com/facebook/react/movies/MoviesApplication.java b/Examples/Movies/android/app/src/main/java/com/facebook/react/movies/MoviesApplication.java deleted file mode 100644 index ee57b9b595f..00000000000 --- a/Examples/Movies/android/app/src/main/java/com/facebook/react/movies/MoviesApplication.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -package com.facebook.react.movies; - -import android.app.Application; - -import com.facebook.react.ReactApplication; -import com.facebook.react.ReactNativeHost; -import com.facebook.react.ReactPackage; -import com.facebook.react.shell.MainReactPackage; - -import java.util.Arrays; -import java.util.List; - -import javax.annotation.Nullable; - -public class MoviesApplication extends Application implements ReactApplication { - private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { - @Override - public String getJSMainModuleName() { - return "Examples/Movies/MoviesApp.android"; - } - - @Override - public @Nullable String getBundleAssetName() { - return "MoviesApp.android.bundle"; - } - - @Override - public boolean getUseDeveloperSupport() { - return true; - } - - @Override - protected List getPackages() { - return Arrays.asList( - new MainReactPackage() - ); - } - }; - - @Override - public ReactNativeHost getReactNativeHost() { - return mReactNativeHost; - } -} diff --git a/Examples/Movies/android/app/src/main/res/drawable-hdpi/android_back_white.png b/Examples/Movies/android/app/src/main/res/drawable-hdpi/android_back_white.png deleted file mode 100644 index a34f0dbb8fd..00000000000 Binary files a/Examples/Movies/android/app/src/main/res/drawable-hdpi/android_back_white.png and /dev/null differ diff --git a/Examples/Movies/android/app/src/main/res/drawable-hdpi/android_search_white.png b/Examples/Movies/android/app/src/main/res/drawable-hdpi/android_search_white.png deleted file mode 100755 index 861b40db0d4..00000000000 Binary files a/Examples/Movies/android/app/src/main/res/drawable-hdpi/android_search_white.png and /dev/null differ diff --git a/Examples/Movies/android/app/src/main/res/drawable-mdpi/android_back_white.png b/Examples/Movies/android/app/src/main/res/drawable-mdpi/android_back_white.png deleted file mode 100644 index 63111599a3b..00000000000 Binary files a/Examples/Movies/android/app/src/main/res/drawable-mdpi/android_back_white.png and /dev/null differ diff --git a/Examples/Movies/android/app/src/main/res/drawable-mdpi/android_search_white.png b/Examples/Movies/android/app/src/main/res/drawable-mdpi/android_search_white.png deleted file mode 100755 index fedd0c623f5..00000000000 Binary files a/Examples/Movies/android/app/src/main/res/drawable-mdpi/android_search_white.png and /dev/null differ diff --git a/Examples/Movies/android/app/src/main/res/drawable-xhdpi/android_back_white.png b/Examples/Movies/android/app/src/main/res/drawable-xhdpi/android_back_white.png deleted file mode 100644 index 500892e105e..00000000000 Binary files a/Examples/Movies/android/app/src/main/res/drawable-xhdpi/android_back_white.png and /dev/null differ diff --git a/Examples/Movies/android/app/src/main/res/drawable-xhdpi/android_search_white.png b/Examples/Movies/android/app/src/main/res/drawable-xhdpi/android_search_white.png deleted file mode 100755 index 5713a86f632..00000000000 Binary files a/Examples/Movies/android/app/src/main/res/drawable-xhdpi/android_search_white.png and /dev/null differ diff --git a/Examples/Movies/android/app/src/main/res/drawable-xxhdpi/android_back_white.png b/Examples/Movies/android/app/src/main/res/drawable-xxhdpi/android_back_white.png deleted file mode 100644 index 03620979ea7..00000000000 Binary files a/Examples/Movies/android/app/src/main/res/drawable-xxhdpi/android_back_white.png and /dev/null differ diff --git a/Examples/Movies/android/app/src/main/res/drawable-xxhdpi/android_search_white.png b/Examples/Movies/android/app/src/main/res/drawable-xxhdpi/android_search_white.png deleted file mode 100755 index d9f75bc794e..00000000000 Binary files a/Examples/Movies/android/app/src/main/res/drawable-xxhdpi/android_search_white.png and /dev/null differ diff --git a/Examples/Movies/android/app/src/main/res/drawable/rotten_tomatoes_icon.png b/Examples/Movies/android/app/src/main/res/drawable/rotten_tomatoes_icon.png deleted file mode 100644 index 395d7043130..00000000000 Binary files a/Examples/Movies/android/app/src/main/res/drawable/rotten_tomatoes_icon.png and /dev/null differ diff --git a/Examples/Movies/android/app/src/main/res/layout/activity_main.xml b/Examples/Movies/android/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index d42c3b844e6..00000000000 --- a/Examples/Movies/android/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/Examples/Movies/android/app/src/main/res/values/strings.xml b/Examples/Movies/android/app/src/main/res/values/strings.xml deleted file mode 100644 index 7c4632e0d0e..00000000000 --- a/Examples/Movies/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - MoviesApp - diff --git a/Examples/Movies/android/app/src/main/res/values/styles.xml b/Examples/Movies/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 319eb0ca100..00000000000 --- a/Examples/Movies/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/Examples/Movies/getImageSource.js b/Examples/Movies/getImageSource.js deleted file mode 100644 index d2332625e6b..00000000000 --- a/Examples/Movies/getImageSource.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * @flow - * @providesModule getImageSource - */ -'use strict'; - -function getImageSource(movie: Object, kind: ?string): {uri: ?string} { - var uri = movie && movie.posters ? movie.posters.thumbnail : null; - if (uri && kind) { - uri = uri.replace('tmb', kind); - } - return { uri }; -} - -module.exports = getImageSource; diff --git a/Examples/Movies/getStyleFromScore.js b/Examples/Movies/getStyleFromScore.js deleted file mode 100644 index 553c0002b12..00000000000 --- a/Examples/Movies/getStyleFromScore.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * @flow - * @providesModule getStyleFromScore - */ -'use strict'; - -var ReactNative = require('react-native'); -var { - StyleSheet, -} = ReactNative; - -var MAX_VALUE = 200; - -import type { StyleObj } from 'StyleSheetTypes'; - -function getStyleFromScore(score: number): StyleObj { - if (score < 0) { - return styles.noScore; - } - - var normalizedScore = Math.round((score / 100) * MAX_VALUE); - return { - color: 'rgb(' + - (MAX_VALUE - normalizedScore) + ', ' + - normalizedScore + ', ' + - 0 + - ')' - }; -} - -var styles = StyleSheet.create({ - noScore: { - color: '#999999', - }, -}); - -module.exports = getStyleFromScore; diff --git a/Examples/Movies/getTextFromScore.js b/Examples/Movies/getTextFromScore.js deleted file mode 100644 index f36c22e3283..00000000000 --- a/Examples/Movies/getTextFromScore.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * @flow - * @providesModule getTextFromScore - */ -'use strict'; - -function getTextFromScore(score: number): string { - return score > 0 ? score + '%' : 'N/A'; -} - -module.exports = getTextFromScore; diff --git a/Examples/TicTacToe/TicTacToe.xcodeproj/project.pbxproj b/Examples/TicTacToe/TicTacToe.xcodeproj/project.pbxproj deleted file mode 100644 index f1f1514d32d..00000000000 --- a/Examples/TicTacToe/TicTacToe.xcodeproj/project.pbxproj +++ /dev/null @@ -1,518 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1341803E1AA91802003F314A /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1341803D1AA917ED003F314A /* libRCTImage.a */; }; - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 144C5F691AC3E5E300B004E7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 144C5F681AC3E5D800B004E7 /* libReact.a */; }; - 58C572511AA6229D00CDF9C8 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58C5724D1AA6224400CDF9C8 /* libRCTText.a */; }; - 5FF8942E1B85571A007731BE /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5FF8942D1B8556F8007731BE /* libRCTWebSocket.a */; }; - 832044981B492C2500E297FC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832044951B492C1E00E297FC /* libRCTSettings.a */; }; - E730D7731D4EE604000B7DA8 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E730D76E1D4EE5FC000B7DA8 /* libRCTNetwork.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1341803C1AA917ED003F314A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 134180381AA917ED003F314A /* RCTImage.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B5115D1A9E6B3D00147676; - remoteInfo = RCTImage; - }; - 144C5F671AC3E5D800B004E7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 144C5F631AC3E5D800B004E7 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; - remoteInfo = React; - }; - 58C5724C1AA6224400CDF9C8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 587650DA1A9EB0DB008B8F17 /* RCTText.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B5119B1A9E6C1200147676; - remoteInfo = RCTText; - }; - 5FF8942C1B8556F8007731BE /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5FF894281B8556F8007731BE /* RCTWebSocket.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3C86DF461ADF2C930047B81A; - remoteInfo = RCTWebSocket; - }; - 832044941B492C1E00E297FC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 8320448F1B492C1E00E297FC /* RCTSettings.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTSettings; - }; - E730D76D1D4EE5FC000B7DA8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = E730D7681D4EE5FC000B7DA8 /* RCTNetwork.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B511DB1A9E6C8500147676; - remoteInfo = RCTNetwork; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 134180381AA917ED003F314A /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = ../../Libraries/Image/RCTImage.xcodeproj; sourceTree = ""; }; - 13B07F961A680F5B00A75B9A /* TicTacToe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TicTacToe.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = TicTacToe/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = TicTacToe/AppDelegate.m; sourceTree = ""; }; - 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = TicTacToe/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = TicTacToe/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = TicTacToe/main.m; sourceTree = ""; }; - 144C5F631AC3E5D800B004E7 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = ../../React/React.xcodeproj; sourceTree = ""; }; - 587650DA1A9EB0DB008B8F17 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = ../../Libraries/Text/RCTText.xcodeproj; sourceTree = ""; }; - 5FF894281B8556F8007731BE /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = ../../Libraries/WebSocket/RCTWebSocket.xcodeproj; sourceTree = ""; }; - 8320448F1B492C1E00E297FC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = ../../Libraries/Settings/RCTSettings.xcodeproj; sourceTree = ""; }; - E730D7681D4EE5FC000B7DA8 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = ../../Libraries/Network/RCTNetwork.xcodeproj; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - E730D7731D4EE604000B7DA8 /* libRCTNetwork.a in Frameworks */, - 5FF8942E1B85571A007731BE /* libRCTWebSocket.a in Frameworks */, - 144C5F691AC3E5E300B004E7 /* libReact.a in Frameworks */, - 1341803E1AA91802003F314A /* libRCTImage.a in Frameworks */, - 58C572511AA6229D00CDF9C8 /* libRCTText.a in Frameworks */, - 832044981B492C2500E297FC /* libRCTSettings.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 134180391AA917ED003F314A /* Products */ = { - isa = PBXGroup; - children = ( - 1341803D1AA917ED003F314A /* libRCTImage.a */, - ); - name = Products; - sourceTree = ""; - }; - 13B07FAE1A68108700A75B9A /* TicTacToe */ = { - isa = PBXGroup; - children = ( - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.m */, - 13B07FB51A68108700A75B9A /* Images.xcassets */, - 13B07FB61A68108700A75B9A /* Info.plist */, - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, - 13B07FB71A68108700A75B9A /* main.m */, - ); - name = TicTacToe; - sourceTree = ""; - }; - 144C5F641AC3E5D800B004E7 /* Products */ = { - isa = PBXGroup; - children = ( - 144C5F681AC3E5D800B004E7 /* libReact.a */, - ); - name = Products; - sourceTree = ""; - }; - 58C572071AA6126D00CDF9C8 /* Libraries */ = { - isa = PBXGroup; - children = ( - E730D7681D4EE5FC000B7DA8 /* RCTNetwork.xcodeproj */, - 5FF894281B8556F8007731BE /* RCTWebSocket.xcodeproj */, - 144C5F631AC3E5D800B004E7 /* React.xcodeproj */, - 134180381AA917ED003F314A /* RCTImage.xcodeproj */, - 8320448F1B492C1E00E297FC /* RCTSettings.xcodeproj */, - 587650DA1A9EB0DB008B8F17 /* RCTText.xcodeproj */, - ); - name = Libraries; - sourceTree = ""; - }; - 58C572481AA6224300CDF9C8 /* Products */ = { - isa = PBXGroup; - children = ( - 58C5724D1AA6224400CDF9C8 /* libRCTText.a */, - ); - name = Products; - sourceTree = ""; - }; - 5FF894291B8556F8007731BE /* Products */ = { - isa = PBXGroup; - children = ( - 5FF8942D1B8556F8007731BE /* libRCTWebSocket.a */, - ); - name = Products; - sourceTree = ""; - }; - 832044901B492C1E00E297FC /* Products */ = { - isa = PBXGroup; - children = ( - 832044951B492C1E00E297FC /* libRCTSettings.a */, - ); - name = Products; - sourceTree = ""; - }; - 83CBB9F61A601CBA00E9B192 = { - isa = PBXGroup; - children = ( - 13B07FAE1A68108700A75B9A /* TicTacToe */, - 58C572071AA6126D00CDF9C8 /* Libraries */, - 83CBBA001A601CBA00E9B192 /* Products */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - }; - 83CBBA001A601CBA00E9B192 /* Products */ = { - isa = PBXGroup; - children = ( - 13B07F961A680F5B00A75B9A /* TicTacToe.app */, - ); - name = Products; - sourceTree = ""; - }; - E730D7691D4EE5FC000B7DA8 /* Products */ = { - isa = PBXGroup; - children = ( - E730D76E1D4EE5FC000B7DA8 /* libRCTNetwork.a */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 13B07F861A680F5B00A75B9A /* TicTacToe */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "TicTacToe" */; - buildPhases = ( - 13B07F871A680F5B00A75B9A /* Sources */, - 13B07F8C1A680F5B00A75B9A /* Frameworks */, - 13B07F8E1A680F5B00A75B9A /* Resources */, - 681C70ED1D2BE73C00E71791 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = TicTacToe; - productName = "Hello World"; - productReference = 13B07F961A680F5B00A75B9A /* TicTacToe.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 83CBB9F71A601CBA00E9B192 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0700; - ORGANIZATIONNAME = Facebook; - }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "TicTacToe" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 83CBB9F61A601CBA00E9B192; - productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 134180391AA917ED003F314A /* Products */; - ProjectRef = 134180381AA917ED003F314A /* RCTImage.xcodeproj */; - }, - { - ProductGroup = E730D7691D4EE5FC000B7DA8 /* Products */; - ProjectRef = E730D7681D4EE5FC000B7DA8 /* RCTNetwork.xcodeproj */; - }, - { - ProductGroup = 832044901B492C1E00E297FC /* Products */; - ProjectRef = 8320448F1B492C1E00E297FC /* RCTSettings.xcodeproj */; - }, - { - ProductGroup = 58C572481AA6224300CDF9C8 /* Products */; - ProjectRef = 587650DA1A9EB0DB008B8F17 /* RCTText.xcodeproj */; - }, - { - ProductGroup = 5FF894291B8556F8007731BE /* Products */; - ProjectRef = 5FF894281B8556F8007731BE /* RCTWebSocket.xcodeproj */; - }, - { - ProductGroup = 144C5F641AC3E5D800B004E7 /* Products */; - ProjectRef = 144C5F631AC3E5D800B004E7 /* React.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 13B07F861A680F5B00A75B9A /* TicTacToe */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 1341803D1AA917ED003F314A /* libRCTImage.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTImage.a; - remoteRef = 1341803C1AA917ED003F314A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 144C5F681AC3E5D800B004E7 /* libReact.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libReact.a; - remoteRef = 144C5F671AC3E5D800B004E7 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 58C5724D1AA6224400CDF9C8 /* libRCTText.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTText.a; - remoteRef = 58C5724C1AA6224400CDF9C8 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 5FF8942D1B8556F8007731BE /* libRCTWebSocket.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTWebSocket.a; - remoteRef = 5FF8942C1B8556F8007731BE /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 832044951B492C1E00E297FC /* libRCTSettings.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTSettings.a; - remoteRef = 832044941B492C1E00E297FC /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - E730D76E1D4EE5FC000B7DA8 /* libRCTNetwork.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTNetwork.a; - remoteRef = E730D76D1D4EE5FC000B7DA8 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 13B07F8E1A680F5B00A75B9A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 681C70ED1D2BE73C00E71791 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n$SRCROOT/../../packager/react-native-xcode.sh Examples/TicTacToe/TicTacToeApp.js\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 13B07F871A680F5B00A75B9A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 13B07FB21A68108700A75B9A /* Base */, - ); - name = LaunchScreen.xib; - path = TicTacToe; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 13B07F941A680F5B00A75B9A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../../React/**", - ); - INFOPLIST_FILE = "$(SRCROOT)/TicTacToe/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(inherited)"; - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = TicTacToe; - }; - name = Debug; - }; - 13B07F951A680F5B00A75B9A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../../React/**", - ); - INFOPLIST_FILE = "$(SRCROOT)/TicTacToe/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = "$(inherited)"; - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = TicTacToe; - }; - name = Release; - }; - 83CBBA201A601CBA00E9B192 /* 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; - ENABLE_TESTABILITY = 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; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../../React/**", - ); - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 83CBBA211A601CBA00E9B192 /* 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 = YES; - 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; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../../React/**", - ); - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "TicTacToe" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13B07F941A680F5B00A75B9A /* Debug */, - 13B07F951A680F5B00A75B9A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "TicTacToe" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83CBBA201A601CBA00E9B192 /* Debug */, - 83CBBA211A601CBA00E9B192 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} diff --git a/Examples/TicTacToe/TicTacToe.xcodeproj/xcshareddata/xcschemes/TicTacToe.xcscheme b/Examples/TicTacToe/TicTacToe.xcodeproj/xcshareddata/xcschemes/TicTacToe.xcscheme deleted file mode 100644 index 635a5380347..00000000000 --- a/Examples/TicTacToe/TicTacToe.xcodeproj/xcshareddata/xcschemes/TicTacToe.xcscheme +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Examples/TicTacToe/TicTacToe/AppDelegate.h b/Examples/TicTacToe/TicTacToe/AppDelegate.h deleted file mode 100644 index 1a4317567ce..00000000000 --- a/Examples/TicTacToe/TicTacToe/AppDelegate.h +++ /dev/null @@ -1,21 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -@interface AppDelegate : UIResponder - -@property (nonatomic, strong) UIWindow *window; - -@end diff --git a/Examples/TicTacToe/TicTacToe/AppDelegate.m b/Examples/TicTacToe/TicTacToe/AppDelegate.m deleted file mode 100644 index 3e7399917b5..00000000000 --- a/Examples/TicTacToe/TicTacToe/AppDelegate.m +++ /dev/null @@ -1,39 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "AppDelegate.h" - -#import "RCTBundleURLProvider.h" -#import "RCTRootView.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"Examples/TicTacToe/TicTacToeApp" fallbackResource:nil]; - - RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation - moduleName:@"TicTacToeApp" - initialProperties:nil - launchOptions:launchOptions]; - - self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; - UIViewController *rootViewController = [UIViewController new]; - rootViewController.view = rootView; - self.window.rootViewController = rootViewController; - [self.window makeKeyAndVisible]; - return YES; -} - -@end diff --git a/Examples/TicTacToe/TicTacToe/Base.lproj/LaunchScreen.xib b/Examples/TicTacToe/TicTacToe/Base.lproj/LaunchScreen.xib deleted file mode 100644 index c2d4e907904..00000000000 --- a/Examples/TicTacToe/TicTacToe/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Examples/TicTacToe/TicTacToe/Images.xcassets/AppIcon.appiconset/Contents.json b/Examples/TicTacToe/TicTacToe/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 118c98f7461..00000000000 --- a/Examples/TicTacToe/TicTacToe/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "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/TicTacToe/TicTacToe/Info.plist b/Examples/TicTacToe/TicTacToe/Info.plist deleted file mode 100644 index 25742279c9d..00000000000 --- a/Examples/TicTacToe/TicTacToe/Info.plist +++ /dev/null @@ -1,46 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - NSAppTransportSecurity - - - NSAllowsArbitraryLoads - - - - diff --git a/Examples/TicTacToe/TicTacToe/main.m b/Examples/TicTacToe/TicTacToe/main.m deleted file mode 100644 index 9c58a39a483..00000000000 --- a/Examples/TicTacToe/TicTacToe/main.m +++ /dev/null @@ -1,22 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/Examples/TicTacToe/TicTacToeApp.js b/Examples/TicTacToe/TicTacToeApp.js deleted file mode 100755 index 17d41a7e675..00000000000 --- a/Examples/TicTacToe/TicTacToeApp.js +++ /dev/null @@ -1,327 +0,0 @@ -/** - * Copyright (c) 2013-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. - * - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * @providesModule TicTacToeApp - * @flow - */ -'use strict'; - -var React = require('react'); -var ReactNative = require('react-native'); -var { - AppRegistry, - StyleSheet, - Text, - TouchableHighlight, - View, -} = ReactNative; - -class Board { - grid: Array>; - turn: number; - - constructor() { - var size = 3; - var grid = Array(size); - for (var i = 0; i < size; i++) { - var row = Array(size); - for (var j = 0; j < size; j++) { - row[j] = 0; - } - grid[i] = row; - } - this.grid = grid; - - this.turn = 1; - } - - mark(row: number, col: number, player: number): Board { - this.grid[row][col] = player; - return this; - } - - hasMark(row: number, col: number): boolean { - return this.grid[row][col] !== 0; - } - - winner(): ?number { - for (var i = 0; i < 3; i++) { - if (this.grid[i][0] !== 0 && this.grid[i][0] === this.grid[i][1] && - this.grid[i][0] === this.grid[i][2]) { - return this.grid[i][0]; - } - } - - for (var i = 0; i < 3; i++) { - if (this.grid[0][i] !== 0 && this.grid[0][i] === this.grid[1][i] && - this.grid[0][i] === this.grid[2][i]) { - return this.grid[0][i]; - } - } - - if (this.grid[0][0] !== 0 && this.grid[0][0] === this.grid[1][1] && - this.grid[0][0] === this.grid[2][2]) { - return this.grid[0][0]; - } - - if (this.grid[0][2] !== 0 && this.grid[0][2] === this.grid[1][1] && - this.grid[0][2] === this.grid[2][0]) { - return this.grid[0][2]; - } - - return null; - } - - tie(): boolean { - for (var i = 0; i < 3; i++) { - for (var j = 0; j < 3; j++) { - if (this.grid[i][j] === 0) { - return false; - } - } - } - return this.winner() === null; - } -} - -class Cell extends React.Component { - cellStyle() { - switch (this.props.player) { - case 1: - return styles.cellX; - case 2: - return styles.cellO; - default: - return null; - } - } - - textStyle() { - switch (this.props.player) { - case 1: - return styles.cellTextX; - case 2: - return styles.cellTextO; - default: - return {}; - } - } - - textContents() { - switch (this.props.player) { - case 1: - return 'X'; - case 2: - return 'O'; - default: - return ''; - } - } - - render() { - return ( - - - - {this.textContents()} - - - - ); - } -} - -class GameEndOverlay extends React.Component { - render() { - var board = this.props.board; - - var tie = board.tie(); - var winner = board.winner(); - if (!winner && !tie) { - return null; - } - - var message; - if (tie) { - message = 'It\'s a tie!'; - } else { - message = (winner === 1 ? 'X' : 'O') + ' wins!'; - } - - return ( - - {message} - - - New Game - - - - ); - } -} - -var TicTacToeApp = React.createClass({ - getInitialState() { - return { board: new Board(), player: 1 }; - }, - - restartGame() { - this.setState(this.getInitialState()); - }, - - nextPlayer(): number { - return this.state.player === 1 ? 2 : 1; - }, - - handleCellPress(row: number, col: number) { - if (this.state.board.hasMark(row, col)) { - return; - } - - this.setState({ - board: this.state.board.mark(row, col, this.state.player), - player: this.nextPlayer(), - }); - }, - - render() { - var rows = this.state.board.grid.map((cells, row) => - - {cells.map((player, col) => - - )} - - ); - - return ( - - EXTREME T3 - - {rows} - - - - ); - } -}); - -var styles = StyleSheet.create({ - container: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: 'white' - }, - title: { - fontFamily: 'Chalkduster', - fontSize: 39, - marginBottom: 20, - }, - board: { - padding: 5, - backgroundColor: '#47525d', - borderRadius: 10, - }, - row: { - flexDirection: 'row', - }, - - // CELL - - cell: { - width: 80, - height: 80, - borderRadius: 5, - backgroundColor: '#7b8994', - margin: 5, - justifyContent: 'center', - alignItems: 'center', - }, - cellX: { - backgroundColor: '#72d0eb', - }, - cellO: { - backgroundColor: '#7ebd26', - }, - - // CELL TEXT - - cellText: { - fontSize: 50, - fontFamily: 'AvenirNext-Bold', - }, - cellTextX: { - color: '#19a9e5', - }, - cellTextO: { - color: '#b9dc2f', - }, - - // GAME OVER - - overlay: { - position: 'absolute', - top: 0, - bottom: 0, - left: 0, - right: 0, - backgroundColor: 'rgba(221, 221, 221, 0.5)', - flex: 1, - flexDirection: 'column', - justifyContent: 'center', - alignItems: 'center', - }, - overlayMessage: { - fontSize: 40, - marginBottom: 20, - marginLeft: 20, - marginRight: 20, - fontFamily: 'AvenirNext-DemiBold', - textAlign: 'center', - }, - newGame: { - backgroundColor: '#887765', - padding: 20, - borderRadius: 5, - }, - newGameText: { - color: 'white', - fontSize: 20, - fontFamily: 'AvenirNext-DemiBold', - }, -}); - -AppRegistry.registerComponent('TicTacToeApp', () => TicTacToeApp); - -module.exports = TicTacToeApp; diff --git a/Examples/TicTacToe/android/app/BUCK b/Examples/TicTacToe/android/app/BUCK deleted file mode 100644 index 3dae6c388d4..00000000000 --- a/Examples/TicTacToe/android/app/BUCK +++ /dev/null @@ -1,31 +0,0 @@ -include_defs("//ReactAndroid/DEFS") - -android_binary( - name = "app", - keystore = "//keystores:debug", - manifest = "src/main/AndroidManifest.xml", - deps = [ - ":tictactoe-lib", - ], -) - -android_library( - name = "tictactoe-lib", - srcs = glob(["src/main/java/**/*.java"]), - deps = [ - ":res", - react_native_dep("third-party/java/jsr-305:jsr-305"), - react_native_target("java/com/facebook/react:react"), - react_native_target("java/com/facebook/react/modules/core:core"), - react_native_target("java/com/facebook/react/shell:shell"), - react_native_target("jni/prebuilt:android-jsc"), - # .so files are prebuilt by Gradle with `./gradlew :ReactAndroid:packageReactNdkLibsForBuck` - react_native_target("jni/prebuilt:reactnative-libs"), - ], -) - -android_resource( - name = "res", - package = "com.facebook.react.tictactoe", - res = "src/main/res", -) diff --git a/Examples/TicTacToe/android/app/build.gradle b/Examples/TicTacToe/android/app/build.gradle deleted file mode 100644 index 94509eca564..00000000000 --- a/Examples/TicTacToe/android/app/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -apply plugin: 'com.android.application' - -android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" - - defaultConfig { - applicationId "com.facebook.react.tictactoe" - minSdkVersion 16 - targetSdkVersion 22 - versionCode 1 - versionName "1.0" - ndk { - abiFilters "armeabi-v7a", "x86" - } - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:23.0.1' - - // Build React Native from source - compile project(':ReactAndroid') -} diff --git a/Examples/TicTacToe/android/app/gradle.properties b/Examples/TicTacToe/android/app/gradle.properties deleted file mode 100644 index dfbe478748b..00000000000 --- a/Examples/TicTacToe/android/app/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -android.useDeprecatedNdk=true diff --git a/Examples/TicTacToe/android/app/proguard-rules.pro b/Examples/TicTacToe/android/app/proguard-rules.pro deleted file mode 100644 index a92fa177ee4..00000000000 --- a/Examples/TicTacToe/android/app/proguard-rules.pro +++ /dev/null @@ -1,17 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/Examples/TicTacToe/android/app/src/main/AndroidManifest.xml b/Examples/TicTacToe/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index a6dbe21557a..00000000000 --- a/Examples/TicTacToe/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/Examples/TicTacToe/android/app/src/main/java/com/facebook/react/tictactoe/TicTacToeActivity.java b/Examples/TicTacToe/android/app/src/main/java/com/facebook/react/tictactoe/TicTacToeActivity.java deleted file mode 100644 index 3589ea4e5a6..00000000000 --- a/Examples/TicTacToe/android/app/src/main/java/com/facebook/react/tictactoe/TicTacToeActivity.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -package com.facebook.react.tictactoe; - -import com.facebook.react.ReactActivity; - -public class TicTacToeActivity extends ReactActivity { - @Override - protected String getMainComponentName() { - return "TicTacToeApp"; - } -} diff --git a/Examples/TicTacToe/android/app/src/main/java/com/facebook/react/tictactoe/TicTacToeApplication.java b/Examples/TicTacToe/android/app/src/main/java/com/facebook/react/tictactoe/TicTacToeApplication.java deleted file mode 100644 index c765a847cf3..00000000000 --- a/Examples/TicTacToe/android/app/src/main/java/com/facebook/react/tictactoe/TicTacToeApplication.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * The examples provided by Facebook are for non-commercial testing and - * evaluation purposes only. - * - * Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -package com.facebook.react.tictactoe; - -import android.app.Application; - -import com.facebook.react.ReactApplication; -import com.facebook.react.ReactNativeHost; -import com.facebook.react.ReactPackage; -import com.facebook.react.shell.MainReactPackage; - -import java.util.Arrays; -import java.util.List; - -import javax.annotation.Nullable; - -public class TicTacToeApplication extends Application implements ReactApplication { - private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { - @Override - public String getJSMainModuleName() { - return "Examples/TicTacToe/TicTacToeApp"; - } - - @Override - public @Nullable String getBundleAssetName() { - return "TicTacToeApp.bundle"; - } - - @Override - public boolean getUseDeveloperSupport() { - return true; - } - - @Override - protected List getPackages() { - return Arrays.asList( - new MainReactPackage() - ); - } - }; - - @Override - public ReactNativeHost getReactNativeHost() { - return mReactNativeHost; - } -} diff --git a/Examples/TicTacToe/android/app/src/main/res/drawable/launcher_icon.png b/Examples/TicTacToe/android/app/src/main/res/drawable/launcher_icon.png deleted file mode 100644 index a4aa3bd6d9a..00000000000 Binary files a/Examples/TicTacToe/android/app/src/main/res/drawable/launcher_icon.png and /dev/null differ diff --git a/Examples/TicTacToe/android/app/src/main/res/layout/activity_main.xml b/Examples/TicTacToe/android/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index 7d338d621d0..00000000000 --- a/Examples/TicTacToe/android/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/Examples/TicTacToe/android/app/src/main/res/values/strings.xml b/Examples/TicTacToe/android/app/src/main/res/values/strings.xml deleted file mode 100644 index 26cdf63c684..00000000000 --- a/Examples/TicTacToe/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - TicTacToeApp - diff --git a/Examples/TicTacToe/android/app/src/main/res/values/styles.xml b/Examples/TicTacToe/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 319eb0ca100..00000000000 --- a/Examples/TicTacToe/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - -