From e4fb9966e762852bf17f21c8406501d42fae0b61 Mon Sep 17 00:00:00 2001 From: hc Date: Fri, 10 Apr 2026 17:39:12 +0800 Subject: Initial commit: iHealth BLE scanner app with patched SDK v1.5.0 --- ios/iHealthScanner/AppDelegate.swift | 48 ++++++++++++++++ .../AppIcon.appiconset/Contents.json | 53 ++++++++++++++++++ ios/iHealthScanner/Images.xcassets/Contents.json | 6 ++ ios/iHealthScanner/Info.plist | 64 ++++++++++++++++++++++ ios/iHealthScanner/LaunchScreen.storyboard | 47 ++++++++++++++++ ios/iHealthScanner/PrivacyInfo.xcprivacy | 37 +++++++++++++ 6 files changed, 255 insertions(+) create mode 100644 ios/iHealthScanner/AppDelegate.swift create mode 100644 ios/iHealthScanner/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 ios/iHealthScanner/Images.xcassets/Contents.json create mode 100644 ios/iHealthScanner/Info.plist create mode 100644 ios/iHealthScanner/LaunchScreen.storyboard create mode 100644 ios/iHealthScanner/PrivacyInfo.xcprivacy (limited to 'ios/iHealthScanner') diff --git a/ios/iHealthScanner/AppDelegate.swift b/ios/iHealthScanner/AppDelegate.swift new file mode 100644 index 0000000..b27dd5a --- /dev/null +++ b/ios/iHealthScanner/AppDelegate.swift @@ -0,0 +1,48 @@ +import UIKit +import React +import React_RCTAppDelegate +import ReactAppDependencyProvider + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + var window: UIWindow? + + var reactNativeDelegate: ReactNativeDelegate? + var reactNativeFactory: RCTReactNativeFactory? + + func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil + ) -> Bool { + let delegate = ReactNativeDelegate() + let factory = RCTReactNativeFactory(delegate: delegate) + delegate.dependencyProvider = RCTAppDependencyProvider() + + reactNativeDelegate = delegate + reactNativeFactory = factory + + window = UIWindow(frame: UIScreen.main.bounds) + + factory.startReactNative( + withModuleName: "iHealthScanner", + in: window, + launchOptions: launchOptions + ) + + return true + } +} + +class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate { + override func sourceURL(for bridge: RCTBridge) -> URL? { + self.bundleURL() + } + + override func bundleURL() -> URL? { +#if DEBUG + RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") +#else + Bundle.main.url(forResource: "main", withExtension: "jsbundle") +#endif + } +} diff --git a/ios/iHealthScanner/Images.xcassets/AppIcon.appiconset/Contents.json b/ios/iHealthScanner/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..8121323 --- /dev/null +++ b/ios/iHealthScanner/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/iHealthScanner/Images.xcassets/Contents.json b/ios/iHealthScanner/Images.xcassets/Contents.json new file mode 100644 index 0000000..2d92bd5 --- /dev/null +++ b/ios/iHealthScanner/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/iHealthScanner/Info.plist b/ios/iHealthScanner/Info.plist new file mode 100644 index 0000000..7e9b20f --- /dev/null +++ b/ios/iHealthScanner/Info.plist @@ -0,0 +1,64 @@ + + + + + CADisableMinimumFrameDurationOnPhone + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + iHealthScanner + 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 + + NSAllowsArbitraryLoads + + NSAllowsLocalNetworking + + + NSBluetoothAlwaysUsageDescription + This app uses Bluetooth to scan for and connect to iHealth devices. + NSBluetoothPeripheralUsageDescription + This app uses Bluetooth to scan for and connect to iHealth devices. + NSLocationWhenInUseUsageDescription + Bluetooth scanning requires location access on iOS. + RCTNewArchEnabled + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + arm64 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/ios/iHealthScanner/LaunchScreen.storyboard b/ios/iHealthScanner/LaunchScreen.storyboard new file mode 100644 index 0000000..4116b5e --- /dev/null +++ b/ios/iHealthScanner/LaunchScreen.storyboard @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/iHealthScanner/PrivacyInfo.xcprivacy b/ios/iHealthScanner/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..41b8317 --- /dev/null +++ b/ios/iHealthScanner/PrivacyInfo.xcprivacy @@ -0,0 +1,37 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + -- cgit