From a9ffaba490172aba3c347661bbf5ffb7a2d47ce1 Mon Sep 17 00:00:00 2001 From: zu Date: Tue, 28 Dec 2021 01:03:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE-=E4=B8=AA=E4=BA=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=92=8C=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Podfile.lock | 2 +- xplan-ios.xcodeproj/project.pbxproj | 12 + .../Contents.json | 22 ++ .../album@2x.png | Bin 0 -> 1119 bytes .../album@3x.png | Bin 0 -> 2094 bytes .../Contents.json | 22 ++ .../camera@2x.png | Bin 0 -> 881 bytes .../camera@3x.png | Bin 0 -> 1646 bytes .../Contents.json | 22 ++ .../voice@2x.png | Bin 0 -> 1309 bytes .../voice@3x.png | Bin 0 -> 2951 bytes xplan-ios/Global/XPHtmlUrl.h | 3 + xplan-ios/Global/XPHtmlUrl.m | 9 +- .../Main/Mine/Model/XPMineSettingItemModel.h | 1 + .../Mine/Presenter/XPMineSettingPresent.m | 10 +- .../Mine/View/XPMineSettingViewController.m | 7 + .../Mine/View/XPPermissionsViewController.h | 16 + .../Mine/View/XPPermissionsViewController.m | 292 ++++++++++++++++++ .../Main/Mine/View/XPPrivacyViewController.h | 16 + .../Main/Mine/View/XPPrivacyViewController.m | 127 ++++++++ 20 files changed, 555 insertions(+), 6 deletions(-) create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_album.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_album.imageset/album@2x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_album.imageset/album@3x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_camera.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_camera.imageset/camera@2x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_camera.imageset/camera@3x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_voice.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_voice.imageset/voice@2x.png create mode 100644 xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_voice.imageset/voice@3x.png create mode 100644 xplan-ios/Main/Mine/View/XPPermissionsViewController.h create mode 100644 xplan-ios/Main/Mine/View/XPPermissionsViewController.m create mode 100644 xplan-ios/Main/Mine/View/XPPrivacyViewController.h create mode 100644 xplan-ios/Main/Mine/View/XPPrivacyViewController.m diff --git a/Podfile.lock b/Podfile.lock index 44ddcec7..2334230c 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -196,4 +196,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: a3a94c2fefbbf41722d4664a7a8c01ae0311c8e1 -COCOAPODS: 1.10.1 +COCOAPODS: 1.11.0 diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index 1db4a615..74ac5141 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -112,6 +112,8 @@ 9B7D804D27537950003DAC0C /* MessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D804C27537950003DAC0C /* MessageCell.m */; }; 9B7D80502753AA9D003DAC0C /* UITableView+NIMScrollToBottom.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D804E2753AA9D003DAC0C /* UITableView+NIMScrollToBottom.m */; }; 9B7D80562753C595003DAC0C /* SendMessageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D80552753C595003DAC0C /* SendMessageView.m */; }; + 9BAA5FED277A1BBE007453F3 /* XPPrivacyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BAA5FEC277A1BBE007453F3 /* XPPrivacyViewController.m */; }; + 9BAA5FF0277A23F4007453F3 /* XPPermissionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BAA5FEF277A23F4007453F3 /* XPPermissionsViewController.m */; }; E80487652717DDD9008595F2 /* XPRoomMenuItem.m in Sources */ = {isa = PBXBuildFile; fileRef = E80487642717DDD9008595F2 /* XPRoomMenuItem.m */; }; E811FFF72742367B00918544 /* XPGiftEmptyCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E811FFF62742367B00918544 /* XPGiftEmptyCollectionViewCell.m */; }; E8133916273E532D00708B66 /* XPGiftItemCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8133915273E532D00708B66 /* XPGiftItemCollectionViewCell.m */; }; @@ -574,6 +576,10 @@ 9B7D804F2753AA9D003DAC0C /* UITableView+NIMScrollToBottom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITableView+NIMScrollToBottom.h"; sourceTree = ""; }; 9B7D80542753C595003DAC0C /* SendMessageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SendMessageView.h; sourceTree = ""; }; 9B7D80552753C595003DAC0C /* SendMessageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SendMessageView.m; sourceTree = ""; }; + 9BAA5FEB277A1BBE007453F3 /* XPPrivacyViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPPrivacyViewController.h; sourceTree = ""; }; + 9BAA5FEC277A1BBE007453F3 /* XPPrivacyViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPPrivacyViewController.m; sourceTree = ""; }; + 9BAA5FEE277A23F4007453F3 /* XPPermissionsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPPermissionsViewController.h; sourceTree = ""; }; + 9BAA5FEF277A23F4007453F3 /* XPPermissionsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPPermissionsViewController.m; sourceTree = ""; }; 9BB865B4272076140029CDE0 /* RtcImplDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RtcImplDelegate.h; sourceTree = ""; }; B66633E061B1B34177CD011C /* Pods-xplan-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-xplan-ios.release.xcconfig"; path = "Target Support Files/Pods-xplan-ios/Pods-xplan-ios.release.xcconfig"; sourceTree = ""; }; CACF623970097D653132D69A /* Pods_xplan_ios.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_xplan_ios.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -2880,6 +2886,10 @@ E8B846C826FDD79700A777FE /* Recharge */, E88B5CBE26FB404800DA9178 /* MineInfo */, E88B5CA926FB15B900DA9178 /* Teenager */, + 9BAA5FEB277A1BBE007453F3 /* XPPrivacyViewController.h */, + 9BAA5FEC277A1BBE007453F3 /* XPPrivacyViewController.m */, + 9BAA5FEE277A23F4007453F3 /* XPPermissionsViewController.h */, + 9BAA5FEF277A23F4007453F3 /* XPPermissionsViewController.m */, ); path = View; sourceTree = ""; @@ -3403,6 +3413,7 @@ 186A536B26FC6F2E00D67B2C /* XPShareItemCell.m in Sources */, E8B846C526FDB41A00A777FE /* XPMineUserInfolbumPresenter.m in Sources */, E83DB47D2746372300D8CBD1 /* XPRoomGiftBannerView.m in Sources */, + 9BAA5FED277A1BBE007453F3 /* XPPrivacyViewController.m in Sources */, E872309326E8D31500B90D4F /* LoginVerifCodeView.m in Sources */, 186A534626FC6ED900D67B2C /* TTPopup.m in Sources */, E81C278C26EAFAF60031E639 /* Base64.m in Sources */, @@ -3467,6 +3478,7 @@ E8A03DF927634A590098D9EA /* CandyTreeResultModel.m in Sources */, E872308D26E89DAA00B90D4F /* LoginInputView.m in Sources */, E8788948273A55D000BF1D57 /* XPGiftBarView.m in Sources */, + 9BAA5FF0277A23F4007453F3 /* XPPermissionsViewController.m in Sources */, 189DD58F26DF97E700AB55B1 /* LoginPresenter.m in Sources */, E89DA67227008D59008483C1 /* WalletInfoModel.m in Sources */, 189DD55026DE37F900AB55B1 /* MvpViewController.m in Sources */, diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_album.imageset/Contents.json b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_album.imageset/Contents.json new file mode 100644 index 00000000..97f641fc --- /dev/null +++ b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_album.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "album@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "album@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_album.imageset/album@2x.png b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_album.imageset/album@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..add229ca2cabf820fe2afd4984a3e0f348b07e59 GIT binary patch literal 1119 zcmV-l1fctgP)Px(8A(JzRA@u(nO}$-MI6V!znR>nhAOs~Y_W(B+WMjt<+$DKRVgZnigNg1twq`g zeN(U~D4ZhrV8w!Rh%bUZSk(IGL5lbX!AeoP*$sz!_|#S(M1)InS2=s8M)Yis~;oZ@`%ESpwoqy^i~Y;FNis0N4Gwvp%sHyo$6u8;!*fLIKR)Pa1y zbYHcq4+6Lmz{x~HOpcAEzlcS7Eofu_zIdhhC^OUQCL&@fX(CRD$N(It@H2p$nq>PI z+cs{A%Y`TbmH-UG>!Myy3``u18bew^NQn2@z(%01gh5CsgypjW5<@|PUEc$fajHNs8;n4 zL`a`^rzHB32oGCU=C@8DA_vIj<|dfc8$_guc+#?rBS9h4(|>PTS^38o?;mz88vRAY zk7cvQ(RL7#0(f3&w^I5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t@`5ud|)piHrNjU4GDn<8XEA2<;#7eWdcMoB3^7YTU~{7 zzu$lHsM&3;SS%jYb=t|yAIXVJ86tY7sfq4iy3{+79~H8m>;C`Lse!t5THL|RI{+-P zu1v#1;5VwO?jIY=Y%KQvK`AGz#tPcX-`{d8tE+5=;3rNbTgJw)QA)W9fJ($aZ)~hT zxNKR&a7k1q7gmlRPc0c6)1PFt>dpXU3cG@86w zO8FCJgi2_1dH~guTiGc;zE_?(zzk!bshA6?&H>e;TiHP}_M3)>u~|xaud&Zvz?vKb zs%5vb)ZNIJhK5qN=(;?}%zd&|`zS;{)4@Oaf`iBfbdWvSs> zkZVDc!-&~ijh)Q+UTr!@d8H!4_d_B7?%ZA`0n)VieNs|)k-LE9mAImZn~ zumu#2CRa*{KQYU9_(Qtu=@W^5A@J$^{czI7;W(PB^e&@xc zHy`%KRMoR*(W0imEnEoG%N6clUMOIlE+7|>vjFB=kZVD%1vw+&T97k-ZVYlQ$e9KG YA0&2El(UKJ-2eap07*qoM6N<$g0}AevH$=8 literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_camera.imageset/Contents.json b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_camera.imageset/Contents.json new file mode 100644 index 00000000..a1f7606d --- /dev/null +++ b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_camera.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "camera@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "camera@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_camera.imageset/camera@2x.png b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_camera.imageset/camera@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..9820e77ccd8f3b952d136f77226af7fb02f6a546 GIT binary patch literal 881 zcmV-%1CIQOP)Px&D@jB_RA@u(nLlU~aTLeDFPEea@lQ*Wwz?D)1hpVBIsZhCkMg7yM$)3DhMrfkp9V)R&58H^z!74mt1OUFTdP1oFr?0 z@4fHm_ulXKd%xciGfVLCkD34t&R#PEnznSBnI8eXzqVx191&fV<@VRL*;S6ND+5zg z-}kJo{hS7}<%v}ZGVP^CKyj!$3-L<1tB1{4_ zwt3g807#|u+l2yOcQ?4Z-U0!-lT1c$SYAs2#r?c6;chr@yb%QktW4Md^f%0W(wmU( zdL^Q_vK&2SdMyE{s=i{cc}b!ZiA40hyP?IrrPF$!Veq@MHLWU2v~?3ecEj#oQDQ-{ zaNby{YIS|K3^V~SJB!f5!r}lx{mc{xU^RGiM4SQmWoKu{M0YpxwdTq545U)oGlc@~ z0XVpgxS2ozSCh%ui&`K&1IT0$$mO!5M0A;%$%!Z;vvT=CI2;>^$5C)%;~9XeX72*H z;zUH1G4~ZEcFl>cCje&IFw?V5Grtb-V@V2)OA>uH#Tf=4F^v2WKo4VJt z)Fxy-6e49S@z%IM5Nc&6_?#?vJpWfIc>s`o!i=GEP=2T=9mCG*d2tM&OXX6+xGcxc z?Yo5UYz391U|%B9mUaS=PA?}6W5d>_&=*CC9^Gkxiry(44(*G_Ti2WbWHKv} zTrU5uT5q$Jz3U~Us@W9)r3+7e09aL&*ze|S2LXIuLYn6DMXYIygUsaLZPfP%nYq|} z-AY)yg|C}A6TT3EjRz#+0bG}=b!8(E`8+v7I@8l8<_{bdYZCScH@00000NkvXX Hu0mjfFBF(% literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_camera.imageset/camera@3x.png b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_camera.imageset/camera@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..6bd24adeddd3917e1dc990f07623862656251b69 GIT binary patch literal 1646 zcmV-!29f!RP)Px*C`m*?RCr$Pn`>-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pJ}EEfA50IsJa=Kgay_!I5z^`DrLYa5_IVB|0nJe8^}WB7qAOV64y zBDJilYVUDQPpAHl2p@KI)NV5)+crR|s(sHnDXGf3T-e##Dt&Fnh}5z@J=z1Y80n|B zNgreAmu2Z5GqP<1lrA$_QsQc8X<6}?86#55_V!-7ab_kqxX^==GlAK(VH+U7f8?^! zogj|~E1R06a5l=PE7RYvl}%2P(QFk`l-lKHWZMQvcu@~ literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_voice.imageset/Contents.json b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_voice.imageset/Contents.json new file mode 100644 index 00000000..c38e2c47 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_voice.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "voice@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "voice@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_voice.imageset/voice@2x.png b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_voice.imageset/voice@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..969917c09aaad14ae7e95e3b85bc692b1145081b GIT binary patch literal 1309 zcmV+&1>*XNP)Px(*GWV{RA@u(Szl;dWfVW>-kYROrQ4d^Z2qIdU=I_Dq-nmdR$HCQCOUL5@J048 zMC!v3_A+p=4HWh=kUdyLd>Fn6gDE;TQK#*ky*EvQ^kLvYu=sCllD3xWY?7OM5VN~Q990N7s}AdLh9>TBKI;UAkpq$vbaseGSh+2;XZt4mPR znx^cJ$HP}$%C9Tto4}&y?a>CnJ7A^*0j1Y(BzzMvjLFNZ(}pepz&pWUFfGs)i^XmL zcmn{RU+GF3;XJzAPZWF+5Cv=7))z7WL^{S;^we6QOmp%m5xymVQxxr4KZWg!fN5rj zh~U)UZdcPfMH~>0l-d)z|)*ZhwBg+0Kl&#nd_YE zyKWPK+zbHS>nt7&1~$iHTmGyCCX<=Dr&uigQIWwp&LdlH6M?KHFU+~FxdCDr-t^Y8 z?Kg#51cX=JMy?fsY7cnLWv_az2(%)wTYAxB~RcKxo-PAEC= z^*p&=UsOwPVgdp;Ze;(KbPJs8cduuwW(|yvW^W=w*iqiJNqwNJtK+6bUMdZJr1iM$QBvaUEQER8`&G)6+2`5%7HqEtKu{~lt@I*dLod?FVbY35!hqBAmBO~d|p zJo23{0*g_Y{FDfvlMIzqRox@+NPcFcOFNG^goSgd`bDFlR(R4V^+ zxlA7t5z3K3#3S?bks+rh>MiJe7dhY7mK!9Z(@gxZ zvDz?Y5b>zIJJnizakrsUa=}(o2Tm}iuNXi2u7PS20C>DA5(^^YoIu3$h+1aU%LIHLXQ6CZQm-qP!a3laa*$8;oHBjvVkxrIni#B_?4{{Uk8ZvX5rVP4G z8`(}nDI_b3!Y-BO&s6PB4f8;xi-ADfVK)W4mT}Jn9Ak!&??a>`M6_2vvFk9g5b+Wb zp61-&zcjuHI6y_)VOg}-wn=QCyW}o*Q3lfhbWKt4il*VETJ1q2VQdP5X?b{YZi zxrp5?(jwr-OKzGumv&Z(-SH7uhwZ_OcI TC4DqU00000NkvXXu0mjf{o!OD literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_voice.imageset/voice@3x.png b/xplan-ios/Assets.xcassets/Mine/Setting/mine_setting_permission_voice.imageset/voice@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..821f0ad757d74a163bfb5efddaf2b39bd17247f6 GIT binary patch literal 2951 zcmV;23wZR2P)Px=K}keGRCr$Pn}2XzRTam-=f2%dvPsh>-QA=u#agSa;YVB2><^04L9sB1I*9xj zK`g&4wL!t5RkTt-P|65OYr*nM6b4abRAc}VrYP% zB&EAAyWRITKPWSMXZD}B=b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ot1Ji+ftj&e2yLCyY5V0!f08ibfRt~8&w^?IR%N?ivfyt%qJISFF1Op= zoGl&5N9nOXqXH<^pl~>G9sOawQ znvhJY6H54)`Lv-QsJtKGFA>ppK!$BLvAwvsSBNlp}6sK4y6#FiKJDAz7Y$qc1J?ou*zxyW^d>IwdlLFA-8;K>%bmIUZURPS` xSUb`;p7{_wDFEeT_*nHR0LnqS04N8b{{!&%@RZ5f=1u?r002ovPDHLkV1k>Hr4j%D literal 0 HcmV?d00001 diff --git a/xplan-ios/Global/XPHtmlUrl.h b/xplan-ios/Global/XPHtmlUrl.h index 2b8749ea..6873ea79 100644 --- a/xplan-ios/Global/XPHtmlUrl.h +++ b/xplan-ios/Global/XPHtmlUrl.h @@ -13,6 +13,9 @@ NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, URLType) { kPrivacyURL,///隐私政策 + kPrivacySDKURL,// 隐私政策-SDK + kPrivacyPersonalURL,// 隐私政策-个人信息 + kPrivacyDeviceURL,// 隐私政策-设备权限 kUserProtocalURL, ///用户协议 kUserInviteFriendURL, ///邀请好友 kFAQURL,///帮助 diff --git a/xplan-ios/Global/XPHtmlUrl.m b/xplan-ios/Global/XPHtmlUrl.m index 1ec0e224..40a445f6 100644 --- a/xplan-ios/Global/XPHtmlUrl.m +++ b/xplan-ios/Global/XPHtmlUrl.m @@ -12,9 +12,12 @@ NSString * const URLWithType(URLType type) { NSString * prefix = @"yinyou"; NSDictionary * dic = @{ - @(kPrivacyURL) : @"modules/rule/privacy-wap.html", - @(kUserProtocalURL) : @"modules/rule/protocol.html", - @(kUserInviteFriendURL) : @"modules/game/index.html", + @(kPrivacyURL) : @"modules/rule/privacy-wap.html",//隐私政策 + @(kPrivacySDKURL) : @"modules/rule/sdk.html",//隐私政策-SDK + @(kPrivacyPersonalURL) : @"modules/rule/personal-info.html",//隐私政策-个人信息 + @(kPrivacyDeviceURL) : @"modules/rule/permissions.html",//隐私政策-设备权限 + @(kUserProtocalURL) : @"modules/rule/protocol.html",///用户协议 + @(kUserInviteFriendURL) : @"modules/game/index.html",///邀请好友 @(kFAQURL) : @"modules/rule/guide.html ",//常见问题 @(kIdentityURL) : @"modules/identity/new.html",//实人认证 @(kGameBindAccountURL) : @"modules/game/bindAccount.html",///绑定账号 diff --git a/xplan-ios/Main/Mine/Model/XPMineSettingItemModel.h b/xplan-ios/Main/Mine/Model/XPMineSettingItemModel.h index 11ee1e19..a1ef60ee 100644 --- a/xplan-ios/Main/Mine/Model/XPMineSettingItemModel.h +++ b/xplan-ios/Main/Mine/Model/XPMineSettingItemModel.h @@ -13,6 +13,7 @@ typedef NS_ENUM(NSInteger, XPMineSettingItemType){ XPMineSettingItemType_Phone, ///手机号 XPMineSettingItemType_Pay_Password,///支付密码 XPMineSettingItemType_Notification_Remind, ///通知提醒 + XPMineSettingItemType_Permission,///关于我们 XPMineSettingItemType_Helper,///帮助 XPMineSettingItemType_Feedback,//我要反馈 XPMineSettingItemType_Clear_Memory,///清楚缓存 diff --git a/xplan-ios/Main/Mine/Presenter/XPMineSettingPresent.m b/xplan-ios/Main/Mine/Presenter/XPMineSettingPresent.m index 5e27b6dc..2fd19b2e 100644 --- a/xplan-ios/Main/Mine/Presenter/XPMineSettingPresent.m +++ b/xplan-ios/Main/Mine/Presenter/XPMineSettingPresent.m @@ -54,6 +54,11 @@ notificaItem.title = @"通知提醒设置"; notificaItem.subTitle = @"设置"; notificaItem.type = XPMineSettingItemType_Notification_Remind; + + XPMineSettingItemModel * privacyItem = [[XPMineSettingItemModel alloc] init]; + privacyItem.title = @"个人信息与权限"; + privacyItem.subTitle = @""; + privacyItem.type = XPMineSettingItemType_Permission; XPMineSettingItemModel * helperItem = [[XPMineSettingItemModel alloc] init]; helperItem.title = @"帮助"; @@ -77,9 +82,10 @@ NSArray * oneSection = @[phoneItem]; NSArray * twoSection = @[payItem, notificaItem]; - NSArray * threeSection = @[helperItem, feedbackItem, clearMemoryItem, aboutusItem]; + NSArray * threeSection = @[privacyItem]; + NSArray * fourthSection = @[helperItem, feedbackItem, clearMemoryItem, aboutusItem]; - self.datasouce = @[oneSection, twoSection, threeSection]; + self.datasouce = @[oneSection, twoSection, threeSection, fourthSection]; } [[self getView] getMineSettingDatasourceSuccess:self.datasouce]; diff --git a/xplan-ios/Main/Mine/View/XPMineSettingViewController.m b/xplan-ios/Main/Mine/View/XPMineSettingViewController.m index 90f3786d..2b2ebb7c 100644 --- a/xplan-ios/Main/Mine/View/XPMineSettingViewController.m +++ b/xplan-ios/Main/Mine/View/XPMineSettingViewController.m @@ -31,6 +31,7 @@ #import "XPMineNotificaViewController.h" #import "XPMinePayPwdViewController.h" #import "XPMineModifPayPwdViewController.h" +#import "XPPrivacyViewController.h" ///不同模块的VC #import "XPWebViewController.h" #import "XPLoginVerifBindPhoneViewController.h" @@ -121,6 +122,12 @@ [self.navigationController pushViewController:notiVC animated:YES]; } break; + case XPMineSettingItemType_Permission: + { + XPPrivacyViewController * pvc = [[XPPrivacyViewController alloc] init]; + [self.navigationController pushViewController:pvc animated:YES]; + } + break; case XPMineSettingItemType_Helper: { [self pushWebViewWIthUrl:URLWithType(kFAQURL)]; diff --git a/xplan-ios/Main/Mine/View/XPPermissionsViewController.h b/xplan-ios/Main/Mine/View/XPPermissionsViewController.h new file mode 100644 index 00000000..91493039 --- /dev/null +++ b/xplan-ios/Main/Mine/View/XPPermissionsViewController.h @@ -0,0 +1,16 @@ +// +// XPPermissionsViewController.h +// xplan-ios +// +// Created by zu on 2021/12/28. +// + +#import "BaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface XPPermissionsViewController : BaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/XPPermissionsViewController.m b/xplan-ios/Main/Mine/View/XPPermissionsViewController.m new file mode 100644 index 00000000..b747de5c --- /dev/null +++ b/xplan-ios/Main/Mine/View/XPPermissionsViewController.m @@ -0,0 +1,292 @@ +// +// XPPermissionsViewController.m +// xplan-ios +// +// Created by zu on 2021/12/28. +// + +#import "XPPermissionsViewController.h" +#import +#import +#import +#import "XPMacro.h" +#import "ThemeColor.h" + +@interface XPPermissionCell : UITableViewCell + +@property (nonatomic, strong) UIImageView * icon; +@property (nonatomic, strong) UILabel * name; +@property (nonatomic, strong) UILabel * tip; + +@end + +@implementation XPPermissionCell + +- (instancetype)init { + if (self == [super init]) { + self.selectionStyle = UITableViewCellSelectionStyleNone; + self.backgroundColor = UIColor.clearColor; + [self.contentView addSubview:self.icon]; + [self.contentView addSubview:self.name]; + [self.contentView addSubview:self.tip]; + self.contentView.backgroundColor = ThemeColor.appCellBackgroundColor; + self.contentView.layer.masksToBounds = YES; + self.contentView.layer.cornerRadius = 8; + [self.icon mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self.contentView); + make.left.mas_equalTo(self.contentView).offset(15); + }]; + [self.name mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.icon.mas_right).offset(8); + make.top.mas_equalTo(self.contentView).offset(16); + }]; + [self.tip mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.icon.mas_right).offset(8); + make.bottom.mas_equalTo(self.contentView).offset(-16); + }]; + } + return self; +} + +- (UIImageView *)icon { + if (!_icon) { + _icon = [[UIImageView alloc] init]; + } + return _icon; +} + +- (UILabel *)name { + if (!_name) { + _name = [[UILabel alloc] init]; + _name.textColor = ThemeColor.mainTextColor; + _name.font = [UIFont systemFontOfSize:14]; + } + return _name; +} + +- (UILabel *)tip { + if (!_tip) { + _tip = [[UILabel alloc] init]; + _tip.textColor = ThemeColor.secondTextColor; + _tip.font = [UIFont systemFontOfSize:13]; + } + return _tip; +} + +@end + +@interface XPPermissionsViewController () + +@property (nonatomic,strong) UITableView * tableView; + +@property (nonatomic, strong) NSMutableArray * permissionIcons; +@property (nonatomic, strong) NSMutableArray * permissionNames; +@property (nonatomic, strong) NSMutableArray * permissionTips; + +@property (nonatomic, strong) UIView * empty; +@property (nonatomic, strong) UIImageView * emptyImage; +@property (nonatomic, strong) UILabel * emptyTip; + +@property (nonatomic, strong) UIView * footer; +@property (nonatomic, strong) UILabel * footerTip; +@property (nonatomic, strong) UIButton * gotoSetting; + +@end + +@implementation XPPermissionsViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + self.title = @"系统权限管理"; + [self.empty addSubview:self.emptyImage]; + [self.empty addSubview:self.emptyTip]; + [self.view addSubview:self.tableView]; + [self.footer addSubview:self.footerTip]; + [self.footer addSubview:self.gotoSetting]; + [self.view addSubview:self.footer]; +} + +- (void)viewDidLayoutSubviews { + [super viewDidLayoutSubviews]; + [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.top.right.bottom.mas_equalTo(self.view).insets(UIEdgeInsetsMake(16, 16, 16, 16)); + }]; + [self.emptyImage mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.empty); + make.top.mas_equalTo(self.empty).offset(200); + make.size.mas_equalTo(CGSizeMake(100, 100)); + }]; + [self.emptyTip mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.empty); + make.top.mas_equalTo(self.emptyImage.mas_bottom).offset(16); + }]; + [self.footer mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self.view); + make.bottom.mas_equalTo(self.view).offset(-kSafeAreaBottomHeight); + make.height.mas_equalTo(100); + }]; + [self.footerTip mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.footer); + make.top.mas_equalTo(self.footer).offset(24); + }]; + [self.gotoSetting mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.footer); + make.top.mas_equalTo(self.footerTip.mas_bottom).offset(40); + }]; +} + +- (void)viewWillAppear:(BOOL)animated { + PHAuthorizationStatus phStatus = [PHPhotoLibrary authorizationStatus]; + if (phStatus == PHAuthorizationStatusAuthorized) { + [self.permissionNames addObject:@"照片"]; + [self.permissionTips addObject:@"读取相册或者存储图片到相册"]; + [self.permissionIcons addObject:@"mine_setting_permission_album"]; + } + + AVAuthorizationStatus microPhoneStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeAudio]; + if (microPhoneStatus == AVAuthorizationStatusAuthorized) { + [self.permissionNames addObject:@"麦克风"]; + [self.permissionTips addObject:@"录制音频"]; + [self.permissionIcons addObject:@"mine_setting_permission_voice"]; + } + + AVAuthorizationStatus cameraStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo]; + if (cameraStatus == AVAuthorizationStatusAuthorized) { + [self.permissionNames addObject:@"相机"]; + [self.permissionTips addObject:@"拍摄照片或录制视频"]; + [self.permissionIcons addObject:@"mine_setting_permission_camera"]; + } +} + +- (void)gotoSettingClick:(UIButton *)sender { + NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString]; + if ([[UIApplication sharedApplication] canOpenURL:url]) { + [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; + } +} + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + tableView.backgroundView = self.permissionNames.count == 0 ? self.empty : nil; + return self.permissionNames.count; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return 1; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { + if (section == 0) { + return 0.001f; + } + return 16.f; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + return 70.f; +} + +-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { + UIView *view = [[UIView alloc] init]; + view.backgroundColor = [UIColor clearColor]; + return view; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + NSInteger section = indexPath.section; + XPPermissionCell * cell = [[XPPermissionCell alloc] init]; + cell.icon.image = [UIImage imageNamed:[self.permissionIcons objectAtIndex:section]]; + cell.name.text = [self.permissionNames objectAtIndex:section]; + cell.tip.text = [self.permissionTips objectAtIndex:section]; + return cell; +} + +- (UITableView *)tableView { + if (!_tableView) { + _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; + _tableView.delegate = self; + _tableView.dataSource = self; + _tableView.showsVerticalScrollIndicator = NO; + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; + _tableView.backgroundColor = [UIColor clearColor]; + [_tableView registerClass:[XPPermissionCell class] forCellReuseIdentifier:NSStringFromClass([XPPermissionCell class])]; + } + return _tableView; +} + +- (NSMutableArray *)permissionIcons { + if (!_permissionIcons) { + _permissionIcons = [[NSMutableArray alloc] init]; + } + return _permissionIcons; +} + +- (NSMutableArray *)permissionNames { + if (!_permissionNames) { + _permissionNames = [[NSMutableArray alloc] init]; + } + return _permissionNames; +} + +- (NSMutableArray *)permissionTips { + if (!_permissionTips) { + _permissionTips = [[NSMutableArray alloc] init]; + } + return _permissionTips; +} + +- (UIView *)empty { + if (!_empty) { + _empty = [[UIView alloc] init]; + } + return _empty; +} + +- (UIImageView *)emptyImage { + if (!_emptyImage) { + _emptyImage = [[UIImageView alloc] init]; + _emptyImage.contentMode = UIViewContentModeScaleAspectFit; + _emptyImage.image = [UIImage imageNamed:@"common_empty"]; + } + return _emptyImage; +} + +- (UILabel *)emptyTip { + if (!_emptyTip) { + _emptyTip = [[UILabel alloc] init]; + _emptyTip.textColor = ThemeColor.secondTextColor; + _emptyTip.font = [UIFont systemFontOfSize:12]; + _emptyTip.text = @"未有已授权的系统权限"; + } + return _emptyTip; +} + +- (UIView *)footer { + if (!_footer) { + _footer = [[UIView alloc] init]; + } + return _footer; +} + +- (UILabel *)footerTip { + if (!_footerTip) { + _footerTip = [[UILabel alloc] init]; + _footerTip.textColor = ThemeColor.mainTextColor; + _footerTip.font = [UIFont systemFontOfSize:12]; + _footerTip.text = @"—— 仅展示能查询到的已授权系统权限 ——"; + } + return _footerTip; +} + +- (UIButton *)gotoSetting { + if (!_gotoSetting) { + _gotoSetting = [UIButton buttonWithType:UIButtonTypeCustom]; + [_gotoSetting setTitle:@"前往系统设置>" forState:UIControlStateNormal]; + [_gotoSetting setTitleColor:ThemeColor.appMainColor forState:UIControlStateNormal]; + _gotoSetting.titleLabel.font = [UIFont systemFontOfSize:14]; + _gotoSetting.titleLabel.adjustsFontSizeToFitWidth = YES; + [_gotoSetting addTarget:self action:@selector(gotoSettingClick:) forControlEvents:UIControlEventTouchUpInside]; + } + return _gotoSetting; +} + +@end diff --git a/xplan-ios/Main/Mine/View/XPPrivacyViewController.h b/xplan-ios/Main/Mine/View/XPPrivacyViewController.h new file mode 100644 index 00000000..e461995c --- /dev/null +++ b/xplan-ios/Main/Mine/View/XPPrivacyViewController.h @@ -0,0 +1,16 @@ +// +// XPPrivacyViewController.h +// xplan-ios +// +// Created by zu on 2021/12/28. +// + +#import "BaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface XPPrivacyViewController : BaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Mine/View/XPPrivacyViewController.m b/xplan-ios/Main/Mine/View/XPPrivacyViewController.m new file mode 100644 index 00000000..16bd077c --- /dev/null +++ b/xplan-ios/Main/Mine/View/XPPrivacyViewController.m @@ -0,0 +1,127 @@ +// +// XPPrivacyViewController.m +// xplan-ios +// +// Created by zu on 2021/12/28. +// + +#import "XPPrivacyViewController.h" +#import +#import "XPMineSettingTableViewCell.h" +#import "XPMineSettingItemModel.h" +#import "XPWebViewController.h" +#import "XPPermissionsViewController.h" +#import "XPHtmlUrl.h" + +@interface XPPrivacyViewController () + +@property (nonatomic, strong) UITableView * tableView; + +@property (nonatomic, strong) NSArray * datasource; + +@end + +@implementation XPPrivacyViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + self.title = @"个人信息与权限"; + [self.view addSubview:self.tableView]; + [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.mas_equalTo(self.view); + make.top.mas_equalTo(0); + }]; +} + +- (void)pushWebViewWIthUrl:(NSString *)url { + XPWebViewController * webVC = [[XPWebViewController alloc] init]; + webVC.url = url; + [self.navigationController pushViewController:webVC animated:YES]; +} + +#pragma mark - UITableViewDelegate And UITableViewDataSource +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + return 45; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.datasource.count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + XPMineSettingTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineSettingTableViewCell class])]; + if (cell == nil) { + cell = [[XPMineSettingTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineSettingTableViewCell class])]; + } + + cell.itemModel = [self.datasource objectAtIndex:indexPath.row]; + return cell; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + [tableView deselectRowAtIndexPath:indexPath animated:YES]; + switch (indexPath.row) { + case 0: + { + XPPermissionsViewController * pvc = [[XPPermissionsViewController alloc] init]; + [self.navigationController pushViewController:pvc animated:YES]; + } + break; + case 1: + [self pushWebViewWIthUrl:URLWithType(kPrivacyURL)]; + break; + case 2: + [self pushWebViewWIthUrl:URLWithType(kPrivacySDKURL)]; + break; + case 3: + [self pushWebViewWIthUrl:URLWithType(kPrivacyPersonalURL)]; + break; + case 4: + [self pushWebViewWIthUrl:URLWithType(kPrivacyDeviceURL)]; + break; + default: + break; + } +} + +- (UITableView *)tableView { + if (!_tableView) { + _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; + _tableView.delegate = self; + _tableView.dataSource = self; + _tableView.showsVerticalScrollIndicator = NO; + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; + _tableView.backgroundColor = [UIColor clearColor]; + [_tableView registerClass:[XPMineSettingTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineSettingTableViewCell class])]; + } + return _tableView; +} + +- (NSArray *)datasource { + if (!_datasource) { + XPMineSettingItemModel * sysPermission = [[XPMineSettingItemModel alloc] init]; + sysPermission.title = @"系统权限管理"; + sysPermission.subTitle = @""; + + XPMineSettingItemModel * privacy = [[XPMineSettingItemModel alloc] init]; + privacy.title = @"隐私保护指引"; + privacy.subTitle = @""; + + XPMineSettingItemModel * sdk = [[XPMineSettingItemModel alloc] init]; + sdk.title = @"第三方 SDK 目录"; + sdk.subTitle = @""; + + XPMineSettingItemModel * personalInfo = [[XPMineSettingItemModel alloc] init]; + personalInfo.title = @"个人信息收集清单"; + personalInfo.subTitle = @""; + + XPMineSettingItemModel * permissionList = [[XPMineSettingItemModel alloc] init]; + permissionList.title = @"设备权限清单"; + permissionList.subTitle = @""; + + _datasource = @[sysPermission, privacy, sdk, personalInfo, permissionList]; + } + return _datasource; +} + +@end