Compare commits
7 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
1eb9d23fc1 | |
|
|
308ec16cab | |
|
|
b6c6d84ae0 | |
|
|
275568f41d | |
|
|
42fea4563a | |
|
|
9e1d7338ab | |
|
|
da806b847e |
|
|
@ -18,7 +18,6 @@ CoreSimulator/
|
|||
|
||||
# Pods / Carthage / Swift Package Manager
|
||||
Pods/
|
||||
Podfile.lock
|
||||
Carthage/Build/
|
||||
Package/.build/
|
||||
Package.resolved
|
||||
|
|
|
|||
3
Podfile
|
|
@ -61,9 +61,6 @@ target 'QuickLocation' do
|
|||
pod 'GYSDK' #个推一键登录
|
||||
pod 'OpenIMSDK' #OpenIM
|
||||
pod 'CocoaMQTT' #MQTT
|
||||
|
||||
#支付宝
|
||||
pod 'AlipaySDK-iOS'
|
||||
|
||||
#wechat
|
||||
pod 'WechatOpenSDK-XCFramework'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
PODS:
|
||||
- Alamofire (5.10.1)
|
||||
- AlipaySDK-iOS (15.8.30)
|
||||
- AMapFoundation-NO-IDFA (1.9.0)
|
||||
- AMapLocation-NO-IDFA (2.12.0):
|
||||
- AMapFoundation-NO-IDFA (>= 1.9.0)
|
||||
|
|
@ -193,7 +192,6 @@ PODS:
|
|||
- ZXSDK (3.3.2)
|
||||
|
||||
DEPENDENCIES:
|
||||
- AlipaySDK-iOS
|
||||
- AMapLocation-NO-IDFA
|
||||
- AMapNavi-NO-IDFA
|
||||
- AMapSearch-NO-IDFA
|
||||
|
|
@ -240,7 +238,6 @@ DEPENDENCIES:
|
|||
SPEC REPOS:
|
||||
https://gitee.com/mirrors/CocoaPods-Specs.git:
|
||||
- Alamofire
|
||||
- AlipaySDK-iOS
|
||||
- AMapFoundation-NO-IDFA
|
||||
- AMapLocation-NO-IDFA
|
||||
- AMapNavi-NO-IDFA
|
||||
|
|
@ -314,7 +311,6 @@ CHECKOUT OPTIONS:
|
|||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: 840d2a1ad82355b536ec6ba5f97e5bfa54600ca3
|
||||
AlipaySDK-iOS: 913a1df564c64798903e71cf3d63141d9e1904d2
|
||||
AMapFoundation-NO-IDFA: a2e3c895398d7ee757278e1a0a8f9359da4b146e
|
||||
AMapLocation-NO-IDFA: 7cd8fc837ea41edfbf4d937cd20572e277b77d18
|
||||
AMapNavi-NO-IDFA: d55b9b138c6e540f737c689975cae2c9dbd1026a
|
||||
|
|
@ -374,6 +370,6 @@ SPEC CHECKSUMS:
|
|||
YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54
|
||||
ZXSDK: 786338c0a18e98e03eda00699c3bfd2700b97117
|
||||
|
||||
PODFILE CHECKSUM: 3272194e421676580050601835b59f7c4d288888
|
||||
PODFILE CHECKSUM: 0e3348cb4e694c0fbb5e657521976c728ee2f5c2
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
|
|
|
|||
|
|
@ -101,8 +101,6 @@
|
|||
305A76E02FCA8C7000227D26 /* GroupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A76232FCA8C7000227D26 /* GroupView.swift */; };
|
||||
305A76E12FCA8C7000227D26 /* GroupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A76242FCA8C7000227D26 /* GroupViewController.swift */; };
|
||||
305A76E22FCA8C7000227D26 /* GroupViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A76252FCA8C7000227D26 /* GroupViewModel.swift */; };
|
||||
305A76E32FCA8C7000227D26 /* GroupMemberView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A76272FCA8C7000227D26 /* GroupMemberView.swift */; };
|
||||
305A76E42FCA8C7000227D26 /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A76282FCA8C7000227D26 /* HomeView.swift */; };
|
||||
305A76E52FCA8C7000227D26 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A76292FCA8C7000227D26 /* HomeViewController.swift */; };
|
||||
305A76E62FCA8C7000227D26 /* LaunchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A762B2FCA8C7000227D26 /* LaunchViewController.swift */; };
|
||||
305A76E72FCA8C7000227D26 /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A762D2FCA8C7000227D26 /* LoginView.swift */; };
|
||||
|
|
@ -167,7 +165,6 @@
|
|||
3062E8BE2FCEBD0E00CEF511 /* GroupIconListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3062E8BD2FCEBD0E00CEF511 /* GroupIconListVC.swift */; };
|
||||
3062E8C02FCED7BB00CEF511 /* GroupIconListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3062E8BF2FCED7BB00CEF511 /* GroupIconListView.swift */; };
|
||||
3062E8C22FCFB86800CEF511 /* CreateGroupViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3062E8C12FCFB86800CEF511 /* CreateGroupViewModel.swift */; };
|
||||
3062E8C42FCFC90F00CEF511 /* CreateGroupVipPopView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3062E8C32FCFC90F00CEF511 /* CreateGroupVipPopView.swift */; };
|
||||
307073E12FD15F50004C37CC /* GroupIMService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307073E02FD15F50004C37CC /* GroupIMService.swift */; };
|
||||
307073E52FD18A20004C37CC /* GroupChatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307073E32FD18A20004C37CC /* GroupChatView.swift */; };
|
||||
307073E62FD18A20004C37CC /* GroupChatVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307073E22FD18A20004C37CC /* GroupChatVC.swift */; };
|
||||
|
|
@ -188,13 +185,10 @@
|
|||
30A87A622FEE724D0095E7C6 /* CreateBubbleTiemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A612FEE724D0095E7C6 /* CreateBubbleTiemView.swift */; };
|
||||
30A87A642FEE75520095E7C6 /* CreateBubbleTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A632FEE75520095E7C6 /* CreateBubbleTipsView.swift */; };
|
||||
30A87A662FEE843E0095E7C6 /* CreateBubbleDoneView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A652FEE843E0095E7C6 /* CreateBubbleDoneView.swift */; };
|
||||
30A87A682FEE86560095E7C6 /* CreateBubblePopView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A672FEE86560095E7C6 /* CreateBubblePopView.swift */; };
|
||||
30A87A6B2FEF5B950095E7C6 /* SearchLocationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A6A2FEF5B950095E7C6 /* SearchLocationView.swift */; };
|
||||
30A87A6D2FEF5BA10095E7C6 /* SearchLocationVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A6C2FEF5BA10095E7C6 /* SearchLocationVC.swift */; };
|
||||
30A87A6F2FEF7BE40095E7C6 /* SearchLocationResultVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A6E2FEF7BE40095E7C6 /* SearchLocationResultVC.swift */; };
|
||||
30A87A712FEF7BED0095E7C6 /* SearchLocationResultView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A702FEF7BED0095E7C6 /* SearchLocationResultView.swift */; };
|
||||
30ACD54C2FF6336000174861 /* PopupWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30ACD54B2FF6336000174861 /* PopupWindow.swift */; };
|
||||
30ACD67B2FF7B36A00174861 /* PopupQueueManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30ACD67A2FF7B36A00174861 /* PopupQueueManager.swift */; };
|
||||
30B2D0B12FEB111100CA0001 /* PhotoPickerStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30B2D0B02FEB111100CA0001 /* PhotoPickerStore.swift */; };
|
||||
30B2D0B32FEB111100CA0001 /* PhotoPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30B2D0B22FEB111100CA0001 /* PhotoPickerView.swift */; };
|
||||
30B2D0B52FEB111100CA0001 /* PhotoPickerAlbumView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30B2D0B42FEB111100CA0001 /* PhotoPickerAlbumView.swift */; };
|
||||
|
|
@ -227,9 +221,7 @@
|
|||
30C4C01D2FDBF557009215C1 /* RemoveMemberViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30C4C01C2FDBF557009215C1 /* RemoveMemberViewModel.swift */; };
|
||||
30C4C0202FDC0EC5009215C1 /* GroupInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30C4C01F2FDC0EC5009215C1 /* GroupInfoView.swift */; };
|
||||
30C4C0222FDC0ED3009215C1 /* GroupInfoVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30C4C0212FDC0ED3009215C1 /* GroupInfoVC.swift */; };
|
||||
30C6666C2FFB7C4000E62B25 /* IAPManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30C6666B2FFB7C4000E62B25 /* IAPManager.swift */; };
|
||||
30C6679E2FFB7FEF00E62B25 /* SharePopView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30C6679C2FFB7FEF00E62B25 /* SharePopView.swift */; };
|
||||
30CCDE4E2FE26CEA00F5214A /* PayResultPopVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CCDE4D2FE26CEA00F5214A /* PayResultPopVC.swift */; };
|
||||
30CCDE512FE2785D00F5214A /* SignInVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CCDE502FE2785D00F5214A /* SignInVC.swift */; };
|
||||
30CCDE532FE2786600F5214A /* SignInView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CCDE522FE2786600F5214A /* SignInView.swift */; };
|
||||
30CCDE552FE2903100F5214A /* SignInModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CCDE542FE2903100F5214A /* SignInModel.swift */; };
|
||||
|
|
@ -237,9 +229,6 @@
|
|||
30CCDE5A2FE39F9D00F5214A /* SOSViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CCDE592FE39F9D00F5214A /* SOSViewController.swift */; };
|
||||
30CCDE5C2FE3A1A800F5214A /* SOSPracticeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CCDE5B2FE3A1A800F5214A /* SOSPracticeView.swift */; };
|
||||
30D74AAB2FE8C7700050EB2C /* GPSSignalHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74AAA2FE8C7700050EB2C /* GPSSignalHelper.swift */; };
|
||||
30D74AAE2FEA13E00050EB2C /* ScheduleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74AAD2FEA13E00050EB2C /* ScheduleView.swift */; };
|
||||
30D74AB02FEA13ED0050EB2C /* ScheduleVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74AAF2FEA13ED0050EB2C /* ScheduleVC.swift */; };
|
||||
30D74AB22FEA1D5D0050EB2C /* ScheduleViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74AB12FEA1D5D0050EB2C /* ScheduleViewModel.swift */; };
|
||||
30D74AB42FEA25B90050EB2C /* ViewedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74AB32FEA25B90050EB2C /* ViewedModel.swift */; };
|
||||
30D74AB62FEA34FF0050EB2C /* ItineraryAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74AB52FEA34FF0050EB2C /* ItineraryAPI.swift */; };
|
||||
30D74AB82FEA36A50050EB2C /* ItineraryService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74AB72FEA36A50050EB2C /* ItineraryService.swift */; };
|
||||
|
|
@ -249,13 +238,9 @@
|
|||
30D74AC12FEA6EEF0050EB2C /* CreateSchedulePopView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74AC02FEA6EEF0050EB2C /* CreateSchedulePopView.swift */; };
|
||||
30D74D1F2FEBB09B0050EB2C /* CreateScheduleVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74D1E2FEBB09B0050EB2C /* CreateScheduleVM.swift */; };
|
||||
30D87CDB2FDFA9EE00E958FD /* MQTTService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D87CDA2FDFA9EE00E958FD /* MQTTService.swift */; };
|
||||
30D87CDD2FDFF07500E958FD /* InteractionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D87CDC2FDFF07500E958FD /* InteractionView.swift */; };
|
||||
30D87CDF2FDFF1A100E958FD /* QuickMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D87CDE2FDFF1A100E958FD /* QuickMessageView.swift */; };
|
||||
30D87D042FE1336300E958FD /* NavigationVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D87D012FE1336300E958FD /* NavigationVC.swift */; };
|
||||
30D87D052FE1336300E958FD /* NavigationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D87D022FE1336300E958FD /* NavigationView.swift */; };
|
||||
30D891F52FE22E0600E958FD /* OrderAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D891F42FE22E0600E958FD /* OrderAPI.swift */; };
|
||||
30D891F72FE22E6E00E958FD /* OrderService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D891F62FE22E6E00E958FD /* OrderService.swift */; };
|
||||
30DA36BD2FECC5AB008D5A2C /* CreateScheduleVipPopView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30DA36BC2FECC5AB008D5A2C /* CreateScheduleVipPopView.swift */; };
|
||||
30DC185A2FD11E7A0041DCD1 /* WebOperations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30DC18562FD11E7A0041DCD1 /* WebOperations.swift */; };
|
||||
30DC185B2FD11E7A0041DCD1 /* NavigationTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30DC18552FD11E7A0041DCD1 /* NavigationTitleView.swift */; };
|
||||
30DC185C2FD11E7A0041DCD1 /* WebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30DC18572FD11E7A0041DCD1 /* WebViewController.swift */; };
|
||||
|
|
@ -293,6 +278,7 @@
|
|||
30EFF3E82FCA8C7000227D26 /* AuthenticationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30EFF3E92FCA8C7000227D26 /* AuthenticationServices.framework */; };
|
||||
4392B1D9C125D873FCFCDDC9 /* app_catalog.json in Resources */ = {isa = PBXBuildFile; fileRef = 3C79865C3ED165AFDD091C29 /* app_catalog.json */; };
|
||||
488FF21773B8E5021D8662B5 /* AppRestrictView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 787F87DD1CEBED1A4E1E9FC7 /* AppRestrictView.swift */; };
|
||||
4A69FEABC5F1BA738C35A607 /* ImageCropVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = C39ADD47D3C81F01F6289AC4 /* ImageCropVC.swift */; };
|
||||
4AF6E5954D73E21F31F7A16B /* AppRestrictVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0112B7865829D5B6A4A0BD0 /* AppRestrictVC.swift */; };
|
||||
557E8D5330187A5C0032AB51 /* BaseNavigationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 557E8D5230187A5C0032AB51 /* BaseNavigationView.swift */; };
|
||||
55B2179130217D6600784774 /* HomeView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B2179030217D6600784774 /* HomeView2.swift */; };
|
||||
|
|
@ -302,15 +288,10 @@
|
|||
55B217A33022F0B100784706 /* UIDevice+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217A33022F0B100784707 /* UIDevice+Extension.swift */; };
|
||||
55B217B13022F0A000784711 /* GroupItineraryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217B03022F0A000784710 /* GroupItineraryView.swift */; };
|
||||
55B217C13022F0A000784721 /* MinePhotoWallView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217C03022F0A000784720 /* MinePhotoWallView.swift */; };
|
||||
55B217C33022F0A000784723 /* MemberPhoneReportView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217C23022F0A000784722 /* MemberPhoneReportView.swift */; };
|
||||
55B217C53022F0A000784725 /* MemberAppUsageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217C43022F0A000784724 /* MemberAppUsageView.swift */; };
|
||||
55B217D13022F0A000784727 /* UnlockCountManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217D03022F0A000784726 /* UnlockCountManager.swift */; };
|
||||
55B217D23023010000784731 /* TodayTrackDetailVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217D13023010000784730 /* TodayTrackDetailVC.swift */; };
|
||||
55B217D43023010000784733 /* TodayTrackDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217D33023010000784732 /* TodayTrackDetailView.swift */; };
|
||||
55B217D63023010000784735 /* TodayTrackDetailViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217D53023010000784734 /* TodayTrackDetailViewModel.swift */; };
|
||||
55B217D83023010000784737 /* PhoneReportDetailVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217D73023010000784736 /* PhoneReportDetailVC.swift */; };
|
||||
55B217DA3023010000784739 /* PhoneReportDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217D93023010000784738 /* PhoneReportDetailView.swift */; };
|
||||
55B217DC302301000078473B /* PhoneReportDetailViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217DB302301000078473A /* PhoneReportDetailViewModel.swift */; };
|
||||
55B218A13024A00100784702 /* AboutVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B218A13024A00100784701 /* AboutVC.swift */; };
|
||||
55B218A13024A00100784704 /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B218A13024A00100784703 /* AboutView.swift */; };
|
||||
55B218A13024A00100784706 /* CancelAccountVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B218A13024A00100784705 /* CancelAccountVC.swift */; };
|
||||
|
|
@ -365,12 +346,15 @@
|
|||
55B250083038000100786508 /* MailboxDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B250073038000100786507 /* MailboxDetailViewController.swift */; };
|
||||
55B26001304B000100786601 /* VersionUpgradePopVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B26000304B000100786600 /* VersionUpgradePopVC.swift */; };
|
||||
55B261010000000100786601 /* PrivacySettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B261000000000100786600 /* PrivacySettingsViewController.swift */; };
|
||||
55B2A1013022F0A000784901 /* LaunchPrivacyConsentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B2A1003022F0A000784900 /* LaunchPrivacyConsentView.swift */; };
|
||||
55BF752D2FFE53F70055DA57 /* LocationPermissionPopView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55BF752C2FFE53F70055DA57 /* LocationPermissionPopView.swift */; };
|
||||
55BF75352FFF91690055DA57 /* InteractionEmojiCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55BF75342FFF91690055DA57 /* InteractionEmojiCell.swift */; };
|
||||
55C1A0113034101000786011 /* PhoneStatusCollector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55C1A0103034101000786010 /* PhoneStatusCollector.swift */; };
|
||||
55C1A0213034102000786021 /* PrivilegeDeniedOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55C1A0203034102000786020 /* PrivilegeDeniedOverlay.swift */; };
|
||||
55C219C13024C00100784731 /* SearchLocationHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55C219C13024C00100784730 /* SearchLocationHeaderView.swift */; };
|
||||
55C4C0242FDB91C8009215C2 /* CheckPermissionGuideVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55C4C0232FDB91C8009215C2 /* CheckPermissionGuideVC.swift */; };
|
||||
55CA150E3058E55E000F1189 /* ScheduleViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55CA150B3058E55E000F1189 /* ScheduleViewModel.swift */; };
|
||||
55CA15103058EBE5000F1189 /* InteractionEmojiCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55CA150F3058EBE5000F1189 /* InteractionEmojiCell.swift */; };
|
||||
55CA15123058EC23000F1189 /* InteractionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55CA15113058EC23000F1189 /* InteractionView.swift */; };
|
||||
60BEE25E61F3DE24976A7A47 /* ManagedSettingsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7FE44DF1C46BDA7B98BC7859 /* ManagedSettingsUI.framework */; };
|
||||
68F0D48EB76039050533197C /* AppRestrictShared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AB29D0618C4BE76F2CA5261 /* AppRestrictShared.swift */; };
|
||||
6D90E8FFE4D597E888E6A224 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E326B06736FE04DD7A5E96D /* UIKit.framework */; };
|
||||
|
|
@ -402,6 +386,7 @@
|
|||
E866CAAE7D4E74EB7AD608B9 /* ITunesSearchService.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE3D39F325FC7624C1D914D6 /* ITunesSearchService.swift */; };
|
||||
EA13C1E21EC94958AC9755A8 /* FamilyActivityPickerHost.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF9D223AB35744F92E0E3E77 /* FamilyActivityPickerHost.swift */; };
|
||||
F53E5BD11D671E5CED4E7408 /* ManagedSettingsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7FE44DF1C46BDA7B98BC7859 /* ManagedSettingsUI.framework */; };
|
||||
F9CE7D326B4F4F3C1FFAA447 /* ImageCropView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51E818049FA5A8557C434E37 /* ImageCropView.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
|
@ -539,8 +524,6 @@
|
|||
305A76232FCA8C7000227D26 /* GroupView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupView.swift; sourceTree = "<group>"; };
|
||||
305A76242FCA8C7000227D26 /* GroupViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupViewController.swift; sourceTree = "<group>"; };
|
||||
305A76252FCA8C7000227D26 /* GroupViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupViewModel.swift; sourceTree = "<group>"; };
|
||||
305A76272FCA8C7000227D26 /* GroupMemberView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupMemberView.swift; sourceTree = "<group>"; };
|
||||
305A76282FCA8C7000227D26 /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = "<group>"; };
|
||||
305A76292FCA8C7000227D26 /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = "<group>"; };
|
||||
305A762B2FCA8C7000227D26 /* LaunchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchViewController.swift; sourceTree = "<group>"; };
|
||||
305A762D2FCA8C7000227D26 /* LoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -609,7 +592,6 @@
|
|||
3062E8BD2FCEBD0E00CEF511 /* GroupIconListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupIconListVC.swift; sourceTree = "<group>"; };
|
||||
3062E8BF2FCED7BB00CEF511 /* GroupIconListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupIconListView.swift; sourceTree = "<group>"; };
|
||||
3062E8C12FCFB86800CEF511 /* CreateGroupViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateGroupViewModel.swift; sourceTree = "<group>"; };
|
||||
3062E8C32FCFC90F00CEF511 /* CreateGroupVipPopView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateGroupVipPopView.swift; sourceTree = "<group>"; };
|
||||
307073E02FD15F50004C37CC /* GroupIMService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupIMService.swift; sourceTree = "<group>"; };
|
||||
307073E22FD18A20004C37CC /* GroupChatVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupChatVC.swift; sourceTree = "<group>"; };
|
||||
307073E32FD18A20004C37CC /* GroupChatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupChatView.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -630,13 +612,10 @@
|
|||
30A87A612FEE724D0095E7C6 /* CreateBubbleTiemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateBubbleTiemView.swift; sourceTree = "<group>"; };
|
||||
30A87A632FEE75520095E7C6 /* CreateBubbleTipsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateBubbleTipsView.swift; sourceTree = "<group>"; };
|
||||
30A87A652FEE843E0095E7C6 /* CreateBubbleDoneView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateBubbleDoneView.swift; sourceTree = "<group>"; };
|
||||
30A87A672FEE86560095E7C6 /* CreateBubblePopView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateBubblePopView.swift; sourceTree = "<group>"; };
|
||||
30A87A6A2FEF5B950095E7C6 /* SearchLocationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchLocationView.swift; sourceTree = "<group>"; };
|
||||
30A87A6C2FEF5BA10095E7C6 /* SearchLocationVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchLocationVC.swift; sourceTree = "<group>"; };
|
||||
30A87A6E2FEF7BE40095E7C6 /* SearchLocationResultVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchLocationResultVC.swift; sourceTree = "<group>"; };
|
||||
30A87A702FEF7BED0095E7C6 /* SearchLocationResultView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchLocationResultView.swift; sourceTree = "<group>"; };
|
||||
30ACD54B2FF6336000174861 /* PopupWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopupWindow.swift; sourceTree = "<group>"; };
|
||||
30ACD67A2FF7B36A00174861 /* PopupQueueManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopupQueueManager.swift; sourceTree = "<group>"; };
|
||||
30B2D0B02FEB111100CA0001 /* PhotoPickerStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoPickerStore.swift; sourceTree = "<group>"; };
|
||||
30B2D0B22FEB111100CA0001 /* PhotoPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoPickerView.swift; sourceTree = "<group>"; };
|
||||
30B2D0B42FEB111100CA0001 /* PhotoPickerAlbumView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoPickerAlbumView.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -670,9 +649,7 @@
|
|||
30C4C01C2FDBF557009215C1 /* RemoveMemberViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoveMemberViewModel.swift; sourceTree = "<group>"; };
|
||||
30C4C01F2FDC0EC5009215C1 /* GroupInfoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupInfoView.swift; sourceTree = "<group>"; };
|
||||
30C4C0212FDC0ED3009215C1 /* GroupInfoVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupInfoVC.swift; sourceTree = "<group>"; };
|
||||
30C6666B2FFB7C4000E62B25 /* IAPManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IAPManager.swift; sourceTree = "<group>"; };
|
||||
30C6679C2FFB7FEF00E62B25 /* SharePopView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharePopView.swift; sourceTree = "<group>"; };
|
||||
30CCDE4D2FE26CEA00F5214A /* PayResultPopVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PayResultPopVC.swift; sourceTree = "<group>"; };
|
||||
30CCDE502FE2785D00F5214A /* SignInVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignInVC.swift; sourceTree = "<group>"; };
|
||||
30CCDE522FE2786600F5214A /* SignInView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignInView.swift; sourceTree = "<group>"; };
|
||||
30CCDE542FE2903100F5214A /* SignInModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignInModel.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -680,9 +657,6 @@
|
|||
30CCDE592FE39F9D00F5214A /* SOSViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SOSViewController.swift; sourceTree = "<group>"; };
|
||||
30CCDE5B2FE3A1A800F5214A /* SOSPracticeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SOSPracticeView.swift; sourceTree = "<group>"; };
|
||||
30D74AAA2FE8C7700050EB2C /* GPSSignalHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GPSSignalHelper.swift; sourceTree = "<group>"; };
|
||||
30D74AAD2FEA13E00050EB2C /* ScheduleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScheduleView.swift; sourceTree = "<group>"; };
|
||||
30D74AAF2FEA13ED0050EB2C /* ScheduleVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScheduleVC.swift; sourceTree = "<group>"; };
|
||||
30D74AB12FEA1D5D0050EB2C /* ScheduleViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScheduleViewModel.swift; sourceTree = "<group>"; };
|
||||
30D74AB32FEA25B90050EB2C /* ViewedModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewedModel.swift; sourceTree = "<group>"; };
|
||||
30D74AB52FEA34FF0050EB2C /* ItineraryAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItineraryAPI.swift; sourceTree = "<group>"; };
|
||||
30D74AB72FEA36A50050EB2C /* ItineraryService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItineraryService.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -692,13 +666,9 @@
|
|||
30D74AC02FEA6EEF0050EB2C /* CreateSchedulePopView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateSchedulePopView.swift; sourceTree = "<group>"; };
|
||||
30D74D1E2FEBB09B0050EB2C /* CreateScheduleVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateScheduleVM.swift; sourceTree = "<group>"; };
|
||||
30D87CDA2FDFA9EE00E958FD /* MQTTService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MQTTService.swift; sourceTree = "<group>"; };
|
||||
30D87CDC2FDFF07500E958FD /* InteractionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InteractionView.swift; sourceTree = "<group>"; };
|
||||
30D87CDE2FDFF1A100E958FD /* QuickMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuickMessageView.swift; sourceTree = "<group>"; };
|
||||
30D87D012FE1336300E958FD /* NavigationVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationVC.swift; sourceTree = "<group>"; };
|
||||
30D87D022FE1336300E958FD /* NavigationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationView.swift; sourceTree = "<group>"; };
|
||||
30D891F42FE22E0600E958FD /* OrderAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderAPI.swift; sourceTree = "<group>"; };
|
||||
30D891F62FE22E6E00E958FD /* OrderService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderService.swift; sourceTree = "<group>"; };
|
||||
30DA36BC2FECC5AB008D5A2C /* CreateScheduleVipPopView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateScheduleVipPopView.swift; sourceTree = "<group>"; };
|
||||
30DC18552FD11E7A0041DCD1 /* NavigationTitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationTitleView.swift; sourceTree = "<group>"; };
|
||||
30DC18562FD11E7A0041DCD1 /* WebOperations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebOperations.swift; sourceTree = "<group>"; };
|
||||
30DC18572FD11E7A0041DCD1 /* WebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebViewController.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -741,6 +711,7 @@
|
|||
475D33CAFA1E1911EB1F8D9F /* Pods_QuickLocation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_QuickLocation.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
47922567FCD34DBE9186F8FD /* AppCatalogStore.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AppCatalogStore.swift; path = AppRestrict/AppCatalogStore.swift; sourceTree = "<group>"; };
|
||||
4CD6B965A124276661A84C4C /* FamilyControls.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FamilyControls.framework; path = System/Library/Frameworks/FamilyControls.framework; sourceTree = SDKROOT; };
|
||||
51E818049FA5A8557C434E37 /* ImageCropView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ImageCropView.swift; sourceTree = "<group>"; };
|
||||
557E8D5230187A5C0032AB51 /* BaseNavigationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseNavigationView.swift; sourceTree = "<group>"; };
|
||||
55B2179030217D6600784774 /* HomeView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView2.swift; sourceTree = "<group>"; };
|
||||
55B2179230218CE100784774 /* GroupMemberView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupMemberView2.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -749,15 +720,10 @@
|
|||
55B217A33022F0B100784707 /* UIDevice+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+Extension.swift"; sourceTree = "<group>"; };
|
||||
55B217B03022F0A000784710 /* GroupItineraryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupItineraryView.swift; sourceTree = "<group>"; };
|
||||
55B217C03022F0A000784720 /* MinePhotoWallView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MinePhotoWallView.swift; sourceTree = "<group>"; };
|
||||
55B217C23022F0A000784722 /* MemberPhoneReportView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MemberPhoneReportView.swift; sourceTree = "<group>"; };
|
||||
55B217C43022F0A000784724 /* MemberAppUsageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MemberAppUsageView.swift; sourceTree = "<group>"; };
|
||||
55B217D03022F0A000784726 /* UnlockCountManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnlockCountManager.swift; sourceTree = "<group>"; };
|
||||
55B217D13023010000784730 /* TodayTrackDetailVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayTrackDetailVC.swift; sourceTree = "<group>"; };
|
||||
55B217D33023010000784732 /* TodayTrackDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayTrackDetailView.swift; sourceTree = "<group>"; };
|
||||
55B217D53023010000784734 /* TodayTrackDetailViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayTrackDetailViewModel.swift; sourceTree = "<group>"; };
|
||||
55B217D73023010000784736 /* PhoneReportDetailVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhoneReportDetailVC.swift; sourceTree = "<group>"; };
|
||||
55B217D93023010000784738 /* PhoneReportDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhoneReportDetailView.swift; sourceTree = "<group>"; };
|
||||
55B217DB302301000078473A /* PhoneReportDetailViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhoneReportDetailViewModel.swift; sourceTree = "<group>"; };
|
||||
55B218A13024A00100784701 /* AboutVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutVC.swift; sourceTree = "<group>"; };
|
||||
55B218A13024A00100784703 /* AboutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutView.swift; sourceTree = "<group>"; };
|
||||
55B218A13024A00100784705 /* CancelAccountVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CancelAccountVC.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -812,12 +778,15 @@
|
|||
55B250073038000100786507 /* MailboxDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MailboxDetailViewController.swift; sourceTree = "<group>"; };
|
||||
55B26000304B000100786600 /* VersionUpgradePopVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VersionUpgradePopVC.swift; sourceTree = "<group>"; };
|
||||
55B261000000000100786600 /* PrivacySettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrivacySettingsViewController.swift; sourceTree = "<group>"; };
|
||||
55B2A1003022F0A000784900 /* LaunchPrivacyConsentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchPrivacyConsentView.swift; sourceTree = "<group>"; };
|
||||
55BF752C2FFE53F70055DA57 /* LocationPermissionPopView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationPermissionPopView.swift; sourceTree = "<group>"; };
|
||||
55BF75342FFF91690055DA57 /* InteractionEmojiCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InteractionEmojiCell.swift; sourceTree = "<group>"; };
|
||||
55C1A0103034101000786010 /* PhoneStatusCollector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhoneStatusCollector.swift; sourceTree = "<group>"; };
|
||||
55C1A0203034102000786020 /* PrivilegeDeniedOverlay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrivilegeDeniedOverlay.swift; sourceTree = "<group>"; };
|
||||
55C219C13024C00100784730 /* SearchLocationHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchLocationHeaderView.swift; sourceTree = "<group>"; };
|
||||
55C4C0232FDB91C8009215C2 /* CheckPermissionGuideVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckPermissionGuideVC.swift; sourceTree = "<group>"; };
|
||||
55CA150B3058E55E000F1189 /* ScheduleViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScheduleViewModel.swift; sourceTree = "<group>"; };
|
||||
55CA150F3058EBE5000F1189 /* InteractionEmojiCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InteractionEmojiCell.swift; sourceTree = "<group>"; };
|
||||
55CA15113058EC23000F1189 /* InteractionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InteractionView.swift; sourceTree = "<group>"; };
|
||||
5E5F5DC8694A001BF0C47147 /* PairGuideStepsView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PairGuideStepsView.swift; path = AppRestrict/PairGuideStepsView.swift; sourceTree = "<group>"; };
|
||||
6BAE595D39202A2958737BD3 /* SelectActivityVC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SelectActivityVC.swift; path = AppRestrict/SelectActivityVC.swift; sourceTree = "<group>"; };
|
||||
787F87DD1CEBED1A4E1E9FC7 /* AppRestrictView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AppRestrictView.swift; path = AppRestrict/AppRestrictView.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -832,6 +801,7 @@
|
|||
AC46E80B848E4012D192E4CE /* LockDistractView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LockDistractView.swift; sourceTree = "<group>"; };
|
||||
BE3D39F325FC7624C1D914D6 /* ITunesSearchService.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ITunesSearchService.swift; path = AppRestrict/ITunesSearchService.swift; sourceTree = "<group>"; };
|
||||
BFFBDE92B94E7004F6B642AD /* AppRestrictShieldSettingsVC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AppRestrictShieldSettingsVC.swift; path = AppRestrict/AppRestrictShieldSettingsVC.swift; sourceTree = "<group>"; };
|
||||
C39ADD47D3C81F01F6289AC4 /* ImageCropVC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ImageCropVC.swift; sourceTree = "<group>"; };
|
||||
D0112B7865829D5B6A4A0BD0 /* AppRestrictVC.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AppRestrictVC.swift; path = AppRestrict/AppRestrictVC.swift; sourceTree = "<group>"; };
|
||||
D64156B4A0E806901AB223FA /* DeviceActivityMonitorExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DeviceActivityMonitorExtension.swift; path = DeviceActivityMonitorExtension/DeviceActivityMonitorExtension.swift; sourceTree = "<group>"; };
|
||||
DA16D49AA46D4F6838340B55 /* Pods-QuickLocation.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QuickLocation.debug.xcconfig"; path = "Target Support Files/Pods-QuickLocation/Pods-QuickLocation.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
|
|
@ -949,7 +919,6 @@
|
|||
305A74CF2FCA8C7000227D26 /* UserAPI.swift */,
|
||||
55B230023032000100785003 /* PigeonAPI.swift */,
|
||||
30BAB8502FCD331C00C33B5C /* GroupAPI.swift */,
|
||||
30D891F42FE22E0600E958FD /* OrderAPI.swift */,
|
||||
30D74AB52FEA34FF0050EB2C /* ItineraryAPI.swift */,
|
||||
30B74B4A2FF390EF00F6744D /* DrivingAPI.swift */,
|
||||
);
|
||||
|
|
@ -1018,6 +987,7 @@
|
|||
305A74DB2FCA8C7000227D26 /* CornerRadiusView */,
|
||||
305A74E22FCA8C7000227D26 /* ImagePicker */,
|
||||
305A74E62FCA8C7000227D26 /* TextTableViewCell */,
|
||||
B2DDB0083141D63A991C9FEE /* ImageCrop */,
|
||||
);
|
||||
path = Component;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -1207,10 +1177,8 @@
|
|||
305A75262FCA8C7000227D26 /* Money */,
|
||||
305A75282FCA8C7000227D26 /* Notification */,
|
||||
305A752A2FCA8C7000227D26 /* Theme */,
|
||||
55B217D23022F0A000784728 /* Unlock */,
|
||||
305A752C2FCA8C7000227D26 /* URL */,
|
||||
30D87CD52FDF9F1900E958FD /* MQTT */,
|
||||
30C6666A2FFB7C3000E62B25 /* IAPManager */,
|
||||
2F518AB6587CC227CC515D8C /* AppRestrict */,
|
||||
);
|
||||
path = Manager;
|
||||
|
|
@ -1300,10 +1268,10 @@
|
|||
305A762A2FCA8C7000227D26 /* Home */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
55CA15113058EC23000F1189 /* InteractionView.swift */,
|
||||
55CA150F3058EBE5000F1189 /* InteractionEmojiCell.swift */,
|
||||
305A76292FCA8C7000227D26 /* HomeViewController.swift */,
|
||||
305A798B2FCAB99300227D26 /* HomeViewModel.swift */,
|
||||
305A76282FCA8C7000227D26 /* HomeView.swift */,
|
||||
305A76272FCA8C7000227D26 /* GroupMemberView.swift */,
|
||||
55B2179030217D6600784774 /* HomeView2.swift */,
|
||||
55B2179230218CE100784774 /* GroupMemberView2.swift */,
|
||||
55B222000000000100784830 /* AddEmojiPopView.swift */,
|
||||
|
|
@ -1312,15 +1280,11 @@
|
|||
55B250013050000100784901 /* LockedAppPopView.swift */,
|
||||
55B219B1302A000100784760 /* ReceiveMessagePopView.swift */,
|
||||
55B219B3302A000100784762 /* ReceiveMessageReportPopView.swift */,
|
||||
55B217C23022F0A000784722 /* MemberPhoneReportView.swift */,
|
||||
55B217C43022F0A000784724 /* MemberAppUsageView.swift */,
|
||||
55B217DD302301000078473C /* TodayTrackDetail */,
|
||||
55B217DE302301000078473D /* PhoneReportDetail */,
|
||||
55B240063040000100784906 /* AppUsageReport */,
|
||||
30A7A9102FCAEE3D00105780 /* GroupListPopView.swift */,
|
||||
30D87CDE2FDFF1A100E958FD /* QuickMessageView.swift */,
|
||||
30D87CDC2FDFF07500E958FD /* InteractionView.swift */,
|
||||
55BF75342FFF91690055DA57 /* InteractionEmojiCell.swift */,
|
||||
55BF752C2FFE53F70055DA57 /* LocationPermissionPopView.swift */,
|
||||
30A87A692FEF59E60095E7C6 /* SearchLocation */,
|
||||
30A87A5C2FEE711C0095E7C6 /* Bubble */,
|
||||
|
|
@ -1335,6 +1299,7 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
305A762B2FCA8C7000227D26 /* LaunchViewController.swift */,
|
||||
55B2A1003022F0A000784900 /* LaunchPrivacyConsentView.swift */,
|
||||
);
|
||||
path = Launch;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -1398,7 +1363,6 @@
|
|||
305A762C2FCA8C7000227D26 /* Launch */,
|
||||
3062E8B32FCE6BA400CEF511 /* Scan */,
|
||||
30DC18592FD11E7A0041DCD1 /* Web */,
|
||||
30ACD54A2FF6332200174861 /* PopupWindow */,
|
||||
30EFF3AD2FD7FF1400EB35D4 /* TextInput */,
|
||||
30C6679D2FFB7FEF00E62B25 /* Share */,
|
||||
F49062649CA8E5F9FA2F22A5 /* AppRestrict */,
|
||||
|
|
@ -1415,7 +1379,6 @@
|
|||
55B230003032000100785001 /* UploadService.swift */,
|
||||
55B230043032000100785005 /* PigeonService.swift */,
|
||||
30BAB8522FCD337C00C33B5C /* GroupService.swift */,
|
||||
30D891F62FE22E6E00E958FD /* OrderService.swift */,
|
||||
30D74AB72FEA36A50050EB2C /* ItineraryService.swift */,
|
||||
30B74B4C2FF391FF00F6744D /* DrivingService.swift */,
|
||||
);
|
||||
|
|
@ -1515,7 +1478,6 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
55B26000304B000100786600 /* VersionUpgradePopVC.swift */,
|
||||
30CCDE4D2FE26CEA00F5214A /* PayResultPopVC.swift */,
|
||||
30EFF3BA2FD90D7600EB35D4 /* ConfirmPopVC.swift */,
|
||||
305A76642FCA8C7000227D26 /* DLAlertPopVC.swift */,
|
||||
305A76652FCA8C7000227D26 /* DLCustomPopVC.swift */,
|
||||
|
|
@ -1599,7 +1561,6 @@
|
|||
3062E8C12FCFB86800CEF511 /* CreateGroupViewModel.swift */,
|
||||
3062E8BD2FCEBD0E00CEF511 /* GroupIconListVC.swift */,
|
||||
3062E8BF2FCED7BB00CEF511 /* GroupIconListView.swift */,
|
||||
3062E8C32FCFC90F00CEF511 /* CreateGroupVipPopView.swift */,
|
||||
);
|
||||
path = CreateGroup;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -1666,7 +1627,6 @@
|
|||
30A87A612FEE724D0095E7C6 /* CreateBubbleTiemView.swift */,
|
||||
30A87A632FEE75520095E7C6 /* CreateBubbleTipsView.swift */,
|
||||
30A87A652FEE843E0095E7C6 /* CreateBubbleDoneView.swift */,
|
||||
30A87A672FEE86560095E7C6 /* CreateBubblePopView.swift */,
|
||||
);
|
||||
path = Bubble;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -1684,15 +1644,6 @@
|
|||
path = SearchLocation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
30ACD54A2FF6332200174861 /* PopupWindow */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
30ACD67A2FF7B36A00174861 /* PopupQueueManager.swift */,
|
||||
30ACD54B2FF6336000174861 /* PopupWindow.swift */,
|
||||
);
|
||||
path = PopupWindow;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
30B2D0BA2FEB111100CA0001 /* PhotoPicker */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
|
@ -1784,14 +1735,6 @@
|
|||
path = GroupInfo;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
30C6666A2FFB7C3000E62B25 /* IAPManager */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
30C6666B2FFB7C4000E62B25 /* IAPManager.swift */,
|
||||
);
|
||||
path = IAPManager;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
30C6679D2FFB7FEF00E62B25 /* Share */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
|
@ -1827,9 +1770,7 @@
|
|||
30D74AAC2FEA13BD0050EB2C /* Schedule */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
30D74AAF2FEA13ED0050EB2C /* ScheduleVC.swift */,
|
||||
30D74AB12FEA1D5D0050EB2C /* ScheduleViewModel.swift */,
|
||||
30D74AAD2FEA13E00050EB2C /* ScheduleView.swift */,
|
||||
55CA150B3058E55E000F1189 /* ScheduleViewModel.swift */,
|
||||
30D74AB32FEA25B90050EB2C /* ViewedModel.swift */,
|
||||
30D74AB92FEA37AD0050EB2C /* ScheduleModel.swift */,
|
||||
30D74ABB2FEA67CE0050EB2C /* CreateSchedule */,
|
||||
|
|
@ -1848,7 +1789,6 @@
|
|||
30D74D1E2FEBB09B0050EB2C /* CreateScheduleVM.swift */,
|
||||
30D74ABE2FEA67F30050EB2C /* CreateScheduleView.swift */,
|
||||
30D74AC02FEA6EEF0050EB2C /* CreateSchedulePopView.swift */,
|
||||
30DA36BC2FECC5AB008D5A2C /* CreateScheduleVipPopView.swift */,
|
||||
);
|
||||
path = CreateSchedule;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -2009,14 +1949,6 @@
|
|||
path = Font;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
55B217D23022F0A000784728 /* Unlock */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
55B217D03022F0A000784726 /* UnlockCountManager.swift */,
|
||||
);
|
||||
path = Unlock;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
55B217DD302301000078473C /* TodayTrackDetail */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
|
@ -2027,16 +1959,6 @@
|
|||
path = TodayTrackDetail;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
55B217DE302301000078473D /* PhoneReportDetail */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
55B217D73023010000784736 /* PhoneReportDetailVC.swift */,
|
||||
55B217D93023010000784738 /* PhoneReportDetailView.swift */,
|
||||
55B217DB302301000078473A /* PhoneReportDetailViewModel.swift */,
|
||||
);
|
||||
path = PhoneReportDetail;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
55B218A13024A00100784710 /* About */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
|
@ -2165,6 +2087,15 @@
|
|||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
B2DDB0083141D63A991C9FEE /* ImageCrop */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
51E818049FA5A8557C434E37 /* ImageCropView.swift */,
|
||||
C39ADD47D3C81F01F6289AC4 /* ImageCropVC.swift */,
|
||||
);
|
||||
path = ImageCrop;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
B79BE06D49443FE82A811D5C /* LockDistract */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
|
@ -2432,7 +2363,6 @@
|
|||
305A76922FCA8C7000227D26 /* LogUtils.swift in Sources */,
|
||||
305A76932FCA8C7000227D26 /* AddImageCell.swift in Sources */,
|
||||
30EFF3D82FDA8F1000EB35D4 /* EmergencyContactVC.swift in Sources */,
|
||||
30A87A682FEE86560095E7C6 /* CreateBubblePopView.swift in Sources */,
|
||||
55B219C13024C00100784722 /* BubbleHeroView.swift in Sources */,
|
||||
55B219C13024C00100784724 /* CreateBubbleSetupView.swift in Sources */,
|
||||
55B219C13024C00100784726 /* BubbleKnowledgeView.swift in Sources */,
|
||||
|
|
@ -2455,27 +2385,24 @@
|
|||
30EFF3DA2FDA935D00EB35D4 /* EmergencyContactFooterView.swift in Sources */,
|
||||
3062E8C22FCFB86800CEF511 /* CreateGroupViewModel.swift in Sources */,
|
||||
30A87A662FEE843E0095E7C6 /* CreateBubbleDoneView.swift in Sources */,
|
||||
55BF75352FFF91690055DA57 /* InteractionEmojiCell.swift in Sources */,
|
||||
305A769B2FCA8C7000227D26 /* PopupAnimators.swift in Sources */,
|
||||
30A87A4D2FEE1DB40095E7C6 /* ItineraryDetailView.swift in Sources */,
|
||||
305A769C2FCA8C7000227D26 /* PopupViewController.swift in Sources */,
|
||||
305A769D2FCA8C7000227D26 /* PopupViewController+Extension.swift in Sources */,
|
||||
30EFF3C42FDA431D00EB35D4 /* ChangePhoneVC.swift in Sources */,
|
||||
30C6666C2FFB7C4000E62B25 /* IAPManager.swift in Sources */,
|
||||
305A769E2FCA8C7000227D26 /* TextArrowCell.swift in Sources */,
|
||||
305A769F2FCA8C7000227D26 /* TextContentArrowCell.swift in Sources */,
|
||||
30D87D042FE1336300E958FD /* NavigationVC.swift in Sources */,
|
||||
30D87D052FE1336300E958FD /* NavigationView.swift in Sources */,
|
||||
30B819F42FF3CE4900FAB693 /* ItineraryTraceVC.swift in Sources */,
|
||||
305A76A02FCA8C7000227D26 /* TextTableViewCell.swift in Sources */,
|
||||
30ACD67B2FF7B36A00174861 /* PopupQueueManager.swift in Sources */,
|
||||
305A76A12FCA8C7000227D26 /* UIButton+RTL.m in Sources */,
|
||||
30EFF3A62FD7C5AF00EB35D4 /* GroupSettingVC.swift in Sources */,
|
||||
55CA15103058EBE5000F1189 /* InteractionEmojiCell.swift in Sources */,
|
||||
305A76A22FCA8C7000227D26 /* Array+Extension.swift in Sources */,
|
||||
305A76A32FCA8C7000227D26 /* ControlEvents+Block.swift in Sources */,
|
||||
3062E8B72FCE6BFE00CEF511 /* ScanView.swift in Sources */,
|
||||
305A76A42FCA8C7000227D26 /* Date+Extension.swift in Sources */,
|
||||
30D74AAE2FEA13E00050EB2C /* ScheduleView.swift in Sources */,
|
||||
305A76A52FCA8C7000227D26 /* Dictionay+Extension.swift in Sources */,
|
||||
30A87A522FEE4E5D0095E7C6 /* ScheduleHistoryVC.swift in Sources */,
|
||||
305A76A62FCA8C7000227D26 /* Int+Extension.swift in Sources */,
|
||||
|
|
@ -2545,14 +2472,10 @@
|
|||
305A76C22FCA8C7000227D26 /* BaseViewModel.swift in Sources */,
|
||||
55B2179330218CE100784774 /* GroupMemberView2.swift in Sources */,
|
||||
55B217C53022F0A000784725 /* MemberAppUsageView.swift in Sources */,
|
||||
55B217C33022F0A000784723 /* MemberPhoneReportView.swift in Sources */,
|
||||
55C1A0213034102000786021 /* PrivilegeDeniedOverlay.swift in Sources */,
|
||||
55B217D23023010000784731 /* TodayTrackDetailVC.swift in Sources */,
|
||||
55B217D43023010000784733 /* TodayTrackDetailView.swift in Sources */,
|
||||
55B217D63023010000784735 /* TodayTrackDetailViewModel.swift in Sources */,
|
||||
55B217D83023010000784737 /* PhoneReportDetailVC.swift in Sources */,
|
||||
55B217DA3023010000784739 /* PhoneReportDetailView.swift in Sources */,
|
||||
55B217DC302301000078473B /* PhoneReportDetailViewModel.swift in Sources */,
|
||||
55B240013040000100784901 /* AppUsageReportVC.swift in Sources */,
|
||||
55B240033040000100784903 /* AppUsageReportView.swift in Sources */,
|
||||
55B240053040000100784905 /* AppUsageReportViewModel.swift in Sources */,
|
||||
|
|
@ -2566,9 +2489,11 @@
|
|||
55B234013036000100785051 /* RelationSelectPopVC.swift in Sources */,
|
||||
55B234033036000100785053 /* RelationStore.swift in Sources */,
|
||||
55B220013031000100784801 /* FeedbackVC.swift in Sources */,
|
||||
55CA15123058EC23000F1189 /* InteractionView.swift in Sources */,
|
||||
55B220033031000100784803 /* FeedbackView.swift in Sources */,
|
||||
55B220053031000100784805 /* FeedbackSuccessView.swift in Sources */,
|
||||
55B221210000000100784821 /* MoodStatusVC.swift in Sources */,
|
||||
55CA150E3058E55E000F1189 /* ScheduleViewModel.swift in Sources */,
|
||||
55B221230000000100784823 /* MoodStatusView.swift in Sources */,
|
||||
55B222010000000100784831 /* AddEmojiPopView.swift in Sources */,
|
||||
55B222030000000100784833 /* AddMessagePopView.swift in Sources */,
|
||||
|
|
@ -2588,7 +2513,6 @@
|
|||
305A76C72FCA8C7000227D26 /* UserConfigModel.swift in Sources */,
|
||||
30B74B472FF3608600F6744D /* ScheduleRecordModel.swift in Sources */,
|
||||
305A76C82FCA8C7000227D26 /* UserConfigResponse.swift in Sources */,
|
||||
30ACD54C2FF6336000174861 /* PopupWindow.swift in Sources */,
|
||||
305A76C92FCA8C7000227D26 /* ApiManager.swift in Sources */,
|
||||
305A76CA2FCA8C7000227D26 /* AppSettings.swift in Sources */,
|
||||
305A76CB2FCA8C7000227D26 /* Authorize.swift in Sources */,
|
||||
|
|
@ -2596,7 +2520,6 @@
|
|||
30C6679E2FFB7FEF00E62B25 /* SharePopView.swift in Sources */,
|
||||
305A76CC2FCA8C7000227D26 /* FileTools.swift in Sources */,
|
||||
305A76CD2FCA8C7000227D26 /* Permission.swift in Sources */,
|
||||
30D74AB02FEA13ED0050EB2C /* ScheduleVC.swift in Sources */,
|
||||
55B218B13024B00100784722 /* FeatureIntroVC.swift in Sources */,
|
||||
55B218B13024B00100784724 /* FeatureIntroView.swift in Sources */,
|
||||
305A76CE2FCA8C7000227D26 /* RouterManager.swift in Sources */,
|
||||
|
|
@ -2605,7 +2528,6 @@
|
|||
305A76D02FCA8C7000227D26 /* MoneyFormatter.swift in Sources */,
|
||||
305A76D12FCA8C7000227D26 /* TimeSpecificNotificationManager.swift in Sources */,
|
||||
305A76D22FCA8C7000227D26 /* ThemeManager.swift in Sources */,
|
||||
55B217D13022F0A000784727 /* UnlockCountManager.swift in Sources */,
|
||||
305A76D32FCA8C7000227D26 /* URLManager.swift in Sources */,
|
||||
305A76D42FCA8C7000227D26 /* GroupModel.swift in Sources */,
|
||||
55B230073032000100785008 /* PigeonModel.swift in Sources */,
|
||||
|
|
@ -2641,7 +2563,6 @@
|
|||
55B250043038000100786504 /* MailboxView.swift in Sources */,
|
||||
55B250063038000100786506 /* MailboxViewController.swift in Sources */,
|
||||
55B250083038000100786508 /* MailboxDetailViewController.swift in Sources */,
|
||||
30D74AB22FEA1D5D0050EB2C /* ScheduleViewModel.swift in Sources */,
|
||||
30EFF3B52FD8F1D000EB35D4 /* ReviewMemberListVC.swift in Sources */,
|
||||
30BAB84D2FCD2FDE00C33B5C /* InviteJoinView.swift in Sources */,
|
||||
30A87A592FEE5A4C0095E7C6 /* ScheduleViewedView.swift in Sources */,
|
||||
|
|
@ -2649,12 +2570,10 @@
|
|||
30CCDE5C2FE3A1A800F5214A /* SOSPracticeView.swift in Sources */,
|
||||
30EFF3E52FDAA93400EB35D4 /* PrivacyPolicyVC.swift in Sources */,
|
||||
305A76E22FCA8C7000227D26 /* GroupViewModel.swift in Sources */,
|
||||
30CCDE4E2FE26CEA00F5214A /* PayResultPopVC.swift in Sources */,
|
||||
305A76E32FCA8C7000227D26 /* GroupMemberView.swift in Sources */,
|
||||
30BAB84F2FCD2FED00C33B5C /* InviteJoinVC.swift in Sources */,
|
||||
305A76E42FCA8C7000227D26 /* HomeView.swift in Sources */,
|
||||
305A76E52FCA8C7000227D26 /* HomeViewController.swift in Sources */,
|
||||
305A76E62FCA8C7000227D26 /* LaunchViewController.swift in Sources */,
|
||||
55B2A1013022F0A000784901 /* LaunchPrivacyConsentView.swift in Sources */,
|
||||
3062E8B52FCE6BBA00CEF511 /* ScanVC.swift in Sources */,
|
||||
30A1C0A12FEB000100CA0001 /* CameraCaptureView.swift in Sources */,
|
||||
30A1C0A32FEB000100CA0001 /* CameraCaptureVC.swift in Sources */,
|
||||
|
|
@ -2722,16 +2641,13 @@
|
|||
305A77032FCA8C7000227D26 /* ProgressHUD.swift in Sources */,
|
||||
305A77042FCA8C7000227D26 /* MXParallaxHeader.m in Sources */,
|
||||
305A77052FCA8C7000227D26 /* MXScrollView.m in Sources */,
|
||||
30D87CDD2FDFF07500E958FD /* InteractionView.swift in Sources */,
|
||||
30BAB8652FCD718A00C33B5C /* JoinGroupView.swift in Sources */,
|
||||
305A77062FCA8C7000227D26 /* MXScrollViewController.m in Sources */,
|
||||
30B74B432FF2438800F6744D /* GroupMemberListView.swift in Sources */,
|
||||
305A77072FCA8C7000227D26 /* Helper.swift in Sources */,
|
||||
30BF30102FED0C8E00D9CB52 /* ScheduleDetailVM.swift in Sources */,
|
||||
30DA36BD2FECC5AB008D5A2C /* CreateScheduleVipPopView.swift in Sources */,
|
||||
305A77082FCA8C7000227D26 /* PageCollectionViewFlowLayout.swift in Sources */,
|
||||
55BF752D2FFE53F70055DA57 /* LocationPermissionPopView.swift in Sources */,
|
||||
3062E8C42FCFC90F00CEF511 /* CreateGroupVipPopView.swift in Sources */,
|
||||
30D74ABA2FEA37AD0050EB2C /* ScheduleModel.swift in Sources */,
|
||||
30CCDE512FE2785D00F5214A /* SignInVC.swift in Sources */,
|
||||
305A77092FCA8C7000227D26 /* PageContentView.swift in Sources */,
|
||||
|
|
@ -2739,7 +2655,6 @@
|
|||
305A770B2FCA8C7000227D26 /* PageTitleView.swift in Sources */,
|
||||
305A770C2FCA8C7000227D26 /* PageView.swift in Sources */,
|
||||
305A770D2FCA8C7000227D26 /* PageViewManager.swift in Sources */,
|
||||
30D891F52FE22E0600E958FD /* OrderAPI.swift in Sources */,
|
||||
307073EA2FD2715A004C37CC /* GroupChatViewModel.swift in Sources */,
|
||||
305A770E2FCA8C7000227D26 /* DLAlertPopVC.swift in Sources */,
|
||||
305A770F2FCA8C7000227D26 /* DLCustomPopVC.swift in Sources */,
|
||||
|
|
@ -2751,7 +2666,6 @@
|
|||
30EFF3B72FD8F86200EB35D4 /* ReviewMemberListVM.swift in Sources */,
|
||||
305A77112FCA8C7000227D26 /* DLViewTransition.m in Sources */,
|
||||
3062E8BA2FCEAC6500CEF511 /* CreateGroupView.swift in Sources */,
|
||||
30D891F72FE22E6E00E958FD /* OrderService.swift in Sources */,
|
||||
305A77192FCA8C7000227D26 /* CollectionHFlowLayout.swift in Sources */,
|
||||
30D74AC12FEA6EEF0050EB2C /* CreateSchedulePopView.swift in Sources */,
|
||||
305A771A2FCA8C7000227D26 /* JJPageControl.swift in Sources */,
|
||||
|
|
@ -2772,6 +2686,8 @@
|
|||
E3D4129BDA33540BA4E1292E /* LockDistractVC.swift in Sources */,
|
||||
E866CAAE7D4E74EB7AD608B9 /* ITunesSearchService.swift in Sources */,
|
||||
DB67C2EB2521042829A3DBA5 /* PairGuideStepsView.swift in Sources */,
|
||||
F9CE7D326B4F4F3C1FFAA447 /* ImageCropView.swift in Sources */,
|
||||
4A69FEABC5F1BA738C35A607 /* ImageCropVC.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -2837,9 +2753,12 @@
|
|||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = NO;
|
||||
CODE_SIGN_ENTITLEMENTS = DeviceActivityMonitorExtension/DeviceActivityMonitorExtension.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = LRDLWZ2Y83;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = LRDLWZ2Y83;
|
||||
GENERATE_INFOPLIST_FILE = NO;
|
||||
INFOPLIST_FILE = DeviceActivityMonitorExtension/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||
|
|
@ -2851,6 +2770,8 @@
|
|||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = cn.zuomeng.jisuloca.DeviceActivityMonitor;
|
||||
PRODUCT_NAME = DeviceActivityMonitorExtension;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "jsdw DeviceActivityMonitor AppStore";
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_DEFAULT_ACTOR_ISOLATION = nonisolated;
|
||||
|
|
@ -2895,11 +2816,9 @@
|
|||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = QuickLocation/QuickLocation.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 2;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = LRDLWZ2Y83;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 5;
|
||||
DEVELOPMENT_TEAM = LRDLWZ2Y83;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = "$(inherited)";
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = QuickLocation/Info.plist;
|
||||
|
|
@ -2926,7 +2845,6 @@
|
|||
PRODUCT_BUNDLE_IDENTIFIER = cn.zuomeng.jisuloca;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = jsdw_dev;
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
|
|
@ -2950,9 +2868,9 @@
|
|||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = QuickLocation/QuickLocation.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 2;
|
||||
CURRENT_PROJECT_VERSION = 5;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = LRDLWZ2Y83;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = "$(inherited)";
|
||||
|
|
@ -2981,7 +2899,7 @@
|
|||
PRODUCT_BUNDLE_IDENTIFIER = cn.zuomeng.jisuloca;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = jsdw_dev;
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = jsdw_AppStore;
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
|
|
@ -3185,7 +3103,7 @@
|
|||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 2;
|
||||
CURRENT_PROJECT_VERSION = 5;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = LRDLWZ2Y83;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = "$(inherited)";
|
||||
|
|
@ -3328,9 +3246,12 @@
|
|||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = NO;
|
||||
CODE_SIGN_ENTITLEMENTS = ShieldConfigurationExtension/ShieldConfigurationExtension.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = LRDLWZ2Y83;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = LRDLWZ2Y83;
|
||||
GENERATE_INFOPLIST_FILE = NO;
|
||||
INFOPLIST_FILE = ShieldConfigurationExtension/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||
|
|
@ -3342,6 +3263,8 @@
|
|||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = cn.zuomeng.jisuloca.ShieldConfiguration;
|
||||
PRODUCT_NAME = ShieldConfigurationExtension;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "jsdw ShieldConfiguration AppStore";
|
||||
SDKROOT = iphoneos;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_DEFAULT_ACTOR_ISOLATION = nonisolated;
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:QuickLocation.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Bucket
|
||||
uuid = "AE547311-A826-480F-B1ED-BD6B815729FA"
|
||||
type = "0"
|
||||
version = "2.0">
|
||||
</Bucket>
|
||||
|
|
@ -148,14 +148,6 @@ enum GatewayStatusCode: Int {
|
|||
case userLoginExpair3 = 1001005
|
||||
// 权限不足
|
||||
case noAuthority = 500
|
||||
// 审核中
|
||||
case review = 201
|
||||
|
||||
/** ============== 业务 ============== */
|
||||
// 需要开通vip
|
||||
case needVip = 20000
|
||||
// 您创建的圈子个数已达上限,请升级会员等级
|
||||
case groupLimit = 20009
|
||||
|
||||
/** ============== 未知错误 ============== */
|
||||
case unknownError = -9999
|
||||
|
|
|
|||
|
|
@ -1,77 +0,0 @@
|
|||
//
|
||||
// OrderAPI.swift
|
||||
// QuickLocation
|
||||
//
|
||||
// Created by 八条 on 2026/6/17.
|
||||
//
|
||||
|
||||
import Moya
|
||||
import SwiftyUserDefaults
|
||||
internal import Alamofire
|
||||
|
||||
/// 订单API
|
||||
enum OrderAPI {
|
||||
/// 充值内容
|
||||
/// - Parameters:
|
||||
/// - type: 类型 member
|
||||
case rechargeInfo(type: String)
|
||||
|
||||
/// 支付参数
|
||||
/// - Parameters:
|
||||
/// - goodsId: 商品ID
|
||||
/// - payType: alipay、weixin
|
||||
/// - source: center
|
||||
/// - extra: 额外参数
|
||||
case orderPayParams(goodsId: String, payType: String, source: String, extra: [String:Any]=[:])
|
||||
|
||||
/// Apple 内购通知
|
||||
case appleNotify(receipt: String, productId: String, transactionId: String)
|
||||
}
|
||||
|
||||
extension OrderAPI: MultiTargetProtocol {
|
||||
|
||||
var path: String {
|
||||
switch self {
|
||||
case .rechargeInfo:
|
||||
return "api/order/goods"
|
||||
case .orderPayParams:
|
||||
return "api/order"
|
||||
case .appleNotify:
|
||||
return "api/order/notify/apple"
|
||||
}
|
||||
}
|
||||
|
||||
var method: Moya.Method {
|
||||
switch self {
|
||||
case .rechargeInfo:
|
||||
return .get
|
||||
default:
|
||||
return .post
|
||||
}
|
||||
}
|
||||
|
||||
var task: Moya.Task {
|
||||
switch self {
|
||||
case let .rechargeInfo(type):
|
||||
var params = Parameters()
|
||||
params["type"] = type
|
||||
return .requestParameters(parameters: params, encoding: URLEncoding())
|
||||
|
||||
case let .orderPayParams(goodsId, payType, source, extra):
|
||||
var params = Parameters()
|
||||
params["goods_id"] = goodsId
|
||||
params["pay_type"] = payType
|
||||
params["source"] = source
|
||||
params["pay_source"] = "app"
|
||||
params["extra"] = extra
|
||||
return .requestParameters(parameters: params, encoding: JSONEncoding())
|
||||
|
||||
case let .appleNotify(receipt, productId, transactionId):
|
||||
var params = Parameters()
|
||||
params["receipt_data"] = receipt
|
||||
params["product_id"] = productId
|
||||
params["transaction_id"] = transactionId
|
||||
return .requestParameters(parameters: params, encoding: JSONEncoding())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
import Foundation
|
||||
import Moya
|
||||
import CommonCrypto
|
||||
|
||||
/// JiaMiKey 的 MD5,预计算避免每次请求都算
|
||||
private let jiaMiKeyMD5: String = {
|
||||
|
|
@ -73,10 +72,6 @@ final class SignPlugin: PluginType {
|
|||
}
|
||||
|
||||
fileprivate static func md5(_ string: String) -> String {
|
||||
let cStr = string.cString(using: .utf8)
|
||||
let length = CC_LONG(strlen(cStr!))
|
||||
var digest = [UInt8](repeating: 0, count: Int(CC_MD5_DIGEST_LENGTH))
|
||||
CC_MD5(cStr, length, &digest)
|
||||
return digest.map { String(format: "%02x", $0) }.joined()
|
||||
string.md5
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,9 +31,6 @@ enum UserAPI {
|
|||
/// 成员 APP 周期使用报告
|
||||
case phoneUsagePeriod(userId: String, groupKey: String, period: String)
|
||||
|
||||
/// 成员手机使用报告
|
||||
case phoneUsageReport(userId: String, groupKey: String)
|
||||
|
||||
/// 成员历史行程
|
||||
case phoneUsageTrips(userId: String, date: Int64)
|
||||
|
||||
|
|
@ -164,8 +161,6 @@ extension UserAPI: MultiTargetProtocol {
|
|||
return "mapi/phone/usage/today"
|
||||
case .phoneUsagePeriod:
|
||||
return "mapi/phone/usage/period"
|
||||
case .phoneUsageReport:
|
||||
return "mapi/phone/usage/report"
|
||||
case .phoneUsageTrips:
|
||||
return "mapi/phone/usage/trips"
|
||||
case .queryPhoneUsageIcon, .savePhoneUsageIcon:
|
||||
|
|
@ -229,7 +224,7 @@ extension UserAPI: MultiTargetProtocol {
|
|||
|
||||
var method: Moya.Method {
|
||||
switch self {
|
||||
case .userInfo, .userStatus, .phoneUsageToday, .phoneUsagePeriod, .phoneUsageReport, .phoneUsageTrips, .queryPhoneUsageIcon, .phoneLockApps, .phoneLocked, .phoneUnlockRequests, .phoneUnlockAllow, .signInInfo, .notice, .followList, .relations:
|
||||
case .userInfo, .userStatus, .phoneUsageToday, .phoneUsagePeriod, .phoneUsageTrips, .queryPhoneUsageIcon, .phoneLockApps, .phoneLocked, .phoneUnlockRequests, .phoneUnlockAllow, .signInInfo, .notice, .followList, .relations:
|
||||
return .get
|
||||
case .changePhone, .changeAvater:
|
||||
return .put
|
||||
|
|
@ -270,13 +265,6 @@ extension UserAPI: MultiTargetProtocol {
|
|||
]
|
||||
return .requestParameters(parameters: params, encoding: URLEncoding.queryString)
|
||||
|
||||
case let .phoneUsageReport(userId, groupKey):
|
||||
let params: Parameters = [
|
||||
"user_id": userId,
|
||||
"group_key": groupKey
|
||||
]
|
||||
return .requestParameters(parameters: params, encoding: URLEncoding.queryString)
|
||||
|
||||
case let .phoneUsageTrips(userId, date):
|
||||
let params: Parameters = [
|
||||
"user_id": userId,
|
||||
|
|
|
|||
|
|
@ -18,12 +18,11 @@ import SwiftDate
|
|||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
var window: UIWindow?
|
||||
private var didSetupPrivacyGrantedSDKs = false
|
||||
|
||||
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
||||
|
||||
UnlockCountManager.shared.start(launchOptions: launchOptions)
|
||||
FontManager.registerCustomFonts()
|
||||
setupLocation()
|
||||
ApiManager.shared.setup()
|
||||
AppRouter.shared.setup()
|
||||
AppUnlockCoordinator.shared.start()
|
||||
|
|
@ -38,23 +37,29 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
|
||||
SwiftDate.defaultRegion = Region(zone: TimeZone.current, locale: Locale.current)
|
||||
|
||||
IAPManager.shared.startObserving()
|
||||
|
||||
IQKeyboardManager.shared.isEnabled = true
|
||||
IQKeyboardManager.shared.enableAutoToolbar = false
|
||||
IQKeyboardManager.shared.resignOnTouchOutside = true
|
||||
|
||||
// 微信
|
||||
WXApi.registerApp(AppSettings.kAppsWXApiAppId, universalLink: AppSettings.kAppsUniversalLink)
|
||||
|
||||
window = UIWindow(frame: UIScreen.main.bounds)
|
||||
window?.backgroundColor = .white
|
||||
window?.overrideUserInterfaceStyle = .light
|
||||
window?.rootViewController = LaunchViewController()
|
||||
window?.makeKeyAndVisible()
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
/// 用户同意隐私协议后再初始化会采集数据的 SDK。
|
||||
func setupPrivacyGrantedSDKs() {
|
||||
guard !didSetupPrivacyGrantedSDKs else { return }
|
||||
didSetupPrivacyGrantedSDKs = true
|
||||
|
||||
// 高德地图
|
||||
#if !targetEnvironment(simulator)
|
||||
AMapServices.shared().apiKey = AppSettings.kAppsAMapAppId
|
||||
#endif
|
||||
|
||||
// 个推
|
||||
#if !targetEnvironment(simulator)
|
||||
GeYanSdk.setPreLoginTimeout(10)
|
||||
GeYanSdk.setEloginTimeout(10)
|
||||
GeYanSdk.start(withAppId: AppSettings.kAppsGeTuiAppId) { isSuccess, error, gtcid in
|
||||
|
|
@ -65,19 +70,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
}
|
||||
#endif
|
||||
|
||||
// OpenIM
|
||||
GroupIMService.shared.initSDK()
|
||||
|
||||
// 友盟
|
||||
UMConfigure.initWithAppkey(AppSettings.kAppsUMengAppKey, channel: "App Store")
|
||||
|
||||
window = UIWindow(frame: UIScreen.main.bounds)
|
||||
window?.backgroundColor = .white
|
||||
window?.overrideUserInterfaceStyle = .light
|
||||
window?.rootViewController = LaunchViewController()
|
||||
window?.makeKeyAndVisible()
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
|
||||
|
|
@ -91,25 +85,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
return true
|
||||
}
|
||||
}
|
||||
|
||||
// 处理支付宝支付结果(不限制 host,适应新版 SDK)
|
||||
if url.scheme?.hasPrefix("Alipay") == true || url.host == "safepay" {
|
||||
AlipaySDK.defaultService().processOrder(withPaymentResult: url) { resultDic in
|
||||
print("📱 Alipay callback: \(resultDic ?? [:])")
|
||||
guard let result = resultDic,
|
||||
let resultStatus = result["resultStatus"] as? String,
|
||||
resultStatus != "6001" else { return }
|
||||
if resultStatus == "9000" {
|
||||
NotificationCenter.default.post(name: .RequestOrderPayStatusNotification, object: nil)
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
// else if url.host == "pay" {
|
||||
return WXApi.handleOpen(url, delegate: self)
|
||||
// }
|
||||
//
|
||||
// return true
|
||||
return WXApi.handleOpen(url, delegate: self)
|
||||
}
|
||||
|
||||
func application(_ application: UIApplication,
|
||||
|
|
@ -118,15 +94,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
print("📱 continue userActivity: \(userActivity.webpageURL?.absoluteString ?? "")")
|
||||
return WXApi.handleOpenUniversalLink(userActivity, delegate: self)
|
||||
}
|
||||
|
||||
func setupLocation() {
|
||||
let manager = AuthorizeManager.manager(type: .locationWhenInUse)
|
||||
if manager?.authorizeStatus() != .authorized {
|
||||
manager?.authorize(nil)
|
||||
Permission.openAppSetting(title: "获取位置失败",
|
||||
message: "请在iPhone的“设置-隐私-定位”选项中允许\(kAppName)访问你的位置。")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AppDelegate {
|
||||
|
|
@ -197,22 +164,5 @@ extension AppDelegate: WXApiDelegate {
|
|||
handleWechatLoginCode(code)
|
||||
return
|
||||
}
|
||||
|
||||
if resp.isKind(of: SendAuthResp.self) {
|
||||
NotificationCenter.default.post(name: .resumePopupQueue, object: nil)
|
||||
}
|
||||
|
||||
if resp.isKind(of: PayResp.self),
|
||||
let response: PayResp = resp as? PayResp {
|
||||
print("===================== WxPay =====================")
|
||||
print(response.errStr)
|
||||
if response.errCode == 0 { // 支付成功
|
||||
DispatchQueue.global().async {
|
||||
DispatchQueue.main.async {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_2040@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_2040@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 149 KiB |
|
Before Width: | Height: | Size: 284 KiB |
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_2041@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_2041@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 294 KiB |
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_2042@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_2042@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 154 KiB |
|
Before Width: | Height: | Size: 282 KiB |
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_2043@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_2043@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 179 KiB |
|
Before Width: | Height: | Size: 270 KiB |
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_2044@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Group_2044@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 144 KiB |
|
Before Width: | Height: | Size: 272 KiB |
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"provides-namespace" : true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "today_track@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "today_track@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "按钮@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "按钮@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -5,10 +5,12 @@
|
|||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "area_badge@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "area_badge@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
BIN
QuickLocation/Assets.xcassets/SearchLocation/area_badge.imageset/area_badge@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
QuickLocation/Assets.xcassets/SearchLocation/area_badge.imageset/area_badge@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"provides-namespace" : true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "crown@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "crown@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 681 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "narrow_button_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "narrow_button_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "wide_button_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "wide_button_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
|
@ -21,30 +21,10 @@ extension DefaultsKeys {
|
|||
var isReLogin: DefaultsKey<Bool> { .init("isReLogin", defaultValue: false) }
|
||||
/// 显示引导页
|
||||
var isShowGuide: DefaultsKey<Bool> { .init("isShowGuide", defaultValue: true) }
|
||||
/// 启动页已同意服务协议及隐私政策
|
||||
var didAgreeLaunchPrivacy: DefaultsKey<Bool> { .init("didAgreeLaunchPrivacy", defaultValue: false) }
|
||||
/// 气泡持续时间
|
||||
var bubbleKeepTimes: DefaultsKey<Date?> { .init("bubbleKeepTimes") }
|
||||
/// 解锁统计:今日次数
|
||||
var unlockCountToday: DefaultsKey<Int> { .init("unlockCountToday", defaultValue: 0) }
|
||||
/// 解锁统计:累计次数
|
||||
var unlockCountTotal: DefaultsKey<Int> { .init("unlockCountTotal", defaultValue: 0) }
|
||||
/// 解锁统计:日期 yyyy-MM-dd
|
||||
var unlockCountDate: DefaultsKey<String> { .init("unlockCountDate", defaultValue: "") }
|
||||
/// 解锁统计:按自然日累计次数,key = yyyy-MM-dd
|
||||
var unlockCountByDay: DefaultsKey<[String: Int]> { .init("unlockCountByDay", defaultValue: [:]) }
|
||||
/// 上次锁屏态(杀进程补计)
|
||||
var unlockWasLocked: DefaultsKey<Bool> { .init("unlockWasLocked", defaultValue: false) }
|
||||
var unlockLastCountedAt: DefaultsKey<Date?> { .init("unlockLastCountedAt") }
|
||||
var unlockLastHeartbeatAt: DefaultsKey<Date?> { .init("unlockLastHeartbeatAt") }
|
||||
var unlockLastLatitude: DefaultsKey<Double?> { .init("unlockLastLatitude") }
|
||||
var unlockLastLongitude: DefaultsKey<Double?> { .init("unlockLastLongitude") }
|
||||
/// 手机报告:按自然日累计屏幕时长(秒),key = yyyy-MM-dd
|
||||
var screenTimeByDay: DefaultsKey<[String: Int]> { .init("screenTimeByDay", defaultValue: [:]) }
|
||||
/// 手机报告:当前进程屏幕时长 session 起点(仅用于杀进程后结算到最后心跳,不跨进程续计)
|
||||
var screenSessionStartAt: DefaultsKey<Date?> { .init("screenSessionStartAt") }
|
||||
/// 手机报告:最后一次确认亮屏的时间(锁屏结算用,避免用 Date() 把灭屏空档算进去)
|
||||
var screenLastOnAt: DefaultsKey<Date?> { .init("screenLastOnAt") }
|
||||
/// 手机报告:本 App 今日进入前台次数
|
||||
var appUsageToday: DefaultsKey<Int> { .init("appUsageToday", defaultValue: 0) }
|
||||
/// 屏幕使用时间权限曾开启的账号
|
||||
var appRestrictApprovedUserIds: DefaultsKey<[String]> { .init("appRestrictApprovedUserIds", defaultValue: []) }
|
||||
/// 等待执行服务端配对全删的账号
|
||||
|
|
@ -67,16 +47,12 @@ extension Notification.Name {
|
|||
static let GroupChatHistoryDidClearNotification = Notification.Name("GroupChatHistoryDidClearNotification")
|
||||
/// 查看成员位置
|
||||
static let ShowMemberLocationNotification = Notification.Name("ShowMemberLocationNotification")
|
||||
/// 支付宝/微信支付结果回调
|
||||
static let RequestOrderPayStatusNotification = Notification.Name("RequestOrderPayStatusNotification")
|
||||
/// 暂停弹窗队列(第三方登录/注册跳转时)
|
||||
static let pausePopupQueue = Notification.Name("pausePopupQueue")
|
||||
/// 恢复弹窗队列(第三方登录取消/失败时)
|
||||
static let resumePopupQueue = Notification.Name("resumePopupQueue")
|
||||
/// 终止弹窗队列(登录成功后)
|
||||
static let invalidatePopupQueue = Notification.Name("invalidatePopupQueue")
|
||||
/// 本机解锁次数变化
|
||||
static let unlockCountDidChange = Notification.Name("unlockCountDidChange")
|
||||
/// 本机应用配对数据变化
|
||||
static let appRestrictPairingDataDidChange = Notification.Name("appRestrictPairingDataDidChange")
|
||||
/// MQTT 应用锁定状态变化
|
||||
|
|
|
|||
|
|
@ -0,0 +1,54 @@
|
|||
//
|
||||
// ImageCropVC.swift
|
||||
// QuickLocation
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
final class ImageCropVC: BaseViewController {
|
||||
|
||||
override var isNavigationBarHidden: Bool { true }
|
||||
override var preferredStatusBarStyle: UIStatusBarStyle { .lightContent }
|
||||
|
||||
var onConfirm: ((UIImage) -> Void)?
|
||||
var onCancel: (() -> Void)?
|
||||
|
||||
private let image: UIImage
|
||||
private var rootView: ImageCropView!
|
||||
|
||||
init(image: UIImage) {
|
||||
self.image = image
|
||||
super.init(nibName: nil, bundle: nil)
|
||||
modalPresentationStyle = .fullScreen
|
||||
modalPresentationCapturesStatusBarAppearance = true
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override func loadView() {
|
||||
rootView = ImageCropView(frame: UIScreen.main.bounds)
|
||||
view = rootView
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
rootView.setImage(image)
|
||||
rootView.onCancel = { [weak self] in
|
||||
self?.dismiss(animated: true) {
|
||||
self?.onCancel?()
|
||||
}
|
||||
}
|
||||
rootView.onConfirm = { [weak self] in
|
||||
guard let self else { return }
|
||||
guard let cropped = self.rootView.croppedImage() else {
|
||||
DLToast.show(text: "图片处理失败")
|
||||
return
|
||||
}
|
||||
self.dismiss(animated: true) {
|
||||
self.onConfirm?(cropped)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,314 @@
|
|||
//
|
||||
// ImageCropView.swift
|
||||
// QuickLocation
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
final class ImageCropView: UIView, UIScrollViewDelegate {
|
||||
|
||||
var onCancel: (() -> Void)?
|
||||
var onConfirm: (() -> Void)?
|
||||
|
||||
private let scrollView = UIScrollView()
|
||||
private let imageView = UIImageView()
|
||||
private let overlayView = ImageCropOverlayView()
|
||||
private let topBar = UIView()
|
||||
private let bottomBar = UIView()
|
||||
|
||||
private var cropRect: CGRect = .zero
|
||||
private var fittedCropRect: CGRect = .zero
|
||||
private var pendingFit = false
|
||||
private var userAdjusted = false
|
||||
private var isFitting = false
|
||||
|
||||
private let bottomBarHeight: CGFloat = 56
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
backgroundColor = .black
|
||||
setupUI()
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
func setImage(_ image: UIImage) {
|
||||
imageView.image = image.fixOrientation()
|
||||
pendingFit = true
|
||||
setNeedsLayout()
|
||||
}
|
||||
|
||||
func rotateClockwise() {
|
||||
guard let image = imageView.image else { return }
|
||||
setImage(image.rotatedClockwise())
|
||||
}
|
||||
|
||||
func croppedImage() -> UIImage? {
|
||||
guard let image = imageView.image, imageView.bounds.width > 0, cropRect.width > 0 else {
|
||||
return nil
|
||||
}
|
||||
let zoom = scrollView.zoomScale
|
||||
guard zoom > 0 else { return nil }
|
||||
|
||||
let origin = CGPoint(
|
||||
x: (scrollView.contentOffset.x + cropRect.minX) / zoom,
|
||||
y: (scrollView.contentOffset.y + cropRect.minY) / zoom
|
||||
)
|
||||
let size = CGSize(
|
||||
width: cropRect.width / zoom,
|
||||
height: cropRect.height / zoom
|
||||
)
|
||||
let rect = CGRect(origin: origin, size: size)
|
||||
|
||||
guard let cgImage = image.cgImage, imageView.bounds.width > 0, imageView.bounds.height > 0 else {
|
||||
return nil
|
||||
}
|
||||
let scaleX = CGFloat(cgImage.width) / imageView.bounds.width
|
||||
let scaleY = CGFloat(cgImage.height) / imageView.bounds.height
|
||||
var pixelRect = CGRect(
|
||||
x: rect.origin.x * scaleX,
|
||||
y: rect.origin.y * scaleY,
|
||||
width: rect.width * scaleX,
|
||||
height: rect.height * scaleY
|
||||
).integral
|
||||
|
||||
let bounds = CGRect(x: 0, y: 0, width: cgImage.width, height: cgImage.height)
|
||||
pixelRect = pixelRect.intersection(bounds)
|
||||
guard pixelRect.width >= 1, pixelRect.height >= 1,
|
||||
let cropped = cgImage.cropping(to: pixelRect) else {
|
||||
return nil
|
||||
}
|
||||
return UIImage(cgImage: cropped, scale: 1, orientation: .up)
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
scrollView.frame = bounds
|
||||
overlayView.frame = bounds
|
||||
|
||||
let topSafe = safeAreaInsets.top
|
||||
let bottomSafe = safeAreaInsets.bottom
|
||||
topBar.frame = CGRect(x: 0, y: 0, width: bounds.width, height: topSafe + 44)
|
||||
bottomBar.frame = CGRect(
|
||||
x: 0,
|
||||
y: bounds.height - bottomSafe - bottomBarHeight,
|
||||
width: bounds.width,
|
||||
height: bottomSafe + bottomBarHeight
|
||||
)
|
||||
|
||||
let side = bounds.width
|
||||
let availableTop = topBar.frame.maxY
|
||||
let availableBottom = bottomBar.frame.minY
|
||||
let originY = availableTop + max(0, (availableBottom - availableTop - side) / 2)
|
||||
cropRect = CGRect(x: 0, y: originY, width: side, height: side)
|
||||
overlayView.cropRect = cropRect
|
||||
applyCropInsets()
|
||||
|
||||
if pendingFit, bounds.width > 0, imageView.image != nil {
|
||||
pendingFit = false
|
||||
userAdjusted = false
|
||||
fitImageToCrop()
|
||||
} else if !userAdjusted, cropRect != fittedCropRect, imageView.image != nil {
|
||||
fitImageToCrop()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - UIScrollViewDelegate
|
||||
|
||||
func viewForZooming(in scrollView: UIScrollView) -> UIView? {
|
||||
imageView
|
||||
}
|
||||
|
||||
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
|
||||
if !isFitting { userAdjusted = true }
|
||||
}
|
||||
|
||||
func scrollViewWillBeginZooming(_ scrollView: UIScrollView, with view: UIView?) {
|
||||
if !isFitting { userAdjusted = true }
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func setupUI() {
|
||||
scrollView.delegate = self
|
||||
scrollView.showsHorizontalScrollIndicator = false
|
||||
scrollView.showsVerticalScrollIndicator = false
|
||||
scrollView.bounces = true
|
||||
scrollView.alwaysBounceVertical = true
|
||||
scrollView.alwaysBounceHorizontal = true
|
||||
scrollView.bouncesZoom = true
|
||||
scrollView.contentInsetAdjustmentBehavior = .never
|
||||
scrollView.backgroundColor = .black
|
||||
addSubview(scrollView)
|
||||
|
||||
imageView.contentMode = .scaleToFill
|
||||
imageView.isUserInteractionEnabled = true
|
||||
scrollView.addSubview(imageView)
|
||||
|
||||
overlayView.isUserInteractionEnabled = false
|
||||
addSubview(overlayView)
|
||||
|
||||
addSubview(topBar)
|
||||
addSubview(bottomBar)
|
||||
|
||||
let closeBtn = UIButton(type: .custom)
|
||||
closeBtn.setImage(UIImage(named: "PhotoPicker/btn_close"), for: .normal)
|
||||
closeBtn.addTarget(self, action: #selector(tapCancel), for: .touchUpInside)
|
||||
topBar.addSubview(closeBtn)
|
||||
closeBtn.translatesAutoresizingMaskIntoConstraints = false
|
||||
NSLayoutConstraint.activate([
|
||||
closeBtn.leadingAnchor.constraint(equalTo: topBar.leadingAnchor, constant: 8),
|
||||
closeBtn.bottomAnchor.constraint(equalTo: topBar.bottomAnchor),
|
||||
closeBtn.widthAnchor.constraint(equalToConstant: 44),
|
||||
closeBtn.heightAnchor.constraint(equalToConstant: 44)
|
||||
])
|
||||
|
||||
let cancelBtn = UIButton(type: .custom)
|
||||
cancelBtn.setTitle("取消", for: .normal)
|
||||
cancelBtn.setTitleColor(.white, for: .normal)
|
||||
cancelBtn.titleLabel?.font = .systemFont(ofSize: 16)
|
||||
cancelBtn.addTarget(self, action: #selector(tapCancel), for: .touchUpInside)
|
||||
bottomBar.addSubview(cancelBtn)
|
||||
|
||||
let rotateBtn = UIButton(type: .custom)
|
||||
let rotateConfig = UIImage.SymbolConfiguration(pointSize: 20, weight: .regular)
|
||||
rotateBtn.setImage(UIImage(systemName: "rotate.right", withConfiguration: rotateConfig), for: .normal)
|
||||
rotateBtn.tintColor = .white
|
||||
rotateBtn.addTarget(self, action: #selector(tapRotate), for: .touchUpInside)
|
||||
bottomBar.addSubview(rotateBtn)
|
||||
|
||||
let confirmBtn = UIButton(type: .custom)
|
||||
confirmBtn.setTitle("确定", for: .normal)
|
||||
confirmBtn.setTitleColor(.white, for: .normal)
|
||||
confirmBtn.titleLabel?.font = .systemFont(ofSize: 16, weight: .medium)
|
||||
confirmBtn.backgroundColor = UIColor(hexStr: "#07C160")
|
||||
confirmBtn.layer.cornerRadius = 8
|
||||
confirmBtn.addTarget(self, action: #selector(tapConfirm), for: .touchUpInside)
|
||||
bottomBar.addSubview(confirmBtn)
|
||||
|
||||
cancelBtn.translatesAutoresizingMaskIntoConstraints = false
|
||||
rotateBtn.translatesAutoresizingMaskIntoConstraints = false
|
||||
confirmBtn.translatesAutoresizingMaskIntoConstraints = false
|
||||
NSLayoutConstraint.activate([
|
||||
cancelBtn.leadingAnchor.constraint(equalTo: bottomBar.leadingAnchor, constant: 20),
|
||||
cancelBtn.topAnchor.constraint(equalTo: bottomBar.topAnchor, constant: 8),
|
||||
cancelBtn.heightAnchor.constraint(equalToConstant: 40),
|
||||
|
||||
rotateBtn.centerXAnchor.constraint(equalTo: bottomBar.centerXAnchor),
|
||||
rotateBtn.centerYAnchor.constraint(equalTo: cancelBtn.centerYAnchor),
|
||||
rotateBtn.widthAnchor.constraint(equalToConstant: 44),
|
||||
rotateBtn.heightAnchor.constraint(equalToConstant: 44),
|
||||
|
||||
confirmBtn.trailingAnchor.constraint(equalTo: bottomBar.trailingAnchor, constant: -16),
|
||||
confirmBtn.centerYAnchor.constraint(equalTo: cancelBtn.centerYAnchor),
|
||||
confirmBtn.widthAnchor.constraint(equalToConstant: 72),
|
||||
confirmBtn.heightAnchor.constraint(equalToConstant: 36)
|
||||
])
|
||||
}
|
||||
|
||||
private func fitImageToCrop() {
|
||||
guard let image = imageView.image, cropRect.width > 0 else { return }
|
||||
let imageSize = image.size
|
||||
guard imageSize.width > 0, imageSize.height > 0 else { return }
|
||||
|
||||
isFitting = true
|
||||
scrollView.minimumZoomScale = 1
|
||||
scrollView.maximumZoomScale = 1
|
||||
scrollView.zoomScale = 1
|
||||
imageView.transform = .identity
|
||||
imageView.frame = CGRect(origin: .zero, size: imageSize)
|
||||
scrollView.contentSize = imageSize
|
||||
|
||||
applyCropInsets()
|
||||
|
||||
let minScale = max(cropRect.width / imageSize.width, cropRect.height / imageSize.height)
|
||||
scrollView.minimumZoomScale = minScale
|
||||
scrollView.maximumZoomScale = max(minScale * 4, 4)
|
||||
scrollView.zoomScale = minScale
|
||||
|
||||
let scaled = CGSize(width: imageSize.width * minScale, height: imageSize.height * minScale)
|
||||
scrollView.contentOffset = CGPoint(
|
||||
x: (scaled.width - cropRect.width) / 2 - scrollView.contentInset.left,
|
||||
y: (scaled.height - cropRect.height) / 2 - scrollView.contentInset.top
|
||||
)
|
||||
fittedCropRect = cropRect
|
||||
isFitting = false
|
||||
}
|
||||
|
||||
private func applyCropInsets() {
|
||||
scrollView.contentInset = UIEdgeInsets(
|
||||
top: cropRect.minY,
|
||||
left: cropRect.minX,
|
||||
bottom: max(0, bounds.height - cropRect.maxY),
|
||||
right: max(0, bounds.width - cropRect.maxX)
|
||||
)
|
||||
}
|
||||
|
||||
@objc private func tapCancel() {
|
||||
onCancel?()
|
||||
}
|
||||
|
||||
@objc private func tapRotate() {
|
||||
rotateClockwise()
|
||||
}
|
||||
|
||||
@objc private func tapConfirm() {
|
||||
onConfirm?()
|
||||
}
|
||||
}
|
||||
|
||||
private final class ImageCropOverlayView: UIView {
|
||||
|
||||
var cropRect: CGRect = .zero {
|
||||
didSet { updateMaskPath() }
|
||||
}
|
||||
|
||||
private let dimLayer: CAShapeLayer = {
|
||||
let layer = CAShapeLayer()
|
||||
layer.fillRule = .evenOdd
|
||||
layer.fillColor = UIColor.black.withAlphaComponent(0.55).cgColor
|
||||
return layer
|
||||
}()
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
isUserInteractionEnabled = false
|
||||
backgroundColor = .clear
|
||||
layer.addSublayer(dimLayer)
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override func layoutSubviews() {
|
||||
super.layoutSubviews()
|
||||
dimLayer.frame = bounds
|
||||
updateMaskPath()
|
||||
}
|
||||
|
||||
private func updateMaskPath() {
|
||||
let path = UIBezierPath(rect: bounds)
|
||||
if cropRect.width > 0, cropRect.height > 0 {
|
||||
path.append(UIBezierPath(rect: cropRect))
|
||||
}
|
||||
dimLayer.path = path.cgPath
|
||||
}
|
||||
}
|
||||
|
||||
private extension UIImage {
|
||||
func rotatedClockwise() -> UIImage {
|
||||
let newSize = CGSize(width: size.height, height: size.width)
|
||||
let format = UIGraphicsImageRendererFormat.default()
|
||||
format.scale = scale
|
||||
format.opaque = false
|
||||
let renderer = UIGraphicsImageRenderer(size: newSize, format: format)
|
||||
return renderer.image { ctx in
|
||||
ctx.cgContext.translateBy(x: newSize.width, y: 0)
|
||||
ctx.cgContext.rotate(by: .pi / 2)
|
||||
draw(in: CGRect(origin: .zero, size: size))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
import Foundation
|
||||
import SwiftyJSON
|
||||
import CommonCrypto
|
||||
import CryptoKit
|
||||
import URLNavigator
|
||||
import SwiftDate
|
||||
|
||||
|
|
@ -53,29 +54,7 @@ public extension String {
|
|||
|
||||
// MARK: md5
|
||||
public extension String {
|
||||
var MD5String: String {
|
||||
|
||||
let cStrl = cString(using: String.Encoding(rawValue: String.Encoding.utf8.rawValue));
|
||||
|
||||
let buffer = UnsafeMutablePointer<UInt8>.allocate(capacity: 16);
|
||||
|
||||
CC_MD5(cStrl, CC_LONG(strlen(cStrl!)), buffer);
|
||||
|
||||
var md5String = "";
|
||||
|
||||
for idx in 0...15 {
|
||||
|
||||
let obcStrl = String.init(format: "%02x", buffer[idx]);
|
||||
|
||||
md5String.append(obcStrl);
|
||||
|
||||
}
|
||||
|
||||
free(buffer);
|
||||
|
||||
return md5String;
|
||||
|
||||
}
|
||||
var MD5String: String { md5 }
|
||||
}
|
||||
// MARK: Base64
|
||||
|
||||
|
|
@ -93,13 +72,7 @@ public extension String {
|
|||
|
||||
|
||||
public extension String {
|
||||
var md5: String {
|
||||
let data = self.data
|
||||
var digest = [UInt8](repeating: 0, count: Int(CC_MD5_DIGEST_LENGTH))
|
||||
CC_MD5((data as NSData).bytes, CC_LONG(data.count), &digest)
|
||||
let hexBytes = digest.map { String(format: "%02hhx", $0) }
|
||||
return hexBytes.joined(separator: "")
|
||||
}
|
||||
var md5: String { data.md5Hex }
|
||||
|
||||
var sha1: String {
|
||||
let data = self.data
|
||||
|
|
@ -216,6 +189,10 @@ public extension Data {
|
|||
var string: String {
|
||||
return String(data: self, encoding: String.Encoding.utf8) ?? ""
|
||||
}
|
||||
|
||||
var md5Hex: String {
|
||||
Insecure.MD5.hash(data: self).map { String(format: "%02x", $0) }.joined()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Int
|
||||
|
|
|
|||
|
|
@ -4,16 +4,6 @@
|
|||
<dict>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>alipay</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>Alipay2021005185689681</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
|
|
@ -24,10 +14,18 @@
|
|||
<string>wx1e38bba788d55cde</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>quciklocation</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>alipays</string>
|
||||
<string>quciklocation</string>
|
||||
<string>baidumap</string>
|
||||
<string>qqmap</string>
|
||||
<string>iosamap</string>
|
||||
|
|
@ -41,14 +39,14 @@
|
|||
<false/>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>cdn.u8t.cn</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
<key>NSIncludesSubdomains</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>cdn2.batiao8.com</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
<key>NSIncludesSubdomains</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>38.207.176.65</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
|
|
@ -69,13 +67,6 @@
|
|||
<key>NSIncludesSubdomains</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>cdn.u8t.cn</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
<key>NSIncludesSubdomains</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>UIAppFonts</key>
|
||||
|
|
|
|||
|
|
@ -56,13 +56,13 @@ class BaseViewController: UIViewController {
|
|||
print(className)
|
||||
MobClick.beginLogPageView(className)
|
||||
|
||||
// 返回根页面时恢复 tabBar 可见性(UINavigationControllerDelegate 在 pop 时可能漏触发)
|
||||
(tabBarController as? MainTabBarController)?.updateTabBarVisibility()
|
||||
if navigationController?.transitionCoordinator == nil {
|
||||
(tabBarController as? MainTabBarController)?.updateTabBarVisibility()
|
||||
}
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
// popToRoot 动画完成后 navigation stack 才减到 1,此时再恢复 tabBar
|
||||
(tabBarController as? MainTabBarController)?.updateTabBarVisibility()
|
||||
}
|
||||
|
||||
|
|
@ -186,16 +186,16 @@ extension BaseViewController {
|
|||
|
||||
// MARK: - FLEX
|
||||
extension BaseViewController {
|
||||
private func setupFlex() {
|
||||
#if DEBUG
|
||||
private func setupFlex() {
|
||||
FLEXManager.shared.showExplorer()
|
||||
#endif
|
||||
}
|
||||
|
||||
override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) {
|
||||
print("摇晃结束")
|
||||
setupFlex()
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// MAKR: - UIView查看大图
|
||||
|
|
|
|||
|
|
@ -113,6 +113,21 @@ extension MainTabBarController: QuickLocationTabBarDelegate {
|
|||
// MARK: - UINavigationControllerDelegate
|
||||
extension MainTabBarController: UINavigationControllerDelegate {
|
||||
func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
|
||||
updateTabBarVisibility()
|
||||
let hideTabBar = viewController !== navigationController.viewControllers.first
|
||||
if hideTabBar {
|
||||
customTabBar.isHidden = true
|
||||
return
|
||||
}
|
||||
guard let coordinator = navigationController.transitionCoordinator else {
|
||||
updateTabBarVisibility()
|
||||
return
|
||||
}
|
||||
coordinator.animate(alongsideTransition: { _ in }, completion: { [weak self] context in
|
||||
if context.isCancelled {
|
||||
self?.updateTabBarVisibility()
|
||||
} else {
|
||||
self?.customTabBar.isHidden = false
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,14 +62,7 @@ class AppContextManager: NSObject {
|
|||
var sex: Int {
|
||||
account?.sex ?? -1
|
||||
}
|
||||
|
||||
/// 会员 1:非会员 2:普通会员 3:终身会员
|
||||
var vip: Int {
|
||||
guard AppContextManager.shared.systemConfig?.isIntercept == false else {
|
||||
return 2
|
||||
}
|
||||
return account?.vip ?? 1
|
||||
}
|
||||
|
||||
/// 状态:0、无状态 1、SOS 2、气泡等
|
||||
var status: Int {
|
||||
account?.status ?? 0
|
||||
|
|
|
|||
|
|
@ -32,12 +32,6 @@ struct UserConfigModel: Mappable {
|
|||
/// 用户 ID
|
||||
var uid: String?
|
||||
|
||||
/// 会员 1:非会员 2:普通会员 3:终身会员
|
||||
var vip: Int = 1
|
||||
/// 会员类型
|
||||
var vip_name: String = ""
|
||||
/// 会员过期时间
|
||||
var vip_expire_time: String = ""
|
||||
/// 状态:0、无状态 1、SOS 2、气泡等
|
||||
var status: Int = 0
|
||||
/// 心情:0、无状态 1、开心 2、愤怒
|
||||
|
|
@ -59,9 +53,6 @@ struct UserConfigModel: Mappable {
|
|||
sex <- map["sex"]
|
||||
head_pic <- (map["head_pic"], kFlexString)
|
||||
config <- map["config"]
|
||||
vip <- map["vip"]
|
||||
vip_name <- map["vip_name"]
|
||||
vip_expire_time <- map["vip_expire_time"]
|
||||
status <- map["status"]
|
||||
mood <- map["mood"]
|
||||
}
|
||||
|
|
@ -70,9 +61,9 @@ struct UserConfigModel: Mappable {
|
|||
struct SystemConfigModel: Mappable {
|
||||
|
||||
/// 弹窗配置
|
||||
var popupConfig: PopupWindowConfigModel?
|
||||
// var popupConfig: PopupWindowConfigModel?
|
||||
/// 弹窗时间配置
|
||||
var timeConfig: PopupWindowTimeModel?
|
||||
// var timeConfig: PopupWindowTimeModel?
|
||||
/// 微信分享配置
|
||||
var shareConfig: WxShareConfigModel?
|
||||
/// 飞鸽传书发送次数
|
||||
|
|
@ -89,17 +80,6 @@ struct SystemConfigModel: Mappable {
|
|||
/// 圈子里的banner
|
||||
var groupBannerList: [String] = []
|
||||
|
||||
/// 引导页显示开关
|
||||
var guideDisplay: Bool = true
|
||||
|
||||
/// 全局控制显示隐藏 弹窗和充值
|
||||
var globalDisplay: Bool = true
|
||||
|
||||
/// 是否拦截
|
||||
var isIntercept: Bool {
|
||||
return globalDisplay == false || !WXApi.isWXAppInstalled() // 未安装微信
|
||||
}
|
||||
|
||||
init?(map: Map) {
|
||||
|
||||
}
|
||||
|
|
@ -107,63 +87,14 @@ struct SystemConfigModel: Mappable {
|
|||
mutating func mapping(map: Map) {
|
||||
chatWarning <- map["client.chatwarning", nested: false]
|
||||
groupBannerList <- map["client.team.ad", nested: false]
|
||||
popupConfig <- map["client.popup.display", nested: false]
|
||||
timeConfig <- map["client.time.setting", nested: false]
|
||||
// timeConfig <- map["client.time.setting", nested: false]
|
||||
pigeonConfig <- map["client.time.setting.pigeon", nested: false]
|
||||
shareConfig <- map["client.weixin.share", nested: false]
|
||||
guideDisplay <- map["client.guide_display", nested: false]
|
||||
globalDisplay <- map["client.global_display", nested: false]
|
||||
versionUpgradeModel <- map["client.version.upgrade", nested: false]
|
||||
bannerList <- map["client.banner.explore", nested: false]
|
||||
}
|
||||
}
|
||||
|
||||
struct PopupWindowConfigModel: Mappable {
|
||||
/// 是否弹vip弹窗
|
||||
var pay_pop: Bool = true
|
||||
|
||||
/// 搜索位置弹窗
|
||||
var search_phone: Bool = true
|
||||
|
||||
|
||||
init?(map: Map) {
|
||||
|
||||
}
|
||||
|
||||
mutating func mapping(map: Map) {
|
||||
pay_pop <- map["pay_pop"]
|
||||
search_phone <- map["search_phone"]
|
||||
}
|
||||
}
|
||||
|
||||
struct PopupWindowTimeModel: Mappable {
|
||||
/// 会员充值push倒计时
|
||||
var buy_vip_tip: Int = 0
|
||||
/// 搜索位置 倒计时(秒)
|
||||
var search_phone: Int = 0
|
||||
/// 注册提示
|
||||
var signup_tip: Int = 0
|
||||
/// vip提示倒计时(秒)
|
||||
var pay_pop_time: Int = 0
|
||||
/// vip折扣
|
||||
var min_discount: Double = 0
|
||||
/// 默认支付方式 1 支付宝 2 微信
|
||||
var pay_pop_type: Int = 0
|
||||
|
||||
init?(map: Map) {
|
||||
|
||||
}
|
||||
|
||||
mutating func mapping(map: Map) {
|
||||
buy_vip_tip <- map["buy_vip_tip"]
|
||||
search_phone <- map["search_phone"]
|
||||
signup_tip <- map["signup_tip"]
|
||||
pay_pop_time <- map["pay_pop_time"]
|
||||
min_discount <- map["min_discount"]
|
||||
pay_pop_type <- map["pay_pop_type"]
|
||||
}
|
||||
}
|
||||
|
||||
struct PigeonTimeSettingModel: Mappable {
|
||||
/// 时间窗口内最多发送次数
|
||||
var nums: Int = 0
|
||||
|
|
@ -237,7 +168,7 @@ struct VersionUpgradeModel: Mappable {
|
|||
struct BannerConfigModel: Mappable {
|
||||
/// 图片地址
|
||||
var img: String = ""
|
||||
/// url:member跳充值页 url:网页地址
|
||||
/// url:网页地址
|
||||
var url: String = ""
|
||||
/// app:原生应用内跳转 web:跳转网页
|
||||
var type: String = ""
|
||||
|
|
|
|||
|
|
@ -201,52 +201,6 @@ struct PhoneUsagePeriodModel: Mappable {
|
|||
}
|
||||
}
|
||||
|
||||
struct PhoneUsageReportResponse: BaseModelProtocol {
|
||||
var code: String?
|
||||
var message: String?
|
||||
var model: PhoneUsageReportModel?
|
||||
|
||||
init?(map: Map) {}
|
||||
|
||||
mutating func mapping(map: Map) {
|
||||
code <- (map["code"], kIntTransformStr)
|
||||
message <- map["message"]
|
||||
model <- map["data"]
|
||||
}
|
||||
}
|
||||
|
||||
struct PhoneUsageReportModel: Mappable {
|
||||
var phoneInfo: PhoneUsageInfoModel?
|
||||
var brand: String = ""
|
||||
var brandIcon: String = ""
|
||||
var screenUseTimes: [PhoneUsageReportDayModel] = []
|
||||
var appUseCounts: [PhoneUsageReportDayModel] = []
|
||||
|
||||
init?(map: Map) {}
|
||||
|
||||
mutating func mapping(map: Map) {
|
||||
phoneInfo <- map["phone_info"]
|
||||
brand <- (map["brand"], kIntTransformStr)
|
||||
brandIcon <- (map["brand_icon"], kIntTransformStr)
|
||||
screenUseTimes <- map["screen_use_times"]
|
||||
appUseCounts <- map["app_use_counts"]
|
||||
}
|
||||
}
|
||||
|
||||
struct PhoneUsageReportDayModel: Mappable {
|
||||
var day: String = ""
|
||||
var useTime: Int?
|
||||
var count: Int?
|
||||
|
||||
init?(map: Map) {}
|
||||
|
||||
mutating func mapping(map: Map) {
|
||||
day <- (map["day"], kIntTransformStr)
|
||||
useTime <- (map["use_time"], kStrTransformInt)
|
||||
count <- (map["count"], kStrTransformInt)
|
||||
}
|
||||
}
|
||||
|
||||
struct PhoneUsageInfoModel: Mappable {
|
||||
var brand: String = ""
|
||||
var model: String = ""
|
||||
|
|
|
|||
|
|
@ -114,8 +114,6 @@ extension ApiManager {
|
|||
handleTokenExpired(msg: message)
|
||||
case GatewayStatusCode.failure.rawValue, GatewayStatusCode.noAuthority.rawValue: // 退出当前界面
|
||||
handlePopView(message, handle)
|
||||
case GatewayStatusCode.needVip.rawValue:
|
||||
handleNeedVip(message)
|
||||
default:
|
||||
// 接口没返回code的时候取success字段
|
||||
if success != nil {
|
||||
|
|
@ -136,7 +134,6 @@ extension ApiManager {
|
|||
return .failure(handleError(with: code,
|
||||
domain: "Data Error",
|
||||
message: message,
|
||||
isShowTip: code != GatewayStatusCode.needVip.rawValue,
|
||||
data: response))
|
||||
case let .failure(error):
|
||||
let message = error.gatewayMessage ?? "请检查网络连接"
|
||||
|
|
@ -197,14 +194,6 @@ extension ApiManager {
|
|||
}
|
||||
}
|
||||
|
||||
// MARK: - 需开通VIP
|
||||
private func handleNeedVip(_ msg: String) {
|
||||
MainAsync {
|
||||
UIViewController.showConfirmPop(title: "温馨提示", message: msg, confirmText: "去开通", confirmBlock: {
|
||||
AppRouter.push(Route.web, userInfo: ["url": URLManager.shared.homeUrl])
|
||||
}, cancelText: "取消")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension ApiManager {
|
||||
|
|
@ -268,17 +257,7 @@ extension ApiManager {
|
|||
}
|
||||
|
||||
class func getMd5_32Bit_String(_ srcString: String, isUppercase: Bool) -> String {
|
||||
let cStr = srcString.cString(using: .utf8)
|
||||
let length = CC_LONG(strlen(cStr!))
|
||||
var digest = [UInt8](repeating: 0, count: Int(CC_MD5_DIGEST_LENGTH))
|
||||
|
||||
CC_MD5(cStr, length, &digest)
|
||||
|
||||
var result = ""
|
||||
for i in 0..<Int(CC_MD5_DIGEST_LENGTH) {
|
||||
result += String(format: "%02x", digest[i])
|
||||
}
|
||||
|
||||
let result = srcString.md5
|
||||
return isUppercase ? result.uppercased() : result
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class AppSettings: NSObject {
|
|||
}()
|
||||
|
||||
/// AppStore ID
|
||||
var appId: String { "" }
|
||||
var appId: String { "6790610409" }
|
||||
|
||||
/// UUID
|
||||
var uuid: String = ""
|
||||
|
|
@ -42,8 +42,6 @@ class AppSettings: NSObject {
|
|||
public static let kAppsAMapAppId = "4f6b29cfedc0e117316b88008fa41c07"
|
||||
/// wechat
|
||||
public static let kAppsWXApiAppId = "wx1e38bba788d55cde"
|
||||
/// 支付宝
|
||||
public static let kAppsAlipayAppId = ""
|
||||
/// 个推
|
||||
public static let kAppsGeTuiAppId = "cYHNI4KThh6SxZUsf9RiU2"
|
||||
/// 友盟
|
||||
|
|
|
|||
|
|
@ -75,8 +75,6 @@ enum Route: String {
|
|||
case itineraryTrace = "itineraryTrace"
|
||||
/// 今日轨迹详情
|
||||
case todayTrackDetail = "todayTrackDetail"
|
||||
/// 手机报告详情
|
||||
case phoneReportDetail = "phoneReportDetail"
|
||||
/// APP 使用报告
|
||||
case appUsageReport = "appUsageReport"
|
||||
/// 关于我们
|
||||
|
|
@ -378,11 +376,6 @@ extension AppRouter: AppRouterProtocol {
|
|||
TodayTrackDetailVC(userInfo: parameters)
|
||||
}
|
||||
|
||||
// MARK: - 手机报告详情
|
||||
AppRouter.register(Route.phoneReportDetail) { url, parameters in
|
||||
PhoneReportDetailVC(userInfo: parameters)
|
||||
}
|
||||
|
||||
// MARK: - APP 使用报告
|
||||
AppRouter.register(Route.appUsageReport) { _, parameters in
|
||||
AppUsageReportVC(userInfo: parameters)
|
||||
|
|
|
|||
|
|
@ -1,81 +0,0 @@
|
|||
//
|
||||
// IAPManager.swift
|
||||
// QuickLocation
|
||||
//
|
||||
// Created by 八条 on 2026/7/3.
|
||||
//
|
||||
|
||||
import StoreKit
|
||||
import RxSwift
|
||||
|
||||
class IAPManager: NSObject {
|
||||
static let shared = IAPManager()
|
||||
private let disposeBag = DisposeBag()
|
||||
|
||||
private var currentGoodsId: String = ""
|
||||
private var purchaseCompletion: ((Bool, String?) -> Void)?
|
||||
|
||||
func startObserving() {
|
||||
SKPaymentQueue.default().add(self)
|
||||
}
|
||||
|
||||
func purchase(goodsId: String, completion: @escaping (Bool, String?) -> Void) {
|
||||
currentGoodsId = goodsId
|
||||
purchaseCompletion = completion
|
||||
let request = SKProductsRequest(productIdentifiers: [goodsId])
|
||||
request.delegate = self
|
||||
request.start()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - SKProductsRequestDelegate
|
||||
extension IAPManager: SKProductsRequestDelegate {
|
||||
func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) {
|
||||
guard let product = response.products.first else {
|
||||
purchaseCompletion?(false, "商品不可用")
|
||||
return
|
||||
}
|
||||
SKPaymentQueue.default().add(SKPayment(product: product))
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - SKPaymentTransactionObserver
|
||||
extension IAPManager: SKPaymentTransactionObserver {
|
||||
func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction]) {
|
||||
for tx in transactions {
|
||||
switch tx.transactionState {
|
||||
case .purchased:
|
||||
verifyReceipt(transaction: tx)
|
||||
case .failed:
|
||||
queue.finishTransaction(tx)
|
||||
let msg = tx.error?.localizedDescription ?? "支付失败"
|
||||
purchaseCompletion?(false, msg)
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func verifyReceipt(transaction: SKPaymentTransaction) {
|
||||
guard let receiptURL = Bundle.main.appStoreReceiptURL,
|
||||
let receiptData = try? Data(contentsOf: receiptURL) else {
|
||||
SKPaymentQueue.default().finishTransaction(transaction)
|
||||
purchaseCompletion?(false, "获取凭证失败")
|
||||
return
|
||||
}
|
||||
let receipt = receiptData.base64EncodedString()
|
||||
let txId = transaction.transactionIdentifier ?? ""
|
||||
|
||||
OrderService.appleNotify(
|
||||
receipt: receipt,
|
||||
productId: currentGoodsId,
|
||||
transactionId: txId
|
||||
).subscribe(onNext: { [weak self] _ in
|
||||
SKPaymentQueue.default().finishTransaction(transaction)
|
||||
self?.purchaseCompletion?(true, nil)
|
||||
}, onError: { [weak self] error in
|
||||
SKPaymentQueue.default().finishTransaction(transaction)
|
||||
self?.purchaseCompletion?(false, error.localizedDescription)
|
||||
}).disposed(by: disposeBag)
|
||||
}
|
||||
}
|
||||
|
|
@ -29,8 +29,6 @@ enum MqttType: String, Codable {
|
|||
case bubbleQuit = "bubblequit" // 退出气泡
|
||||
case needTrack = "needtrack" // 追踪上报
|
||||
case emote = "emote" // 接收表情
|
||||
case phone = "phone" // 手机信息上报
|
||||
case phoneUsage = "phoneUsage" // 当前 App 使用次数上报
|
||||
case lockApp = "lockApp" // 远程锁 App
|
||||
case appUnlock = "appUnlock" // 远程解锁 App
|
||||
case lockAppsChanged = "lockAppsChanged" // App 锁状态已同步
|
||||
|
|
@ -629,76 +627,6 @@ final class AppUnlockCoordinator {
|
|||
}
|
||||
}
|
||||
|
||||
/// 手机信息上报数据
|
||||
private struct MqttPhoneInfo: Codable {
|
||||
let brand: String
|
||||
let model: String
|
||||
let memory_total: String
|
||||
let memory_used: String
|
||||
let battery: String
|
||||
let network: String
|
||||
let brightness: String
|
||||
let volume: String
|
||||
let weather: String
|
||||
let use_time: String
|
||||
let unlock_count: String
|
||||
}
|
||||
|
||||
private struct MqttPhoneReportData: Codable {
|
||||
let user_id: String
|
||||
let group_key: String
|
||||
let phone: MqttPhoneInfo
|
||||
}
|
||||
|
||||
private struct MqttPhoneReportPayload: Codable {
|
||||
let type: String
|
||||
let data: MqttPhoneReportData
|
||||
let extra: String
|
||||
}
|
||||
|
||||
private struct MqttPhoneUsageExtra: Codable {
|
||||
let count: Int
|
||||
}
|
||||
|
||||
private struct MqttPhoneUsageItem: Codable {
|
||||
let day: String
|
||||
let appName: String
|
||||
let packageName: String
|
||||
let usageTime: Int
|
||||
let extra: MqttPhoneUsageExtra
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case day
|
||||
case appName = "app_name"
|
||||
case packageName = "package"
|
||||
case usageTime = "usage_time"
|
||||
case extra
|
||||
}
|
||||
}
|
||||
|
||||
private struct MqttPhoneUsageData: Codable {
|
||||
let userId: String
|
||||
let groupKey: String
|
||||
let phoneUsage: [MqttPhoneUsageItem]
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case userId = "user_id"
|
||||
case groupKey = "group_key"
|
||||
case phoneUsage = "phone_usage"
|
||||
}
|
||||
}
|
||||
|
||||
private struct MqttPhoneUsagePayload: Codable {
|
||||
let type: String
|
||||
let data: MqttPhoneUsageData
|
||||
let extra: String
|
||||
}
|
||||
|
||||
private struct MqttPhoneUsageSnapshot: Equatable {
|
||||
let day: String
|
||||
let count: Int
|
||||
}
|
||||
|
||||
// MARK: - MQTTService
|
||||
|
||||
/// MQTT 5.0 服务,管理连接、订阅和消息收发
|
||||
|
|
@ -811,39 +739,9 @@ final class MQTTService: NSObject {
|
|||
}
|
||||
}
|
||||
|
||||
// MARK: - 手机信息上报
|
||||
private let phoneReportInterval: TimeInterval = 30 * 60
|
||||
private let phoneReportRetryInterval: TimeInterval = 60
|
||||
private var phoneReportGroupKey = ""
|
||||
private var phoneReportLocation: CLLocation?
|
||||
private var phoneReportTimer: Timer?
|
||||
private var lastPhoneReportDate: Date?
|
||||
private var isPhoneReportInFlight = false
|
||||
private var phoneReportGeneration = 0
|
||||
private var lastObservedPhoneUsage: MqttPhoneUsageSnapshot?
|
||||
private var pendingPhoneUsage: MqttPhoneUsageSnapshot?
|
||||
|
||||
override private init() {
|
||||
super.init()
|
||||
UIDevice.current.isBatteryMonitoringEnabled = true
|
||||
PhoneStatusCollector.shared.start()
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(applicationDidBecomeActive),
|
||||
name: UIApplication.didBecomeActiveNotification,
|
||||
object: nil
|
||||
)
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(appUsageCountDidChange),
|
||||
name: .unlockCountDidChange,
|
||||
object: nil
|
||||
)
|
||||
let usage = Self.currentPhoneUsageSnapshot()
|
||||
lastObservedPhoneUsage = usage
|
||||
if usage.count > 0 {
|
||||
pendingPhoneUsage = usage
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - 连接
|
||||
|
|
@ -883,13 +781,11 @@ final class MQTTService: NSObject {
|
|||
func disconnect() {
|
||||
mqtt?.disconnect()
|
||||
isConnected = false
|
||||
invalidatePhoneReportTimer()
|
||||
}
|
||||
|
||||
// MARK: - 切换用户
|
||||
/// 更新 clientID 并重连(切换用户后调用)
|
||||
func updateClientID(_ newID: String) {
|
||||
resetPhoneReportState()
|
||||
clientID = newID
|
||||
disconnect()
|
||||
connect()
|
||||
|
|
@ -1064,206 +960,6 @@ final class MQTTService: NSObject {
|
|||
publish(topic: "\(topic)\(AppContextManager.shared.userId)", message: payload.toJsonString())
|
||||
}
|
||||
|
||||
// MARK: - 手机信息上报
|
||||
|
||||
/// 首页提供当前默认圈子和最新定位。切换圈子只更新上下文,不额外触发重复上报。
|
||||
func updatePhoneReportContext(groupKey: String?, location: CLLocation?) {
|
||||
performOnMain { [weak self] in
|
||||
guard let self else { return }
|
||||
if let groupKey {
|
||||
self.phoneReportGroupKey = groupKey
|
||||
}
|
||||
if let location, CLLocationCoordinate2DIsValid(location.coordinate) {
|
||||
self.phoneReportLocation = location
|
||||
}
|
||||
self.reportPhoneUsageIfNeeded()
|
||||
self.reportPhoneIfNeeded()
|
||||
}
|
||||
}
|
||||
|
||||
/// MQTT 重连、Timer 和 App 回到前台都通过此入口检查是否到期。
|
||||
func reportPhoneIfNeeded(force: Bool = false) {
|
||||
guard Thread.isMainThread else {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.reportPhoneIfNeeded(force: force)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
guard isConnected,
|
||||
!isPhoneReportInFlight,
|
||||
!phoneReportGroupKey.isEmpty,
|
||||
!AppContextManager.shared.userId.isEmpty else { return }
|
||||
|
||||
if !force,
|
||||
let lastPhoneReportDate,
|
||||
Date().timeIntervalSince(lastPhoneReportDate) < phoneReportInterval {
|
||||
schedulePhoneReportTimer(after: phoneReportInterval - Date().timeIntervalSince(lastPhoneReportDate))
|
||||
return
|
||||
}
|
||||
|
||||
isPhoneReportInFlight = true
|
||||
phoneReportGeneration += 1
|
||||
let generation = phoneReportGeneration
|
||||
|
||||
guard let location = phoneReportLocation else {
|
||||
finishPhoneReport(weather: "未知", generation: generation)
|
||||
return
|
||||
}
|
||||
|
||||
MemberWeatherService.shared.weather(for: location) { [weak self] result in
|
||||
let weather = (try? result.get().text) ?? "未知"
|
||||
self?.finishPhoneReport(weather: weather, generation: generation)
|
||||
}
|
||||
}
|
||||
|
||||
@objc func applicationDidBecomeActive() {
|
||||
capturePhoneUsageChange()
|
||||
reportPhoneUsageIfNeeded()
|
||||
reportPhoneIfNeeded()
|
||||
}
|
||||
|
||||
@objc private func appUsageCountDidChange() {
|
||||
performOnMain { [weak self] in
|
||||
self?.capturePhoneUsageChange()
|
||||
}
|
||||
}
|
||||
|
||||
private func capturePhoneUsageChange() {
|
||||
let usage = Self.currentPhoneUsageSnapshot()
|
||||
guard usage != lastObservedPhoneUsage else { return }
|
||||
lastObservedPhoneUsage = usage
|
||||
pendingPhoneUsage = usage
|
||||
reportPhoneUsageIfNeeded()
|
||||
}
|
||||
|
||||
private func reportPhoneUsageIfNeeded() {
|
||||
guard Thread.isMainThread else {
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.reportPhoneUsageIfNeeded()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
let userId = AppContextManager.shared.userId
|
||||
let groupKey = phoneReportGroupKey
|
||||
guard isConnected,
|
||||
let usage = pendingPhoneUsage,
|
||||
!userId.isEmpty,
|
||||
!groupKey.isEmpty else { return }
|
||||
|
||||
let item = MqttPhoneUsageItem(
|
||||
day: usage.day,
|
||||
appName: Self.appDisplayName,
|
||||
packageName: "cn.zuom8.jisuloca",
|
||||
usageTime: 0,
|
||||
extra: MqttPhoneUsageExtra(count: usage.count)
|
||||
)
|
||||
let payload = MqttPhoneUsagePayload(
|
||||
type: MqttType.phoneUsage.rawValue,
|
||||
data: MqttPhoneUsageData(
|
||||
userId: userId,
|
||||
groupKey: groupKey,
|
||||
phoneUsage: [item]
|
||||
),
|
||||
extra: ""
|
||||
)
|
||||
guard let data = try? JSONEncoder().encode(payload),
|
||||
let message = String(data: data, encoding: .utf8) else { return }
|
||||
|
||||
let messageId = publish(
|
||||
topic: "\(topic)\(userId)",
|
||||
message: message
|
||||
)
|
||||
if messageId >= 0, pendingPhoneUsage == usage {
|
||||
pendingPhoneUsage = nil
|
||||
}
|
||||
}
|
||||
|
||||
private func finishPhoneReport(weather: String, generation: Int) {
|
||||
performOnMain { [weak self] in
|
||||
guard let self,
|
||||
generation == self.phoneReportGeneration else { return }
|
||||
self.isPhoneReportInFlight = false
|
||||
|
||||
let userId = AppContextManager.shared.userId
|
||||
let groupKey = self.phoneReportGroupKey
|
||||
guard self.isConnected, !userId.isEmpty, !groupKey.isEmpty else { return }
|
||||
|
||||
let payload = MqttPhoneReportPayload(
|
||||
type: MqttType.phone.rawValue,
|
||||
data: MqttPhoneReportData(
|
||||
user_id: userId,
|
||||
group_key: groupKey,
|
||||
phone: self.collectPhoneInfo(weather: weather)
|
||||
),
|
||||
extra: ""
|
||||
)
|
||||
guard let data = try? JSONEncoder().encode(payload),
|
||||
let message = String(data: data, encoding: .utf8) else {
|
||||
self.schedulePhoneReportTimer(after: self.phoneReportRetryInterval)
|
||||
return
|
||||
}
|
||||
|
||||
let messageId = self.publish(
|
||||
topic: "\(self.topic)\(userId)",
|
||||
message: message
|
||||
)
|
||||
if messageId >= 0 {
|
||||
self.lastPhoneReportDate = Date()
|
||||
self.schedulePhoneReportTimer(after: self.phoneReportInterval)
|
||||
} else {
|
||||
self.schedulePhoneReportTimer(after: self.phoneReportRetryInterval)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func collectPhoneInfo(weather: String) -> MqttPhoneInfo {
|
||||
let snap = PhoneStatusCollector.shared.snapshot()
|
||||
return MqttPhoneInfo(
|
||||
brand: "iphone",
|
||||
model: snap.model,
|
||||
memory_total: snap.memoryTotal ?? "未知",
|
||||
memory_used: snap.memoryUsed ?? "未知",
|
||||
battery: snap.batteryText,
|
||||
network: snap.network,
|
||||
brightness: snap.brightnessText,
|
||||
volume: snap.volumeText,
|
||||
weather: weather,
|
||||
use_time: "\(max(0, UnlockCountManager.shared.todayScreenTimeSeconds))",
|
||||
unlock_count: "\(UnlockCountManager.shared.todayCount)"
|
||||
)
|
||||
}
|
||||
|
||||
private func schedulePhoneReportTimer(after interval: TimeInterval) {
|
||||
invalidatePhoneReportTimer()
|
||||
let timer = Timer(timeInterval: max(1, interval), repeats: false) { [weak self] _ in
|
||||
self?.phoneReportTimer = nil
|
||||
self?.reportPhoneIfNeeded()
|
||||
}
|
||||
RunLoop.main.add(timer, forMode: .common)
|
||||
phoneReportTimer = timer
|
||||
}
|
||||
|
||||
private func invalidatePhoneReportTimer() {
|
||||
performOnMain { [weak self] in
|
||||
self?.phoneReportTimer?.invalidate()
|
||||
self?.phoneReportTimer = nil
|
||||
}
|
||||
}
|
||||
|
||||
private func resetPhoneReportState() {
|
||||
performOnMain { [weak self] in
|
||||
guard let self else { return }
|
||||
self.phoneReportGeneration += 1
|
||||
self.phoneReportGroupKey = ""
|
||||
self.phoneReportLocation = nil
|
||||
self.lastPhoneReportDate = nil
|
||||
self.isPhoneReportInFlight = false
|
||||
self.invalidatePhoneReportTimer()
|
||||
}
|
||||
}
|
||||
|
||||
private func performOnMain(_ work: @escaping () -> Void) {
|
||||
if Thread.isMainThread {
|
||||
work()
|
||||
|
|
@ -1272,24 +968,6 @@ final class MQTTService: NSObject {
|
|||
}
|
||||
}
|
||||
|
||||
private static func currentPhoneUsageSnapshot() -> MqttPhoneUsageSnapshot {
|
||||
let formatter = DateFormatter()
|
||||
formatter.calendar = Calendar.current
|
||||
formatter.locale = Locale(identifier: "en_US_POSIX")
|
||||
formatter.timeZone = TimeZone.current
|
||||
formatter.dateFormat = "yyyy-MM-dd"
|
||||
return MqttPhoneUsageSnapshot(
|
||||
day: formatter.string(from: Date()),
|
||||
count: max(0, UnlockCountManager.shared.todayAppUsageCount)
|
||||
)
|
||||
}
|
||||
|
||||
private static var appDisplayName: String {
|
||||
Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String
|
||||
?? Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String
|
||||
?? "极速定位"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - CocoaMQTT5Delegate
|
||||
|
|
@ -1309,8 +987,6 @@ extension MQTTService: CocoaMQTT5Delegate {
|
|||
}
|
||||
onConnected?()
|
||||
flushPendingLockAppsChangedEvents()
|
||||
reportPhoneUsageIfNeeded()
|
||||
reportPhoneIfNeeded()
|
||||
}
|
||||
|
||||
func mqtt5(_ mqtt5: CocoaMQTT5, didPublishMessage message: CocoaMQTT5Message, id: UInt16) {
|
||||
|
|
@ -1359,7 +1035,6 @@ extension MQTTService: CocoaMQTT5Delegate {
|
|||
|
||||
func mqtt5DidDisconnect(_ mqtt5: CocoaMQTT5, withError err: Error?) {
|
||||
isConnected = false
|
||||
invalidatePhoneReportTimer()
|
||||
print("MQTT5 disconnected: \(err?.localizedDescription ?? "")")
|
||||
onDisconnected?()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,10 +80,6 @@ final class MemberWeatherService {
|
|||
let snapshot = Self.snapshot(from: weather)
|
||||
self?.finish(key: key, result: .success(snapshot))
|
||||
} catch {
|
||||
#if DEBUG
|
||||
let error = error as NSError
|
||||
print("WeatherKit request failed [\(error.domain):\(error.code)] at \(key): \(error.localizedDescription)")
|
||||
#endif
|
||||
self?.finish(key: key, result: .failure(error))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,10 +10,7 @@ import SwiftyUserDefaults
|
|||
import RxSwift
|
||||
|
||||
extension DefaultsKeys {
|
||||
// 接口环境 0:测试环境 1:正式环境
|
||||
var apiEnvKey: DefaultsKey<Int> { .init("ApiEnvKey", defaultValue: -99) }
|
||||
// 接口地址
|
||||
var apiServerURL: DefaultsKey<String> { .init("ApiServerURL", defaultValue: "") }
|
||||
|
||||
}
|
||||
|
||||
@objcMembers class URLManager: NSObject {
|
||||
|
|
@ -32,8 +29,6 @@ extension DefaultsKeys {
|
|||
var openIM_API = ""
|
||||
var openIM_WS = ""
|
||||
|
||||
///
|
||||
var homeUrl: String { "https://u.batiao8.com/ushare/10057" }
|
||||
/// 用户协议
|
||||
var userAgreementUrl: String { "https://smartdrive.zuom8.cn/jisu/Agreement.html" }
|
||||
/// 隐私政策
|
||||
|
|
@ -49,64 +44,27 @@ extension DefaultsKeys {
|
|||
}
|
||||
|
||||
func setupNetworkMode() {
|
||||
#if DEBUG
|
||||
setupApiEnv(1)
|
||||
openIM_API = "https://imapi.zuom8.cn" // http://38.207.176.65:10002
|
||||
openIM_WS = "ws://imws.zuom8.cn" // ws://38.207.176.65:10010
|
||||
#elseif AdHoc
|
||||
setupApiEnv(1)
|
||||
openIM_API = "https://imapi.zuom8.cn"
|
||||
openIM_WS = "ws://imws.zuom8.cn"
|
||||
#else
|
||||
setupApiEnv(1)
|
||||
openIM_API = "https://imapi.zuom8.cn"
|
||||
openIM_WS = "ws://imws.zuom8.cn"
|
||||
#endif
|
||||
}
|
||||
|
||||
private func setupApiEnv(_ env: Int) {
|
||||
// env
|
||||
if Defaults[\.apiEnvKey] != -99 {
|
||||
apiEnv = Defaults[\.apiEnvKey]
|
||||
}
|
||||
else {
|
||||
apiEnv = env
|
||||
}
|
||||
// api
|
||||
if Defaults[\.apiServerURL].isEmpty {
|
||||
apiServerURL = apiServerURL(apiEnv)
|
||||
} else {
|
||||
apiServerURL = Defaults[\.apiServerURL]
|
||||
}
|
||||
apiServerURL = apiServerURL(apiEnv)
|
||||
}
|
||||
|
||||
// MARK: - 接口地址
|
||||
func apiServerURL(_ env: Int) -> String {
|
||||
switch env {
|
||||
case 1: // 正式
|
||||
return "https://jsapi.zuom8.cn/"
|
||||
return "https://speed.batiao8.com/"
|
||||
case -1: // UAT
|
||||
return "https://jsapi.zuom8.cn/"
|
||||
return "https://speed.batiao8.com/"
|
||||
default: // SIT
|
||||
return "http://172.16.10.23:9243/"
|
||||
return "https://speed.batiao8.com/"
|
||||
}
|
||||
}
|
||||
|
||||
static let presetServers: [(title: String, url: String, env: Int)] = [
|
||||
("开发", "http://172.16.10.23:9243/", 0),
|
||||
("正式", "https://jsapi.zuom8.cn/", 1)
|
||||
]
|
||||
|
||||
func switchServer(url: String, env: Int? = nil) {
|
||||
let normalized = Self.normalizedServerURL(url)
|
||||
guard !normalized.isEmpty else { return }
|
||||
let resolvedEnv = env ?? Self.env(for: normalized)
|
||||
Defaults[\.apiEnvKey] = resolvedEnv
|
||||
Defaults[\.apiServerURL] = normalized
|
||||
apiEnv = resolvedEnv
|
||||
apiServerURL = normalized
|
||||
}
|
||||
|
||||
static func normalizedServerURL(_ raw: String) -> String {
|
||||
var url = raw.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
guard !url.isEmpty else { return "" }
|
||||
|
|
@ -118,21 +76,9 @@ extension DefaultsKeys {
|
|||
}
|
||||
return url
|
||||
}
|
||||
|
||||
static func env(for url: String) -> Int {
|
||||
let normalized = normalizedServerURL(url)
|
||||
if let preset = presetServers.first(where: { normalizedServerURL($0.url) == normalized }) {
|
||||
return preset.env
|
||||
}
|
||||
return 99
|
||||
}
|
||||
|
||||
// MARK: - 大对象服务器地址
|
||||
func uploadServerURL() -> String {
|
||||
//#if DEBUG
|
||||
// return ""
|
||||
//#else
|
||||
return ""
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,889 +0,0 @@
|
|||
//
|
||||
// UnlockCountManager.swift
|
||||
// QuickLocation
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import CoreLocation
|
||||
import SwiftyUserDefaults
|
||||
|
||||
/// 本机解锁次数:protectedData 状态机 + 始终定位保持后台运行窗口(不上报)
|
||||
final class UnlockCountManager: NSObject {
|
||||
|
||||
static let shared = UnlockCountManager()
|
||||
|
||||
private let locationManager = CLLocationManager()
|
||||
private let coarseLocationManager = CLLocationManager()
|
||||
private let logPrefix = "[DEBUG-UNLOCK]"
|
||||
private let debugLogDefaultsKey = "unlockDebugLogs"
|
||||
private let geofenceIdPrefix = "unlock.keepAlive."
|
||||
private let geofenceCenterId = "unlock.keepAlive.center"
|
||||
private let geofenceRadius: CLLocationDistance = 50
|
||||
/// 四向卫星围栏相对中心的偏移(米),用于静止时 GPS 抖动触发
|
||||
private let geofenceSatelliteOffset: CLLocationDistance = 40
|
||||
/// 相对围栏中心移动超过该距离才刷新围栏网格,避免频繁重注册
|
||||
private let geofenceRefreshDistance: CLLocationDistance = 40
|
||||
|
||||
private var didStart = false
|
||||
private var isSessionLocked = false
|
||||
private var hasSeenLockInSession = false
|
||||
private var protectedDataPollTimer: Timer?
|
||||
private var lastGeofenceCenter: CLLocationCoordinate2D?
|
||||
private var lastKnownLocation: CLLocation?
|
||||
private var bootBackgroundTask: UIBackgroundTaskIdentifier = .invalid
|
||||
private var backgroundPollTask: UIBackgroundTaskIdentifier = .invalid
|
||||
/// 当前解锁 session 起点(锁屏结算屏幕时长,仅当前进程)
|
||||
private var screenSessionStart: Date?
|
||||
/// 最后一次确认亮屏(锁屏结算用,不用 Date() 把灭屏空档算进去)
|
||||
private var lastScreenOnAt: Date?
|
||||
/// 亮屏心跳超过该间隔视为观察中断(可能错过锁屏)
|
||||
private let screenOnStaleInterval: TimeInterval = 10
|
||||
/// 本次进程里用户是否真正打开过 App;杀进程后被定位拉起不算
|
||||
private var hasUserActivatedApp = false
|
||||
|
||||
private override init() {
|
||||
super.init()
|
||||
locationManager.delegate = self
|
||||
configureLocationManager(
|
||||
locationManager,
|
||||
accuracy: kCLLocationAccuracyNearestTenMeters,
|
||||
distanceFilter: kCLDistanceFilterNone
|
||||
)
|
||||
coarseLocationManager.delegate = self
|
||||
configureLocationManager(
|
||||
coarseLocationManager,
|
||||
accuracy: 800,
|
||||
distanceFilter: 100
|
||||
)
|
||||
}
|
||||
|
||||
private func configureLocationManager(
|
||||
_ manager: CLLocationManager,
|
||||
accuracy: CLLocationAccuracy,
|
||||
distanceFilter: CLLocationDistance
|
||||
) {
|
||||
manager.desiredAccuracy = accuracy
|
||||
manager.distanceFilter = distanceFilter
|
||||
manager.pausesLocationUpdatesAutomatically = false
|
||||
manager.activityType = .otherNavigation
|
||||
if #available(iOS 11.0, *) {
|
||||
manager.showsBackgroundLocationIndicator = false
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
var todayCount: Int {
|
||||
rollDayIfNeeded()
|
||||
return Defaults[\.unlockCountToday]
|
||||
}
|
||||
|
||||
var totalCount: Int {
|
||||
rollDayIfNeeded()
|
||||
return Defaults[\.unlockCountTotal]
|
||||
}
|
||||
|
||||
/// 今日屏幕使用时长(秒),含当前解锁 session 的今日部分
|
||||
var todayScreenTimeSeconds: Int {
|
||||
rollDayIfNeeded()
|
||||
let today = todayString()
|
||||
var total = Defaults[\.screenTimeByDay][today] ?? 0
|
||||
if let start = screenSessionStart {
|
||||
total += screenTimeSeconds(from: start, to: resolvedScreenSessionEnd(), onDay: today)
|
||||
}
|
||||
return total
|
||||
}
|
||||
|
||||
/// 本 App 今日进入前台次数
|
||||
var todayAppUsageCount: Int {
|
||||
rollDayIfNeeded()
|
||||
return Defaults[\.appUsageToday]
|
||||
}
|
||||
|
||||
var hasAlwaysLocationAuthorization: Bool {
|
||||
authorizationStatus() == .authorizedAlways
|
||||
}
|
||||
|
||||
func start(launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) {
|
||||
let appState = UIApplication.shared.applicationState
|
||||
let launchedByLocation = launchOptions?[.location] != nil
|
||||
let nonActiveLaunch = appState != .active
|
||||
|
||||
if nonActiveLaunch {
|
||||
beginBootBackgroundTask()
|
||||
debugLog("coldBootNonActive appState=\(appState.rawValue) locationKey=\(launchedByLocation) bgMode=\(isLocationBackgroundModeEnabled) auth=\(authorizationStatus().rawValue) bootTask=1")
|
||||
}
|
||||
|
||||
guard !didStart else {
|
||||
restartLocationMonitoringIfPossible(reassertContinuous: true)
|
||||
handleNonActiveLaunchIfNeeded(launchOptions)
|
||||
return
|
||||
}
|
||||
didStart = true
|
||||
lastScreenOnAt = Defaults[\.screenLastOnAt]
|
||||
closeOrphanScreenSessionIfNeeded()
|
||||
rollDayIfNeeded()
|
||||
|
||||
let available = UIApplication.shared.isProtectedDataAvailable
|
||||
isSessionLocked = !available
|
||||
dumpStoredDebugLogs()
|
||||
debugLog("start auth=\(authorizationStatus().rawValue) appState=\(appState.rawValue) protected=\(available) bgMode=\(isLocationBackgroundModeEnabled)")
|
||||
// 冷启动已解锁:不计数,只同步状态
|
||||
if !available {
|
||||
hasSeenLockInSession = true
|
||||
Defaults[\.unlockWasLocked] = true
|
||||
}
|
||||
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(protectedDataWillBecomeUnavailable),
|
||||
name: UIApplication.protectedDataWillBecomeUnavailableNotification,
|
||||
object: nil
|
||||
)
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(protectedDataDidBecomeAvailable),
|
||||
name: UIApplication.protectedDataDidBecomeAvailableNotification,
|
||||
object: nil
|
||||
)
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(appWillResignActive),
|
||||
name: UIApplication.willResignActiveNotification,
|
||||
object: nil
|
||||
)
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(appDidEnterBackground),
|
||||
name: UIApplication.didEnterBackgroundNotification,
|
||||
object: nil
|
||||
)
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(appWillTerminate),
|
||||
name: UIApplication.willTerminateNotification,
|
||||
object: nil
|
||||
)
|
||||
NotificationCenter.default.addObserver(
|
||||
self,
|
||||
selector: #selector(appDidBecomeActive),
|
||||
name: UIApplication.didBecomeActiveNotification,
|
||||
object: nil
|
||||
)
|
||||
|
||||
restartLocationMonitoringIfPossible(reassertContinuous: true)
|
||||
handleNonActiveLaunchIfNeeded(launchOptions)
|
||||
reconcileUnlockIfNeeded(reason: "coldStartAfterLock")
|
||||
if UIApplication.shared.isProtectedDataAvailable {
|
||||
noteScreenOn()
|
||||
}
|
||||
Defaults[\.unlockLastHeartbeatAt] = Date()
|
||||
startProtectedDataPolling()
|
||||
}
|
||||
|
||||
func refreshAuthorizationAndMonitoring() {
|
||||
restartLocationMonitoringIfPossible(reassertContinuous: true)
|
||||
debugLog("refresh auth=\(authorizationStatus().rawValue) appState=\(UIApplication.shared.applicationState.rawValue) protected=\(UIApplication.shared.isProtectedDataAvailable)")
|
||||
notifyChange()
|
||||
}
|
||||
|
||||
// MARK: - Day roll
|
||||
|
||||
private func todayString() -> String {
|
||||
let formatter = DateFormatter()
|
||||
formatter.calendar = Calendar.current
|
||||
formatter.locale = Locale(identifier: "en_US_POSIX")
|
||||
formatter.timeZone = TimeZone.current
|
||||
formatter.dateFormat = "yyyy-MM-dd"
|
||||
return formatter.string(from: Date())
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
private func rollDayIfNeeded() -> Bool {
|
||||
migrateScreenTimeStorageIfNeeded()
|
||||
let today = todayString()
|
||||
let previousDate = Defaults[\.unlockCountDate]
|
||||
guard previousDate != today else { return false }
|
||||
|
||||
flushScreenSession()
|
||||
|
||||
// 切日前落盘旧日解锁次数
|
||||
if !previousDate.isEmpty {
|
||||
var byDay = Defaults[\.unlockCountByDay]
|
||||
byDay[previousDate] = Defaults[\.unlockCountToday]
|
||||
Defaults[\.unlockCountByDay] = byDay
|
||||
}
|
||||
|
||||
Defaults[\.unlockCountDate] = today
|
||||
Defaults[\.unlockCountToday] = 0
|
||||
Defaults[\.appUsageToday] = 0
|
||||
return true
|
||||
}
|
||||
|
||||
private func dayString(for date: Date) -> String {
|
||||
let formatter = DateFormatter()
|
||||
formatter.calendar = Calendar.current
|
||||
formatter.locale = Locale(identifier: "en_US_POSIX")
|
||||
formatter.timeZone = TimeZone.current
|
||||
formatter.dateFormat = "yyyy-MM-dd"
|
||||
return formatter.string(from: date)
|
||||
}
|
||||
|
||||
private func migrateScreenTimeStorageIfNeeded() {
|
||||
var byDay = Defaults[\.screenTimeByDay]
|
||||
guard byDay.isEmpty else { return }
|
||||
|
||||
let legacyKey = "screenTimeTodaySeconds"
|
||||
let legacyToday = UserDefaults.standard.integer(forKey: legacyKey)
|
||||
if legacyToday > 0 {
|
||||
let dateKey = Defaults[\.unlockCountDate].isEmpty ? todayString() : Defaults[\.unlockCountDate]
|
||||
byDay[dateKey] = legacyToday
|
||||
Defaults[\.screenTimeByDay] = byDay
|
||||
}
|
||||
}
|
||||
|
||||
private func addScreenTime(from start: Date, to end: Date) {
|
||||
guard end > start else { return }
|
||||
var cursor = start
|
||||
let calendar = Calendar.current
|
||||
var byDay = Defaults[\.screenTimeByDay]
|
||||
|
||||
while cursor < end {
|
||||
let dayStart = calendar.startOfDay(for: cursor)
|
||||
guard let nextDay = calendar.date(byAdding: .day, value: 1, to: dayStart) else { break }
|
||||
let segmentEnd = min(end, nextDay)
|
||||
let seconds = max(0, Int(segmentEnd.timeIntervalSince(cursor)))
|
||||
if seconds > 0 {
|
||||
let key = dayString(for: cursor)
|
||||
byDay[key, default: 0] += seconds
|
||||
}
|
||||
cursor = segmentEnd
|
||||
}
|
||||
|
||||
Defaults[\.screenTimeByDay] = byDay
|
||||
}
|
||||
|
||||
private func screenTimeSeconds(from start: Date, to end: Date, onDay dayKey: String) -> Int {
|
||||
guard end > start else { return 0 }
|
||||
let calendar = Calendar.current
|
||||
guard
|
||||
let dayStart = date(fromDayKey: dayKey),
|
||||
let nextDay = calendar.date(byAdding: .day, value: 1, to: dayStart)
|
||||
else { return 0 }
|
||||
|
||||
let segmentStart = max(start, dayStart)
|
||||
let segmentEnd = min(end, nextDay)
|
||||
guard segmentEnd > segmentStart else { return 0 }
|
||||
return max(0, Int(segmentEnd.timeIntervalSince(segmentStart)))
|
||||
}
|
||||
|
||||
private func date(fromDayKey key: String) -> Date? {
|
||||
let formatter = DateFormatter()
|
||||
formatter.calendar = Calendar.current
|
||||
formatter.locale = Locale(identifier: "en_US_POSIX")
|
||||
formatter.timeZone = TimeZone.current
|
||||
formatter.dateFormat = "yyyy-MM-dd"
|
||||
return formatter.date(from: key)
|
||||
}
|
||||
|
||||
/// 上一进程留下的 session 只结算到最后一次确认亮屏,死掉/锁屏的空档不再计入
|
||||
private func closeOrphanScreenSessionIfNeeded() {
|
||||
guard screenSessionStart == nil else { return }
|
||||
guard let start = Defaults[\.screenSessionStartAt] else { return }
|
||||
let end = Defaults[\.screenLastOnAt] ?? Defaults[\.unlockLastHeartbeatAt]
|
||||
if let end, end > start {
|
||||
addScreenTime(from: start, to: end)
|
||||
}
|
||||
Defaults[\.screenSessionStartAt] = nil
|
||||
debugLog("closeOrphanScreenSession start=\(start) end=\(String(describing: end))")
|
||||
notifyChange()
|
||||
}
|
||||
|
||||
private var shouldUseLiveScreenClock: Bool {
|
||||
UIApplication.shared.applicationState == .active
|
||||
&& UIApplication.shared.isProtectedDataAvailable
|
||||
&& !isSessionLocked
|
||||
}
|
||||
|
||||
private func resolvedScreenSessionEnd() -> Date {
|
||||
if shouldUseLiveScreenClock {
|
||||
let now = Date()
|
||||
noteScreenOn(at: now)
|
||||
return now
|
||||
}
|
||||
return lastScreenOnAt ?? screenSessionStart ?? Date()
|
||||
}
|
||||
|
||||
private func noteScreenOn(at date: Date = Date()) {
|
||||
guard UIApplication.shared.isProtectedDataAvailable else { return }
|
||||
lastScreenOnAt = date
|
||||
Defaults[\.screenLastOnAt] = date
|
||||
}
|
||||
|
||||
private func startScreenSession() {
|
||||
guard UIApplication.shared.isProtectedDataAvailable else { return }
|
||||
guard hasUserActivatedApp || UIApplication.shared.applicationState == .active else { return }
|
||||
rollDayIfNeeded()
|
||||
let now = Date()
|
||||
if screenSessionStart != nil {
|
||||
noteScreenOn(at: now)
|
||||
return
|
||||
}
|
||||
screenSessionStart = now
|
||||
Defaults[\.screenSessionStartAt] = now
|
||||
noteScreenOn(at: now)
|
||||
Defaults[\.unlockLastHeartbeatAt] = now
|
||||
debugLog("startScreenSession at=\(now)")
|
||||
}
|
||||
|
||||
private func flushScreenSession(end: Date? = nil) {
|
||||
guard let start = screenSessionStart else { return }
|
||||
let resolvedEnd = end ?? resolvedScreenSessionEnd()
|
||||
addScreenTime(from: start, to: max(start, resolvedEnd))
|
||||
screenSessionStart = nil
|
||||
Defaults[\.screenSessionStartAt] = nil
|
||||
debugLog("flushScreenSession start=\(start) end=\(resolvedEnd)")
|
||||
notifyChange()
|
||||
}
|
||||
|
||||
/// 观察中断后按最后亮屏结算,避免锁屏空档计入
|
||||
private func repairOpenScreenSessionIfStale() {
|
||||
guard let start = screenSessionStart else { return }
|
||||
guard UIApplication.shared.isProtectedDataAvailable else {
|
||||
markLocked()
|
||||
return
|
||||
}
|
||||
let lastOn = lastScreenOnAt ?? start
|
||||
let gap = Date().timeIntervalSince(lastOn)
|
||||
if gap > screenOnStaleInterval {
|
||||
debugLog("repairStaleScreenSession gap=\(Int(gap)) lastOn=\(lastOn)")
|
||||
flushScreenSession(end: lastOn)
|
||||
startScreenSession()
|
||||
} else {
|
||||
noteScreenOn()
|
||||
}
|
||||
}
|
||||
|
||||
private func recordAppUsage() {
|
||||
rollDayIfNeeded()
|
||||
Defaults[\.appUsageToday] = Defaults[\.appUsageToday] + 1
|
||||
notifyChange()
|
||||
debugLog("appUsage today=\(Defaults[\.appUsageToday])")
|
||||
}
|
||||
|
||||
// MARK: - Counting
|
||||
|
||||
private func recordUnlock(reason: String) {
|
||||
let now = Date()
|
||||
rollDayIfNeeded()
|
||||
Defaults[\.unlockCountToday] = Defaults[\.unlockCountToday] + 1
|
||||
Defaults[\.unlockCountTotal] = Defaults[\.unlockCountTotal] + 1
|
||||
var byDay = Defaults[\.unlockCountByDay]
|
||||
byDay[todayString()] = Defaults[\.unlockCountToday]
|
||||
Defaults[\.unlockCountByDay] = byDay
|
||||
Defaults[\.unlockLastCountedAt] = now
|
||||
Defaults[\.unlockWasLocked] = false
|
||||
isSessionLocked = false
|
||||
Defaults[\.unlockLastHeartbeatAt] = now
|
||||
stopProtectedDataPolling()
|
||||
startScreenSession()
|
||||
if UIApplication.shared.applicationState != .active {
|
||||
startProtectedDataPolling()
|
||||
}
|
||||
notifyChange()
|
||||
print("🔓 UnlockCount +\(reason) today=\(Defaults[\.unlockCountToday]) total=\(Defaults[\.unlockCountTotal])")
|
||||
debugLog("recordUnlock reason=\(reason) today=\(Defaults[\.unlockCountToday]) total=\(Defaults[\.unlockCountTotal])")
|
||||
}
|
||||
|
||||
private func markLocked() {
|
||||
if isSessionLocked, screenSessionStart == nil {
|
||||
Defaults[\.unlockWasLocked] = true
|
||||
hasSeenLockInSession = true
|
||||
startProtectedDataPolling()
|
||||
return
|
||||
}
|
||||
let end = lastScreenOnAt ?? screenSessionStart
|
||||
flushScreenSession(end: end)
|
||||
isSessionLocked = true
|
||||
hasSeenLockInSession = true
|
||||
Defaults[\.unlockWasLocked] = true
|
||||
Defaults[\.unlockLastHeartbeatAt] = Date()
|
||||
startProtectedDataPolling()
|
||||
}
|
||||
|
||||
private func persistLifecycleHeartbeat() {
|
||||
Defaults[\.unlockLastHeartbeatAt] = Date()
|
||||
if !UIApplication.shared.isProtectedDataAvailable {
|
||||
markLocked()
|
||||
return
|
||||
}
|
||||
noteScreenOn()
|
||||
}
|
||||
|
||||
private func notifyChange() {
|
||||
NotificationCenter.default.post(name: .unlockCountDidChange, object: nil)
|
||||
}
|
||||
|
||||
private func debugLog(_ message: String) {
|
||||
let line = "\(Date()) \(logPrefix) \(message)"
|
||||
NSLog("%@", line)
|
||||
|
||||
var logs = UserDefaults.standard.stringArray(forKey: debugLogDefaultsKey) ?? []
|
||||
logs.append(line)
|
||||
if logs.count > 200 {
|
||||
logs.removeFirst(logs.count - 200)
|
||||
}
|
||||
UserDefaults.standard.set(logs, forKey: debugLogDefaultsKey)
|
||||
}
|
||||
|
||||
private func dumpStoredDebugLogs() {
|
||||
let logs = UserDefaults.standard.stringArray(forKey: debugLogDefaultsKey) ?? []
|
||||
guard !logs.isEmpty else { return }
|
||||
NSLog("%@ storedLogCount=%d", logPrefix, logs.count)
|
||||
logs.suffix(50).forEach { NSLog("%@ stored %@", logPrefix, $0) }
|
||||
}
|
||||
|
||||
private var shouldPollProtectedData: Bool {
|
||||
let needsUnlockDetect = Defaults[\.unlockWasLocked] || isSessionLocked
|
||||
let needsLockDetect = screenSessionStart != nil && UIApplication.shared.applicationState != .active
|
||||
return needsUnlockDetect || needsLockDetect
|
||||
}
|
||||
|
||||
private func startProtectedDataPolling() {
|
||||
guard shouldPollProtectedData else { return }
|
||||
guard protectedDataPollTimer == nil else { return }
|
||||
debugLog("startProtectedDataPolling")
|
||||
|
||||
let timer = Timer(timeInterval: 1, repeats: true) { [weak self] _ in
|
||||
guard let self else { return }
|
||||
self.pollProtectedDataAvailability()
|
||||
}
|
||||
protectedDataPollTimer = timer
|
||||
RunLoop.main.add(timer, forMode: .common)
|
||||
pollProtectedDataAvailability()
|
||||
}
|
||||
|
||||
private func stopProtectedDataPolling() {
|
||||
guard protectedDataPollTimer != nil else { return }
|
||||
protectedDataPollTimer?.invalidate()
|
||||
protectedDataPollTimer = nil
|
||||
debugLog("stopProtectedDataPolling")
|
||||
}
|
||||
|
||||
private func pollProtectedDataAvailability() {
|
||||
let available = UIApplication.shared.isProtectedDataAvailable
|
||||
if !available {
|
||||
debugLog("protectedDataPoll protected=0 wasLocked=\(Defaults[\.unlockWasLocked]) sessionLocked=\(isSessionLocked)")
|
||||
markLocked()
|
||||
return
|
||||
}
|
||||
if Defaults[\.unlockWasLocked] || isSessionLocked {
|
||||
debugLog("protectedDataPoll protected=1 wasLocked=\(Defaults[\.unlockWasLocked]) sessionLocked=\(isSessionLocked)")
|
||||
recordUnlock(reason: "protectedDataPoll")
|
||||
return
|
||||
}
|
||||
noteScreenOn()
|
||||
if !shouldPollProtectedData {
|
||||
stopProtectedDataPolling()
|
||||
}
|
||||
}
|
||||
|
||||
/// 对照 protectedData 纠正锁态(定位回调补强,避免挂起丢通知)
|
||||
private func syncLockStateFromProtectedData(reason: String) {
|
||||
if !UIApplication.shared.isProtectedDataAvailable {
|
||||
markLocked()
|
||||
return
|
||||
}
|
||||
if Defaults[\.unlockWasLocked] || isSessionLocked {
|
||||
recordUnlock(reason: reason)
|
||||
return
|
||||
}
|
||||
repairOpenScreenSessionIfStale()
|
||||
}
|
||||
|
||||
/// 定位事件短窗口:锁态同步 + 心跳 + FinishTask 断言
|
||||
private func performLocationTick(reason: String) {
|
||||
let app = UIApplication.shared
|
||||
var taskId = UIBackgroundTaskIdentifier.invalid
|
||||
taskId = app.beginBackgroundTask(withName: "unlock.locationTick") {
|
||||
if taskId != .invalid {
|
||||
app.endBackgroundTask(taskId)
|
||||
taskId = .invalid
|
||||
}
|
||||
}
|
||||
|
||||
syncLockStateFromProtectedData(reason: reason)
|
||||
Defaults[\.unlockLastHeartbeatAt] = Date()
|
||||
|
||||
if taskId != .invalid {
|
||||
app.endBackgroundTask(taskId)
|
||||
taskId = .invalid
|
||||
}
|
||||
}
|
||||
|
||||
/// DAS / 定位冷启动短窗口:等 locationd 接管前尽量不被秒挂
|
||||
private func beginBootBackgroundTask() {
|
||||
endBootBackgroundTask()
|
||||
let app = UIApplication.shared
|
||||
bootBackgroundTask = app.beginBackgroundTask(withName: "unlock.boot") { [weak self] in
|
||||
self?.debugLog("bootTask expired")
|
||||
self?.endBootBackgroundTask()
|
||||
}
|
||||
debugLog("bootTask begin id=\(bootBackgroundTask.rawValue)")
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 25) { [weak self] in
|
||||
self?.endBootBackgroundTask()
|
||||
}
|
||||
}
|
||||
|
||||
private func endBootBackgroundTask() {
|
||||
guard bootBackgroundTask != .invalid else { return }
|
||||
let id = bootBackgroundTask
|
||||
bootBackgroundTask = .invalid
|
||||
UIApplication.shared.endBackgroundTask(id)
|
||||
debugLog("bootTask end id=\(id.rawValue)")
|
||||
}
|
||||
|
||||
/// 进后台后再给 poll 一段系统宽限,覆盖「回桌面马上锁屏」
|
||||
private func beginBackgroundPollTask() {
|
||||
endBackgroundPollTask()
|
||||
let app = UIApplication.shared
|
||||
backgroundPollTask = app.beginBackgroundTask(withName: "unlock.screenOnPoll") { [weak self] in
|
||||
self?.debugLog("screenOnPollTask expired")
|
||||
self?.endBackgroundPollTask()
|
||||
}
|
||||
debugLog("screenOnPollTask begin id=\(backgroundPollTask.rawValue)")
|
||||
}
|
||||
|
||||
private func endBackgroundPollTask() {
|
||||
guard backgroundPollTask != .invalid else { return }
|
||||
let id = backgroundPollTask
|
||||
backgroundPollTask = .invalid
|
||||
UIApplication.shared.endBackgroundTask(id)
|
||||
debugLog("screenOnPollTask end id=\(id.rawValue)")
|
||||
}
|
||||
|
||||
// MARK: - protectedData / lifecycle
|
||||
|
||||
@objc private func protectedDataWillBecomeUnavailable() {
|
||||
debugLog("protectedDataWillBecomeUnavailable appState=\(UIApplication.shared.applicationState.rawValue)")
|
||||
markLocked()
|
||||
}
|
||||
|
||||
@objc private func protectedDataDidBecomeAvailable() {
|
||||
debugLog("protectedDataDidBecomeAvailable appState=\(UIApplication.shared.applicationState.rawValue) wasLocked=\(Defaults[\.unlockWasLocked]) sessionLocked=\(isSessionLocked)")
|
||||
guard hasSeenLockInSession || Defaults[\.unlockWasLocked] else { return }
|
||||
guard isSessionLocked || Defaults[\.unlockWasLocked] else { return }
|
||||
recordUnlock(reason: "protectedData")
|
||||
}
|
||||
|
||||
@objc private func appWillResignActive() {
|
||||
if UIApplication.shared.isProtectedDataAvailable {
|
||||
noteScreenOn()
|
||||
Defaults[\.unlockLastHeartbeatAt] = Date()
|
||||
} else {
|
||||
markLocked()
|
||||
}
|
||||
debugLog("willResignActive protected=\(UIApplication.shared.isProtectedDataAvailable) wasLocked=\(Defaults[\.unlockWasLocked])")
|
||||
}
|
||||
|
||||
@objc private func appDidEnterBackground() {
|
||||
persistLifecycleHeartbeat()
|
||||
startProtectedDataPolling()
|
||||
beginBackgroundPollTask()
|
||||
restartLocationMonitoringIfPossible(reassertContinuous: true)
|
||||
forceRefreshGeofenceFromLastKnown(reason: "didEnterBackground")
|
||||
debugLog("didEnterBackground auth=\(authorizationStatus().rawValue) protected=\(UIApplication.shared.isProtectedDataAvailable) wasLocked=\(Defaults[\.unlockWasLocked]) regions=\(locationManager.monitoredRegions.count)")
|
||||
}
|
||||
|
||||
@objc private func appWillTerminate() {
|
||||
flushScreenSession()
|
||||
persistLifecycleHeartbeat()
|
||||
forceRefreshGeofenceFromLastKnown(reason: "willTerminate")
|
||||
debugLog("willTerminate protected=\(UIApplication.shared.isProtectedDataAvailable) wasLocked=\(Defaults[\.unlockWasLocked])")
|
||||
}
|
||||
|
||||
@objc private func appDidBecomeActive() {
|
||||
debugLog("didBecomeActive protected=\(UIApplication.shared.isProtectedDataAvailable) wasLocked=\(Defaults[\.unlockWasLocked]) sessionLocked=\(isSessionLocked)")
|
||||
hasUserActivatedApp = true
|
||||
endBootBackgroundTask()
|
||||
endBackgroundPollTask()
|
||||
if UIApplication.shared.isProtectedDataAvailable {
|
||||
if isSessionLocked || Defaults[\.unlockWasLocked] {
|
||||
reconcileUnlockIfNeeded(reason: "becomeActiveAfterLock")
|
||||
} else {
|
||||
repairOpenScreenSessionIfStale()
|
||||
startScreenSession()
|
||||
}
|
||||
if !isSessionLocked {
|
||||
stopProtectedDataPolling()
|
||||
}
|
||||
} else {
|
||||
markLocked()
|
||||
}
|
||||
recordAppUsage()
|
||||
restartLocationMonitoringIfPossible(reassertContinuous: true)
|
||||
Defaults[\.unlockLastHeartbeatAt] = Date()
|
||||
}
|
||||
|
||||
/// 杀进程前已记锁屏,解锁后冷启动/回前台时补计
|
||||
private func reconcileUnlockIfNeeded(reason: String) {
|
||||
guard UIApplication.shared.isProtectedDataAvailable else { return }
|
||||
guard Defaults[\.unlockWasLocked] || isSessionLocked else { return }
|
||||
recordUnlock(reason: reason)
|
||||
}
|
||||
|
||||
// MARK: - Location wake
|
||||
|
||||
private func authorizationStatus() -> CLAuthorizationStatus {
|
||||
if #available(iOS 14.0, *) {
|
||||
return locationManager.authorizationStatus
|
||||
}
|
||||
return CLLocationManager.authorizationStatus()
|
||||
}
|
||||
|
||||
/// Info.plist 的 UIBackgroundModes 必须是含 location 的数组,才可安全打开后台持续定位
|
||||
private var isLocationBackgroundModeEnabled: Bool {
|
||||
guard let modes = Bundle.main.object(forInfoDictionaryKey: "UIBackgroundModes") as? [String] else {
|
||||
return false
|
||||
}
|
||||
return modes.contains("location")
|
||||
}
|
||||
|
||||
private func restartLocationMonitoringIfPossible(reassertContinuous: Bool = false) {
|
||||
guard authorizationStatus() == .authorizedAlways else {
|
||||
stopAllLocationMonitoring()
|
||||
stopProtectedDataPolling()
|
||||
debugLog("stopLocation auth=\(authorizationStatus().rawValue) stopVisits=true stopCoarse=true stopGeofence=true")
|
||||
return
|
||||
}
|
||||
|
||||
// 重要位置变化 / Visit / 围栏:杀进程后由系统拉起
|
||||
locationManager.startMonitoringSignificantLocationChanges()
|
||||
locationManager.startMonitoringVisits()
|
||||
debugLog("startVisits auth=\(authorizationStatus().rawValue)")
|
||||
|
||||
if isLocationBackgroundModeEnabled {
|
||||
reassertContinuousLocationUpdates(forceStopFirst: reassertContinuous)
|
||||
} else {
|
||||
if #available(iOS 9.0, *) {
|
||||
locationManager.allowsBackgroundLocationUpdates = false
|
||||
coarseLocationManager.allowsBackgroundLocationUpdates = false
|
||||
}
|
||||
locationManager.stopUpdatingLocation()
|
||||
coarseLocationManager.stopUpdatingLocation()
|
||||
print("UnlockCountManager: UIBackgroundModes 缺少 location,仅使用重要位置变化/围栏")
|
||||
debugLog("startSignificantOnly auth=\(authorizationStatus().rawValue)")
|
||||
}
|
||||
}
|
||||
|
||||
private func stopAllLocationMonitoring() {
|
||||
locationManager.stopUpdatingLocation()
|
||||
locationManager.stopMonitoringSignificantLocationChanges()
|
||||
locationManager.stopMonitoringVisits()
|
||||
coarseLocationManager.stopUpdatingLocation()
|
||||
stopGeofenceMonitoring()
|
||||
if #available(iOS 9.0, *) {
|
||||
locationManager.allowsBackgroundLocationUpdates = false
|
||||
coarseLocationManager.allowsBackgroundLocationUpdates = false
|
||||
}
|
||||
}
|
||||
|
||||
/// 停再开持续定位,迫使 locationd 重新挂上 Location subscription(对齐 Lookus 拉起后行为)
|
||||
private func reassertContinuousLocationUpdates(forceStopFirst: Bool) {
|
||||
guard authorizationStatus() == .authorizedAlways, isLocationBackgroundModeEnabled else { return }
|
||||
if forceStopFirst {
|
||||
locationManager.stopUpdatingLocation()
|
||||
coarseLocationManager.stopUpdatingLocation()
|
||||
debugLog("reassertContinuous stopThenStart")
|
||||
}
|
||||
if #available(iOS 9.0, *) {
|
||||
locationManager.allowsBackgroundLocationUpdates = true
|
||||
coarseLocationManager.allowsBackgroundLocationUpdates = true
|
||||
}
|
||||
locationManager.startUpdatingLocation()
|
||||
coarseLocationManager.startUpdatingLocation()
|
||||
debugLog("startPreciseLocation accuracy=10 distanceFilter=none activity=otherNavigation auth=\(authorizationStatus().rawValue) appState=\(UIApplication.shared.applicationState.rawValue) protected=\(UIApplication.shared.isProtectedDataAvailable)")
|
||||
debugLog("startCoarseLocation accuracy=800 distanceFilter=100 activity=otherNavigation auth=\(authorizationStatus().rawValue) appState=\(UIApplication.shared.applicationState.rawValue) protected=\(UIApplication.shared.isProtectedDataAvailable)")
|
||||
}
|
||||
|
||||
private func stopGeofenceMonitoring() {
|
||||
for region in locationManager.monitoredRegions where region.identifier.hasPrefix(geofenceIdPrefix) {
|
||||
locationManager.stopMonitoring(for: region)
|
||||
}
|
||||
lastGeofenceCenter = nil
|
||||
}
|
||||
|
||||
/// 中心 + 东南西北共 5 个围栏中心点(偏移约 40m)
|
||||
private func geofenceGridCenters(around coordinate: CLLocationCoordinate2D) -> [(id: String, coordinate: CLLocationCoordinate2D)] {
|
||||
let earthRadius: CLLocationDistance = 6_378_137
|
||||
let latRad = coordinate.latitude * .pi / 180
|
||||
let dLat = (geofenceSatelliteOffset / earthRadius) * 180 / .pi
|
||||
let dLon = (geofenceSatelliteOffset / (earthRadius * cos(latRad))) * 180 / .pi
|
||||
return [
|
||||
(geofenceCenterId, coordinate),
|
||||
("\(geofenceIdPrefix)n", CLLocationCoordinate2D(latitude: coordinate.latitude + dLat, longitude: coordinate.longitude)),
|
||||
("\(geofenceIdPrefix)s", CLLocationCoordinate2D(latitude: coordinate.latitude - dLat, longitude: coordinate.longitude)),
|
||||
("\(geofenceIdPrefix)e", CLLocationCoordinate2D(latitude: coordinate.latitude, longitude: coordinate.longitude + dLon)),
|
||||
("\(geofenceIdPrefix)w", CLLocationCoordinate2D(latitude: coordinate.latitude, longitude: coordinate.longitude - dLon))
|
||||
]
|
||||
}
|
||||
|
||||
private func rememberLocation(_ location: CLLocation) {
|
||||
lastKnownLocation = location
|
||||
Defaults[\.unlockLastLatitude] = location.coordinate.latitude
|
||||
Defaults[\.unlockLastLongitude] = location.coordinate.longitude
|
||||
}
|
||||
|
||||
private func resolvedLastKnownLocation() -> CLLocation? {
|
||||
if let location = locationManager.location ?? lastKnownLocation {
|
||||
return location
|
||||
}
|
||||
if let lat = Defaults[\.unlockLastLatitude], let lon = Defaults[\.unlockLastLongitude] {
|
||||
return CLLocation(latitude: lat, longitude: lon)
|
||||
}
|
||||
if let lat = Defaults[\.currentLatitude], let lon = Defaults[\.currentLongitude] {
|
||||
return CLLocation(latitude: lat, longitude: lon)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
private func forceRefreshGeofenceFromLastKnown(reason: String) {
|
||||
guard let location = resolvedLastKnownLocation() else {
|
||||
debugLog("geofenceSkip reason=\(reason) noLastLocation")
|
||||
return
|
||||
}
|
||||
debugLog("geofenceForce reason=\(reason)")
|
||||
refreshGeofence(around: location, force: true)
|
||||
}
|
||||
|
||||
private func refreshGeofence(around location: CLLocation, force: Bool = false) {
|
||||
guard authorizationStatus() == .authorizedAlways else { return }
|
||||
guard CLLocationManager.isMonitoringAvailable(for: CLCircularRegion.self) else {
|
||||
debugLog("geofence unavailable")
|
||||
return
|
||||
}
|
||||
|
||||
let coordinate = location.coordinate
|
||||
if !force, let last = lastGeofenceCenter {
|
||||
let lastLocation = CLLocation(latitude: last.latitude, longitude: last.longitude)
|
||||
if lastLocation.distance(from: location) < geofenceRefreshDistance {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
stopGeofenceMonitoring()
|
||||
|
||||
let centers = geofenceGridCenters(around: coordinate)
|
||||
for item in centers {
|
||||
let region = CLCircularRegion(
|
||||
center: item.coordinate,
|
||||
radius: geofenceRadius,
|
||||
identifier: item.id
|
||||
)
|
||||
region.notifyOnEntry = true
|
||||
region.notifyOnExit = true
|
||||
locationManager.startMonitoring(for: region)
|
||||
}
|
||||
lastGeofenceCenter = coordinate
|
||||
let ours = locationManager.monitoredRegions.filter { $0.identifier.hasPrefix(geofenceIdPrefix) }.count
|
||||
debugLog("geofenceRefresh lat=\(coordinate.latitude) lon=\(coordinate.longitude) radius=\(geofenceRadius) grid=\(centers.count) force=\(force) monitoredOurs=\(ours) monitoredTotal=\(locationManager.monitoredRegions.count)")
|
||||
}
|
||||
|
||||
/// DAS 预热 / 定位拉起 / 任意非前台冷启动:立刻重申持续定位并尝试恢复围栏
|
||||
private func handleNonActiveLaunchIfNeeded(_ launchOptions: [UIApplication.LaunchOptionsKey: Any]?) {
|
||||
let launchedByLocation = launchOptions?[.location] != nil
|
||||
let nonActive = UIApplication.shared.applicationState != .active
|
||||
guard launchedByLocation || nonActive else { return }
|
||||
|
||||
let reason: String
|
||||
if launchedByLocation {
|
||||
reason = "locationLaunch"
|
||||
} else if UIApplication.shared.applicationState == .background {
|
||||
reason = "backgroundLaunch"
|
||||
} else {
|
||||
reason = "inactiveLaunch"
|
||||
}
|
||||
|
||||
debugLog("handleLaunch reason=\(reason) locationKey=\(launchedByLocation) appState=\(UIApplication.shared.applicationState.rawValue) protected=\(UIApplication.shared.isProtectedDataAvailable) bgMode=\(isLocationBackgroundModeEnabled)")
|
||||
reassertContinuousLocationUpdates(forceStopFirst: true)
|
||||
forceRefreshGeofenceFromLastKnown(reason: reason)
|
||||
performLocationTick(reason: reason)
|
||||
startProtectedDataPolling()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - CLLocationManagerDelegate
|
||||
|
||||
extension UnlockCountManager: CLLocationManagerDelegate {
|
||||
|
||||
func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) {
|
||||
restartLocationMonitoringIfPossible(reassertContinuous: true)
|
||||
debugLog("authChangedNewAPI auth=\(authorizationStatus().rawValue)")
|
||||
notifyChange()
|
||||
}
|
||||
|
||||
func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
|
||||
restartLocationMonitoringIfPossible(reassertContinuous: true)
|
||||
debugLog("authChangedOldAPI status=\(status.rawValue)")
|
||||
notifyChange()
|
||||
}
|
||||
|
||||
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
|
||||
let source = manager === coarseLocationManager ? "coarse" : "precise"
|
||||
debugLog("didUpdateLocations source=\(source) count=\(locations.count) appState=\(UIApplication.shared.applicationState.rawValue) protected=\(UIApplication.shared.isProtectedDataAvailable) wasLocked=\(Defaults[\.unlockWasLocked]) sessionLocked=\(isSessionLocked)")
|
||||
performLocationTick(reason: "locationUpdate")
|
||||
if let latest = locations.last {
|
||||
rememberLocation(latest)
|
||||
refreshGeofence(around: latest)
|
||||
}
|
||||
// locationd 已开始送点,可结束 DAS 预热 boot task
|
||||
endBootBackgroundTask()
|
||||
}
|
||||
|
||||
func locationManager(_ manager: CLLocationManager, didVisit visit: CLVisit) {
|
||||
debugLog("didVisit arrival=\(visit.arrivalDate) departure=\(visit.departureDate) appState=\(UIApplication.shared.applicationState.rawValue) protected=\(UIApplication.shared.isProtectedDataAvailable) wasLocked=\(Defaults[\.unlockWasLocked]) sessionLocked=\(isSessionLocked)")
|
||||
beginBootBackgroundTask()
|
||||
reassertContinuousLocationUpdates(forceStopFirst: true)
|
||||
performLocationTick(reason: "visit")
|
||||
if visit.coordinate.latitude != 0 || visit.coordinate.longitude != 0 {
|
||||
let location = CLLocation(latitude: visit.coordinate.latitude, longitude: visit.coordinate.longitude)
|
||||
rememberLocation(location)
|
||||
refreshGeofence(around: location, force: true)
|
||||
}
|
||||
}
|
||||
|
||||
func locationManager(_ manager: CLLocationManager, didEnterRegion region: CLRegion) {
|
||||
guard region.identifier.hasPrefix(geofenceIdPrefix) else { return }
|
||||
debugLog("didEnterRegion id=\(region.identifier) appState=\(UIApplication.shared.applicationState.rawValue)")
|
||||
beginBootBackgroundTask()
|
||||
reassertContinuousLocationUpdates(forceStopFirst: true)
|
||||
performLocationTick(reason: "geofenceEnter")
|
||||
}
|
||||
|
||||
func locationManager(_ manager: CLLocationManager, didExitRegion region: CLRegion) {
|
||||
guard region.identifier.hasPrefix(geofenceIdPrefix) else { return }
|
||||
debugLog("didExitRegion id=\(region.identifier) appState=\(UIApplication.shared.applicationState.rawValue)")
|
||||
beginBootBackgroundTask()
|
||||
reassertContinuousLocationUpdates(forceStopFirst: true)
|
||||
performLocationTick(reason: "geofenceExit")
|
||||
if let location = manager.location {
|
||||
rememberLocation(location)
|
||||
refreshGeofence(around: location, force: true)
|
||||
} else {
|
||||
forceRefreshGeofenceFromLastKnown(reason: "geofenceExit")
|
||||
}
|
||||
}
|
||||
|
||||
func locationManager(_ manager: CLLocationManager, didStartMonitoringFor region: CLRegion) {
|
||||
debugLog("geofenceStarted id=\(region.identifier)")
|
||||
}
|
||||
|
||||
func locationManager(_ manager: CLLocationManager, monitoringDidFailFor region: CLRegion?, withError error: Error) {
|
||||
debugLog("geofenceFail id=\(region?.identifier ?? "nil") error=\(error.localizedDescription)")
|
||||
}
|
||||
|
||||
func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
|
||||
print("UnlockCountManager location error: \(error.localizedDescription)")
|
||||
debugLog("locationError=\(error.localizedDescription)")
|
||||
}
|
||||
}
|
||||
|
|
@ -92,7 +92,6 @@ struct GroupUsersResponse: BaseModelProtocol {
|
|||
var message: String?
|
||||
var model: GroupInfoModel?
|
||||
var list: [GroupMemberModel] = []
|
||||
var vip = GroupMemberVip()
|
||||
var reviewCount: Int = 0
|
||||
|
||||
init?(map: Map) {}
|
||||
|
|
@ -102,7 +101,6 @@ struct GroupUsersResponse: BaseModelProtocol {
|
|||
message <- map["message"]
|
||||
model <- map["data.group"]
|
||||
list <- map["data.mates"]
|
||||
vip <- map["data.vip"]
|
||||
reviewCount <- (map["data.reviewCount"], kStrTransformInt)
|
||||
if reviewCount == 0 {
|
||||
reviewCount <- (map["data.review_count"], kStrTransformInt)
|
||||
|
|
@ -231,7 +229,7 @@ struct GroupInfoModel: Mappable, Equatable {
|
|||
var people_no: Int = 0
|
||||
/// 描述
|
||||
var description: String = ""
|
||||
/// 会员等级
|
||||
/// 等级
|
||||
var level: String = ""
|
||||
/// 邀请码
|
||||
var share_code: String = ""
|
||||
|
|
@ -288,27 +286,6 @@ struct GroupPrivilege: Mappable, Equatable {
|
|||
}
|
||||
}
|
||||
|
||||
struct GroupMemberVip: Mappable, Equatable {
|
||||
var app_usage_record: Bool?
|
||||
var phone_report: Bool?
|
||||
var trip_analysis_others: Bool?
|
||||
var app_lock: Bool?
|
||||
var pigeon_mail: Bool?
|
||||
var view_phone: Bool?
|
||||
|
||||
init() {}
|
||||
init?(map: Map) {}
|
||||
|
||||
mutating func mapping(map: Map) {
|
||||
app_usage_record <- (map["app_usage_record"], kOptionalFlexibleBool)
|
||||
phone_report <- (map["phone_report"], kOptionalFlexibleBool)
|
||||
trip_analysis_others <- (map["trip_analysis_others"], kOptionalFlexibleBool)
|
||||
app_lock <- (map["app_lock"], kOptionalFlexibleBool)
|
||||
pigeon_mail <- (map["pigeon_mail"], kOptionalFlexibleBool)
|
||||
view_phone <- (map["view_phone"], kOptionalFlexibleBool)
|
||||
}
|
||||
}
|
||||
|
||||
private let kFlexibleBool = TransformOf<Bool, Any>(fromJSON: { value in
|
||||
switch value {
|
||||
case let value as Bool:
|
||||
|
|
@ -327,31 +304,6 @@ private let kFlexibleBool = TransformOf<Bool, Any>(fromJSON: { value in
|
|||
value
|
||||
})
|
||||
|
||||
private let kOptionalFlexibleBool = TransformOf<Bool, Any>(fromJSON: { value in
|
||||
switch value {
|
||||
case let value as Bool:
|
||||
return value
|
||||
case let value as NSNumber:
|
||||
return value.boolValue
|
||||
case let value as Int:
|
||||
return value != 0
|
||||
case let value as String:
|
||||
let text = value.trimmingCharacters(in: .whitespacesAndNewlines).lowercased()
|
||||
switch text {
|
||||
case "1", "true", "yes":
|
||||
return true
|
||||
case "0", "false", "no":
|
||||
return false
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}, toJSON: { value in
|
||||
value
|
||||
})
|
||||
|
||||
extension UIImageView {
|
||||
@MainActor
|
||||
func setGroupIcon(_ model: GroupInfoModel) {
|
||||
|
|
@ -470,11 +422,6 @@ struct GroupMemberModel: Mappable, Equatable {
|
|||
remark.isEmpty ? nick_name : remark
|
||||
}
|
||||
|
||||
/// 会员等级 1普通 2白银 3永久 4钻石
|
||||
var level: Int = 1
|
||||
var shouldShowVipAvatarFrame: Bool {
|
||||
AppContextManager.shared.systemConfig?.isIntercept != true && level != 1
|
||||
}
|
||||
/// 状态:0、无状态 1、SOS 2、气泡等
|
||||
var status: Int = 0
|
||||
/// 入圈天数(若服务端下发)
|
||||
|
|
@ -530,7 +477,6 @@ struct GroupMemberModel: Mappable, Equatable {
|
|||
if avater.isEmpty {
|
||||
avater <- (map["avatar"], kFlexString)
|
||||
}
|
||||
level <- (map["level"], kStrTransformInt)
|
||||
nick_name <- map["nick_name"]
|
||||
remark <- map["remark"]
|
||||
battery <- map["battery"]
|
||||
|
|
|
|||
|
|
@ -255,20 +255,43 @@ enum HeadPic {
|
|||
}
|
||||
}
|
||||
|
||||
private enum HeadPicAssociatedKeys {
|
||||
static var lastValue: UInt8 = 0
|
||||
}
|
||||
|
||||
extension UIImageView {
|
||||
private var lastHeadPicValue: String {
|
||||
get { objc_getAssociatedObject(self, &HeadPicAssociatedKeys.lastValue) as? String ?? "" }
|
||||
set { objc_setAssociatedObject(self, &HeadPicAssociatedKeys.lastValue, newValue, .OBJC_ASSOCIATION_COPY_NONATOMIC) }
|
||||
}
|
||||
|
||||
func setHeadPic(_ value: String?) {
|
||||
let trimmed = (value ?? "").trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
guard !trimmed.isEmpty else {
|
||||
lastHeadPicValue = ""
|
||||
kf.cancelDownloadTask()
|
||||
image = HeadPic.placeholder
|
||||
return
|
||||
}
|
||||
let cached = HeadPic.image(for: trimmed)
|
||||
let hasCachedImage = cached.size.width > 0
|
||||
if lastHeadPicValue == trimmed, hasCachedImage, image === cached {
|
||||
return
|
||||
}
|
||||
lastHeadPicValue = trimmed
|
||||
if let url = HeadPic.remoteURL(for: trimmed) {
|
||||
kf.cancelDownloadTask()
|
||||
kf.setImage(with: url, placeholder: nil, options: kNetworkImageFailureOptions)
|
||||
if !hasCachedImage {
|
||||
kf.cancelDownloadTask()
|
||||
image = nil
|
||||
}
|
||||
kf.setImage(
|
||||
with: url,
|
||||
placeholder: hasCachedImage ? cached : nil,
|
||||
options: kNetworkImageFailureOptions
|
||||
)
|
||||
} else {
|
||||
kf.cancelDownloadTask()
|
||||
image = HeadPic.localImage(trimmed)
|
||||
image = cached
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,140 @@
|
|||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array/>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array/>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSPrivacyCollectedDataType</key>
|
||||
<string>NSPrivacyCollectedDataTypePreciseLocation</string>
|
||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
||||
<true/>
|
||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
||||
<array>
|
||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyCollectedDataType</key>
|
||||
<string>NSPrivacyCollectedDataTypePhysicalAddress</string>
|
||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
||||
<true/>
|
||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
||||
<array>
|
||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyCollectedDataType</key>
|
||||
<string>NSPrivacyCollectedDataTypeUserID</string>
|
||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
||||
<true/>
|
||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
||||
<array>
|
||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyCollectedDataType</key>
|
||||
<string>NSPrivacyCollectedDataTypeDeviceID</string>
|
||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
||||
<true/>
|
||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
||||
<array>
|
||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyCollectedDataType</key>
|
||||
<string>NSPrivacyCollectedDataTypePhoneNumber</string>
|
||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
||||
<true/>
|
||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
||||
<array>
|
||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyCollectedDataType</key>
|
||||
<string>NSPrivacyCollectedDataTypeName</string>
|
||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
||||
<true/>
|
||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
||||
<array>
|
||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyCollectedDataType</key>
|
||||
<string>NSPrivacyCollectedDataTypeEmailAddress</string>
|
||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
||||
<true/>
|
||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
||||
<array>
|
||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyCollectedDataType</key>
|
||||
<string>NSPrivacyCollectedDataTypePhotosorVideos</string>
|
||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
||||
<true/>
|
||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
||||
<array>
|
||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyCollectedDataType</key>
|
||||
<string>NSPrivacyCollectedDataTypeAudioData</string>
|
||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
||||
<true/>
|
||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
||||
<array>
|
||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyCollectedDataType</key>
|
||||
<string>NSPrivacyCollectedDataTypeContacts</string>
|
||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
||||
<true/>
|
||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
||||
<array>
|
||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>NSPrivacyCollectedDataType</key>
|
||||
<string>NSPrivacyCollectedDataTypeOtherUserContent</string>
|
||||
<key>NSPrivacyCollectedDataTypeLinked</key>
|
||||
<true/>
|
||||
<key>NSPrivacyCollectedDataTypeTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyCollectedDataTypePurposes</key>
|
||||
<array>
|
||||
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NSPrivacyAccessedAPITypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,4 @@
|
|||
// 微信
|
||||
#import <WechatOpenSDK/WXApi.h>
|
||||
|
||||
// 支付宝
|
||||
#import <AlipaySDK/AlipaySDK.h>
|
||||
|
||||
#endif /* QuickLocation_Bridging_Header_h */
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
{"v":"5.12.1","fr":25,"ip":0,"op":110,"w":375,"h":375,"nm":"合成 1","ddd":0,"assets":[{"id":"image_0","w":480,"h":480,"u":"images/","p":"dialog_buy_vip3_img_0.png","e":0},{"id":"image_1","w":192,"h":160,"u":"images/","p":"dialog_buy_vip3_img_1.png","e":0}],"layers":[{"ddd":0,"ind":1,"ty":2,"nm":"image 112.png","cl":"png","refId":"image_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[306,117.5,0],"to":[0,0,0],"ti":[117,4,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":18.462,"s":[226,248,0],"to":[-117,-4,0],"ti":[-39.5,36,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":36.923,"s":[125,136,0],"to":[6.063,-5.526,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":55.385,"s":[232.5,144,0],"to":[0,0,0],"ti":[140.5,-22,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":73.846,"s":[167.5,284,0],"to":[-140.5,22,0],"ti":[-39.436,13.632,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":92.308,"s":[73.5,227,0],"to":[40.5,-14,0],"ti":[-22,-19,0]},{"t":110.76953125,"s":[212.5,285.5,0]}],"ix":2,"l":2},"a":{"a":0,"k":[243.995,243.45,0],"ix":1,"l":2},"s":{"a":0,"k":[11.792,11.792,100],"ix":6,"l":2}},"ao":1,"ip":0,"op":126,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"图层 30 1.png","cl":"png","refId":"image_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[195,210.5,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":18.445,"s":[195,181.5,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":22,"s":[195,197.089,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":36.892,"s":[195,210.5,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":55.337,"s":[195,181.5,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":73.783,"s":[195,210.5,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":92.229,"s":[195,181.5,0],"to":[0,0,0],"ti":[0,0,0]},{"t":110.673828125,"s":[195,210.5,0]}],"ix":2,"l":2},"a":{"a":0,"k":[96,80,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ip":0,"op":126,"st":0,"bm":0}],"markers":[],"props":{}}
|
||||
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
|
@ -35,8 +35,7 @@ final class FeatureIntroVC: BaseViewController {
|
|||
super.viewDidAppear(animated)
|
||||
|
||||
rootView.reloadFeatureItems()
|
||||
guard AppContextManager.shared.systemConfig?.isIntercept == false,
|
||||
let config = AppContextManager.shared.systemConfig else { return }
|
||||
guard let config = AppContextManager.shared.systemConfig else { return }
|
||||
bannerList = config.bannerList
|
||||
rootView.cycleScrollView.isHidden = config.bannerList.filter { $0.enable == true }.count == 0
|
||||
rootView.cycleScrollView.imageURLStringsGroup = config.bannerList.filter { $0.enable == true }.map { $0.img }
|
||||
|
|
@ -58,7 +57,6 @@ final class FeatureIntroVC: BaseViewController {
|
|||
case .pigeonMessage:
|
||||
AppRouter.push(Route.pigeonMessage)
|
||||
case .searchLocation:
|
||||
guard AppContextManager.shared.systemConfig?.isIntercept != true else { return }
|
||||
AppRouter.push(Route.searchLocation)
|
||||
case .sos:
|
||||
AppRouter.push(Route.sos)
|
||||
|
|
@ -79,10 +77,6 @@ extension FeatureIntroVC: SDCycleScrollViewDelegate {
|
|||
let model = bannerList[index]
|
||||
|
||||
switch model.type {
|
||||
case "app":
|
||||
if model.url == "member" {
|
||||
AppRouter.push(Route.web, userInfo: ["url": URLManager.shared.homeUrl])
|
||||
}
|
||||
case "web":
|
||||
AppRouter.push(Route.web, userInfo: ["url": model.url])
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -154,8 +154,7 @@ final class FeatureIntroView: UIView {
|
|||
}
|
||||
|
||||
func reloadFeatureItems() {
|
||||
let hideSearch = AppContextManager.shared.systemConfig?.isIntercept == true
|
||||
displayedItems = Self.allItems.filter { !hideSearch || $0.action != .searchLocation }
|
||||
displayedItems = Self.allItems
|
||||
rebuildGrid()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -128,15 +128,7 @@ class CreateGroupViewModel {
|
|||
"labels": selectedTagList]).subscribe(onNext: { [weak self] _ in
|
||||
self?.createSucceeded.accept(())
|
||||
}, onError: { (error) in
|
||||
guard let code = error.underlyingError?.code else { return }
|
||||
|
||||
guard let systemConfig = AppContextManager.shared.systemConfig, systemConfig.isIntercept == false else { return }
|
||||
if code == 20009 { // "您创建的圈子个数已达上限,请升级会员等级"
|
||||
CreateGroupVipPopView.show()
|
||||
}
|
||||
else {
|
||||
DLToast.show(error)
|
||||
}
|
||||
DLToast.show(error)
|
||||
}).disposed(by: disposeBag)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,120 +0,0 @@
|
|||
//
|
||||
// CreateGroupVipPopView.swift
|
||||
// QuickLocation
|
||||
//
|
||||
// Created by 八条 on 2026/6/3.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import RxSwift
|
||||
import RxCocoa
|
||||
|
||||
class CreateGroupVipPopView: UIView {
|
||||
|
||||
private static let shared = CreateGroupVipPopView(frame: CGRect(origin: .zero, size: kScreenSize))
|
||||
|
||||
var disposeBag = DisposeBag()
|
||||
|
||||
static func show() {
|
||||
guard let superView = kKeyWindow else {
|
||||
return
|
||||
}
|
||||
|
||||
if CreateGroupVipPopView.shared.superview != nil {
|
||||
CreateGroupVipPopView.shared.removeFromSuperview()
|
||||
CreateGroupVipPopView.shared.bgView.frame = .zero
|
||||
}
|
||||
CreateGroupVipPopView.shared.bgView.alpha = 1
|
||||
CreateGroupVipPopView.shared.bgView.frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: kScreenHeight)
|
||||
superView.addSubview(CreateGroupVipPopView.shared)
|
||||
superView.bringSubviewToFront(CreateGroupVipPopView.shared)
|
||||
|
||||
UIView.animate(withDuration: 0.25) {
|
||||
CreateGroupVipPopView.shared.bgView.alpha = 1
|
||||
}
|
||||
}
|
||||
|
||||
/// 关闭
|
||||
static func dismiss() {
|
||||
guard CreateGroupVipPopView.shared.superview != nil else { return }
|
||||
|
||||
UIView.animate(withDuration: 0.25, delay: 0, options: [.curveEaseIn]) {
|
||||
CreateGroupVipPopView.shared.bgView.alpha = 0
|
||||
} completion: { _ in
|
||||
CreateGroupVipPopView.shared.removeFromSuperview()
|
||||
}
|
||||
}
|
||||
|
||||
private func setupRx() {
|
||||
upgradedBtn.rx.tap.subscribe(onNext: { _ in
|
||||
CreateGroupVipPopView.dismiss()
|
||||
AppRouter.push(Route.web, userInfo: ["url": URLManager.shared.homeUrl])
|
||||
}).disposed(by: disposeBag)
|
||||
|
||||
closeBtn.rx.tap.subscribe(onNext: { _ in
|
||||
CreateGroupVipPopView.dismiss()
|
||||
}).disposed(by: disposeBag)
|
||||
}
|
||||
|
||||
private lazy var bgView: UIView = {
|
||||
let view = UIView()
|
||||
view.backgroundColor = .black.withAlphaComponent(0.5)
|
||||
return view
|
||||
}()
|
||||
|
||||
lazy var vipImgView: UIImageView = {
|
||||
let view = UIImageView()
|
||||
view.image = UIImage(named: "Group/vip_pop")
|
||||
view.contentMode = .scaleAspectFill
|
||||
return view
|
||||
}()
|
||||
|
||||
lazy var upgradedBtn: UIButton = {
|
||||
let btn = UIButton(type: .custom)
|
||||
btn.backgroundColor = .clear
|
||||
btn.setBackgroundImage(UIImage(named: "Group/upgrade_bg"), for: .normal)
|
||||
return btn
|
||||
}()
|
||||
|
||||
lazy var closeBtn: UIButton = {
|
||||
let btn = UIButton(type: .custom)
|
||||
btn.backgroundColor = .clear
|
||||
btn.setBackgroundImage(UIImage(named: "Group/close"), for: .normal)
|
||||
btn.extendEdgeInsets = UIEdgeInsets(top: 10, left: 100, bottom: 100, right: 100)
|
||||
return btn
|
||||
}()
|
||||
|
||||
// MARK: - Init
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
backgroundColor = .clear
|
||||
addSubview(bgView)
|
||||
bgView.addSubview(vipImgView)
|
||||
bgView.addSubview(upgradedBtn)
|
||||
bgView.addSubview(closeBtn)
|
||||
|
||||
vipImgView.layoutChain
|
||||
.centerY()
|
||||
.edgesHorzontal(25)
|
||||
.heightToWidth(814/648)
|
||||
|
||||
upgradedBtn.layoutChain
|
||||
.topToBottomOfView(vipImgView, offset: -20)
|
||||
.centerX()
|
||||
.width(240)
|
||||
.height(60)
|
||||
|
||||
closeBtn.layoutChain
|
||||
.topToBottomOfView(upgradedBtn, offset: 15)
|
||||
.centerX()
|
||||
.width(22)
|
||||
.height(22)
|
||||
|
||||
setupRx()
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -68,6 +68,7 @@ final class GroupChatVC: BaseViewController {
|
|||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
viewModel.isChatActive = true
|
||||
fd_interactivePopDisabled = true
|
||||
bindViewModel()
|
||||
reactiveAction()
|
||||
|
|
@ -93,15 +94,16 @@ final class GroupChatVC: BaseViewController {
|
|||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
viewModel.isChatActive = true
|
||||
setupKeyboard()
|
||||
IQKeyboardManager.shared.isEnabled = false
|
||||
IQKeyboardManager.shared.resignOnTouchOutside = false
|
||||
rootView.updateVipMediaAccess(isUnlocked: isVipUnlocked)
|
||||
}
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
viewModel.markAsRead()
|
||||
viewModel.isChatActive = false
|
||||
VoicePlayerManager.shared.stop()
|
||||
if isVoiceRecording {
|
||||
finishVoiceRecording(action: .discard)
|
||||
|
|
@ -115,6 +117,9 @@ final class GroupChatVC: BaseViewController {
|
|||
override func viewDidDisappear(_ animated: Bool) {
|
||||
super.viewDidDisappear(animated)
|
||||
NotificationCenter.default.removeObserver(self)
|
||||
if isMovingFromParent || isBeingDismissed {
|
||||
removeMessageListener()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Keyboard
|
||||
|
|
@ -292,7 +297,6 @@ final class GroupChatVC: BaseViewController {
|
|||
rootView.bringSubviewToFront(rootView.mentionPickerView)
|
||||
rootView.bringSubviewToFront(rootView.quoteBar)
|
||||
rootView.bringSubviewToFront(rootView.bottomBar)
|
||||
rootView.bringSubviewToFront(rootView.disableIMView)
|
||||
rootView.bringSubviewToFront(rootView.voiceRecordView)
|
||||
}
|
||||
|
||||
|
|
@ -430,6 +434,12 @@ final class GroupChatVC: BaseViewController {
|
|||
OIMManager.callbacker.addAdvancedMsgListener(listener: msgListener!)
|
||||
}
|
||||
|
||||
private func removeMessageListener() {
|
||||
guard let listener = msgListener else { return }
|
||||
OIMManager.callbacker.removeAdvancedMsgListener(listener: listener)
|
||||
msgListener = nil
|
||||
}
|
||||
|
||||
// MARK: - Long press (quote / revoke / avatar @)
|
||||
private func setupChatLongPress() {
|
||||
let longPress = UILongPressGestureRecognizer(target: self, action: #selector(handleChatLongPress(_:)))
|
||||
|
|
@ -580,18 +590,6 @@ final class GroupChatVC: BaseViewController {
|
|||
}
|
||||
|
||||
// MARK: - Actions
|
||||
private var isVipUnlocked: Bool {
|
||||
return AppContextManager.shared.vip > 1
|
||||
}
|
||||
|
||||
private func requireVipForMedia() -> Bool {
|
||||
guard isVipUnlocked else {
|
||||
AppRouter.push(Route.web, userInfo: ["url": URLManager.shared.homeUrl])
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
private func reactiveAction() {
|
||||
rootView.backBtn.rx.tap
|
||||
.subscribe(onNext: { _ in
|
||||
|
|
@ -641,7 +639,7 @@ final class GroupChatVC: BaseViewController {
|
|||
|
||||
rootView.galleryBtn.rx.tap
|
||||
.subscribe(onNext: { [weak self] in
|
||||
guard let self, self.requireVipForMedia() else { return }
|
||||
guard let self else { return }
|
||||
self.rootView.dismissAllPanels()
|
||||
self.showAlbum()
|
||||
})
|
||||
|
|
@ -649,7 +647,7 @@ final class GroupChatVC: BaseViewController {
|
|||
|
||||
rootView.cameraBtn.rx.tap
|
||||
.subscribe(onNext: { [weak self] in
|
||||
guard let self, self.requireVipForMedia() else { return }
|
||||
guard let self else { return }
|
||||
self.rootView.dismissAllPanels()
|
||||
self.showCamera()
|
||||
})
|
||||
|
|
@ -714,10 +712,9 @@ final class GroupChatVC: BaseViewController {
|
|||
|
||||
// MARK: - 显示相册
|
||||
private func showAlbum() {
|
||||
guard requireVipForMedia() else { return }
|
||||
let picker = PhotoPickerVC(maxCount: 9)
|
||||
picker.onConfirm = { [weak self] images in
|
||||
guard let self, self.requireVipForMedia() else { return }
|
||||
guard let self else { return }
|
||||
for image in images {
|
||||
self.sendImageMessage(image)
|
||||
}
|
||||
|
|
@ -726,7 +723,6 @@ final class GroupChatVC: BaseViewController {
|
|||
}
|
||||
|
||||
private func showCamera() {
|
||||
guard requireVipForMedia() else { return }
|
||||
guard UIImagePickerController.isSourceTypeAvailable(.camera) else {
|
||||
DLToast.showError(text: "当前设备不支持拍照")
|
||||
return
|
||||
|
|
@ -769,11 +765,6 @@ final class GroupChatVC: BaseViewController {
|
|||
private var currentVoiceHover: VoiceRecordView.HoverTarget = .none
|
||||
|
||||
private func enterVoiceInputMode() {
|
||||
guard isVipUnlocked else {
|
||||
rootView.dismissAllPanels()
|
||||
rootView.setVoiceInputMode(true)
|
||||
return
|
||||
}
|
||||
let status = AVCaptureDevice.authorizationStatus(for: .audio)
|
||||
switch status {
|
||||
case .authorized:
|
||||
|
|
@ -857,7 +848,6 @@ final class GroupChatVC: BaseViewController {
|
|||
}
|
||||
|
||||
private func startVoiceRecording() {
|
||||
guard requireVipForMedia() else { return }
|
||||
guard !isVoiceRecording else { return }
|
||||
AudioServicesPlaySystemSound(1519)
|
||||
currentVoiceHover = .none
|
||||
|
|
@ -972,11 +962,6 @@ final class GroupChatVC: BaseViewController {
|
|||
}
|
||||
|
||||
private func sendVoiceMessage(url: URL, durationMs: Int) {
|
||||
guard requireVipForMedia() else {
|
||||
deleteRecordFile()
|
||||
rootView.voiceRecordView.reset()
|
||||
return
|
||||
}
|
||||
GroupIMService.shared.sendGroupMessage(groupId: viewModel.groupId,
|
||||
makeMessage: {
|
||||
OIMMessageInfo.createSoundMessage(fromFullPath: url.path, duration: durationMs)
|
||||
|
|
@ -1235,7 +1220,6 @@ private class MessageListenerProxy: NSObject, OIMAdvancedMsgListener {
|
|||
|
||||
extension GroupChatVC {
|
||||
private func sendImageMessage(_ image: UIImage) {
|
||||
guard requireVipForMedia() else { return }
|
||||
let sendImage = image.cgImage != nil ? image.fixOrientation() : image
|
||||
guard let data = sendImage.jpegData(compressionQuality: 0.8) else { return }
|
||||
let dir = NSTemporaryDirectory()
|
||||
|
|
|
|||
|
|
@ -217,7 +217,6 @@ class GroupChatView: UIView {
|
|||
|
||||
/// 收起所有浮层面板
|
||||
private var isVoiceInputMode = false
|
||||
private var isVipMediaUnlocked = true
|
||||
|
||||
func setVoiceInputMode(_ enabled: Bool) {
|
||||
isVoiceInputMode = enabled
|
||||
|
|
@ -228,18 +227,6 @@ class GroupChatView: UIView {
|
|||
refreshComposer()
|
||||
}
|
||||
|
||||
func updateVipMediaAccess(isUnlocked: Bool) {
|
||||
isVipMediaUnlocked = isUnlocked
|
||||
let lockedBackground = isUnlocked ? nil : UIImage(named: "VipFeature/media_locked_bg")
|
||||
galleryBtn.setBackgroundImage(lockedBackground, for: .normal)
|
||||
cameraBtn.setBackgroundImage(lockedBackground, for: .normal)
|
||||
galleryBtn.backgroundColor = isUnlocked ? .white : .clear
|
||||
cameraBtn.backgroundColor = isUnlocked ? .white : .clear
|
||||
voiceBtn.setImage(UIImage(named: "IM/voice_input"), for: .normal)
|
||||
textField.placeholder = "发消息或者按住说话"
|
||||
refreshComposer()
|
||||
}
|
||||
|
||||
func refreshComposer() {
|
||||
let hasText = !(textField.text ?? "").trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
|
||||
textField.updatePlaceholderVisibility()
|
||||
|
|
@ -292,9 +279,7 @@ class GroupChatView: UIView {
|
|||
private func updateHoldSpeakAppearance() {
|
||||
var configuration = UIButton.Configuration.plain()
|
||||
configuration.title = "按住 说话"
|
||||
configuration.image = isVipMediaUnlocked ? nil : UIImage(named: "VipFeature/crown")
|
||||
configuration.imagePlacement = .leading
|
||||
configuration.imagePadding = isVipMediaUnlocked ? 0 : 10
|
||||
configuration.contentInsets = .zero
|
||||
configuration.baseForegroundColor = UIColor(hexStr: "#293445")
|
||||
configuration.titleTextAttributesTransformer = UIConfigurationTextAttributesTransformer { attributes in
|
||||
|
|
@ -389,7 +374,6 @@ class GroupChatView: UIView {
|
|||
addSubview(mentionPickerView)
|
||||
addSubview(quickActionBar)
|
||||
addSubview(bottomBar)
|
||||
addSubview(disableIMView)
|
||||
bottomBar.addSubview(bottomBarCornerView)
|
||||
addSubview(voiceRecordView)
|
||||
addSubview(emojiPanelView)
|
||||
|
|
@ -522,11 +506,6 @@ class GroupChatView: UIView {
|
|||
bottomBarHeightConstraint = bottomBar.heightAnchor.constraint(equalToConstant: minimumBottomBarHeight)
|
||||
bottomBarHeightConstraint?.isActive = true
|
||||
|
||||
disableIMView.layoutChain
|
||||
.edgesHorzontal(15)
|
||||
.height(50)
|
||||
.bottom(kSafeBottomMargin)
|
||||
|
||||
bottomBarBottomConstraint = bottomBar.jh_constraint(.bottom, toAttribute: .bottom, otherView: bottomBar.superview, relation: .equal)
|
||||
|
||||
bottomBarCornerView.layoutChain.edges()
|
||||
|
|
@ -883,32 +862,6 @@ class GroupChatView: UIView {
|
|||
return btn
|
||||
}()
|
||||
|
||||
/// IM功能禁用
|
||||
lazy var disableIMView: UIView = {
|
||||
let view = UIView()
|
||||
view.backgroundColor = .clear
|
||||
view.layer.shadowColor = UIColor(hexStr: "#0F2846", alpha: 0.1).cgColor
|
||||
view.layer.shadowOffset = CGSize(width: 0, height: 0)
|
||||
view.layer.shadowOpacity = 1
|
||||
view.layer.shadowRadius = 9
|
||||
view.isHidden = true
|
||||
|
||||
let v = UIView()
|
||||
v.backgroundColor = .white
|
||||
v.cornerRadius = 25
|
||||
view.addSubview(v)
|
||||
v.layoutChain.edges()
|
||||
|
||||
let label = UILabel()
|
||||
label.text = "开通VIP后可发送消息"
|
||||
label.textColor = ThemeManager.shared.color.titleAuxColor
|
||||
label.font = .systemFont(ofSize: 15, weight: .medium)
|
||||
view.addSubview(label)
|
||||
label.layoutChain.centerX().centerY()
|
||||
|
||||
return view
|
||||
}()
|
||||
|
||||
/// 语音面板
|
||||
lazy var voiceRecordView: VoiceRecordView = {
|
||||
let v = VoiceRecordView()
|
||||
|
|
|
|||
|
|
@ -710,8 +710,11 @@ final class GroupChatViewModel {
|
|||
messagesSubject.accept([])
|
||||
}
|
||||
|
||||
/// 仅当前聊天页在前台时为 true,避免退出后仍把新消息标成已读。
|
||||
var isChatActive = false
|
||||
|
||||
func markAsRead() {
|
||||
guard !conversationID.isEmpty else { return }
|
||||
guard isChatActive, !conversationID.isEmpty else { return }
|
||||
OIMManager.manager.markConversationMessage(asRead: conversationID,
|
||||
onSuccess: nil,
|
||||
onFailure: nil)
|
||||
|
|
@ -735,7 +738,7 @@ final class GroupChatViewModel {
|
|||
// MARK: - Receive
|
||||
func onReceiveMessage(_ msg: OIMMessageInfo) {
|
||||
cacheMessage(msg)
|
||||
if msg.sendID != AppContextManager.shared.userId {
|
||||
if isChatActive, msg.sendID != AppContextManager.shared.userId {
|
||||
markAsRead()
|
||||
}
|
||||
guard let item = toSectionItem(msg) else { return }
|
||||
|
|
|
|||
|
|
@ -513,7 +513,16 @@ final class GroupItineraryCell: UITableViewCell {
|
|||
let minutes = max(1, (end.expected_timestamp - start.expected_timestamp) / 60_000)
|
||||
let hours = minutes / 60
|
||||
let remainder = minutes % 60
|
||||
return hours > 0 ? "\(hours)小时\(remainder)分" : "\(minutes)分钟"
|
||||
switch (hours > 0, remainder > 0) {
|
||||
case (true, true):
|
||||
return "\(hours)小时\(remainder)分"
|
||||
case (true, false):
|
||||
return "\(hours)小时"
|
||||
case (false, true):
|
||||
return "\(remainder)分钟"
|
||||
case (false, false):
|
||||
return "--"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
//
|
||||
|
||||
import UIKit
|
||||
import Kingfisher
|
||||
|
||||
final class GroupMemberListView: UIView {
|
||||
|
||||
|
|
@ -257,6 +258,7 @@ final class GroupMemberListCell: UICollectionViewCell {
|
|||
super.prepareForReuse()
|
||||
updateSOSBlink(false)
|
||||
bubbleImageView.isHidden = true
|
||||
avatarImageView.kf.cancelDownloadTask()
|
||||
}
|
||||
|
||||
func configure(model: GroupMemberModel, isCurrentUser: Bool, isSelected: Bool) {
|
||||
|
|
@ -264,7 +266,6 @@ final class GroupMemberListCell: UICollectionViewCell {
|
|||
nameLabel.text = model.showName
|
||||
nameLabel.textColor = UIColor(hexStr: isCurrentUser ? "#16B3FF" : "#0F2846")
|
||||
selectionImageView.isHidden = !isSelected
|
||||
vipBackgroundView.isHidden = !model.shouldShowVipAvatarFrame
|
||||
|
||||
let isSOS = model.status == 1
|
||||
updateSOSBlink(isSOS)
|
||||
|
|
@ -291,10 +292,9 @@ final class GroupMemberListCell: UICollectionViewCell {
|
|||
contentView.addSubview(avatarImageView)
|
||||
contentView.addSubview(bubbleImageView)
|
||||
contentView.addSubview(sosImageView)
|
||||
contentView.addSubview(vipBackgroundView)
|
||||
contentView.addSubview(nameLabel)
|
||||
|
||||
[selectionImageView, avatarImageView, bubbleImageView, sosImageView, vipBackgroundView, nameLabel].forEach {
|
||||
[selectionImageView, avatarImageView, bubbleImageView, sosImageView, nameLabel].forEach {
|
||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||
}
|
||||
|
||||
|
|
@ -319,9 +319,6 @@ final class GroupMemberListCell: UICollectionViewCell {
|
|||
sosImageView.trailingAnchor.constraint(equalTo: avatarImageView.trailingAnchor),
|
||||
sosImageView.bottomAnchor.constraint(equalTo: avatarImageView.bottomAnchor),
|
||||
|
||||
vipBackgroundView.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 7),
|
||||
vipBackgroundView.centerXAnchor.constraint(equalTo: contentView.centerXAnchor),
|
||||
|
||||
nameLabel.topAnchor.constraint(equalTo: avatarImageView.bottomAnchor, constant: 7),
|
||||
nameLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
|
||||
nameLabel.trailingAnchor.constraint(equalTo: contentView.trailingAnchor)
|
||||
|
|
@ -360,12 +357,6 @@ final class GroupMemberListCell: UICollectionViewCell {
|
|||
return view
|
||||
}()
|
||||
|
||||
private lazy var vipBackgroundView: UIImageView = {
|
||||
let view = UIImageView(image: UIImage(named: "GroupMemberList/vip"))
|
||||
view.isHidden = true
|
||||
return view
|
||||
}()
|
||||
|
||||
private lazy var nameLabel: UILabel = {
|
||||
let label = UILabel()
|
||||
label.font = .systemFont(ofSize: 12, weight: .medium)
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ final class GroupViewController: BaseViewController {
|
|||
private var hasSetupIMListeners = false
|
||||
private var hasRequestedIMData = false
|
||||
private var isRequestingIMData = false
|
||||
private var conversationListRequestID = UUID()
|
||||
|
||||
/// 进入页面加载 IM 会话:圈子集合已由业务接口给出,这里只补未读/最后一条
|
||||
private func loadIMData(showsLoading: Bool = false) {
|
||||
|
|
@ -92,6 +93,7 @@ final class GroupViewController: BaseViewController {
|
|||
|
||||
GroupIMService.shared.setConversationListener({ [weak self] conversations in
|
||||
DispatchQueue.main.async {
|
||||
self?.conversationListRequestID = UUID()
|
||||
self?.viewModel.updateConversations(conversations)
|
||||
}
|
||||
}, onNeedsRefresh: { [weak self] in
|
||||
|
|
@ -110,12 +112,15 @@ final class GroupViewController: BaseViewController {
|
|||
}
|
||||
|
||||
private func refreshIMData(showsLoading: Bool = false) {
|
||||
let requestID = UUID()
|
||||
conversationListRequestID = requestID
|
||||
GroupIMService.shared.getConversationList { [weak self] conversations in
|
||||
DispatchQueue.main.async {
|
||||
if showsLoading {
|
||||
DLToast.dismiss()
|
||||
}
|
||||
self?.viewModel.loadConversations(conversations)
|
||||
guard let self, self.conversationListRequestID == requestID else { return }
|
||||
self.viewModel.loadConversations(conversations)
|
||||
}
|
||||
} onFailure: {
|
||||
DispatchQueue.main.async {
|
||||
|
|
|
|||
|
|
@ -72,17 +72,32 @@ final class GroupViewModel {
|
|||
/// 仅更新会话元数据(未读、时间)- 消息监听回调(只返回变更的会话,需合并)
|
||||
func updateConversations(_ conversations: [OIMConversationInfo]) {
|
||||
var merged: [String: OIMConversationInfo] = [:]
|
||||
for c in cachedConversations { if let gid = c.groupID { merged[gid] = c } }
|
||||
for c in conversations { if let gid = c.groupID { merged[gid] = c } }
|
||||
for c in cachedConversations {
|
||||
if let key = Self.conversationGroupKey(c) { merged[key] = c }
|
||||
}
|
||||
for c in conversations {
|
||||
if let key = Self.conversationGroupKey(c) { merged[key] = c }
|
||||
}
|
||||
cachedConversations = Array(merged.values)
|
||||
reloadData()
|
||||
}
|
||||
|
||||
private static func conversationGroupKey(_ conversation: OIMConversationInfo) -> String? {
|
||||
if let groupID = conversation.groupID, !groupID.isEmpty {
|
||||
return groupID
|
||||
}
|
||||
guard let conversationID = conversation.conversationID, conversationID.hasPrefix("sg_"),
|
||||
conversationID.count > 3 else { return nil }
|
||||
return String(conversationID.dropFirst(3))
|
||||
}
|
||||
|
||||
private func reloadData() {
|
||||
let convMap: [String: OIMConversationInfo] = {
|
||||
var m: [String: OIMConversationInfo] = [:]
|
||||
for c in cachedConversations where c.groupID != nil && !(c.groupID?.isEmpty ?? true) {
|
||||
m[c.groupID!] = c
|
||||
for c in cachedConversations {
|
||||
if let key = Self.conversationGroupKey(c) {
|
||||
m[key] = c
|
||||
}
|
||||
}
|
||||
return m
|
||||
}()
|
||||
|
|
|
|||
|
|
@ -1,120 +0,0 @@
|
|||
//
|
||||
// CreateBubblePopView.swift
|
||||
// QuickLocation
|
||||
//
|
||||
// Created by 八条 on 2026/6/26.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import RxSwift
|
||||
import RxCocoa
|
||||
|
||||
class CreateBubblePopView: UIView {
|
||||
|
||||
private static let shared = CreateBubblePopView(frame: CGRect(origin: .zero, size: kScreenSize))
|
||||
|
||||
var disposeBag = DisposeBag()
|
||||
|
||||
static func show() {
|
||||
guard let superView = kKeyWindow else {
|
||||
return
|
||||
}
|
||||
|
||||
if CreateBubblePopView.shared.superview != nil {
|
||||
CreateBubblePopView.shared.removeFromSuperview()
|
||||
CreateBubblePopView.shared.bgView.frame = .zero
|
||||
}
|
||||
CreateBubblePopView.shared.bgView.alpha = 1
|
||||
CreateBubblePopView.shared.bgView.frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: kScreenHeight)
|
||||
superView.addSubview(CreateBubblePopView.shared)
|
||||
superView.bringSubviewToFront(CreateBubblePopView.shared)
|
||||
|
||||
UIView.animate(withDuration: 0.25) {
|
||||
CreateBubblePopView.shared.bgView.alpha = 1
|
||||
}
|
||||
}
|
||||
|
||||
/// 关闭
|
||||
static func dismiss() {
|
||||
guard CreateBubblePopView.shared.superview != nil else { return }
|
||||
|
||||
UIView.animate(withDuration: 0.25, delay: 0, options: [.curveEaseIn]) {
|
||||
CreateBubblePopView.shared.bgView.alpha = 0
|
||||
} completion: { _ in
|
||||
CreateBubblePopView.shared.removeFromSuperview()
|
||||
}
|
||||
}
|
||||
|
||||
private func setupRx() {
|
||||
upgradedBtn.rx.tap.subscribe(onNext: { _ in
|
||||
CreateBubblePopView.dismiss()
|
||||
AppRouter.push(Route.web, userInfo: ["url": URLManager.shared.homeUrl])
|
||||
}).disposed(by: disposeBag)
|
||||
|
||||
closeBtn.rx.tap.subscribe(onNext: { _ in
|
||||
CreateBubblePopView.dismiss()
|
||||
}).disposed(by: disposeBag)
|
||||
}
|
||||
|
||||
private lazy var bgView: UIView = {
|
||||
let view = UIView()
|
||||
view.backgroundColor = .black.withAlphaComponent(0.5)
|
||||
return view
|
||||
}()
|
||||
|
||||
lazy var vipImgView: UIImageView = {
|
||||
let view = UIImageView()
|
||||
view.image = UIImage(named: "Bubble/vip_pop")
|
||||
view.contentMode = .scaleAspectFill
|
||||
return view
|
||||
}()
|
||||
|
||||
lazy var upgradedBtn: UIButton = {
|
||||
let btn = UIButton(type: .custom)
|
||||
btn.backgroundColor = .clear
|
||||
btn.setBackgroundImage(UIImage(named: "Bubble/upgrade_bg"), for: .normal)
|
||||
return btn
|
||||
}()
|
||||
|
||||
lazy var closeBtn: UIButton = {
|
||||
let btn = UIButton(type: .custom)
|
||||
btn.backgroundColor = .clear
|
||||
btn.setBackgroundImage(UIImage(named: "Group/close"), for: .normal)
|
||||
btn.extendEdgeInsets = UIEdgeInsets(top: 10, left: 100, bottom: 100, right: 100)
|
||||
return btn
|
||||
}()
|
||||
|
||||
// MARK: - Init
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
backgroundColor = .clear
|
||||
addSubview(bgView)
|
||||
bgView.addSubview(vipImgView)
|
||||
bgView.addSubview(upgradedBtn)
|
||||
bgView.addSubview(closeBtn)
|
||||
|
||||
vipImgView.layoutChain
|
||||
.centerY()
|
||||
.edgesHorzontal(25)
|
||||
.heightToWidth(814/648)
|
||||
|
||||
upgradedBtn.layoutChain
|
||||
.topToBottomOfView(vipImgView, offset: -20)
|
||||
.centerX()
|
||||
.width(240)
|
||||
.height(60)
|
||||
|
||||
closeBtn.layoutChain
|
||||
.topToBottomOfView(upgradedBtn, offset: 15)
|
||||
.centerX()
|
||||
.width(22)
|
||||
.height(22)
|
||||
|
||||
setupRx()
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -25,7 +25,6 @@ final class CreateBubbleSetupView: UIView {
|
|||
private let subtitleLab = UILabel()
|
||||
private let titleLab = UILabel()
|
||||
private let hourPicker = BubbleHourPickerView()
|
||||
private let vipOfferImageView = UIImageView(image: UIImage(named: "VipFeature/limited_offer"))
|
||||
|
||||
private let sheetOverlay = UIView()
|
||||
private let sheetPanel = UIView()
|
||||
|
|
@ -84,7 +83,6 @@ final class CreateBubbleSetupView: UIView {
|
|||
addSubview(subtitleLab)
|
||||
addSubview(hourPicker)
|
||||
addSubview(confirmBtn)
|
||||
addSubview(vipOfferImageView)
|
||||
|
||||
heroView.showsOuterDecorBubbles = false
|
||||
heroView.layoutChain
|
||||
|
|
@ -115,25 +113,6 @@ final class CreateBubbleSetupView: UIView {
|
|||
confirmBtn.setBackgroundImage(UIImage(named: "Common/button_bg_2"), for: .normal)
|
||||
confirmBtn.cornerRadius = 20
|
||||
confirmBtn.layoutChain.left(30).right(30).bottom(34).height(56)
|
||||
|
||||
vipOfferImageView.contentMode = .scaleAspectFit
|
||||
vipOfferImageView.isHidden = true
|
||||
vipOfferImageView.translatesAutoresizingMaskIntoConstraints = false
|
||||
NSLayoutConstraint.activate([
|
||||
vipOfferImageView.trailingAnchor.constraint(equalTo: confirmBtn.trailingAnchor, constant: -6),
|
||||
vipOfferImageView.bottomAnchor.constraint(equalTo: confirmBtn.topAnchor, constant: 10),
|
||||
vipOfferImageView.widthAnchor.constraint(equalToConstant: 94),
|
||||
vipOfferImageView.heightAnchor.constraint(equalToConstant: 32)
|
||||
])
|
||||
}
|
||||
|
||||
func updateVipAccess(isUnlocked: Bool) {
|
||||
confirmBtn.setTitle(isUnlocked ? "确定" : "开通会员 解锁功能", for: .normal)
|
||||
confirmBtn.setBackgroundImage(
|
||||
UIImage(named: isUnlocked ? "Common/button_bg_2" : "VipFeature/wide_button_bg"),
|
||||
for: .normal
|
||||
)
|
||||
vipOfferImageView.isHidden = isUnlocked
|
||||
}
|
||||
|
||||
private func setupSheet() {
|
||||
|
|
|
|||