From 6ff7c459e3d08ebdf6da6973ebe0410b5cab9c0a Mon Sep 17 00:00:00 2001 From: Alberto-Duarte Date: Thu, 11 May 2023 11:40:35 +0100 Subject: first commit --- ios/reactnativeapp/AppDelegate.h | 6 +++ ios/reactnativeapp/AppDelegate.mm | 36 ++++++++++++++ .../AppIcon.appiconset/Contents.json | 53 +++++++++++++++++++++ ios/reactnativeapp/Images.xcassets/Contents.json | 6 +++ ios/reactnativeapp/Info.plist | 55 ++++++++++++++++++++++ ios/reactnativeapp/LaunchScreen.storyboard | 47 ++++++++++++++++++ ios/reactnativeapp/main.m | 10 ++++ 7 files changed, 213 insertions(+) create mode 100644 ios/reactnativeapp/AppDelegate.h create mode 100644 ios/reactnativeapp/AppDelegate.mm create mode 100644 ios/reactnativeapp/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 ios/reactnativeapp/Images.xcassets/Contents.json create mode 100644 ios/reactnativeapp/Info.plist create mode 100644 ios/reactnativeapp/LaunchScreen.storyboard create mode 100644 ios/reactnativeapp/main.m (limited to 'ios/reactnativeapp') diff --git a/ios/reactnativeapp/AppDelegate.h b/ios/reactnativeapp/AppDelegate.h new file mode 100644 index 0000000..5d28082 --- /dev/null +++ b/ios/reactnativeapp/AppDelegate.h @@ -0,0 +1,6 @@ +#import +#import + +@interface AppDelegate : RCTAppDelegate + +@end diff --git a/ios/reactnativeapp/AppDelegate.mm b/ios/reactnativeapp/AppDelegate.mm new file mode 100644 index 0000000..3ef3d80 --- /dev/null +++ b/ios/reactnativeapp/AppDelegate.mm @@ -0,0 +1,36 @@ +#import "AppDelegate.h" + +#import + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + self.moduleName = @"reactnativeapp"; + // You can add your custom initial props in the dictionary below. + // They will be passed down to the ViewController used by React Native. + self.initialProps = @{}; + + return [super application:application didFinishLaunchingWithOptions:launchOptions]; +} + +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ +#if DEBUG + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; +#else + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif +} + +/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. +/// +/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html +/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). +/// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`. +- (BOOL)concurrentRootEnabled +{ + return true; +} + +@end diff --git a/ios/reactnativeapp/Images.xcassets/AppIcon.appiconset/Contents.json b/ios/reactnativeapp/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..8121323 --- /dev/null +++ b/ios/reactnativeapp/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,53 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/reactnativeapp/Images.xcassets/Contents.json b/ios/reactnativeapp/Images.xcassets/Contents.json new file mode 100644 index 0000000..2d92bd5 --- /dev/null +++ b/ios/reactnativeapp/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/reactnativeapp/Info.plist b/ios/reactnativeapp/Info.plist new file mode 100644 index 0000000..03f1ad4 --- /dev/null +++ b/ios/reactnativeapp/Info.plist @@ -0,0 +1,55 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + reactnativeapp + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSExceptionDomains + + localhost + + NSExceptionAllowsInsecureHTTPLoads + + + + + NSLocationWhenInUseUsageDescription + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/ios/reactnativeapp/LaunchScreen.storyboard b/ios/reactnativeapp/LaunchScreen.storyboard new file mode 100644 index 0000000..5922380 --- /dev/null +++ b/ios/reactnativeapp/LaunchScreen.storyboard @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/reactnativeapp/main.m b/ios/reactnativeapp/main.m new file mode 100644 index 0000000..d645c72 --- /dev/null +++ b/ios/reactnativeapp/main.m @@ -0,0 +1,10 @@ +#import + +#import "AppDelegate.h" + +int main(int argc, char *argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} -- cgit v1.2.3-54-g00ecf