diff options
Diffstat (limited to 'src/react-native-app/ios/reactnativeapp')
17 files changed, 342 insertions, 0 deletions
diff --git a/src/react-native-app/ios/reactnativeapp/AppDelegate.h b/src/react-native-app/ios/reactnativeapp/AppDelegate.h new file mode 100644 index 0000000..99b0e89 --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/AppDelegate.h @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +#import <RCTAppDelegate.h> +#import <UIKit/UIKit.h> +#import <Expo/Expo.h> + +@interface AppDelegate : EXAppDelegateWrapper + +@end diff --git a/src/react-native-app/ios/reactnativeapp/AppDelegate.mm b/src/react-native-app/ios/reactnativeapp/AppDelegate.mm new file mode 100644 index 0000000..b27f832 --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/AppDelegate.mm @@ -0,0 +1,62 @@ +#import "AppDelegate.h" + +#import <React/RCTBundleURLProvider.h> +#import <React/RCTLinkingManager.h> + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + self.moduleName = @"main"; + + // 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 +{ + return [self bundleURL]; +} + +- (NSURL *)bundleURL +{ +#if DEBUG + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@".expo/.virtual-metro-entry"]; +#else + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif +} + +// Linking API +- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options { + return [super application:application openURL:url options:options] || [RCTLinkingManager application:application openURL:url options:options]; +} + +// Universal Links +- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler { + BOOL result = [RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler]; + return [super application:application continueUserActivity:userActivity restorationHandler:restorationHandler] || result; +} + +// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries +- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken +{ + return [super application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; +} + +// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries +- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error +{ + return [super application:application didFailToRegisterForRemoteNotificationsWithError:error]; +} + +// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler +{ + return [super application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler]; +} + +@end diff --git a/src/react-native-app/ios/reactnativeapp/Images.xcassets/AppIcon.appiconset/App-Icon-1024x1024@1x.png b/src/react-native-app/ios/reactnativeapp/Images.xcassets/AppIcon.appiconset/App-Icon-1024x1024@1x.png Binary files differnew file mode 100644 index 0000000..104d8ef --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/Images.xcassets/AppIcon.appiconset/App-Icon-1024x1024@1x.png diff --git a/src/react-native-app/ios/reactnativeapp/Images.xcassets/AppIcon.appiconset/Contents.json b/src/react-native-app/ios/reactnativeapp/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..5f6956c --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images": [ + { + "filename": "App-Icon-1024x1024@1x.png", + "idiom": "universal", + "platform": "ios", + "size": "1024x1024" + } + ], + "info": { + "version": 1, + "author": "expo" + } +} diff --git a/src/react-native-app/ios/reactnativeapp/Images.xcassets/Contents.json b/src/react-native-app/ios/reactnativeapp/Images.xcassets/Contents.json new file mode 100644 index 0000000..ed285c2 --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "expo" + } +} diff --git a/src/react-native-app/ios/reactnativeapp/Images.xcassets/SplashScreen.imageset/Contents.json b/src/react-native-app/ios/reactnativeapp/Images.xcassets/SplashScreen.imageset/Contents.json new file mode 100644 index 0000000..7d28020 --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/Images.xcassets/SplashScreen.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images": [ + { + "idiom": "universal", + "filename": "image.png", + "scale": "1x" + }, + { + "idiom": "universal", + "scale": "2x" + }, + { + "idiom": "universal", + "scale": "3x" + } + ], + "info": { + "version": 1, + "author": "expo" + } +} diff --git a/src/react-native-app/ios/reactnativeapp/Images.xcassets/SplashScreen.imageset/image.png b/src/react-native-app/ios/reactnativeapp/Images.xcassets/SplashScreen.imageset/image.png Binary files differnew file mode 100644 index 0000000..cc4aaad --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/Images.xcassets/SplashScreen.imageset/image.png diff --git a/src/react-native-app/ios/reactnativeapp/Images.xcassets/SplashScreenBackground.imageset/Contents.json b/src/react-native-app/ios/reactnativeapp/Images.xcassets/SplashScreenBackground.imageset/Contents.json new file mode 100644 index 0000000..7d28020 --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/Images.xcassets/SplashScreenBackground.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images": [ + { + "idiom": "universal", + "filename": "image.png", + "scale": "1x" + }, + { + "idiom": "universal", + "scale": "2x" + }, + { + "idiom": "universal", + "scale": "3x" + } + ], + "info": { + "version": 1, + "author": "expo" + } +} diff --git a/src/react-native-app/ios/reactnativeapp/Images.xcassets/SplashScreenBackground.imageset/image.png b/src/react-native-app/ios/reactnativeapp/Images.xcassets/SplashScreenBackground.imageset/image.png Binary files differnew file mode 100644 index 0000000..33ddf20 --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/Images.xcassets/SplashScreenBackground.imageset/image.png diff --git a/src/react-native-app/ios/reactnativeapp/Info.plist b/src/react-native-app/ios/reactnativeapp/Info.plist new file mode 100644 index 0000000..ef9c9c0 --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/Info.plist @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> + <dict> + <key>CADisableMinimumFrameDurationOnPhone</key> + <true/> + <key>CFBundleDevelopmentRegion</key> + <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleDisplayName</key> + <string>Astronomy Shop App</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> + <key>CFBundleShortVersionString</key> + <string>1.0.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleURLTypes</key> + <array> + <dict> + <key>CFBundleURLSchemes</key> + <array> + <string>myapp</string> + <string>io.opentelemetry.reactnativeapp</string> + </array> + </dict> + </array> + <key>CFBundleVersion</key> + <string>1</string> + <key>LSRequiresIPhoneOS</key> + <true/> + <key>NSAppTransportSecurity</key> + <dict> + <key>NSAllowsArbitraryLoads</key> + <false/> + <key>NSAllowsLocalNetworking</key> + <true/> + </dict> + <key>NSUserActivityTypes</key> + <array> + <string>$(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route</string> + </array> + <key>UILaunchStoryboardName</key> + <string>SplashScreen</string> + <key>UIRequiredDeviceCapabilities</key> + <array> + <string>arm64</string> + </array> + <key>UIRequiresFullScreen</key> + <false/> + <key>UIStatusBarStyle</key> + <string>UIStatusBarStyleDefault</string> + <key>UISupportedInterfaceOrientations</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationPortraitUpsideDown</string> + </array> + <key>UISupportedInterfaceOrientations~ipad</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationPortraitUpsideDown</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> + <key>UIUserInterfaceStyle</key> + <string>Automatic</string> + <key>UIViewControllerBasedStatusBarAppearance</key> + <false/> + </dict> +</plist> diff --git a/src/react-native-app/ios/reactnativeapp/PrivacyInfo.xcprivacy b/src/react-native-app/ios/reactnativeapp/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..5bb83c5 --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/PrivacyInfo.xcprivacy @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>NSPrivacyAccessedAPITypes</key> + <array> + <dict> + <key>NSPrivacyAccessedAPIType</key> + <string>NSPrivacyAccessedAPICategoryUserDefaults</string> + <key>NSPrivacyAccessedAPITypeReasons</key> + <array> + <string>CA92.1</string> + </array> + </dict> + <dict> + <key>NSPrivacyAccessedAPIType</key> + <string>NSPrivacyAccessedAPICategoryFileTimestamp</string> + <key>NSPrivacyAccessedAPITypeReasons</key> + <array> + <string>0A2A.1</string> + <string>3B52.1</string> + <string>C617.1</string> + </array> + </dict> + <dict> + <key>NSPrivacyAccessedAPIType</key> + <string>NSPrivacyAccessedAPICategoryDiskSpace</string> + <key>NSPrivacyAccessedAPITypeReasons</key> + <array> + <string>E174.1</string> + <string>85F4.1</string> + </array> + </dict> + <dict> + <key>NSPrivacyAccessedAPIType</key> + <string>NSPrivacyAccessedAPICategorySystemBootTime</string> + <key>NSPrivacyAccessedAPITypeReasons</key> + <array> + <string>35F9.1</string> + </array> + </dict> + </array> + <key>NSPrivacyCollectedDataTypes</key> + <array/> + <key>NSPrivacyTracking</key> + <false/> +</dict> +</plist> diff --git a/src/react-native-app/ios/reactnativeapp/SplashScreen.storyboard b/src/react-native-app/ios/reactnativeapp/SplashScreen.storyboard new file mode 100644 index 0000000..ec54574 --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/SplashScreen.storyboard @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="EXPO-VIEWCONTROLLER-1"> + <device id="retina5_5" orientation="portrait" appearance="light"/> + <dependencies> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> + <capability name="Safe area layout guides" minToolsVersion="9.0"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> + </dependencies> + <scenes> + <scene sceneID="EXPO-SCENE-1"> + <objects> + <viewController storyboardIdentifier="SplashScreenViewController" id="EXPO-VIEWCONTROLLER-1" sceneMemberID="viewController"> + <view key="view" userInteractionEnabled="NO" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="EXPO-ContainerView" userLabel="ContainerView"> + <rect key="frame" x="0.0" y="0.0" width="414" height="736"/> + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> + <subviews> + <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" insetsLayoutMarginsFromSafeArea="NO" image="SplashScreenBackground" translatesAutoresizingMaskIntoConstraints="NO" id="EXPO-SplashScreenBackground" userLabel="SplashScreenBackground"> + <rect key="frame" x="0.0" y="0.0" width="414" height="736"/> + </imageView> + <imageView id="EXPO-SplashScreen" userLabel="SplashScreen" image="SplashScreen" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" clipsSubviews="true" userInteractionEnabled="false" translatesAutoresizingMaskIntoConstraints="false"> + <rect key="frame" x="0" y="0" width="414" height="736"/> + </imageView> + </subviews> + <constraints> + <constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="top" secondItem="EXPO-ContainerView" secondAttribute="top" id="1gX-mQ-vu6"/> + <constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="leading" secondItem="EXPO-ContainerView" secondAttribute="leading" id="6tX-OG-Sck"/> + <constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="trailing" secondItem="EXPO-ContainerView" secondAttribute="trailing" id="ABX-8g-7v4"/> + <constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="bottom" secondItem="EXPO-ContainerView" secondAttribute="bottom" id="jkI-2V-eW5"/> + <constraint firstItem="EXPO-SplashScreen" firstAttribute="top" secondItem="EXPO-ContainerView" secondAttribute="top" id="2VS-Uz-0LU"/> + <constraint firstItem="EXPO-SplashScreen" firstAttribute="leading" secondItem="EXPO-ContainerView" secondAttribute="leading" id="LhH-Ei-DKo"/> + <constraint firstItem="EXPO-SplashScreen" firstAttribute="trailing" secondItem="EXPO-ContainerView" secondAttribute="trailing" id="I6l-TP-6fn"/> + <constraint firstItem="EXPO-SplashScreen" firstAttribute="bottom" secondItem="EXPO-ContainerView" secondAttribute="bottom" id="nbp-HC-eaG"/> + <constraint firstItem="EXPO-SplashScreen" firstAttribute="top" secondItem="EXPO-ContainerView" secondAttribute="top" id="83fcb9b545b870ba44c24f0feeb116490c499c52"/> + <constraint firstItem="EXPO-SplashScreen" firstAttribute="leading" secondItem="EXPO-ContainerView" secondAttribute="leading" id="61d16215e44b98e39d0a2c74fdbfaaa22601b12c"/> + <constraint firstItem="EXPO-SplashScreen" firstAttribute="trailing" secondItem="EXPO-ContainerView" secondAttribute="trailing" id="f934da460e9ab5acae3ad9987d5b676a108796c1"/> + <constraint firstItem="EXPO-SplashScreen" firstAttribute="bottom" secondItem="EXPO-ContainerView" secondAttribute="bottom" id="d6a0be88096b36fb132659aa90203d39139deda9"/> + </constraints> + <viewLayoutGuide key="safeArea" id="Rmq-lb-GrQ"/> + </view> + </viewController> + <placeholder placeholderIdentifier="IBFirstResponder" id="EXPO-PLACEHOLDER-1" userLabel="First Responder" sceneMemberID="firstResponder"/> + </objects> + <point key="canvasLocation" x="140.625" y="129.4921875"/> + </scene> + </scenes> + <resources> + <image name="SplashScreenBackground" width="1" height="1"/> + <image name="SplashScreen" width="414" height="736"/> + </resources> +</document> diff --git a/src/react-native-app/ios/reactnativeapp/Supporting/Expo.plist b/src/react-native-app/ios/reactnativeapp/Supporting/Expo.plist new file mode 100644 index 0000000..7fa7911 --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/Supporting/Expo.plist @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> + <dict> + <key>EXUpdatesCheckOnLaunch</key> + <string>ALWAYS</string> + <key>EXUpdatesEnabled</key> + <false/> + <key>EXUpdatesLaunchWaitMs</key> + <integer>0</integer> + </dict> +</plist> diff --git a/src/react-native-app/ios/reactnativeapp/main.m b/src/react-native-app/ios/reactnativeapp/main.m new file mode 100644 index 0000000..25181b6 --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/main.m @@ -0,0 +1,10 @@ +#import <UIKit/UIKit.h> + +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} + diff --git a/src/react-native-app/ios/reactnativeapp/noop-file.swift b/src/react-native-app/ios/reactnativeapp/noop-file.swift new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/noop-file.swift diff --git a/src/react-native-app/ios/reactnativeapp/reactnativeapp-Bridging-Header.h b/src/react-native-app/ios/reactnativeapp/reactnativeapp-Bridging-Header.h new file mode 100644 index 0000000..f8f0758 --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/reactnativeapp-Bridging-Header.h @@ -0,0 +1,5 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +// +// Use this file to import your target's public headers that you would like to expose to Swift. +// diff --git a/src/react-native-app/ios/reactnativeapp/reactnativeapp.entitlements b/src/react-native-app/ios/reactnativeapp/reactnativeapp.entitlements new file mode 100644 index 0000000..a4942dc --- /dev/null +++ b/src/react-native-app/ios/reactnativeapp/reactnativeapp.entitlements @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> + <dict/> +</plist> + |
