develop_sky #1

Merged
liyi merged 62 commits from develop_sky into develop_sky_liyi 2025-09-22 17:48:20 +08:00
13 changed files with 392 additions and 92 deletions
Showing only changes of commit c7c1730cb0 - Show all commits

31
ios/LCKBridge.swift Normal file
View File

@ -0,0 +1,31 @@
import Foundation
import UIKit
import LiveCommunicationKit
@objc class LCKBridge: NSObject {
@objc static func presentCallInterfaceFromRootVC(_ rootVC: UIViewController, callerName: String) {
if #available(iOS 17.4, *) {
// ConversationManager
let config = ConversationManager.Configuration(
ringtoneName: "notes_of_the_optimistic",
iconTemplateImageData: UIImage(named: "AppIcon")?.pngData(),
maximumConversationGroups: 1,
maximumConversationsPerConversationGroup: 1,
includesConversationInRecents: false,
supportsVideo: false,
supportedHandleTypes: [.generic, .phoneNumber, .emailAddress]
)
let manager = ConversationManager(configuration: config)
let local = Handle(type: .generic, value: callerName, displayName: callerName)
let update = Conversation.Update(localMember: local, members: [local], activeRemoteMembers: [local])
Task {
do {
try await manager.reportNewIncomingConversation(uuid: UUID(), update: update)
print("成功报告新来电")
} catch {
print("报告新来电失败: \(error.localizedDescription)")
}
}
}
}
}

View File

@ -1,6 +1,4 @@
PODS:
- aj_captcha_flutter (0.0.1):
- Flutter
- AlicloudPush (1.9.9.8):
- AlicloudSender
- AlicloudUT
@ -15,17 +13,6 @@ PODS:
- AlicloudUTDID
- aliyun_face_plugin (0.0.1):
- Flutter
- AMap3DMap (10.0.700):
- AMapFoundation (>= 1.8.0)
- amap_flutter_location (0.0.1):
- AMapLocation
- Flutter
- amap_flutter_map (0.0.1):
- AMap3DMap
- Flutter
- AMapFoundation (1.8.2)
- AMapLocation (2.10.0):
- AMapFoundation (>= 1.8.0)
- app_settings (5.1.1):
- Flutter
- audio_session (0.0.1):
@ -40,6 +27,7 @@ PODS:
- connectivity_plus (0.0.1):
- Flutter
- FlutterMacOS
- CryptoSwift (1.8.4)
- device_info_plus (0.0.1):
- Flutter
- DKImagePickerController/Core (4.3.9):
@ -121,11 +109,16 @@ PODS:
- GoogleUtilities/UserDefaults (~> 8.0)
- PromisesObjC (~> 2.4)
- Flutter (1.0.0)
- flutter_app_badger (1.3.0):
- Flutter
- flutter_blue_plus (0.0.1):
- Flutter
- flutter_bugly (0.0.1):
- Bugly (= 2.6.1)
- Flutter
- flutter_callkit_incoming (0.0.1):
- CryptoSwift
- Flutter
- flutter_local_notifications (0.0.1):
- Flutter
- flutter_native_contact_picker (0.0.1):
@ -272,6 +265,8 @@ PODS:
- UMDevice
- url_launcher_ios (0.0.1):
- Flutter
- video_decode_plugin (0.0.1):
- Flutter
- video_player_avfoundation (0.0.1):
- Flutter
- FlutterMacOS
@ -283,11 +278,8 @@ PODS:
- WechatOpenSDK-XCFramework (2.0.4)
DEPENDENCIES:
- aj_captcha_flutter (from `.symlinks/plugins/aj_captcha_flutter/ios`)
- AlicloudPush (~> 1.9.9)
- aliyun_face_plugin (from `.symlinks/plugins/aliyun_face_plugin/ios`)
- amap_flutter_location (from `.symlinks/plugins/amap_flutter_location/ios`)
- amap_flutter_map (from `.symlinks/plugins/amap_flutter_map/ios`)
- app_settings (from `.symlinks/plugins/app_settings/ios`)
- audio_session (from `.symlinks/plugins/audio_session/ios`)
- audioplayers_darwin (from `.symlinks/plugins/audioplayers_darwin/ios`)
@ -299,8 +291,10 @@ DEPENDENCIES:
- firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- Flutter (from `Flutter`)
- flutter_app_badger (from `.symlinks/plugins/flutter_app_badger/ios`)
- flutter_blue_plus (from `.symlinks/plugins/flutter_blue_plus/ios`)
- flutter_bugly (from `.symlinks/plugins/flutter_bugly/ios`)
- flutter_callkit_incoming (from `.symlinks/plugins/flutter_callkit_incoming/ios`)
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
- flutter_native_contact_picker (from `.symlinks/plugins/flutter_native_contact_picker/ios`)
- flutter_pcm_sound (from `.symlinks/plugins/flutter_pcm_sound/ios`)
@ -327,6 +321,7 @@ DEPENDENCIES:
- UMDevice
- umeng_common_sdk (from `.symlinks/plugins/umeng_common_sdk/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- video_decode_plugin (from `.symlinks/plugins/video_decode_plugin/ios`)
- video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/darwin`)
- video_thumbnail (from `.symlinks/plugins/video_thumbnail/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
@ -340,10 +335,8 @@ SPEC REPOS:
- AlicloudUtils
- EMASRest
https://github.com/CocoaPods/Specs.git:
- AMap3DMap
- AMapFoundation
- AMapLocation
- Bugly
- CryptoSwift
- DKImagePickerController
- DKPhotoGallery
- Firebase
@ -369,14 +362,8 @@ SPEC REPOS:
- WechatOpenSDK-XCFramework
EXTERNAL SOURCES:
aj_captcha_flutter:
:path: ".symlinks/plugins/aj_captcha_flutter/ios"
aliyun_face_plugin:
:path: ".symlinks/plugins/aliyun_face_plugin/ios"
amap_flutter_location:
:path: ".symlinks/plugins/amap_flutter_location/ios"
amap_flutter_map:
:path: ".symlinks/plugins/amap_flutter_map/ios"
app_settings:
:path: ".symlinks/plugins/app_settings/ios"
audio_session:
@ -399,10 +386,14 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/firebase_core/ios"
Flutter:
:path: Flutter
flutter_app_badger:
:path: ".symlinks/plugins/flutter_app_badger/ios"
flutter_blue_plus:
:path: ".symlinks/plugins/flutter_blue_plus/ios"
flutter_bugly:
:path: ".symlinks/plugins/flutter_bugly/ios"
flutter_callkit_incoming:
:path: ".symlinks/plugins/flutter_callkit_incoming/ios"
flutter_local_notifications:
:path: ".symlinks/plugins/flutter_local_notifications/ios"
flutter_native_contact_picker:
@ -449,6 +440,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/umeng_common_sdk/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
video_decode_plugin:
:path: ".symlinks/plugins/video_decode_plugin/ios"
video_player_avfoundation:
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
video_thumbnail:
@ -457,83 +450,81 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
SPEC CHECKSUMS:
aj_captcha_flutter: dd7af1aa064bdd621ae335b819bab07309c3c023
AlicloudPush: 88529c9b796e4ece0601de0867b30359f55b61f7
AlicloudSender: 1f468b6bd962a099ffc19d45e3608b0fe98f259d
AlicloudUT: 6d1cf30d57d096b7e9bb4b069dd0ba6ad59a3338
AlicloudUTDID: 4e9d44c2fd704b3508069c38eaec9d6a759e702c
AlicloudUtils: 2a78de434a8b2dc99e408c4d6220e654076d9ef0
aliyun_face_plugin: 7a90b6526c5acea616062e809699294c782c3eb8
AMap3DMap: 6ee456d7ba946ebbad580a343b74ffa8e9936175
amap_flutter_location: 44ff5beb64f42e0bf5feb402fe299dac0013af6f
amap_flutter_map: 979e54d227cedac6c7504a2151bfbf3bcf96760a
AMapFoundation: 9885c48fc3a78fdfb84a0299a2293e56ea3c9fec
AMapLocation: 5248aec2455ebb5d104b367813c946430a2ee033
app_settings: 017320c6a680cdc94c799949d95b84cb69389ebc
audio_session: 088d2483ebd1dc43f51d253d4a1c517d9a2e7207
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
auto_orientation: 102ed811a5938d52c86520ddd7ecd3a126b5d39d
aliyun_face_plugin: 8b3b7961de363c53d841d3b484506e85bdcfb756
app_settings: 5127ae0678de1dcc19f2293271c51d37c89428b2
audio_session: f08db0697111ac84ba46191b55488c0563bb29c6
audioplayers_darwin: ccf9c770ee768abb07e26d90af093f7bab1c12ab
auto_orientation: a1600c9ed72e6e96982fb4e1214463343342432a
Bugly: 217ac2ce5f0f2626d43dbaa4f70764c953a26a31
camera_avfoundation: dd002b0330f4981e1bbcb46ae9b62829237459a4
connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
camera_avfoundation: 04b44aeb14070126c6529e5ab82cc7c9fca107cf
connectivity_plus: 3f6c9057f4cd64198dc826edfb0542892f825343
CryptoSwift: e64e11850ede528a02a0f3e768cec8e9d92ecb90
device_info_plus: d668d0dcad87727e865495c472b911b15d7ee26a
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
EMASRest: 8df6f87836767a9415ad5cc4af739bc9d215b475
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
file_picker: 5f42b9d5580e30b57b4863f9d94b448016b702e5
Firebase: 9f574c08c2396885b5e7e100ed4293d956218af9
firebase_analytics: 1a66fe8d4375eccff44671ea37897683a78b2675
firebase_core: ceec591a66629daaee82d3321551692c4a871493
firebase_analytics: 2090f32a7f5364b03cdf11aa7e904f4610309563
firebase_core: 53cecb83c72fea329b267bb0accb06a33e9f036a
FirebaseAnalytics: 27eb78b97880ea4a004839b9bac0b58880f5a92a
FirebaseCore: 3cf438f431f18c12cdf2aaf64434648b63f7e383
FirebaseCoreInternal: d6c17dafc8dc33614733a8b52df78fcb4394c881
FirebaseInstallations: 6ef4a1c7eb2a61ee1f74727d7f6ce2e72acf1414
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_blue_plus: 4837da7d00cf5d441fdd6635b3a57f936778ea96
flutter_bugly: bf35df32a9c5d50b8aacdd35bd8ddc5b55150dae
flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086
flutter_native_contact_picker: bd430ba0fbf82768bb50c2c52a69a65759a8f907
flutter_pcm_sound: de0572ca4f99091cc2abfcc31601b8a4ddd33c0e
flutter_voice_processor: 2b89b93d69b02227ae3fd58589ee0bcfa3ca2a82
fluttertoast: e9a18c7be5413da53898f660530c56f35edfba9c
fluwx: daa284756ce53442b3d0417ceeda66e981906811
gallery_saver: 9fc173c9f4fcc48af53b2a9ebea1b643255be542
google_maps_flutter_ios: f135b968a67c05679e0a53538e900b5c174b0d99
flutter_app_badger: 16b371e989d04cd265df85be2c3851b49cb68d18
flutter_blue_plus: e5808fc4e5ebc58bb911635f8fdaf5e2b4da2754
flutter_bugly: a77131ff7b385a481c594830dc89aa53e8e7fbee
flutter_callkit_incoming: cb8138af67cda6dd981f7101a5d709003af21502
flutter_local_notifications: ad39620c743ea4c15127860f4b5641649a988100
flutter_native_contact_picker: ebff97ae8c8110e9de4590d6e363f974dca52a8c
flutter_pcm_sound: e9c2f6ce580eefcab2af46763f0354484d5c4ac8
flutter_voice_processor: a4e08ad27a55554d962a71033461e32638cee3f6
fluttertoast: 76fea30fcf04176325f6864c87306927bd7d2038
fluwx: 6bf9c5a3a99ad31b0de137dd92370a0d10a60f4b
gallery_saver: 1d68d1818df11b1afa84a97d1a530463753e92e3
google_maps_flutter_ios: e6aba27b584112778b931f1116527f78c9dba99b
GoogleAppMeasurement: 6e49ffac7d3f2c3ded9cc663f912a13b67bbd0de
GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
image_gallery_saver: 14711d79da40581063e8842a11acf1969d781ed7
image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a
ios-voice-processor: 8e32d7f980a06d392d128ef1cd19cf6ddcaca3c1
JCore: 024c73b04e110b496e93d8c127ea9cd1ed934e4c
JPush: b71f497a3c1b825c7843fd97f290b05d5cd75f2e
jpush_flutter: c87be254790933c0363684169ef9d3d279a5adc5
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
jpush_flutter: 81be43c2095cac5c2ac45e673e26c83230304015
just_audio: 6c031bb61297cf218b4462be616638e81c058e97
JVerification: 0774807f44dd788c78d50303a14e133735807856
jverify: 337ea43ac1e16f9484f4195abe787d1b6241163c
jverify: 59d8e9a5835616c1deed9cf67dbd9679aa1ca244
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f
open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
network_info_plus: b6c3b27559bf719cc53ef571a947b3ac4629754c
open_filex: 432f3cd11432da3e39f47fcc0df2b1603854eff1
package_info_plus: ae4a63389b62b5be8544b36bfc5b069617938813
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
SDWebImage: dfe95b2466a9823cf9f0c6d01217c06550d7b29a
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
sqflite: c35dad70033b8862124f8337cc994a809fcd9fa3
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
system_settings: 8f5cdbfa72c677fc8d665b863bcc20d393d87e9d
system_settings: 0afa5deab4239f6b9325f54aba2d3b0932bcf23d
Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e
UMCommon: 8b4cd0423297c39bca6eea1ec896558b40e5bcf7
UMDevice: dcdf7ec167387837559d149fbc7d793d984faf82
umeng_common_sdk: a8abd7f86dfd013dbbeeae587ee143760c6582f2
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
video_thumbnail: c4e2a3c539e247d4de13cd545344fd2d26ffafd1
webview_flutter_wkwebview: 2a23822e9039b7b1bc52e5add778e5d89ad488d1
umeng_common_sdk: 095b63e6f83b71548725a7c03a6c17b23be6674b
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
video_decode_plugin: 07649b4703fdf618daf7000af58f3b251c3e280f
video_player_avfoundation: 2cef49524dd1f16c5300b9cd6efd9611ce03639b
video_thumbnail: b637e0ad5f588ca9945f6e2c927f73a69a661140
webview_flutter_wkwebview: 45a041c7831641076618876de3ba75c712860c6b
WechatOpenSDK-XCFramework: 36fb2bea0754266c17184adf4963d7e6ff98b69f
PODFILE CHECKSUM: 728f9c851a19709391c77c54ed3556e484b54db6
COCOAPODS: 1.14.3
COCOAPODS: 1.16.2

View File

@ -0,0 +1,4 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//

View File

@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
044929092E13AE5D0062AC4D /* LCKBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044929082E13AE5D0062AC4D /* LCKBridge.swift */; };
04717D692D1B97E100089BD3 /* InfoPlist_sky.strings in Resources */ = {isa = PBXBuildFile; fileRef = 04717D672D1B97E100089BD3 /* InfoPlist_sky.strings */; };
04717D6D2D1B983300089BD3 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 04717D6B2D1B983200089BD3 /* InfoPlist.strings */; };
04717D712D1B9B5A00089BD3 /* InfoPlist_xhj.strings in Resources */ = {isa = PBXBuildFile; fileRef = 04717D6F2D1B9B5A00089BD3 /* InfoPlist_xhj.strings */; };
@ -100,6 +101,8 @@
/* Begin PBXFileReference section */
0420903B2C0EEAA50073E654 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = "<group>"; };
044929082E13AE5D0062AC4D /* LCKBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LCKBridge.swift; sourceTree = "<group>"; };
0449290A2E13AE5F0062AC4D /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
04717D682D1B97E100089BD3 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist_sky.strings"; sourceTree = "<group>"; };
04717D6A2D1B97E800089BD3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist_sky.strings; sourceTree = "<group>"; };
04717D6C2D1B983200089BD3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
@ -462,6 +465,7 @@
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
044929082E13AE5D0062AC4D /* LCKBridge.swift */,
82F1ED1B2BE8BA8E00265D59 /* BioAuthEngine.bundle */,
82F1ED192BE8BA7D00265D59 /* OCRXMedia.bundle */,
82F1ED172BE8BA6900265D59 /* APBToygerFacadeSuitable.bundle */,
@ -476,6 +480,7 @@
7EA577AFEEE10224BA96C569 /* preLaunchScreen.storyboard */,
9A03C622761920C324D80733 /* skyLaunchScreen.storyboard */,
6A6F5C86239927252C06A16A /* xhjLaunchScreen.storyboard */,
0449290A2E13AE5F0062AC4D /* Runner-Bridging-Header.h */,
);
sourceTree = "<group>";
};
@ -606,7 +611,7 @@
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 1430;
LastSwiftMigration = 1630;
};
};
};
@ -809,6 +814,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
044929092E13AE5D0062AC4D /* LCKBridge.swift in Sources */,
8297E49B2AE7974700E886FA /* AppDelegate.m in Sources */,
8297E4102AE75AC500E886FA /* XSFlutterManager.m in Sources */,
97C146F31CF9000F007C117D /* main.m in Sources */,
@ -1073,6 +1079,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 4A63B2C308CB401731950EC8 /* Pods-Runner.debug-sky.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = "Runner/RunnerRelease-sky.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@ -1092,6 +1099,8 @@
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h";
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = "Debug-sky";
@ -1171,6 +1180,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 22D858E988707FF26E068457 /* Pods-Runner.debug-xhj.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = "Runner/RunnerRelease-xhj.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@ -1190,6 +1200,8 @@
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h";
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = "Debug-xhj";
@ -1198,12 +1210,11 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 16A83D21DFB231D8453DC681 /* Pods-Runner.release-sky.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = "Runner/RunnerRelease-sky.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = NAQ5PL2DYC;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = NAQ5PL2DYC;
INFOPLIST_FILE = Runner/info_sky.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
@ -1212,10 +1223,11 @@
);
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = Appstore_com.skychip.lock.mobileprovision;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h";
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = "Release-sky";
@ -1224,6 +1236,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = CDC2B8ED804B514A774F187D /* Pods-Runner.release-xhj.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = "Runner/RunnerRelease-xhj.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
@ -1243,6 +1256,8 @@
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h";
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = "Release-xhj";
@ -1470,6 +1485,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 72E2A6A227EA101C0167D322 /* Pods-Runner.debug-local.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = "Runner/RunnerDebug-dev.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@ -1489,6 +1505,9 @@
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = "Debug-local";
@ -1568,6 +1587,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = D697F91E8405773AB9A5881E /* Pods-Runner.pre-release-sky.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = "Runner/RunnerRelease-sky.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
@ -1587,6 +1607,8 @@
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h";
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = "Pre-release-sky";
@ -1666,6 +1688,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 126D1370182AB44291C67A10 /* Pods-Runner.dev-release-sky.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = "Runner/RunnerRelease-sky.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
@ -1685,6 +1708,8 @@
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h";
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = "Dev-release-sky";
@ -1764,6 +1789,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 789004F1B475B44713E199BC /* Pods-Runner.pre-release-xhj.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = "Runner/RunnerRelease-xhj.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
@ -1783,6 +1809,8 @@
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h";
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = "Pre-release-xhj";
@ -1862,6 +1890,7 @@
isa = XCBuildConfiguration;
baseConfigurationReference = ED3A443EA1439FD0FB4BCF80 /* Pods-Runner.dev-release-xhj.xcconfig */;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = "Runner/RunnerRelease-xhj.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
@ -1881,6 +1910,8 @@
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h";
SWIFT_VERSION = 6.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = "Dev-release-xhj";

View File

@ -3,13 +3,19 @@
#import "GeneratedPluginRegistrant.h"
#import "CommonDefine.h"
#import "XSFlutterManager.h"
#import "Runner-Swift.h"
#import <UserNotifications/UserNotifications.h>
#import <PushKit/PushKit.h>
#import <CallKit/CallKit.h>
// #import <UMCommon/UMCommon.h>
@interface AppDelegate()
@interface AppDelegate()<PKPushRegistryDelegate, CXProviderDelegate>
@property (nonatomic, strong) FlutterMethodChannel *methodChannel;
@property (nonatomic, strong) CXProvider *callKitProvider;
@property (nonatomic, copy) NSString *pendingCallKitEvent; // CallKit
@property (nonatomic, strong) NSUUID *lastCallUUID;
@end
@ -34,11 +40,54 @@
}
[JPUSHService registerForRemoteNotificationConfig:entity delegate:self];
// VoIP
PKPushRegistry *voipRegistry = [[PKPushRegistry alloc] initWithQueue:dispatch_get_main_queue()];
voipRegistry.delegate = self;
voipRegistry.desiredPushTypes = [NSSet setWithObject:PKPushTypeVoIP];
XSFlutterManager *VC = [[XSFlutterManager alloc] init];
self.window.rootViewController = VC;
[self.window makeKeyAndVisible];
// FlutterMethodChannel
FlutterViewController *controller = (FlutterViewController *)self.window.rootViewController;
self.methodChannel = [FlutterMethodChannel methodChannelWithName:@"com.starlock/callkit" binaryMessenger:controller.binaryMessenger];
// pending
__weak typeof(self) weakSelf = self;
[self.methodChannel setMethodCallHandler:^(FlutterMethodCall *call, FlutterResult result) {
if ([call.method isEqualToString:@"get_pending_event"]) {
if (weakSelf.pendingCallKitEvent) {
result(weakSelf.pendingCallKitEvent);
weakSelf.pendingCallKitEvent = nil;
} else {
result(nil);
}
} else if ([call.method isEqualToString:@"end_call"]) {
NSLog(@"[CallKit] 收到Flutter端结束通话请求");
// CallKit
// UUID
if (weakSelf.lastCallUUID) {
CXCallEndedReason reason = CXCallEndedReasonRemoteEnded;
[weakSelf.callKitProvider reportCallWithUUID:weakSelf.lastCallUUID endedAtDate:[NSDate date] reason:reason];
weakSelf.lastCallUUID = nil;
result(@"ok");
} else {
NSLog(@"[CallKit] 无有效UUID无法结束通话");
result(@"no_call");
}
} else {
result(FlutterMethodNotImplemented);
}
}];
// CallKit Provider
#if USE_CALLKIT
CXProviderConfiguration *providerConfiguration = [[CXProviderConfiguration alloc] initWithLocalizedName:@"来电"];
providerConfiguration.supportsVideo = NO;
providerConfiguration.maximumCallsPerCallGroup = 1;
self.callKitProvider = [[CXProvider alloc] initWithConfiguration:providerConfiguration];
[self.callKitProvider setDelegate:self queue:nil];
#endif
return YES;
}
@ -168,6 +217,68 @@
[JPUSHService handleRemoteNotification:userInfo];
}
#pragma mark - PKPushRegistryDelegate
// VoIP Token
- (void)pushRegistry:(PKPushRegistry *)registry didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(PKPushType)type {
if ([type isEqualToString:PKPushTypeVoIP]) {
const unsigned char *tokenBytes = credentials.token.bytes;
NSMutableString *tokenString = [NSMutableString string];
for (NSInteger i = 0; i < credentials.token.length; i++) {
[tokenString appendFormat:@"%02x", tokenBytes[i]];
}
NSLog(@"[VoIP] didUpdatePushCredentials, token: %@", tokenString);
}
}
// VoIP
- (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(PKPushType)type withCompletionHandler:(void (^)(void))completion {
if ([type isEqualToString:PKPushTypeVoIP]) {
NSLog(@"[VoIP] didReceiveIncomingPushWithPayload: %@", payload.dictionaryPayload);
#if USE_CALLKIT
// CallKit
NSString *callerName = @"来电"; // payload
// provider
CXCallUpdate *update = [[CXCallUpdate alloc] init];
update.remoteHandle = [[CXHandle alloc] initWithType:CXHandleTypeGeneric value:callerName];
update.hasVideo = NO;
NSUUID *callUUID = [NSUUID UUID];
self.lastCallUUID = callUUID;
[self.callKitProvider reportNewIncomingCallWithUUID:callUUID update:update completion:^(NSError * _Nullable error) {
if (error) {
NSLog(@"CallKit error: %@", error);
}
}];
#else
// 使LiveCommunicationKit
UIViewController *rootVC = [UIApplication sharedApplication].delegate.window.rootViewController;
NSString *callerName = @"来电"; // payload
[LCKBridge presentCallInterfaceFromRootVC:rootVC callerName:callerName];
#endif
}
if (completion) {
completion();
}
}
#pragma mark - CXProviderDelegate
// "接听"
- (void)provider:(CXProvider *)provider performAnswerCallAction:(CXAnswerCallAction *)action {
NSLog(@"[CallKit] 用户接听来电");
if (self.methodChannel) {
[self.methodChannel invokeMethod:@"callkit_answered" arguments:nil];
} else {
self.pendingCallKitEvent = @"callkit_answered";
}
[action fulfill];
}
// "拒绝"
- (void)provider:(CXProvider *)provider performEndCallAction:(CXEndCallAction *)action {
NSLog(@"[CallKit] 用户拒绝/挂断来电");
if (self.methodChannel) {
[self.methodChannel invokeMethod:@"callkit_declined" arguments:nil];
} else {
self.pendingCallKitEvent = @"callkit_declined";
}
[action fulfill];
}
@end

View File

@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
@ -53,6 +51,8 @@
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
@ -108,6 +108,9 @@
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
<string>voip</string>
<string>processing</string>
<string>fetch</string>
</array>
<key>UIFileSharingEnabled</key>
<true/>

View File

@ -0,0 +1,60 @@
import Foundation
import UIKit
#if USE_CALLKIT
import CallKit
#endif
import LiveCommunicationKit
@objc(LCKBridge)
class LCKBridge: NSObject {
// CallKit
@objc(presentCallInterfaceWithCallKit:)
class func presentCallInterfaceWithCallKit(_ callerName: NSString) {
#if USE_CALLKIT
let providerConfiguration = CXProviderConfiguration(localizedName: callerName as String)
providerConfiguration.supportsVideo = false
providerConfiguration.maximumCallsPerCallGroup = 1
let provider = CXProvider(configuration: providerConfiguration)
let update = CXCallUpdate()
update.remoteHandle = CXHandle(type: .generic, value: callerName as String)
update.hasVideo = false
provider.setDelegate(nil, queue: nil)
provider.reportNewIncomingCall(with: UUID(), update: update) { error in
if let error = error {
print("CallKit来电弹窗失败: \(error.localizedDescription)")
} else {
print("CallKit来电弹窗成功")
}
}
#endif
}
// LiveCommunicationKit
@objc(presentCallInterfaceFromRootVC:callerName:)
class func presentCallInterfaceFromRootVC(_ rootVC: UIViewController, callerName: NSString) {
#if !USE_CALLKIT
if #available(iOS 17.4, *) {
// ConversationManager
let config = ConversationManager.Configuration(
ringtoneName: "notes_of_the_optimistic",
iconTemplateImageData: UIImage(named: "AppIcon")?.pngData(),
maximumConversationGroups: 1,
maximumConversationsPerConversationGroup: 1,
includesConversationInRecents: false,
supportsVideo: false,
supportedHandleTypes: [.generic, .phoneNumber, .emailAddress]
)
let manager = ConversationManager(configuration: config)
let local = Handle(type: .generic, value: callerName as String, displayName: callerName as String)
let update = Conversation.Update(localMember: local, members: [local], activeRemoteMembers: [local])
Task {
do {
try await manager.reportNewIncomingConversation(uuid: UUID(), update: update)
print("成功报告新来电")
} catch {
print("报告新来电失败: \(error.localizedDescription)")
}
}
}
#endif
}
}

View File

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<string>production</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:lock.skychip.top</string>

View File

@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
@ -53,6 +51,8 @@
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
@ -86,6 +86,8 @@
<string>应用请求相机,以便于拍摄照片,用于头像上传及人脸认证</string>
<key>NSContactsUsageDescription</key>
<string>Reason we need access to the contact list</string>
<key>NSFileProtectionKey</key>
<string>NSFileProtectionCompleteUntilFirstUserAuthentication</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备</string>
<key>NSLocationAlwaysUsageDescription</key>
@ -106,7 +108,12 @@
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
<string>voip</string>
<string>processing</string>
<string>fetch</string>
</array>
<key>UIFileSharingEnabled</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>skyLaunchScreen</string>
<key>UIMainStoryboardFile</key>
@ -123,10 +130,6 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSFileProtectionKey</key>
<string>NSFileProtectionCompleteUntilFirstUserAuthentication</string>
<key>UIFileSharingEnabled</key>
<true/>
<key>io.flutter.embedded_views_preview</key>
<true/>
</dict>

View File

@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
@ -53,6 +51,8 @@
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
@ -108,6 +108,9 @@
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
<string>voip</string>
<string>processing</string>
<string>fetch</string>
</array>
<key>UIFileSharingEnabled</key>
<true/>

View File

@ -19,6 +19,7 @@ import 'package:star_lock/talk/starChart/handle/impl/debug_Info_model.dart';
import 'package:star_lock/talk/starChart/status/appLifecycle_observer.dart';
import 'package:star_lock/tools/baseGetXController.dart';
import 'package:star_lock/tools/bugly/bugly_tool.dart';
import 'package:star_lock/tools/callkit_handler.dart';
import 'package:star_lock/tools/device_info_service.dart';
import 'package:star_lock/tools/eventBusEventManage.dart';
import 'package:star_lock/tools/jverify_one_click_login.dart';
@ -65,6 +66,7 @@ FutureOr<void> main() async {
// runApp(MultiProvider(providers: [
// ChangeNotifierProvider(create: (_) => DebugInfoModel()),
// ], child: MyApp(isLogin: isLogin)));
CallKitHandler.setupListener();
runApp(MyApp(isLogin: isLogin));
}, onException: (FlutterErrorDetails details) async {
debugPrint('FlutterErrorDetails ${details.exceptionAsString()}');

View File

@ -36,6 +36,7 @@ import 'package:star_lock/talk/starChart/views/native/talk_view_native_decode_st
import 'package:star_lock/talk/starChart/views/talkView/talk_view_state.dart';
import 'package:star_lock/tools/G711Tool.dart';
import 'package:star_lock/tools/bugly/bugly_tool.dart';
import 'package:star_lock/tools/callkit_handler.dart';
import 'package:star_lock/tools/commonDataManage.dart';
import 'package:star_lock/tools/storage.dart';
import 'package:video_decode_plugin/nalu_utils.dart';
@ -159,6 +160,9 @@ class TalkViewNativeDecodeLogic extends BaseGetXController {
//
StartChartManage().startTalkRejectMessageTimer();
}
if (Platform.isIOS) {
CallKitHandler.endCall();
}
VideoDecodePlugin.releaseDecoder();
Get.back();
}
@ -172,7 +176,6 @@ class TalkViewNativeDecodeLogic extends BaseGetXController {
int frameSeqI,
ScpMessage scpMessage,
) {
// frameSeq较小时阈值也小
if (!_pendingStreamReset &&
_lastFrameSeq != null &&
@ -181,7 +184,8 @@ class TalkViewNativeDecodeLogic extends BaseGetXController {
int dynamicThreshold = _getFrameSeqRolloverThreshold(_lastFrameSeq!);
if ((_lastFrameSeq! - frameSeq) > dynamicThreshold) {
// I帧frameSeq大幅回绕loading并重置所有本地状态
AppLog.log('检测到新流I帧frameSeq大幅回绕进入loading并重置: frameSeq=$frameSeq, lastFrameSeq=$_lastFrameSeq, 阈值=$dynamicThreshold');
AppLog.log(
'检测到新流I帧frameSeq大幅回绕进入loading并重置: frameSeq=$frameSeq, lastFrameSeq=$_lastFrameSeq, 阈值=$dynamicThreshold');
Future.microtask(() => state.isLoading.value = true);
_pendingStreamReset = true;
//
@ -198,7 +202,8 @@ class TalkViewNativeDecodeLogic extends BaseGetXController {
//
} else {
//
AppLog.log('检测到I帧乱序未超过回绕阈值$dynamicThreshold),丢弃: frameSeq=$frameSeq, lastFrameSeq=$_lastFrameSeq');
AppLog.log(
'检测到I帧乱序未超过回绕阈值$dynamicThreshold),丢弃: frameSeq=$frameSeq, lastFrameSeq=$_lastFrameSeq');
return;
}
}

View File

@ -0,0 +1,56 @@
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import 'package:star_lock/appRouters.dart';
import 'package:star_lock/app_settings/app_settings.dart';
class CallKitHandler {
static const MethodChannel _channel = MethodChannel('com.starlock/callkit');
static bool _isInitialized = false;
/// context
static void setupListener() async {
if (_isInitialized) {
print('CallKitHandler.setupListener 已初始化,跳过');
return;
}
_isInitialized = true;
print('CallKitHandler.setupListener 初始化准备拉取pending事件');
// pending事件
final pendingEvent =
await _channel.invokeMethod<String>('get_pending_event');
print('CallKitHandler 拉取到pendingEvent: $pendingEvent');
if (pendingEvent == 'callkit_answered') {
print('启动时拉取到callkit_answered跳转到对讲页面');
//
} else if (pendingEvent == 'callkit_declined') {
print('启动时拉取到callkit_declined返回主页面');
} else {
print('启动时无pending事件');
}
//
_channel.setMethodCallHandler((call) async {
print('CallKitHandler 收到原生事件: ${call.method}');
if (call.method == 'callkit_answered') {
print('跳转到对讲页面');
String currentRoute = Get.currentRoute;
print('当前路由: $currentRoute');
if (currentRoute != Routers.h264View) {
Get.toNamed(
Routers.h264View,
);
}
} else if (call.method == 'callkit_declined') {
print('返回主页面');
} else {
print('收到未知事件: ${call.method}');
}
});
print('CallKitHandler.setupListener 监听已注册');
}
/// CallKit通话
static Future<void> endCall() async {
print('CallKitHandler.endCall 通知原生端结束通话');
await _channel.invokeMethod('end_call');
}
}