From 2265a8478325a04871aab6a86d49c28d7d65443a Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 29 五月 2023 15:17:01 +0800 Subject: [PATCH] 增加开锁二次确认弹窗 --- HDLLinPhoneSDK/HDLLinPhoneSDK.xcodeproj/project.pbxproj | 8 +- HDLLinPhoneSDK/HDLLinPhoneSDK/HDLLinphoneIntercomVC.m | 29 +++++++++ /dev/null | 0 Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK.csproj | 7 +- HDLLinPhoneSDK(OC)/HDLLinPhoneSDK.xcodeproj/project.pbxproj | 2 HDLLinPhoneSDK(OC)/HDLLinPhoneSDK/HDLLinphoneIntercomVC.m | 31 ++++++++++ HDLLinPhoneSDK(OC)/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m | 27 ++++++++ HDLLinPhoneSDK/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m | 29 +++++++++ Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Properties/AssemblyInfo.cs | 2 9 files changed, 123 insertions(+), 12 deletions(-) diff --git a/HDLLinPhoneSDK/HDLLinPhoneSDK.xcodeproj/project.pbxproj b/HDLLinPhoneSDK/HDLLinPhoneSDK.xcodeproj/project.pbxproj index abd263a..eeeec1c 100644 --- a/HDLLinPhoneSDK/HDLLinPhoneSDK.xcodeproj/project.pbxproj +++ b/HDLLinPhoneSDK/HDLLinPhoneSDK.xcodeproj/project.pbxproj @@ -698,7 +698,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -750,7 +750,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -770,7 +770,7 @@ "$(PROJECT_DIR)/HDLLinPhoneSDK/apple-darwin/Frameworks", ); GCC_C_LANGUAGE_STANDARD = gnu11; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ""; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = "-ObjC"; @@ -794,7 +794,7 @@ "$(PROJECT_DIR)/HDLLinPhoneSDK/apple-darwin/Frameworks", ); GCC_C_LANGUAGE_STANDARD = gnu11; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ""; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/HDLLinPhoneSDK/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m b/HDLLinPhoneSDK/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m index dd4878b..dcf3093 100644 --- a/HDLLinPhoneSDK/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m +++ b/HDLLinPhoneSDK/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m @@ -59,6 +59,10 @@ NSString * LCSdkToken; NSString * LCHostApi; + + NSString * cancelStr; + NSString * tipMsgStr; + CGFloat Height66; bool isShowErrorAlert; // int _openDoorTimeout; @@ -114,6 +118,8 @@ unlockStr = @"寮�閿�"; endOfMonitoringStr = @"鐩戣缁撴潫"; unlockSuccessfullyStr = @"寮�閿佹垚鍔�"; + cancelStr = @"鍙栨秷"; + tipMsgStr = @"纭畾寮�閿佸悧?"; }else{ tipStr = @"Prompt"; @@ -124,6 +130,8 @@ unlockStr = @"Unlock"; endOfMonitoringStr = @"End of monitoring"; unlockSuccessfullyStr = @"Unlock successfully"; + cancelStr = @"Cancel"; + tipMsgStr = @"Are you sure to unlock?"; } @@ -298,7 +306,26 @@ [_unlockTextBtn setTitleColor:TextColor forState:UIControlStateNormal]; //寮�閿� if(self.hdlLinphoneCallDelegate != NULL){ - [self.hdlLinphoneCallDelegate onUnlockAction]; + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:tipStr message:tipMsgStr preferredStyle:UIAlertControllerStyleAlert]; + + // 娣诲姞鍙栨秷鎸夐挳 + UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelStr style:UIAlertActionStyleCancel handler:nil]; + [alertController addAction:cancelAction]; + + // 娣诲姞纭鎸夐挳 + WEAKSELF_AT + UIAlertAction *confirmAction = [UIAlertAction actionWithTitle:okStr style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { + + [weakSelf_AT.hdlLinphoneCallDelegate onUnlockAction]; + }]; + [alertController addAction:confirmAction]; + + // 鑾峰彇褰撳墠瑙嗗浘鎺у埗鍣� + UIViewController *currentViewController = [UIApplication sharedApplication].keyWindow.rootViewController; + + // 鏄剧ず寮圭獥 + [currentViewController presentViewController:alertController animated:YES completion:nil]; + } } diff --git a/HDLLinPhoneSDK/HDLLinPhoneSDK/HDLLinphoneIntercomVC.m b/HDLLinPhoneSDK/HDLLinPhoneSDK/HDLLinphoneIntercomVC.m index ad92e58..33682da 100644 --- a/HDLLinPhoneSDK/HDLLinPhoneSDK/HDLLinphoneIntercomVC.m +++ b/HDLLinPhoneSDK/HDLLinPhoneSDK/HDLLinphoneIntercomVC.m @@ -50,6 +50,10 @@ NSString * callingStr; NSString * hangUpStr; NSString * endOfCallStr; + + NSString * cancelStr; + NSString * tipMsgStr; + // int openDoorTimeout; //鍏ㄥ眬鍙橀噺 SystemSoundID sound; @@ -109,6 +113,8 @@ unlockSuccessfullyStr = @"寮�閿佹垚鍔�"; callingStr = @"鏉ョ數涓�..."; endOfCallStr = @"閫氳瘽缁撴潫"; + cancelStr = @"鍙栨秷"; + tipMsgStr = @"纭畾寮�閿佸悧?"; }else{ tipStr = @"Prompt"; okStr = @"OK"; @@ -120,6 +126,8 @@ unlockSuccessfullyStr = @"Unlock successfully"; callingStr = @"Incoming call"; endOfCallStr = @"End of call"; + cancelStr = @"Cancel"; + tipMsgStr = @"Are you sure to unlock?"; } } @@ -279,7 +287,26 @@ [_unlockImgBtn setImage:[UIImage imageNamed:@"ic_esvideo_on_unlock_unselect"] forState:UIControlStateNormal]; //寮�閿� if(self.hdlLinphoneCallDelegate != NULL){ - [self.hdlLinphoneCallDelegate onUnlockAction]; + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:tipStr message:tipMsgStr preferredStyle:UIAlertControllerStyleAlert]; + + // 娣诲姞鍙栨秷鎸夐挳 + UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelStr style:UIAlertActionStyleCancel handler:nil]; + [alertController addAction:cancelAction]; + + // 娣诲姞纭鎸夐挳 + WEAKSELF_AT + UIAlertAction *confirmAction = [UIAlertAction actionWithTitle:okStr style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { + + [weakSelf_AT.hdlLinphoneCallDelegate onUnlockAction]; + }]; + [alertController addAction:confirmAction]; + + // 鑾峰彇褰撳墠瑙嗗浘鎺у埗鍣� + UIViewController *currentViewController = [UIApplication sharedApplication].keyWindow.rootViewController; + + // 鏄剧ず寮圭獥 + [currentViewController presentViewController:alertController animated:YES completion:nil]; + } } diff --git "a/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK.xcodeproj/project.pbxproj" "b/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK.xcodeproj/project.pbxproj" index 793b313..e907658 100644 --- "a/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK.xcodeproj/project.pbxproj" +++ "b/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK.xcodeproj/project.pbxproj" @@ -36,6 +36,7 @@ AEC00E13287403E80009221E /* limetester.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AEC00E12287403E80009221E /* limetester.framework */; }; AEC00E15287403F90009221E /* linphonetester.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AEC00E14287403F90009221E /* linphonetester.framework */; }; AEF6AC05282B8E9B00C9FD36 /* bctoolbox-ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AEF6AC04282B8E9B00C9FD36 /* bctoolbox-ios.framework */; }; + DB3B5BB12A247868000AD34E /* libHDLLinPhoneSDK.a in CopyFiles */ = {isa = PBXBuildFile; fileRef = AE9CC92F26B8DD3F00FD514C /* libHDLLinPhoneSDK.a */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -45,6 +46,7 @@ dstPath = "include/$(PRODUCT_NAME)"; dstSubfolderSpec = 16; files = ( + DB3B5BB12A247868000AD34E /* libHDLLinPhoneSDK.a in CopyFiles */, AE7718EE26BD250C00C9FD1B /* HDLLinphoneCallDelegate.h in CopyFiles */, AEB4A76626BBF57B005641ED /* HDLLinPhoneSDK.h in CopyFiles */, ); diff --git "a/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m" "b/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m" index 247edac..63e68f9 100644 --- "a/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m" +++ "b/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLPOnMonitorViewController.m" @@ -58,6 +58,8 @@ NSString * LCSdkToken; NSString * LCHostApi; + NSString * cancelStr; + NSString * tipMsgStr; CGFloat Height66; bool isShowErrorAlert; @@ -120,6 +122,8 @@ unlockStr = @"寮�閿�"; endOfMonitoringStr = @"鐩戣缁撴潫"; unlockSuccessfullyStr = @"寮�閿佹垚鍔�"; + cancelStr = @"鍙栨秷"; + tipMsgStr = @"纭畾寮�閿佸悧?"; }else{ tipStr = @"Prompt"; @@ -130,6 +134,8 @@ unlockStr = @"Unlock"; endOfMonitoringStr = @"End of monitoring"; unlockSuccessfullyStr = @"Unlock successfully"; + cancelStr = @"Cancel"; + tipMsgStr = @"Are you sure to unlock?"; } @@ -304,7 +310,26 @@ [_unlockTextBtn setTitleColor:TextColor forState:UIControlStateNormal]; //寮�閿� if(self.hdlLinphoneCallDelegate != NULL){ - [self.hdlLinphoneCallDelegate onUnlockAction]; + + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:tipStr message:tipMsgStr preferredStyle:UIAlertControllerStyleAlert]; + + // 娣诲姞鍙栨秷鎸夐挳 + UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelStr style:UIAlertActionStyleCancel handler:nil]; + [alertController addAction:cancelAction]; + + // 娣诲姞纭鎸夐挳 + WEAKSELF_AT + UIAlertAction *confirmAction = [UIAlertAction actionWithTitle:okStr style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { + + [weakSelf_AT.hdlLinphoneCallDelegate onUnlockAction]; + }]; + [alertController addAction:confirmAction]; + + // 鑾峰彇褰撳墠瑙嗗浘鎺у埗鍣� + UIViewController *currentViewController = [UIApplication sharedApplication].keyWindow.rootViewController; + + // 鏄剧ず寮圭獥 + [self presentViewController:alertController animated:YES completion:nil]; } } diff --git "a/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLinphoneIntercomVC.m" "b/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLinphoneIntercomVC.m" index 90fba0f..2b70d1b 100644 --- "a/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLinphoneIntercomVC.m" +++ "b/HDLLinPhoneSDK\357\274\210OC\357\274\211/HDLLinPhoneSDK/HDLLinphoneIntercomVC.m" @@ -53,6 +53,11 @@ NSString * callingStr; NSString * hangUpStr; NSString * endOfCallStr; + + + NSString * cancelStr; + NSString * tipMsgStr; + // int openDoorTimeout; //鍏ㄥ眬鍙橀噺 SystemSoundID sound; @@ -121,6 +126,8 @@ unlockSuccessfullyStr = @"寮�閿佹垚鍔�"; callingStr = @"鏉ョ數涓�..."; endOfCallStr = @"閫氳瘽缁撴潫"; + cancelStr = @"鍙栨秷"; + tipMsgStr = @"纭畾寮�閿佸悧?"; }else{ tipStr = @"Prompt"; okStr = @"OK"; @@ -132,6 +139,8 @@ unlockSuccessfullyStr = @"Unlock successfully"; callingStr = @"Incoming call"; endOfCallStr = @"End of call"; + cancelStr = @"Cancel"; + tipMsgStr = @"Are you sure to unlock?"; } } @@ -290,7 +299,27 @@ [_unlockImgBtn setImage:[UIImage imageNamed:@"ic_esvideo_on_unlock_unselect"] forState:UIControlStateNormal]; //寮�閿� if(self.hdlLinphoneCallDelegate != NULL){ - [self.hdlLinphoneCallDelegate onUnlockAction]; + + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:tipStr message:tipMsgStr preferredStyle:UIAlertControllerStyleAlert]; + + // 娣诲姞鍙栨秷鎸夐挳 + UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelStr style:UIAlertActionStyleCancel handler:nil]; + [alertController addAction:cancelAction]; + + // 娣诲姞纭鎸夐挳 + WEAKSELF_AT + UIAlertAction *confirmAction = [UIAlertAction actionWithTitle:okStr style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { + + [weakSelf_AT.hdlLinphoneCallDelegate onUnlockAction]; + }]; + [alertController addAction:confirmAction]; + + // 鑾峰彇褰撳墠瑙嗗浘鎺у埗鍣� + UIViewController *currentViewController = [UIApplication sharedApplication].keyWindow.rootViewController; + + // 鏄剧ず寮圭獥 + [self presentViewController:alertController animated:YES completion:nil]; + } } diff --git a/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/libHDLLinPhoneSDK.a b/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/libHDLLinPhoneSDK.a deleted file mode 100644 index 1ecd467..0000000 --- a/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Library/libHDLLinPhoneSDK.a +++ /dev/null Binary files differ diff --git a/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Properties/AssemblyInfo.cs b/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Properties/AssemblyInfo.cs index 53d41dc..3a080a2 100644 --- a/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Properties/AssemblyInfo.cs +++ b/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Properties/AssemblyInfo.cs @@ -25,7 +25,7 @@ // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion("1.0.1.8")] +[assembly: AssemblyVersion("1.23.5.30")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK.csproj b/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK.csproj index 5f42027..2016e14 100644 --- a/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK.csproj +++ b/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK/Shared.IOS.HDLLinphoneSDK.csproj @@ -68,9 +68,6 @@ <NativeReference Include="Library\belr.framework"> <Kind>Framework</Kind> </NativeReference> - <NativeReference Include="Library\libHDLLinPhoneSDK.a"> - <Kind>Static</Kind> - </NativeReference> <NativeReference Include="Library\lime.framework"> <Kind>Framework</Kind> </NativeReference> @@ -109,6 +106,10 @@ <Kind>Framework</Kind> <SmartLink>False</SmartLink> </NativeReference> + <NativeReference Include="..\..\..\..\libHDLLinPhoneSDK.a"> + <Kind>Static</Kind> + <SmartLink>False</SmartLink> + </NativeReference> </ItemGroup> <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" /> </Project> \ No newline at end of file -- Gitblit v1.8.0