Release 4.8.0 - 2024-05-26
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
import UIKit
|
||||
import CoreLocation
|
||||
import Flutter
|
||||
|
||||
@UIApplicationMain
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
@objc class AppDelegate: FlutterAppDelegate, CLLocationManagerDelegate {
|
||||
var locationManager: CLLocationManager?
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
@ -12,6 +14,7 @@ import Flutter
|
||||
let controller : FlutterViewController = window?.rootViewController as! FlutterViewController
|
||||
let locationServiceChannel = FlutterMethodChannel(name: "location",
|
||||
binaryMessenger: controller.binaryMessenger)
|
||||
/*
|
||||
locationServiceChannel.setMethodCallHandler { (call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
|
||||
if call.method == "isLocationServiceRunning" {
|
||||
result(self.isLocationServiceRunning())
|
||||
@ -19,6 +22,18 @@ import Flutter
|
||||
result(FlutterMethodNotImplemented)
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
locationServiceChannel.setMethodCallHandler { [weak self] (call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
|
||||
if call.method == "startLocationService" {
|
||||
//self?.startLocationService()
|
||||
result(nil)
|
||||
} else if call.method == "isLocationServiceRunning" {
|
||||
result(self?.isLocationServiceRunning() ?? false)
|
||||
} else {
|
||||
result(FlutterMethodNotImplemented)
|
||||
}
|
||||
}
|
||||
|
||||
locationManager = CLLocationManager()
|
||||
locationManager?.delegate = self
|
||||
|
||||
@ -24,8 +24,6 @@
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>FLTEnableImpeller</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
@ -38,6 +36,8 @@
|
||||
<string>このアプリはチェックポイントへのチェックインや走行履歴を記録するために、位置情報にアクセスします。</string>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>撮影した写真はデバイスのアルバムに保存されます。これにより、不具合時の通過記録を安全に担保することができます。</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>このアプリではカメラは使用しますが、マイクの使用は当面行いません。</string>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
|
||||
Reference in New Issue
Block a user