diff --git a/components/FileList/view.js b/components/FileList/view.js index e617704..6a78d50 100644 --- a/components/FileList/view.js +++ b/components/FileList/view.js @@ -9,6 +9,7 @@ import React, { TouchableNativeFeedback, RecyclerViewBackedScrollView } from 'react-native'; +import TouchableFeedback from '../TouchableFeedback'; var navBgColor = '#00aa00'; @@ -78,11 +79,11 @@ export default class FileList extends Component { _renderRow = (rowData, sectionID, rowID) => { return ( - + {rowData} - + ); }; diff --git a/components/TouchableFeedback.android.js b/components/TouchableFeedback.android.js new file mode 100644 index 0000000..62aab1f --- /dev/null +++ b/components/TouchableFeedback.android.js @@ -0,0 +1,5 @@ +import React, {TouchableNativeFeedback} from 'react-native'; + +export default (props) => { + return {props.children} +}; diff --git a/components/TouchableFeedback.ios.js b/components/TouchableFeedback.ios.js new file mode 100644 index 0000000..f679374 --- /dev/null +++ b/components/TouchableFeedback.ios.js @@ -0,0 +1,5 @@ +import React, {TouchableHighlight} from 'react-native'; + +export default (props) => { + return {props.children} +}; diff --git a/index.ios.js b/index.ios.js index dbb13bc..9ec1eac 100644 --- a/index.ios.js +++ b/index.ios.js @@ -1,52 +1,15 @@ -/** - * Sample React Native App - * https://github.com/facebook/react-native - */ -'use strict'; import React, { AppRegistry, - Component, - StyleSheet, - Text, - View + Component } from 'react-native'; +import App from './components/App'; class koandeck extends Component { - render() { + render(){ return ( - - - Welcome to React Native! - - - To get started, edit index.ios.js - - - Press Cmd+R to reload,{'\n'} - Cmd+D or shake for dev menu - - + ); } } -const styles = StyleSheet.create({ - container: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: '#F5FCFF', - }, - welcome: { - fontSize: 20, - textAlign: 'center', - margin: 10, - }, - instructions: { - textAlign: 'center', - color: '#333333', - marginBottom: 5, - }, -}); - AppRegistry.registerComponent('koandeck', () => koandeck); diff --git a/ios/RCTOrientation/Orientation.h b/ios/RCTOrientation/Orientation.h new file mode 100644 index 0000000..35955e2 --- /dev/null +++ b/ios/RCTOrientation/Orientation.h @@ -0,0 +1,19 @@ +// +// Orientation.h +// + +#import +#import +#import "RCTBridgeModule.h" +#import "RCTBridge.h" +#import "RCTEventDispatcher.h" +#import "AppDelegate.h" + +@interface Orientation : NSObject ++ (void)setOrientation: (UIInterfaceOrientationMask)orientation; ++ (UIInterfaceOrientationMask)getOrientation; +@end + +@interface AppDelegate (Orientation) + +@end diff --git a/ios/RCTOrientation/Orientation.m b/ios/RCTOrientation/Orientation.m new file mode 100644 index 0000000..fce0ebe --- /dev/null +++ b/ios/RCTOrientation/Orientation.m @@ -0,0 +1,191 @@ +// +// Orientation.m +// + +#import "Orientation.h" +#import "AppDelegate.h" + + +@implementation AppDelegate (Orientation) + +- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window { + return [Orientation getOrientation]; +} + +@end + + +@implementation Orientation + +@synthesize bridge = _bridge; + +static UIInterfaceOrientationMask _orientation = UIInterfaceOrientationMaskAllButUpsideDown; ++ (void)setOrientation: (UIInterfaceOrientationMask)orientation { + _orientation = orientation; +} ++ (UIInterfaceOrientationMask)getOrientation { + return _orientation; +} + +- (instancetype)init +{ + if ((self = [super init])) { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deviceOrientationDidChange:) name:@"UIDeviceOrientationDidChangeNotification" object:nil]; + } + return self; + +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (void)deviceOrientationDidChange:(NSNotification *)notification +{ + UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; + [_bridge.eventDispatcher sendDeviceEventWithName:@"specificOrientationDidChange" + body:@{@"specificOrientation": [self getSpecificOrientationStr:orientation]}]; + + [_bridge.eventDispatcher sendDeviceEventWithName:@"orientationDidChange" + body:@{@"orientation": [self getOrientationStr:orientation]}]; + +} + +- (NSString *)getOrientationStr: (UIDeviceOrientation)orientation { + NSString *orientationStr; + switch (orientation) { + case UIDeviceOrientationPortrait: + orientationStr = @"PORTRAIT"; + break; + case UIDeviceOrientationLandscapeLeft: + case UIDeviceOrientationLandscapeRight: + + orientationStr = @"LANDSCAPE"; + break; + + case UIDeviceOrientationPortraitUpsideDown: + orientationStr = @"PORTRAITUPSIDEDOWN"; + break; + + default: + orientationStr = @"UNKNOWN"; + break; + } + return orientationStr; +} + +- (NSString *)getSpecificOrientationStr: (UIDeviceOrientation)orientation { + NSString *orientationStr; + switch (orientation) { + case UIDeviceOrientationPortrait: + orientationStr = @"PORTRAIT"; + break; + + case UIDeviceOrientationLandscapeLeft: + orientationStr = @"LANDSCAPE-LEFT"; + break; + + case UIDeviceOrientationLandscapeRight: + orientationStr = @"LANDSCAPE-RIGHT"; + break; + + case UIDeviceOrientationPortraitUpsideDown: + orientationStr = @"PORTRAITUPSIDEDOWN"; + break; + + default: + orientationStr = @"UNKNOWN"; + break; + } + return orientationStr; +} + +RCT_EXPORT_MODULE(); + +RCT_EXPORT_METHOD(getOrientation:(RCTResponseSenderBlock)callback) +{ + UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; + NSString *orientationStr = [self getOrientationStr:orientation]; + callback(@[[NSNull null], orientationStr]); +} + +RCT_EXPORT_METHOD(getSpecificOrientation:(RCTResponseSenderBlock)callback) +{ + UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; + NSString *orientationStr = [self getSpecificOrientationStr:orientation]; + callback(@[[NSNull null], orientationStr]); +} + +RCT_EXPORT_METHOD(lockToPortrait) +{ + #if DEBUG + NSLog(@"Locked to Portrait"); + #endif + [Orientation setOrientation:UIInterfaceOrientationMaskPortrait]; + [[NSOperationQueue mainQueue] addOperationWithBlock:^ { + [[UIDevice currentDevice] setValue:[NSNumber numberWithInteger: UIInterfaceOrientationPortrait] forKey:@"orientation"]; + }]; + +} + +RCT_EXPORT_METHOD(lockToLandscape) +{ + #if DEBUG + NSLog(@"Locked to Landscape"); + #endif + [Orientation setOrientation:UIInterfaceOrientationMaskLandscape]; + [[NSOperationQueue mainQueue] addOperationWithBlock:^ { + [[UIDevice currentDevice] setValue:[NSNumber numberWithInteger: UIInterfaceOrientationLandscapeLeft] forKey:@"orientation"]; + }]; + +} + +RCT_EXPORT_METHOD(lockToLandscapeRight) +{ + #if DEBUG + NSLog(@"Locked to Landscape Right"); + #endif + [Orientation setOrientation:UIInterfaceOrientationMaskLandscapeLeft]; + [[NSOperationQueue mainQueue] addOperationWithBlock:^ { + [[UIDevice currentDevice] setValue:[NSNumber numberWithInteger: UIInterfaceOrientationLandscapeLeft] forKey:@"orientation"]; + }]; + +} + +RCT_EXPORT_METHOD(lockToLandscapeLeft) +{ + #if DEBUG + NSLog(@"Locked to Landscape Left"); + #endif + [Orientation setOrientation:UIInterfaceOrientationMaskLandscapeRight]; + [[NSOperationQueue mainQueue] addOperationWithBlock:^ { + // this seems counter intuitive + [[UIDevice currentDevice] setValue:[NSNumber numberWithInteger: UIInterfaceOrientationLandscapeRight] forKey:@"orientation"]; + }]; + +} + +RCT_EXPORT_METHOD(unlockAllOrientations) +{ + #if DEBUG + NSLog(@"Unlock All Orientations"); + #endif + [Orientation setOrientation:UIInterfaceOrientationMaskAllButUpsideDown]; +// AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; +// delegate.orientation = 3; +} + +- (NSDictionary *)constantsToExport +{ + + UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; + NSString *orientationStr = [self getOrientationStr:orientation]; + + return @{ + @"initialOrientation": orientationStr + }; +} + +@end + diff --git a/ios/koandeck.xcodeproj/project.pbxproj b/ios/koandeck.xcodeproj/project.pbxproj index 3440930..8088234 100644 --- a/ios/koandeck.xcodeproj/project.pbxproj +++ b/ios/koandeck.xcodeproj/project.pbxproj @@ -22,6 +22,7 @@ 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; + BEBFD3F81CA9504500B2BAD7 /* Orientation.m in Sources */ = {isa = PBXBuildFile; fileRef = BEBFD3F71CA9504500B2BAD7 /* Orientation.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -105,17 +106,17 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = main.jsbundle; sourceTree = ""; }; - 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = ../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj; sourceTree = ""; }; - 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = ../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj; sourceTree = ""; }; - 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = ../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj; sourceTree = ""; }; - 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = ../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj; sourceTree = ""; }; - 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = ../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj; sourceTree = ""; }; + 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; + 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; + 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; + 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; + 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; + 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 00E356EE1AD99517003FC87E /* koandeckTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = koandeckTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 00E356F21AD99517003FC87E /* koandeckTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = koandeckTests.m; sourceTree = ""; }; - 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = ../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj; sourceTree = ""; }; - 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = ../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj; sourceTree = ""; }; + 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; + 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* koandeck.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = koandeck.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = koandeck/AppDelegate.h; sourceTree = ""; }; 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = koandeck/AppDelegate.m; sourceTree = ""; }; @@ -123,9 +124,11 @@ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = koandeck/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = koandeck/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = koandeck/main.m; sourceTree = ""; }; - 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = ../node_modules/react-native/React/React.xcodeproj; sourceTree = ""; }; - 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = ../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj; sourceTree = ""; }; - 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = ../node_modules/react-native/Libraries/Text/RCTText.xcodeproj; sourceTree = ""; }; + 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; + 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; + 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; + BEBFD3F61CA9504500B2BAD7 /* Orientation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Orientation.h; sourceTree = ""; }; + BEBFD3F71CA9504500B2BAD7 /* Orientation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Orientation.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -287,6 +290,7 @@ 83CBB9F61A601CBA00E9B192 = { isa = PBXGroup; children = ( + BEBFD3F51CA9504500B2BAD7 /* RCTOrientation */, 13B07FAE1A68108700A75B9A /* koandeck */, 832341AE1AAA6A7D00B99B32 /* Libraries */, 00E356EF1AD99517003FC87E /* koandeckTests */, @@ -305,6 +309,15 @@ name = Products; sourceTree = ""; }; + BEBFD3F51CA9504500B2BAD7 /* RCTOrientation */ = { + isa = PBXGroup; + children = ( + BEBFD3F61CA9504500B2BAD7 /* Orientation.h */, + BEBFD3F71CA9504500B2BAD7 /* Orientation.m */, + ); + path = RCTOrientation; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -326,9 +339,9 @@ productReference = 00E356EE1AD99517003FC87E /* koandeckTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - 13B07F861A680F5B00A75B9A /* koandeck */ = { + 13B07F861A680F5B00A75B9A /* Koan Deck */ = { isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "koandeck" */; + buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Koan Deck" */; buildPhases = ( 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, @@ -339,7 +352,7 @@ ); dependencies = ( ); - name = koandeck; + name = "Koan Deck"; productName = "Hello World"; productReference = 13B07F961A680F5B00A75B9A /* koandeck.app */; productType = "com.apple.product-type.application"; @@ -357,6 +370,9 @@ CreatedOnToolsVersion = 6.2; TestTargetID = 13B07F861A680F5B00A75B9A; }; + 13B07F861A680F5B00A75B9A = { + DevelopmentTeam = RT44NCJNJ3; + }; }; }; buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "koandeck" */; @@ -414,7 +430,7 @@ ); projectRoot = ""; targets = ( - 13B07F861A680F5B00A75B9A /* koandeck */, + 13B07F861A680F5B00A75B9A /* Koan Deck */, 00E356ED1AD99517003FC87E /* koandeckTests */, ); }; @@ -526,7 +542,6 @@ runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh"; - showEnvVarsInLog = 1; }; /* End PBXShellScriptBuildPhase section */ @@ -545,6 +560,7 @@ files = ( 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 13B07FC11A68108700A75B9A /* main.m in Sources */, + BEBFD3F81CA9504500B2BAD7 /* Orientation.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -553,7 +569,7 @@ /* Begin PBXTargetDependency section */ 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 13B07F861A680F5B00A75B9A /* koandeck */; + target = 13B07F861A680F5B00A75B9A /* Koan Deck */; targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -612,16 +628,19 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; DEAD_CODE_STRIPPING = NO; HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "$(SRCROOT)/../node_modules/react-native/React/**", ); - INFOPLIST_FILE = "koandeck/Info.plist"; + INFOPLIST_FILE = koandeck/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = "-ObjC"; + PRODUCT_BUNDLE_IDENTIFIER = th.in.whs.koandeck; PRODUCT_NAME = koandeck; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; @@ -629,15 +648,18 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_IDENTITY = "iPhone Developer"; HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "$(SRCROOT)/../node_modules/react-native/React/**", ); - INFOPLIST_FILE = "koandeck/Info.plist"; + INFOPLIST_FILE = koandeck/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = "-ObjC"; + PRODUCT_BUNDLE_IDENTIFIER = th.in.whs.koandeck; PRODUCT_NAME = koandeck; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; @@ -739,7 +761,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "koandeck" */ = { + 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Koan Deck" */ = { isa = XCConfigurationList; buildConfigurations = ( 13B07F941A680F5B00A75B9A /* Debug */, diff --git a/ios/koandeck.xcodeproj/xcshareddata/xcschemes/koandeck.xcscheme b/ios/koandeck.xcodeproj/xcshareddata/xcschemes/koandeck.xcscheme index 648b61d..338f7ec 100644 --- a/ios/koandeck.xcodeproj/xcshareddata/xcschemes/koandeck.xcscheme +++ b/ios/koandeck.xcodeproj/xcshareddata/xcschemes/koandeck.xcscheme @@ -16,7 +16,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "13B07F861A680F5B00A75B9A" BuildableName = "koandeck.app" - BlueprintName = "koandeck" + BlueprintName = "Koan Deck" ReferencedContainer = "container:koandeck.xcodeproj"> @@ -37,10 +37,10 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -58,19 +58,22 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "13B07F861A680F5B00A75B9A" BuildableName = "koandeck.app" - BlueprintName = "koandeck" + BlueprintName = "Koan Deck" ReferencedContainer = "container:koandeck.xcodeproj"> + + @@ -78,7 +81,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "13B07F861A680F5B00A75B9A" BuildableName = "koandeck.app" - BlueprintName = "koandeck" + BlueprintName = "Koan Deck" ReferencedContainer = "container:koandeck.xcodeproj"> @@ -86,10 +89,10 @@ @@ -97,7 +100,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "13B07F861A680F5B00A75B9A" BuildableName = "koandeck.app" - BlueprintName = "koandeck" + BlueprintName = "Koan Deck" ReferencedContainer = "container:koandeck.xcodeproj"> diff --git a/ios/koandeck/AppDelegate.m b/ios/koandeck/AppDelegate.m index f911d9a..3b10ebd 100644 --- a/ios/koandeck/AppDelegate.m +++ b/ios/koandeck/AppDelegate.m @@ -31,7 +31,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( * on the same Wi-Fi network. */ - jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"]; + jsCodeLocation = [NSURL URLWithString:@"http://ushio.local:8081/index.ios.bundle?platform=ios&dev=true"]; /** * OPTION 2 diff --git a/ios/koandeck/Base.lproj/LaunchScreen.xib b/ios/koandeck/Base.lproj/LaunchScreen.xib index ed81856..b823fc9 100644 --- a/ios/koandeck/Base.lproj/LaunchScreen.xib +++ b/ios/koandeck/Base.lproj/LaunchScreen.xib @@ -1,8 +1,8 @@ - + - + diff --git a/ios/koandeck/Info.plist b/ios/koandeck/Info.plist index 91963b2..f94ad41 100644 --- a/ios/koandeck/Info.plist +++ b/ios/koandeck/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -22,6 +22,13 @@ 1 LSRequiresIPhoneOS + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSLocationWhenInUseUsageDescription + UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities @@ -34,15 +41,14 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortraitUpsideDown + UIViewControllerBasedStatusBarAppearance - NSLocationWhenInUseUsageDescription - - NSAppTransportSecurity - - - NSAllowsArbitraryLoads - -