From 517b6b6734f1e77b1b5f973d2aa8311e3f0b8b08 Mon Sep 17 00:00:00 2001 From: liyi Date: Mon, 30 Jun 2025 17:17:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:voip=E6=94=B6=E5=88=B0=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E7=9A=84=E5=9F=BA=E7=A1=80=E5=8A=9F=E8=83=BD=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Podfile.lock | 133 +++++++++++++-------------- ios/Runner.xcodeproj/project.pbxproj | 7 +- ios/Runner/AppDelegate.m | 29 +++++- ios/Runner/Info.plist | 5 +- ios/Runner/info_sky.plist | 13 +-- ios/Runner/info_xhj.plist | 5 +- 6 files changed, 104 insertions(+), 88 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 16e3f421..71433310 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -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 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 7a12c6ca..f99d9efd 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -1200,10 +1200,8 @@ buildSettings = { 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,7 +1210,6 @@ ); 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; diff --git a/ios/Runner/AppDelegate.m b/ios/Runner/AppDelegate.m index b648e544..92350cc0 100755 --- a/ios/Runner/AppDelegate.m +++ b/ios/Runner/AppDelegate.m @@ -5,10 +5,11 @@ #import "XSFlutterManager.h" #import +#import // #import -@interface AppDelegate() +@interface AppDelegate() @property (nonatomic, strong) FlutterMethodChannel *methodChannel; @end @@ -34,6 +35,10 @@ } [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; @@ -168,6 +173,26 @@ [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 (completion) { + completion(); + } +} @end diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 0da50486..9260e206 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -2,8 +2,6 @@ - ITSAppUsesNonExemptEncryption - CADisableMinimumFrameDurationOnPhone CFBundleDevelopmentRegion @@ -53,6 +51,8 @@ CFBundleVersion $(FLUTTER_BUILD_NUMBER) + ITSAppUsesNonExemptEncryption + LSApplicationQueriesSchemes weixin @@ -108,6 +108,7 @@ UIBackgroundModes remote-notification + voip UIFileSharingEnabled diff --git a/ios/Runner/info_sky.plist b/ios/Runner/info_sky.plist index 9ccafa1f..b4c7aed1 100755 --- a/ios/Runner/info_sky.plist +++ b/ios/Runner/info_sky.plist @@ -2,8 +2,6 @@ - ITSAppUsesNonExemptEncryption - CADisableMinimumFrameDurationOnPhone CFBundleDevelopmentRegion @@ -53,6 +51,8 @@ CFBundleVersion $(FLUTTER_BUILD_NUMBER) + ITSAppUsesNonExemptEncryption + LSApplicationQueriesSchemes weixin @@ -86,6 +86,8 @@ 应用请求相机,以便于拍摄照片,用于头像上传及人脸认证 NSContactsUsageDescription Reason we need access to the contact list + NSFileProtectionKey + NSFileProtectionCompleteUntilFirstUserAuthentication NSLocationAlwaysAndWhenInUseUsageDescription 我们需要访问您的位置信息,以便更加精准的扫描到所在位置的蓝牙锁设备 NSLocationAlwaysUsageDescription @@ -106,7 +108,10 @@ UIBackgroundModes remote-notification + voip + UIFileSharingEnabled + UILaunchStoryboardName skyLaunchScreen UIMainStoryboardFile @@ -123,10 +128,6 @@ UIViewControllerBasedStatusBarAppearance - NSFileProtectionKey - NSFileProtectionCompleteUntilFirstUserAuthentication - UIFileSharingEnabled - io.flutter.embedded_views_preview diff --git a/ios/Runner/info_xhj.plist b/ios/Runner/info_xhj.plist index fee509c2..35272474 100755 --- a/ios/Runner/info_xhj.plist +++ b/ios/Runner/info_xhj.plist @@ -2,8 +2,6 @@ - ITSAppUsesNonExemptEncryption - CADisableMinimumFrameDurationOnPhone CFBundleDevelopmentRegion @@ -53,6 +51,8 @@ CFBundleVersion $(FLUTTER_BUILD_NUMBER) + ITSAppUsesNonExemptEncryption + LSApplicationQueriesSchemes weixin @@ -108,6 +108,7 @@ UIBackgroundModes remote-notification + voip UIFileSharingEnabled