diff options
| author | hc <haocheng.xie@respiree.com> | 2026-04-10 17:39:12 +0800 |
|---|---|---|
| committer | hc <haocheng.xie@respiree.com> | 2026-04-10 17:39:22 +0800 |
| commit | e4fb9966e762852bf17f21c8406501d42fae0b61 (patch) | |
| tree | 658bbdba977ff7846a17ee94b8ed6b676f6ce9dd /ios/iHealthScanner | |
Initial commit: iHealth BLE scanner app with patched SDK v1.5.0
Diffstat (limited to 'ios/iHealthScanner')
| -rw-r--r-- | ios/iHealthScanner/AppDelegate.swift | 48 | ||||
| -rw-r--r-- | ios/iHealthScanner/Images.xcassets/AppIcon.appiconset/Contents.json | 53 | ||||
| -rw-r--r-- | ios/iHealthScanner/Images.xcassets/Contents.json | 6 | ||||
| -rw-r--r-- | ios/iHealthScanner/Info.plist | 64 | ||||
| -rw-r--r-- | ios/iHealthScanner/LaunchScreen.storyboard | 47 | ||||
| -rw-r--r-- | ios/iHealthScanner/PrivacyInfo.xcprivacy | 37 |
6 files changed, 255 insertions, 0 deletions
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 @@ | |||
| 1 | import UIKit | ||
| 2 | import React | ||
| 3 | import React_RCTAppDelegate | ||
| 4 | import ReactAppDependencyProvider | ||
| 5 | |||
| 6 | @main | ||
| 7 | class AppDelegate: UIResponder, UIApplicationDelegate { | ||
| 8 | var window: UIWindow? | ||
| 9 | |||
| 10 | var reactNativeDelegate: ReactNativeDelegate? | ||
| 11 | var reactNativeFactory: RCTReactNativeFactory? | ||
| 12 | |||
| 13 | func application( | ||
| 14 | _ application: UIApplication, | ||
| 15 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil | ||
| 16 | ) -> Bool { | ||
| 17 | let delegate = ReactNativeDelegate() | ||
| 18 | let factory = RCTReactNativeFactory(delegate: delegate) | ||
| 19 | delegate.dependencyProvider = RCTAppDependencyProvider() | ||
| 20 | |||
| 21 | reactNativeDelegate = delegate | ||
| 22 | reactNativeFactory = factory | ||
| 23 | |||
| 24 | window = UIWindow(frame: UIScreen.main.bounds) | ||
| 25 | |||
| 26 | factory.startReactNative( | ||
| 27 | withModuleName: "iHealthScanner", | ||
| 28 | in: window, | ||
| 29 | launchOptions: launchOptions | ||
| 30 | ) | ||
| 31 | |||
| 32 | return true | ||
| 33 | } | ||
| 34 | } | ||
| 35 | |||
| 36 | class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate { | ||
| 37 | override func sourceURL(for bridge: RCTBridge) -> URL? { | ||
| 38 | self.bundleURL() | ||
| 39 | } | ||
| 40 | |||
| 41 | override func bundleURL() -> URL? { | ||
| 42 | #if DEBUG | ||
| 43 | RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") | ||
| 44 | #else | ||
| 45 | Bundle.main.url(forResource: "main", withExtension: "jsbundle") | ||
| 46 | #endif | ||
| 47 | } | ||
| 48 | } | ||
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 @@ | |||
| 1 | { | ||
| 2 | "images" : [ | ||
| 3 | { | ||
| 4 | "idiom" : "iphone", | ||
| 5 | "scale" : "2x", | ||
| 6 | "size" : "20x20" | ||
| 7 | }, | ||
| 8 | { | ||
| 9 | "idiom" : "iphone", | ||
| 10 | "scale" : "3x", | ||
| 11 | "size" : "20x20" | ||
| 12 | }, | ||
| 13 | { | ||
| 14 | "idiom" : "iphone", | ||
| 15 | "scale" : "2x", | ||
| 16 | "size" : "29x29" | ||
| 17 | }, | ||
| 18 | { | ||
| 19 | "idiom" : "iphone", | ||
| 20 | "scale" : "3x", | ||
| 21 | "size" : "29x29" | ||
| 22 | }, | ||
| 23 | { | ||
| 24 | "idiom" : "iphone", | ||
| 25 | "scale" : "2x", | ||
| 26 | "size" : "40x40" | ||
| 27 | }, | ||
| 28 | { | ||
| 29 | "idiom" : "iphone", | ||
| 30 | "scale" : "3x", | ||
| 31 | "size" : "40x40" | ||
| 32 | }, | ||
| 33 | { | ||
| 34 | "idiom" : "iphone", | ||
| 35 | "scale" : "2x", | ||
| 36 | "size" : "60x60" | ||
| 37 | }, | ||
| 38 | { | ||
| 39 | "idiom" : "iphone", | ||
| 40 | "scale" : "3x", | ||
| 41 | "size" : "60x60" | ||
| 42 | }, | ||
| 43 | { | ||
| 44 | "idiom" : "ios-marketing", | ||
| 45 | "scale" : "1x", | ||
| 46 | "size" : "1024x1024" | ||
| 47 | } | ||
| 48 | ], | ||
| 49 | "info" : { | ||
| 50 | "author" : "xcode", | ||
| 51 | "version" : 1 | ||
| 52 | } | ||
| 53 | } | ||
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 @@ | |||
| 1 | { | ||
| 2 | "info" : { | ||
| 3 | "version" : 1, | ||
| 4 | "author" : "xcode" | ||
| 5 | } | ||
| 6 | } | ||
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 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | <plist version="1.0"> | ||
| 4 | <dict> | ||
| 5 | <key>CADisableMinimumFrameDurationOnPhone</key> | ||
| 6 | <true/> | ||
| 7 | <key>CFBundleDevelopmentRegion</key> | ||
| 8 | <string>en</string> | ||
| 9 | <key>CFBundleDisplayName</key> | ||
| 10 | <string>iHealthScanner</string> | ||
| 11 | <key>CFBundleExecutable</key> | ||
| 12 | <string>$(EXECUTABLE_NAME)</string> | ||
| 13 | <key>CFBundleIdentifier</key> | ||
| 14 | <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
| 15 | <key>CFBundleInfoDictionaryVersion</key> | ||
| 16 | <string>6.0</string> | ||
| 17 | <key>CFBundleName</key> | ||
| 18 | <string>$(PRODUCT_NAME)</string> | ||
| 19 | <key>CFBundlePackageType</key> | ||
| 20 | <string>APPL</string> | ||
| 21 | <key>CFBundleShortVersionString</key> | ||
| 22 | <string>$(MARKETING_VERSION)</string> | ||
| 23 | <key>CFBundleSignature</key> | ||
| 24 | <string>????</string> | ||
| 25 | <key>CFBundleVersion</key> | ||
| 26 | <string>$(CURRENT_PROJECT_VERSION)</string> | ||
| 27 | <key>LSRequiresIPhoneOS</key> | ||
| 28 | <true/> | ||
| 29 | <key>NSAppTransportSecurity</key> | ||
| 30 | <dict> | ||
| 31 | <key>NSAllowsArbitraryLoads</key> | ||
| 32 | <false/> | ||
| 33 | <key>NSAllowsLocalNetworking</key> | ||
| 34 | <true/> | ||
| 35 | </dict> | ||
| 36 | <key>NSBluetoothAlwaysUsageDescription</key> | ||
| 37 | <string>This app uses Bluetooth to scan for and connect to iHealth devices.</string> | ||
| 38 | <key>NSBluetoothPeripheralUsageDescription</key> | ||
| 39 | <string>This app uses Bluetooth to scan for and connect to iHealth devices.</string> | ||
| 40 | <key>NSLocationWhenInUseUsageDescription</key> | ||
| 41 | <string>Bluetooth scanning requires location access on iOS.</string> | ||
| 42 | <key>RCTNewArchEnabled</key> | ||
| 43 | <true/> | ||
| 44 | <key>UILaunchStoryboardName</key> | ||
| 45 | <string>LaunchScreen</string> | ||
| 46 | <key>UIRequiredDeviceCapabilities</key> | ||
| 47 | <array> | ||
| 48 | <string>arm64</string> | ||
| 49 | </array> | ||
| 50 | <key>UISupportedInterfaceOrientations</key> | ||
| 51 | <array> | ||
| 52 | <string>UIInterfaceOrientationPortrait</string> | ||
| 53 | </array> | ||
| 54 | <key>UISupportedInterfaceOrientations~ipad</key> | ||
| 55 | <array> | ||
| 56 | <string>UIInterfaceOrientationLandscapeLeft</string> | ||
| 57 | <string>UIInterfaceOrientationLandscapeRight</string> | ||
| 58 | <string>UIInterfaceOrientationPortrait</string> | ||
| 59 | <string>UIInterfaceOrientationPortraitUpsideDown</string> | ||
| 60 | </array> | ||
| 61 | <key>UIViewControllerBasedStatusBarAppearance</key> | ||
| 62 | <false/> | ||
| 63 | </dict> | ||
| 64 | </plist> | ||
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 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> | ||
| 3 | <device id="retina4_7" orientation="portrait" appearance="light"/> | ||
| 4 | <dependencies> | ||
| 5 | <deployment identifier="iOS"/> | ||
| 6 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/> | ||
| 7 | <capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
| 8 | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
| 9 | </dependencies> | ||
| 10 | <scenes> | ||
| 11 | <!--View Controller--> | ||
| 12 | <scene sceneID="EHf-IW-A2E"> | ||
| 13 | <objects> | ||
| 14 | <viewController id="01J-lp-oVM" sceneMemberID="viewController"> | ||
| 15 | <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> | ||
| 16 | <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
| 17 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
| 18 | <subviews> | ||
| 19 | <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="iHealthScanner" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb"> | ||
| 20 | <rect key="frame" x="0.0" y="202" width="375" height="43"/> | ||
| 21 | <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/> | ||
| 22 | <nil key="highlightedColor"/> | ||
| 23 | </label> | ||
| 24 | <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="MN2-I3-ftu"> | ||
| 25 | <rect key="frame" x="0.0" y="626" width="375" height="21"/> | ||
| 26 | <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
| 27 | <nil key="highlightedColor"/> | ||
| 28 | </label> | ||
| 29 | </subviews> | ||
| 30 | <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> | ||
| 31 | <constraints> | ||
| 32 | <constraint firstItem="Bcu-3y-fUS" firstAttribute="bottom" secondItem="MN2-I3-ftu" secondAttribute="bottom" constant="20" id="OZV-Vh-mqD"/> | ||
| 33 | <constraint firstItem="Bcu-3y-fUS" firstAttribute="centerX" secondItem="GJd-Yh-RWb" secondAttribute="centerX" id="Q3B-4B-g5h"/> | ||
| 34 | <constraint firstItem="MN2-I3-ftu" firstAttribute="centerX" secondItem="Bcu-3y-fUS" secondAttribute="centerX" id="akx-eg-2ui"/> | ||
| 35 | <constraint firstItem="MN2-I3-ftu" firstAttribute="leading" secondItem="Bcu-3y-fUS" secondAttribute="leading" id="i1E-0Y-4RG"/> | ||
| 36 | <constraint firstItem="GJd-Yh-RWb" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="bottom" multiplier="1/3" constant="1" id="moa-c2-u7t"/> | ||
| 37 | <constraint firstItem="GJd-Yh-RWb" firstAttribute="leading" secondItem="Bcu-3y-fUS" secondAttribute="leading" symbolic="YES" id="x7j-FC-K8j"/> | ||
| 38 | </constraints> | ||
| 39 | <viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/> | ||
| 40 | </view> | ||
| 41 | </viewController> | ||
| 42 | <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
| 43 | </objects> | ||
| 44 | <point key="canvasLocation" x="52.173913043478265" y="375"/> | ||
| 45 | </scene> | ||
| 46 | </scenes> | ||
| 47 | </document> | ||
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 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| 3 | <plist version="1.0"> | ||
| 4 | <dict> | ||
| 5 | <key>NSPrivacyAccessedAPITypes</key> | ||
| 6 | <array> | ||
| 7 | <dict> | ||
| 8 | <key>NSPrivacyAccessedAPIType</key> | ||
| 9 | <string>NSPrivacyAccessedAPICategoryFileTimestamp</string> | ||
| 10 | <key>NSPrivacyAccessedAPITypeReasons</key> | ||
| 11 | <array> | ||
| 12 | <string>C617.1</string> | ||
| 13 | </array> | ||
| 14 | </dict> | ||
| 15 | <dict> | ||
| 16 | <key>NSPrivacyAccessedAPIType</key> | ||
| 17 | <string>NSPrivacyAccessedAPICategoryUserDefaults</string> | ||
| 18 | <key>NSPrivacyAccessedAPITypeReasons</key> | ||
| 19 | <array> | ||
| 20 | <string>CA92.1</string> | ||
| 21 | </array> | ||
| 22 | </dict> | ||
| 23 | <dict> | ||
| 24 | <key>NSPrivacyAccessedAPIType</key> | ||
| 25 | <string>NSPrivacyAccessedAPICategorySystemBootTime</string> | ||
| 26 | <key>NSPrivacyAccessedAPITypeReasons</key> | ||
| 27 | <array> | ||
| 28 | <string>35F9.1</string> | ||
| 29 | </array> | ||
| 30 | </dict> | ||
| 31 | </array> | ||
| 32 | <key>NSPrivacyCollectedDataTypes</key> | ||
| 33 | <array/> | ||
| 34 | <key>NSPrivacyTracking</key> | ||
| 35 | <false/> | ||
| 36 | </dict> | ||
| 37 | </plist> | ||
