Compare commits
7 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
1eb9d23fc1 | |
|
|
308ec16cab | |
|
|
b6c6d84ae0 | |
|
|
275568f41d | |
|
|
42fea4563a | |
|
|
9e1d7338ab | |
|
|
da806b847e |
3
Podfile
|
|
@ -61,9 +61,6 @@ target 'QuickLocation' do
|
||||||
pod 'GYSDK' #个推一键登录
|
pod 'GYSDK' #个推一键登录
|
||||||
pod 'OpenIMSDK' #OpenIM
|
pod 'OpenIMSDK' #OpenIM
|
||||||
pod 'CocoaMQTT' #MQTT
|
pod 'CocoaMQTT' #MQTT
|
||||||
|
|
||||||
#支付宝
|
|
||||||
pod 'AlipaySDK-iOS'
|
|
||||||
|
|
||||||
#wechat
|
#wechat
|
||||||
pod 'WechatOpenSDK-XCFramework'
|
pod 'WechatOpenSDK-XCFramework'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
PODS:
|
PODS:
|
||||||
- Alamofire (5.10.1)
|
- Alamofire (5.10.1)
|
||||||
- AlipaySDK-iOS (15.8.30)
|
|
||||||
- AMapFoundation-NO-IDFA (1.9.0)
|
- AMapFoundation-NO-IDFA (1.9.0)
|
||||||
- AMapLocation-NO-IDFA (2.12.0):
|
- AMapLocation-NO-IDFA (2.12.0):
|
||||||
- AMapFoundation-NO-IDFA (>= 1.9.0)
|
- AMapFoundation-NO-IDFA (>= 1.9.0)
|
||||||
|
|
@ -193,7 +192,6 @@ PODS:
|
||||||
- ZXSDK (3.3.2)
|
- ZXSDK (3.3.2)
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- AlipaySDK-iOS
|
|
||||||
- AMapLocation-NO-IDFA
|
- AMapLocation-NO-IDFA
|
||||||
- AMapNavi-NO-IDFA
|
- AMapNavi-NO-IDFA
|
||||||
- AMapSearch-NO-IDFA
|
- AMapSearch-NO-IDFA
|
||||||
|
|
@ -240,7 +238,6 @@ DEPENDENCIES:
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
https://gitee.com/mirrors/CocoaPods-Specs.git:
|
https://gitee.com/mirrors/CocoaPods-Specs.git:
|
||||||
- Alamofire
|
- Alamofire
|
||||||
- AlipaySDK-iOS
|
|
||||||
- AMapFoundation-NO-IDFA
|
- AMapFoundation-NO-IDFA
|
||||||
- AMapLocation-NO-IDFA
|
- AMapLocation-NO-IDFA
|
||||||
- AMapNavi-NO-IDFA
|
- AMapNavi-NO-IDFA
|
||||||
|
|
@ -314,7 +311,6 @@ CHECKOUT OPTIONS:
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
Alamofire: 840d2a1ad82355b536ec6ba5f97e5bfa54600ca3
|
Alamofire: 840d2a1ad82355b536ec6ba5f97e5bfa54600ca3
|
||||||
AlipaySDK-iOS: 913a1df564c64798903e71cf3d63141d9e1904d2
|
|
||||||
AMapFoundation-NO-IDFA: a2e3c895398d7ee757278e1a0a8f9359da4b146e
|
AMapFoundation-NO-IDFA: a2e3c895398d7ee757278e1a0a8f9359da4b146e
|
||||||
AMapLocation-NO-IDFA: 7cd8fc837ea41edfbf4d937cd20572e277b77d18
|
AMapLocation-NO-IDFA: 7cd8fc837ea41edfbf4d937cd20572e277b77d18
|
||||||
AMapNavi-NO-IDFA: d55b9b138c6e540f737c689975cae2c9dbd1026a
|
AMapNavi-NO-IDFA: d55b9b138c6e540f737c689975cae2c9dbd1026a
|
||||||
|
|
@ -374,6 +370,6 @@ SPEC CHECKSUMS:
|
||||||
YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54
|
YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54
|
||||||
ZXSDK: 786338c0a18e98e03eda00699c3bfd2700b97117
|
ZXSDK: 786338c0a18e98e03eda00699c3bfd2700b97117
|
||||||
|
|
||||||
PODFILE CHECKSUM: 3272194e421676580050601835b59f7c4d288888
|
PODFILE CHECKSUM: 0e3348cb4e694c0fbb5e657521976c728ee2f5c2
|
||||||
|
|
||||||
COCOAPODS: 1.16.2
|
COCOAPODS: 1.16.2
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,6 @@
|
||||||
305A76E02FCA8C7000227D26 /* GroupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A76232FCA8C7000227D26 /* GroupView.swift */; };
|
305A76E02FCA8C7000227D26 /* GroupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A76232FCA8C7000227D26 /* GroupView.swift */; };
|
||||||
305A76E12FCA8C7000227D26 /* GroupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A76242FCA8C7000227D26 /* GroupViewController.swift */; };
|
305A76E12FCA8C7000227D26 /* GroupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A76242FCA8C7000227D26 /* GroupViewController.swift */; };
|
||||||
305A76E22FCA8C7000227D26 /* GroupViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A76252FCA8C7000227D26 /* GroupViewModel.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 */; };
|
305A76E52FCA8C7000227D26 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A76292FCA8C7000227D26 /* HomeViewController.swift */; };
|
||||||
305A76E62FCA8C7000227D26 /* LaunchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A762B2FCA8C7000227D26 /* LaunchViewController.swift */; };
|
305A76E62FCA8C7000227D26 /* LaunchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A762B2FCA8C7000227D26 /* LaunchViewController.swift */; };
|
||||||
305A76E72FCA8C7000227D26 /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305A762D2FCA8C7000227D26 /* LoginView.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 */; };
|
3062E8BE2FCEBD0E00CEF511 /* GroupIconListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3062E8BD2FCEBD0E00CEF511 /* GroupIconListVC.swift */; };
|
||||||
3062E8C02FCED7BB00CEF511 /* GroupIconListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3062E8BF2FCED7BB00CEF511 /* GroupIconListView.swift */; };
|
3062E8C02FCED7BB00CEF511 /* GroupIconListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3062E8BF2FCED7BB00CEF511 /* GroupIconListView.swift */; };
|
||||||
3062E8C22FCFB86800CEF511 /* CreateGroupViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3062E8C12FCFB86800CEF511 /* CreateGroupViewModel.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 */; };
|
307073E12FD15F50004C37CC /* GroupIMService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307073E02FD15F50004C37CC /* GroupIMService.swift */; };
|
||||||
307073E52FD18A20004C37CC /* GroupChatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307073E32FD18A20004C37CC /* GroupChatView.swift */; };
|
307073E52FD18A20004C37CC /* GroupChatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307073E32FD18A20004C37CC /* GroupChatView.swift */; };
|
||||||
307073E62FD18A20004C37CC /* GroupChatVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307073E22FD18A20004C37CC /* GroupChatVC.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 */; };
|
30A87A622FEE724D0095E7C6 /* CreateBubbleTiemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A612FEE724D0095E7C6 /* CreateBubbleTiemView.swift */; };
|
||||||
30A87A642FEE75520095E7C6 /* CreateBubbleTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A632FEE75520095E7C6 /* CreateBubbleTipsView.swift */; };
|
30A87A642FEE75520095E7C6 /* CreateBubbleTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A632FEE75520095E7C6 /* CreateBubbleTipsView.swift */; };
|
||||||
30A87A662FEE843E0095E7C6 /* CreateBubbleDoneView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A652FEE843E0095E7C6 /* CreateBubbleDoneView.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 */; };
|
30A87A6B2FEF5B950095E7C6 /* SearchLocationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A6A2FEF5B950095E7C6 /* SearchLocationView.swift */; };
|
||||||
30A87A6D2FEF5BA10095E7C6 /* SearchLocationVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A6C2FEF5BA10095E7C6 /* SearchLocationVC.swift */; };
|
30A87A6D2FEF5BA10095E7C6 /* SearchLocationVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A6C2FEF5BA10095E7C6 /* SearchLocationVC.swift */; };
|
||||||
30A87A6F2FEF7BE40095E7C6 /* SearchLocationResultVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A6E2FEF7BE40095E7C6 /* SearchLocationResultVC.swift */; };
|
30A87A6F2FEF7BE40095E7C6 /* SearchLocationResultVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A6E2FEF7BE40095E7C6 /* SearchLocationResultVC.swift */; };
|
||||||
30A87A712FEF7BED0095E7C6 /* SearchLocationResultView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30A87A702FEF7BED0095E7C6 /* SearchLocationResultView.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 */; };
|
30B2D0B12FEB111100CA0001 /* PhotoPickerStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30B2D0B02FEB111100CA0001 /* PhotoPickerStore.swift */; };
|
||||||
30B2D0B32FEB111100CA0001 /* PhotoPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30B2D0B22FEB111100CA0001 /* PhotoPickerView.swift */; };
|
30B2D0B32FEB111100CA0001 /* PhotoPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30B2D0B22FEB111100CA0001 /* PhotoPickerView.swift */; };
|
||||||
30B2D0B52FEB111100CA0001 /* PhotoPickerAlbumView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30B2D0B42FEB111100CA0001 /* PhotoPickerAlbumView.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 */; };
|
30C4C01D2FDBF557009215C1 /* RemoveMemberViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30C4C01C2FDBF557009215C1 /* RemoveMemberViewModel.swift */; };
|
||||||
30C4C0202FDC0EC5009215C1 /* GroupInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30C4C01F2FDC0EC5009215C1 /* GroupInfoView.swift */; };
|
30C4C0202FDC0EC5009215C1 /* GroupInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30C4C01F2FDC0EC5009215C1 /* GroupInfoView.swift */; };
|
||||||
30C4C0222FDC0ED3009215C1 /* GroupInfoVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30C4C0212FDC0ED3009215C1 /* GroupInfoVC.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 */; };
|
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 */; };
|
30CCDE512FE2785D00F5214A /* SignInVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CCDE502FE2785D00F5214A /* SignInVC.swift */; };
|
||||||
30CCDE532FE2786600F5214A /* SignInView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CCDE522FE2786600F5214A /* SignInView.swift */; };
|
30CCDE532FE2786600F5214A /* SignInView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CCDE522FE2786600F5214A /* SignInView.swift */; };
|
||||||
30CCDE552FE2903100F5214A /* SignInModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CCDE542FE2903100F5214A /* SignInModel.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 */; };
|
30CCDE5A2FE39F9D00F5214A /* SOSViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CCDE592FE39F9D00F5214A /* SOSViewController.swift */; };
|
||||||
30CCDE5C2FE3A1A800F5214A /* SOSPracticeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CCDE5B2FE3A1A800F5214A /* SOSPracticeView.swift */; };
|
30CCDE5C2FE3A1A800F5214A /* SOSPracticeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30CCDE5B2FE3A1A800F5214A /* SOSPracticeView.swift */; };
|
||||||
30D74AAB2FE8C7700050EB2C /* GPSSignalHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74AAA2FE8C7700050EB2C /* GPSSignalHelper.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 */; };
|
30D74AB42FEA25B90050EB2C /* ViewedModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74AB32FEA25B90050EB2C /* ViewedModel.swift */; };
|
||||||
30D74AB62FEA34FF0050EB2C /* ItineraryAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74AB52FEA34FF0050EB2C /* ItineraryAPI.swift */; };
|
30D74AB62FEA34FF0050EB2C /* ItineraryAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74AB52FEA34FF0050EB2C /* ItineraryAPI.swift */; };
|
||||||
30D74AB82FEA36A50050EB2C /* ItineraryService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74AB72FEA36A50050EB2C /* ItineraryService.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 */; };
|
30D74AC12FEA6EEF0050EB2C /* CreateSchedulePopView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74AC02FEA6EEF0050EB2C /* CreateSchedulePopView.swift */; };
|
||||||
30D74D1F2FEBB09B0050EB2C /* CreateScheduleVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74D1E2FEBB09B0050EB2C /* CreateScheduleVM.swift */; };
|
30D74D1F2FEBB09B0050EB2C /* CreateScheduleVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D74D1E2FEBB09B0050EB2C /* CreateScheduleVM.swift */; };
|
||||||
30D87CDB2FDFA9EE00E958FD /* MQTTService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D87CDA2FDFA9EE00E958FD /* MQTTService.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 */; };
|
30D87CDF2FDFF1A100E958FD /* QuickMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D87CDE2FDFF1A100E958FD /* QuickMessageView.swift */; };
|
||||||
30D87D042FE1336300E958FD /* NavigationVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D87D012FE1336300E958FD /* NavigationVC.swift */; };
|
30D87D042FE1336300E958FD /* NavigationVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D87D012FE1336300E958FD /* NavigationVC.swift */; };
|
||||||
30D87D052FE1336300E958FD /* NavigationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D87D022FE1336300E958FD /* NavigationView.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 */; };
|
30DC185A2FD11E7A0041DCD1 /* WebOperations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30DC18562FD11E7A0041DCD1 /* WebOperations.swift */; };
|
||||||
30DC185B2FD11E7A0041DCD1 /* NavigationTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30DC18552FD11E7A0041DCD1 /* NavigationTitleView.swift */; };
|
30DC185B2FD11E7A0041DCD1 /* NavigationTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30DC18552FD11E7A0041DCD1 /* NavigationTitleView.swift */; };
|
||||||
30DC185C2FD11E7A0041DCD1 /* WebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30DC18572FD11E7A0041DCD1 /* WebViewController.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 */; };
|
30EFF3E82FCA8C7000227D26 /* AuthenticationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30EFF3E92FCA8C7000227D26 /* AuthenticationServices.framework */; };
|
||||||
4392B1D9C125D873FCFCDDC9 /* app_catalog.json in Resources */ = {isa = PBXBuildFile; fileRef = 3C79865C3ED165AFDD091C29 /* app_catalog.json */; };
|
4392B1D9C125D873FCFCDDC9 /* app_catalog.json in Resources */ = {isa = PBXBuildFile; fileRef = 3C79865C3ED165AFDD091C29 /* app_catalog.json */; };
|
||||||
488FF21773B8E5021D8662B5 /* AppRestrictView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 787F87DD1CEBED1A4E1E9FC7 /* AppRestrictView.swift */; };
|
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 */; };
|
4AF6E5954D73E21F31F7A16B /* AppRestrictVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0112B7865829D5B6A4A0BD0 /* AppRestrictVC.swift */; };
|
||||||
557E8D5330187A5C0032AB51 /* BaseNavigationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 557E8D5230187A5C0032AB51 /* BaseNavigationView.swift */; };
|
557E8D5330187A5C0032AB51 /* BaseNavigationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 557E8D5230187A5C0032AB51 /* BaseNavigationView.swift */; };
|
||||||
55B2179130217D6600784774 /* HomeView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B2179030217D6600784774 /* HomeView2.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 */; };
|
55B217A33022F0B100784706 /* UIDevice+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217A33022F0B100784707 /* UIDevice+Extension.swift */; };
|
||||||
55B217B13022F0A000784711 /* GroupItineraryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217B03022F0A000784710 /* GroupItineraryView.swift */; };
|
55B217B13022F0A000784711 /* GroupItineraryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217B03022F0A000784710 /* GroupItineraryView.swift */; };
|
||||||
55B217C13022F0A000784721 /* MinePhotoWallView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217C03022F0A000784720 /* MinePhotoWallView.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 */; };
|
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 */; };
|
55B217D23023010000784731 /* TodayTrackDetailVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217D13023010000784730 /* TodayTrackDetailVC.swift */; };
|
||||||
55B217D43023010000784733 /* TodayTrackDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217D33023010000784732 /* TodayTrackDetailView.swift */; };
|
55B217D43023010000784733 /* TodayTrackDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217D33023010000784732 /* TodayTrackDetailView.swift */; };
|
||||||
55B217D63023010000784735 /* TodayTrackDetailViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B217D53023010000784734 /* TodayTrackDetailViewModel.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 */; };
|
55B218A13024A00100784702 /* AboutVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B218A13024A00100784701 /* AboutVC.swift */; };
|
||||||
55B218A13024A00100784704 /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B218A13024A00100784703 /* AboutView.swift */; };
|
55B218A13024A00100784704 /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B218A13024A00100784703 /* AboutView.swift */; };
|
||||||
55B218A13024A00100784706 /* CancelAccountVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B218A13024A00100784705 /* CancelAccountVC.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 */; };
|
55B250083038000100786508 /* MailboxDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B250073038000100786507 /* MailboxDetailViewController.swift */; };
|
||||||
55B26001304B000100786601 /* VersionUpgradePopVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B26000304B000100786600 /* VersionUpgradePopVC.swift */; };
|
55B26001304B000100786601 /* VersionUpgradePopVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B26000304B000100786600 /* VersionUpgradePopVC.swift */; };
|
||||||
55B261010000000100786601 /* PrivacySettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B261000000000100786600 /* PrivacySettingsViewController.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 */; };
|
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 */; };
|
55C1A0113034101000786011 /* PhoneStatusCollector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55C1A0103034101000786010 /* PhoneStatusCollector.swift */; };
|
||||||
55C1A0213034102000786021 /* PrivilegeDeniedOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55C1A0203034102000786020 /* PrivilegeDeniedOverlay.swift */; };
|
55C1A0213034102000786021 /* PrivilegeDeniedOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55C1A0203034102000786020 /* PrivilegeDeniedOverlay.swift */; };
|
||||||
55C219C13024C00100784731 /* SearchLocationHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55C219C13024C00100784730 /* SearchLocationHeaderView.swift */; };
|
55C219C13024C00100784731 /* SearchLocationHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55C219C13024C00100784730 /* SearchLocationHeaderView.swift */; };
|
||||||
55C4C0242FDB91C8009215C2 /* CheckPermissionGuideVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55C4C0232FDB91C8009215C2 /* CheckPermissionGuideVC.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 */; };
|
60BEE25E61F3DE24976A7A47 /* ManagedSettingsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7FE44DF1C46BDA7B98BC7859 /* ManagedSettingsUI.framework */; };
|
||||||
68F0D48EB76039050533197C /* AppRestrictShared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AB29D0618C4BE76F2CA5261 /* AppRestrictShared.swift */; };
|
68F0D48EB76039050533197C /* AppRestrictShared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AB29D0618C4BE76F2CA5261 /* AppRestrictShared.swift */; };
|
||||||
6D90E8FFE4D597E888E6A224 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E326B06736FE04DD7A5E96D /* UIKit.framework */; };
|
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 */; };
|
E866CAAE7D4E74EB7AD608B9 /* ITunesSearchService.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE3D39F325FC7624C1D914D6 /* ITunesSearchService.swift */; };
|
||||||
EA13C1E21EC94958AC9755A8 /* FamilyActivityPickerHost.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF9D223AB35744F92E0E3E77 /* FamilyActivityPickerHost.swift */; };
|
EA13C1E21EC94958AC9755A8 /* FamilyActivityPickerHost.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF9D223AB35744F92E0E3E77 /* FamilyActivityPickerHost.swift */; };
|
||||||
F53E5BD11D671E5CED4E7408 /* ManagedSettingsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7FE44DF1C46BDA7B98BC7859 /* ManagedSettingsUI.framework */; };
|
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 */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
|
@ -539,8 +524,6 @@
|
||||||
305A76232FCA8C7000227D26 /* GroupView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupView.swift; sourceTree = "<group>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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; };
|
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>"; };
|
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; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
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 */,
|
305A74CF2FCA8C7000227D26 /* UserAPI.swift */,
|
||||||
55B230023032000100785003 /* PigeonAPI.swift */,
|
55B230023032000100785003 /* PigeonAPI.swift */,
|
||||||
30BAB8502FCD331C00C33B5C /* GroupAPI.swift */,
|
30BAB8502FCD331C00C33B5C /* GroupAPI.swift */,
|
||||||
30D891F42FE22E0600E958FD /* OrderAPI.swift */,
|
|
||||||
30D74AB52FEA34FF0050EB2C /* ItineraryAPI.swift */,
|
30D74AB52FEA34FF0050EB2C /* ItineraryAPI.swift */,
|
||||||
30B74B4A2FF390EF00F6744D /* DrivingAPI.swift */,
|
30B74B4A2FF390EF00F6744D /* DrivingAPI.swift */,
|
||||||
);
|
);
|
||||||
|
|
@ -1018,6 +987,7 @@
|
||||||
305A74DB2FCA8C7000227D26 /* CornerRadiusView */,
|
305A74DB2FCA8C7000227D26 /* CornerRadiusView */,
|
||||||
305A74E22FCA8C7000227D26 /* ImagePicker */,
|
305A74E22FCA8C7000227D26 /* ImagePicker */,
|
||||||
305A74E62FCA8C7000227D26 /* TextTableViewCell */,
|
305A74E62FCA8C7000227D26 /* TextTableViewCell */,
|
||||||
|
B2DDB0083141D63A991C9FEE /* ImageCrop */,
|
||||||
);
|
);
|
||||||
path = Component;
|
path = Component;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|
@ -1207,10 +1177,8 @@
|
||||||
305A75262FCA8C7000227D26 /* Money */,
|
305A75262FCA8C7000227D26 /* Money */,
|
||||||
305A75282FCA8C7000227D26 /* Notification */,
|
305A75282FCA8C7000227D26 /* Notification */,
|
||||||
305A752A2FCA8C7000227D26 /* Theme */,
|
305A752A2FCA8C7000227D26 /* Theme */,
|
||||||
55B217D23022F0A000784728 /* Unlock */,
|
|
||||||
305A752C2FCA8C7000227D26 /* URL */,
|
305A752C2FCA8C7000227D26 /* URL */,
|
||||||
30D87CD52FDF9F1900E958FD /* MQTT */,
|
30D87CD52FDF9F1900E958FD /* MQTT */,
|
||||||
30C6666A2FFB7C3000E62B25 /* IAPManager */,
|
|
||||||
2F518AB6587CC227CC515D8C /* AppRestrict */,
|
2F518AB6587CC227CC515D8C /* AppRestrict */,
|
||||||
);
|
);
|
||||||
path = Manager;
|
path = Manager;
|
||||||
|
|
@ -1300,10 +1268,10 @@
|
||||||
305A762A2FCA8C7000227D26 /* Home */ = {
|
305A762A2FCA8C7000227D26 /* Home */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
55CA15113058EC23000F1189 /* InteractionView.swift */,
|
||||||
|
55CA150F3058EBE5000F1189 /* InteractionEmojiCell.swift */,
|
||||||
305A76292FCA8C7000227D26 /* HomeViewController.swift */,
|
305A76292FCA8C7000227D26 /* HomeViewController.swift */,
|
||||||
305A798B2FCAB99300227D26 /* HomeViewModel.swift */,
|
305A798B2FCAB99300227D26 /* HomeViewModel.swift */,
|
||||||
305A76282FCA8C7000227D26 /* HomeView.swift */,
|
|
||||||
305A76272FCA8C7000227D26 /* GroupMemberView.swift */,
|
|
||||||
55B2179030217D6600784774 /* HomeView2.swift */,
|
55B2179030217D6600784774 /* HomeView2.swift */,
|
||||||
55B2179230218CE100784774 /* GroupMemberView2.swift */,
|
55B2179230218CE100784774 /* GroupMemberView2.swift */,
|
||||||
55B222000000000100784830 /* AddEmojiPopView.swift */,
|
55B222000000000100784830 /* AddEmojiPopView.swift */,
|
||||||
|
|
@ -1312,15 +1280,11 @@
|
||||||
55B250013050000100784901 /* LockedAppPopView.swift */,
|
55B250013050000100784901 /* LockedAppPopView.swift */,
|
||||||
55B219B1302A000100784760 /* ReceiveMessagePopView.swift */,
|
55B219B1302A000100784760 /* ReceiveMessagePopView.swift */,
|
||||||
55B219B3302A000100784762 /* ReceiveMessageReportPopView.swift */,
|
55B219B3302A000100784762 /* ReceiveMessageReportPopView.swift */,
|
||||||
55B217C23022F0A000784722 /* MemberPhoneReportView.swift */,
|
|
||||||
55B217C43022F0A000784724 /* MemberAppUsageView.swift */,
|
55B217C43022F0A000784724 /* MemberAppUsageView.swift */,
|
||||||
55B217DD302301000078473C /* TodayTrackDetail */,
|
55B217DD302301000078473C /* TodayTrackDetail */,
|
||||||
55B217DE302301000078473D /* PhoneReportDetail */,
|
|
||||||
55B240063040000100784906 /* AppUsageReport */,
|
55B240063040000100784906 /* AppUsageReport */,
|
||||||
30A7A9102FCAEE3D00105780 /* GroupListPopView.swift */,
|
30A7A9102FCAEE3D00105780 /* GroupListPopView.swift */,
|
||||||
30D87CDE2FDFF1A100E958FD /* QuickMessageView.swift */,
|
30D87CDE2FDFF1A100E958FD /* QuickMessageView.swift */,
|
||||||
30D87CDC2FDFF07500E958FD /* InteractionView.swift */,
|
|
||||||
55BF75342FFF91690055DA57 /* InteractionEmojiCell.swift */,
|
|
||||||
55BF752C2FFE53F70055DA57 /* LocationPermissionPopView.swift */,
|
55BF752C2FFE53F70055DA57 /* LocationPermissionPopView.swift */,
|
||||||
30A87A692FEF59E60095E7C6 /* SearchLocation */,
|
30A87A692FEF59E60095E7C6 /* SearchLocation */,
|
||||||
30A87A5C2FEE711C0095E7C6 /* Bubble */,
|
30A87A5C2FEE711C0095E7C6 /* Bubble */,
|
||||||
|
|
@ -1335,6 +1299,7 @@
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
305A762B2FCA8C7000227D26 /* LaunchViewController.swift */,
|
305A762B2FCA8C7000227D26 /* LaunchViewController.swift */,
|
||||||
|
55B2A1003022F0A000784900 /* LaunchPrivacyConsentView.swift */,
|
||||||
);
|
);
|
||||||
path = Launch;
|
path = Launch;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|
@ -1398,7 +1363,6 @@
|
||||||
305A762C2FCA8C7000227D26 /* Launch */,
|
305A762C2FCA8C7000227D26 /* Launch */,
|
||||||
3062E8B32FCE6BA400CEF511 /* Scan */,
|
3062E8B32FCE6BA400CEF511 /* Scan */,
|
||||||
30DC18592FD11E7A0041DCD1 /* Web */,
|
30DC18592FD11E7A0041DCD1 /* Web */,
|
||||||
30ACD54A2FF6332200174861 /* PopupWindow */,
|
|
||||||
30EFF3AD2FD7FF1400EB35D4 /* TextInput */,
|
30EFF3AD2FD7FF1400EB35D4 /* TextInput */,
|
||||||
30C6679D2FFB7FEF00E62B25 /* Share */,
|
30C6679D2FFB7FEF00E62B25 /* Share */,
|
||||||
F49062649CA8E5F9FA2F22A5 /* AppRestrict */,
|
F49062649CA8E5F9FA2F22A5 /* AppRestrict */,
|
||||||
|
|
@ -1415,7 +1379,6 @@
|
||||||
55B230003032000100785001 /* UploadService.swift */,
|
55B230003032000100785001 /* UploadService.swift */,
|
||||||
55B230043032000100785005 /* PigeonService.swift */,
|
55B230043032000100785005 /* PigeonService.swift */,
|
||||||
30BAB8522FCD337C00C33B5C /* GroupService.swift */,
|
30BAB8522FCD337C00C33B5C /* GroupService.swift */,
|
||||||
30D891F62FE22E6E00E958FD /* OrderService.swift */,
|
|
||||||
30D74AB72FEA36A50050EB2C /* ItineraryService.swift */,
|
30D74AB72FEA36A50050EB2C /* ItineraryService.swift */,
|
||||||
30B74B4C2FF391FF00F6744D /* DrivingService.swift */,
|
30B74B4C2FF391FF00F6744D /* DrivingService.swift */,
|
||||||
);
|
);
|
||||||
|
|
@ -1515,7 +1478,6 @@
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
55B26000304B000100786600 /* VersionUpgradePopVC.swift */,
|
55B26000304B000100786600 /* VersionUpgradePopVC.swift */,
|
||||||
30CCDE4D2FE26CEA00F5214A /* PayResultPopVC.swift */,
|
|
||||||
30EFF3BA2FD90D7600EB35D4 /* ConfirmPopVC.swift */,
|
30EFF3BA2FD90D7600EB35D4 /* ConfirmPopVC.swift */,
|
||||||
305A76642FCA8C7000227D26 /* DLAlertPopVC.swift */,
|
305A76642FCA8C7000227D26 /* DLAlertPopVC.swift */,
|
||||||
305A76652FCA8C7000227D26 /* DLCustomPopVC.swift */,
|
305A76652FCA8C7000227D26 /* DLCustomPopVC.swift */,
|
||||||
|
|
@ -1599,7 +1561,6 @@
|
||||||
3062E8C12FCFB86800CEF511 /* CreateGroupViewModel.swift */,
|
3062E8C12FCFB86800CEF511 /* CreateGroupViewModel.swift */,
|
||||||
3062E8BD2FCEBD0E00CEF511 /* GroupIconListVC.swift */,
|
3062E8BD2FCEBD0E00CEF511 /* GroupIconListVC.swift */,
|
||||||
3062E8BF2FCED7BB00CEF511 /* GroupIconListView.swift */,
|
3062E8BF2FCED7BB00CEF511 /* GroupIconListView.swift */,
|
||||||
3062E8C32FCFC90F00CEF511 /* CreateGroupVipPopView.swift */,
|
|
||||||
);
|
);
|
||||||
path = CreateGroup;
|
path = CreateGroup;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|
@ -1666,7 +1627,6 @@
|
||||||
30A87A612FEE724D0095E7C6 /* CreateBubbleTiemView.swift */,
|
30A87A612FEE724D0095E7C6 /* CreateBubbleTiemView.swift */,
|
||||||
30A87A632FEE75520095E7C6 /* CreateBubbleTipsView.swift */,
|
30A87A632FEE75520095E7C6 /* CreateBubbleTipsView.swift */,
|
||||||
30A87A652FEE843E0095E7C6 /* CreateBubbleDoneView.swift */,
|
30A87A652FEE843E0095E7C6 /* CreateBubbleDoneView.swift */,
|
||||||
30A87A672FEE86560095E7C6 /* CreateBubblePopView.swift */,
|
|
||||||
);
|
);
|
||||||
path = Bubble;
|
path = Bubble;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|
@ -1684,15 +1644,6 @@
|
||||||
path = SearchLocation;
|
path = SearchLocation;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
30ACD54A2FF6332200174861 /* PopupWindow */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
30ACD67A2FF7B36A00174861 /* PopupQueueManager.swift */,
|
|
||||||
30ACD54B2FF6336000174861 /* PopupWindow.swift */,
|
|
||||||
);
|
|
||||||
path = PopupWindow;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
30B2D0BA2FEB111100CA0001 /* PhotoPicker */ = {
|
30B2D0BA2FEB111100CA0001 /* PhotoPicker */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
|
@ -1784,14 +1735,6 @@
|
||||||
path = GroupInfo;
|
path = GroupInfo;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
30C6666A2FFB7C3000E62B25 /* IAPManager */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
30C6666B2FFB7C4000E62B25 /* IAPManager.swift */,
|
|
||||||
);
|
|
||||||
path = IAPManager;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
30C6679D2FFB7FEF00E62B25 /* Share */ = {
|
30C6679D2FFB7FEF00E62B25 /* Share */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
|
@ -1827,9 +1770,7 @@
|
||||||
30D74AAC2FEA13BD0050EB2C /* Schedule */ = {
|
30D74AAC2FEA13BD0050EB2C /* Schedule */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
30D74AAF2FEA13ED0050EB2C /* ScheduleVC.swift */,
|
55CA150B3058E55E000F1189 /* ScheduleViewModel.swift */,
|
||||||
30D74AB12FEA1D5D0050EB2C /* ScheduleViewModel.swift */,
|
|
||||||
30D74AAD2FEA13E00050EB2C /* ScheduleView.swift */,
|
|
||||||
30D74AB32FEA25B90050EB2C /* ViewedModel.swift */,
|
30D74AB32FEA25B90050EB2C /* ViewedModel.swift */,
|
||||||
30D74AB92FEA37AD0050EB2C /* ScheduleModel.swift */,
|
30D74AB92FEA37AD0050EB2C /* ScheduleModel.swift */,
|
||||||
30D74ABB2FEA67CE0050EB2C /* CreateSchedule */,
|
30D74ABB2FEA67CE0050EB2C /* CreateSchedule */,
|
||||||
|
|
@ -1848,7 +1789,6 @@
|
||||||
30D74D1E2FEBB09B0050EB2C /* CreateScheduleVM.swift */,
|
30D74D1E2FEBB09B0050EB2C /* CreateScheduleVM.swift */,
|
||||||
30D74ABE2FEA67F30050EB2C /* CreateScheduleView.swift */,
|
30D74ABE2FEA67F30050EB2C /* CreateScheduleView.swift */,
|
||||||
30D74AC02FEA6EEF0050EB2C /* CreateSchedulePopView.swift */,
|
30D74AC02FEA6EEF0050EB2C /* CreateSchedulePopView.swift */,
|
||||||
30DA36BC2FECC5AB008D5A2C /* CreateScheduleVipPopView.swift */,
|
|
||||||
);
|
);
|
||||||
path = CreateSchedule;
|
path = CreateSchedule;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|
@ -2009,14 +1949,6 @@
|
||||||
path = Font;
|
path = Font;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
55B217D23022F0A000784728 /* Unlock */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
55B217D03022F0A000784726 /* UnlockCountManager.swift */,
|
|
||||||
);
|
|
||||||
path = Unlock;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
55B217DD302301000078473C /* TodayTrackDetail */ = {
|
55B217DD302301000078473C /* TodayTrackDetail */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
|
@ -2027,16 +1959,6 @@
|
||||||
path = TodayTrackDetail;
|
path = TodayTrackDetail;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
55B217DE302301000078473D /* PhoneReportDetail */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
55B217D73023010000784736 /* PhoneReportDetailVC.swift */,
|
|
||||||
55B217D93023010000784738 /* PhoneReportDetailView.swift */,
|
|
||||||
55B217DB302301000078473A /* PhoneReportDetailViewModel.swift */,
|
|
||||||
);
|
|
||||||
path = PhoneReportDetail;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
55B218A13024A00100784710 /* About */ = {
|
55B218A13024A00100784710 /* About */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
|
@ -2165,6 +2087,15 @@
|
||||||
path = Pods;
|
path = Pods;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
B2DDB0083141D63A991C9FEE /* ImageCrop */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
51E818049FA5A8557C434E37 /* ImageCropView.swift */,
|
||||||
|
C39ADD47D3C81F01F6289AC4 /* ImageCropVC.swift */,
|
||||||
|
);
|
||||||
|
path = ImageCrop;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
B79BE06D49443FE82A811D5C /* LockDistract */ = {
|
B79BE06D49443FE82A811D5C /* LockDistract */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
|
@ -2432,7 +2363,6 @@
|
||||||
305A76922FCA8C7000227D26 /* LogUtils.swift in Sources */,
|
305A76922FCA8C7000227D26 /* LogUtils.swift in Sources */,
|
||||||
305A76932FCA8C7000227D26 /* AddImageCell.swift in Sources */,
|
305A76932FCA8C7000227D26 /* AddImageCell.swift in Sources */,
|
||||||
30EFF3D82FDA8F1000EB35D4 /* EmergencyContactVC.swift in Sources */,
|
30EFF3D82FDA8F1000EB35D4 /* EmergencyContactVC.swift in Sources */,
|
||||||
30A87A682FEE86560095E7C6 /* CreateBubblePopView.swift in Sources */,
|
|
||||||
55B219C13024C00100784722 /* BubbleHeroView.swift in Sources */,
|
55B219C13024C00100784722 /* BubbleHeroView.swift in Sources */,
|
||||||
55B219C13024C00100784724 /* CreateBubbleSetupView.swift in Sources */,
|
55B219C13024C00100784724 /* CreateBubbleSetupView.swift in Sources */,
|
||||||
55B219C13024C00100784726 /* BubbleKnowledgeView.swift in Sources */,
|
55B219C13024C00100784726 /* BubbleKnowledgeView.swift in Sources */,
|
||||||
|
|
@ -2455,27 +2385,24 @@
|
||||||
30EFF3DA2FDA935D00EB35D4 /* EmergencyContactFooterView.swift in Sources */,
|
30EFF3DA2FDA935D00EB35D4 /* EmergencyContactFooterView.swift in Sources */,
|
||||||
3062E8C22FCFB86800CEF511 /* CreateGroupViewModel.swift in Sources */,
|
3062E8C22FCFB86800CEF511 /* CreateGroupViewModel.swift in Sources */,
|
||||||
30A87A662FEE843E0095E7C6 /* CreateBubbleDoneView.swift in Sources */,
|
30A87A662FEE843E0095E7C6 /* CreateBubbleDoneView.swift in Sources */,
|
||||||
55BF75352FFF91690055DA57 /* InteractionEmojiCell.swift in Sources */,
|
|
||||||
305A769B2FCA8C7000227D26 /* PopupAnimators.swift in Sources */,
|
305A769B2FCA8C7000227D26 /* PopupAnimators.swift in Sources */,
|
||||||
30A87A4D2FEE1DB40095E7C6 /* ItineraryDetailView.swift in Sources */,
|
30A87A4D2FEE1DB40095E7C6 /* ItineraryDetailView.swift in Sources */,
|
||||||
305A769C2FCA8C7000227D26 /* PopupViewController.swift in Sources */,
|
305A769C2FCA8C7000227D26 /* PopupViewController.swift in Sources */,
|
||||||
305A769D2FCA8C7000227D26 /* PopupViewController+Extension.swift in Sources */,
|
305A769D2FCA8C7000227D26 /* PopupViewController+Extension.swift in Sources */,
|
||||||
30EFF3C42FDA431D00EB35D4 /* ChangePhoneVC.swift in Sources */,
|
30EFF3C42FDA431D00EB35D4 /* ChangePhoneVC.swift in Sources */,
|
||||||
30C6666C2FFB7C4000E62B25 /* IAPManager.swift in Sources */,
|
|
||||||
305A769E2FCA8C7000227D26 /* TextArrowCell.swift in Sources */,
|
305A769E2FCA8C7000227D26 /* TextArrowCell.swift in Sources */,
|
||||||
305A769F2FCA8C7000227D26 /* TextContentArrowCell.swift in Sources */,
|
305A769F2FCA8C7000227D26 /* TextContentArrowCell.swift in Sources */,
|
||||||
30D87D042FE1336300E958FD /* NavigationVC.swift in Sources */,
|
30D87D042FE1336300E958FD /* NavigationVC.swift in Sources */,
|
||||||
30D87D052FE1336300E958FD /* NavigationView.swift in Sources */,
|
30D87D052FE1336300E958FD /* NavigationView.swift in Sources */,
|
||||||
30B819F42FF3CE4900FAB693 /* ItineraryTraceVC.swift in Sources */,
|
30B819F42FF3CE4900FAB693 /* ItineraryTraceVC.swift in Sources */,
|
||||||
305A76A02FCA8C7000227D26 /* TextTableViewCell.swift in Sources */,
|
305A76A02FCA8C7000227D26 /* TextTableViewCell.swift in Sources */,
|
||||||
30ACD67B2FF7B36A00174861 /* PopupQueueManager.swift in Sources */,
|
|
||||||
305A76A12FCA8C7000227D26 /* UIButton+RTL.m in Sources */,
|
305A76A12FCA8C7000227D26 /* UIButton+RTL.m in Sources */,
|
||||||
30EFF3A62FD7C5AF00EB35D4 /* GroupSettingVC.swift in Sources */,
|
30EFF3A62FD7C5AF00EB35D4 /* GroupSettingVC.swift in Sources */,
|
||||||
|
55CA15103058EBE5000F1189 /* InteractionEmojiCell.swift in Sources */,
|
||||||
305A76A22FCA8C7000227D26 /* Array+Extension.swift in Sources */,
|
305A76A22FCA8C7000227D26 /* Array+Extension.swift in Sources */,
|
||||||
305A76A32FCA8C7000227D26 /* ControlEvents+Block.swift in Sources */,
|
305A76A32FCA8C7000227D26 /* ControlEvents+Block.swift in Sources */,
|
||||||
3062E8B72FCE6BFE00CEF511 /* ScanView.swift in Sources */,
|
3062E8B72FCE6BFE00CEF511 /* ScanView.swift in Sources */,
|
||||||
305A76A42FCA8C7000227D26 /* Date+Extension.swift in Sources */,
|
305A76A42FCA8C7000227D26 /* Date+Extension.swift in Sources */,
|
||||||
30D74AAE2FEA13E00050EB2C /* ScheduleView.swift in Sources */,
|
|
||||||
305A76A52FCA8C7000227D26 /* Dictionay+Extension.swift in Sources */,
|
305A76A52FCA8C7000227D26 /* Dictionay+Extension.swift in Sources */,
|
||||||
30A87A522FEE4E5D0095E7C6 /* ScheduleHistoryVC.swift in Sources */,
|
30A87A522FEE4E5D0095E7C6 /* ScheduleHistoryVC.swift in Sources */,
|
||||||
305A76A62FCA8C7000227D26 /* Int+Extension.swift in Sources */,
|
305A76A62FCA8C7000227D26 /* Int+Extension.swift in Sources */,
|
||||||
|
|
@ -2545,14 +2472,10 @@
|
||||||
305A76C22FCA8C7000227D26 /* BaseViewModel.swift in Sources */,
|
305A76C22FCA8C7000227D26 /* BaseViewModel.swift in Sources */,
|
||||||
55B2179330218CE100784774 /* GroupMemberView2.swift in Sources */,
|
55B2179330218CE100784774 /* GroupMemberView2.swift in Sources */,
|
||||||
55B217C53022F0A000784725 /* MemberAppUsageView.swift in Sources */,
|
55B217C53022F0A000784725 /* MemberAppUsageView.swift in Sources */,
|
||||||
55B217C33022F0A000784723 /* MemberPhoneReportView.swift in Sources */,
|
|
||||||
55C1A0213034102000786021 /* PrivilegeDeniedOverlay.swift in Sources */,
|
55C1A0213034102000786021 /* PrivilegeDeniedOverlay.swift in Sources */,
|
||||||
55B217D23023010000784731 /* TodayTrackDetailVC.swift in Sources */,
|
55B217D23023010000784731 /* TodayTrackDetailVC.swift in Sources */,
|
||||||
55B217D43023010000784733 /* TodayTrackDetailView.swift in Sources */,
|
55B217D43023010000784733 /* TodayTrackDetailView.swift in Sources */,
|
||||||
55B217D63023010000784735 /* TodayTrackDetailViewModel.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 */,
|
55B240013040000100784901 /* AppUsageReportVC.swift in Sources */,
|
||||||
55B240033040000100784903 /* AppUsageReportView.swift in Sources */,
|
55B240033040000100784903 /* AppUsageReportView.swift in Sources */,
|
||||||
55B240053040000100784905 /* AppUsageReportViewModel.swift in Sources */,
|
55B240053040000100784905 /* AppUsageReportViewModel.swift in Sources */,
|
||||||
|
|
@ -2566,9 +2489,11 @@
|
||||||
55B234013036000100785051 /* RelationSelectPopVC.swift in Sources */,
|
55B234013036000100785051 /* RelationSelectPopVC.swift in Sources */,
|
||||||
55B234033036000100785053 /* RelationStore.swift in Sources */,
|
55B234033036000100785053 /* RelationStore.swift in Sources */,
|
||||||
55B220013031000100784801 /* FeedbackVC.swift in Sources */,
|
55B220013031000100784801 /* FeedbackVC.swift in Sources */,
|
||||||
|
55CA15123058EC23000F1189 /* InteractionView.swift in Sources */,
|
||||||
55B220033031000100784803 /* FeedbackView.swift in Sources */,
|
55B220033031000100784803 /* FeedbackView.swift in Sources */,
|
||||||
55B220053031000100784805 /* FeedbackSuccessView.swift in Sources */,
|
55B220053031000100784805 /* FeedbackSuccessView.swift in Sources */,
|
||||||
55B221210000000100784821 /* MoodStatusVC.swift in Sources */,
|
55B221210000000100784821 /* MoodStatusVC.swift in Sources */,
|
||||||
|
55CA150E3058E55E000F1189 /* ScheduleViewModel.swift in Sources */,
|
||||||
55B221230000000100784823 /* MoodStatusView.swift in Sources */,
|
55B221230000000100784823 /* MoodStatusView.swift in Sources */,
|
||||||
55B222010000000100784831 /* AddEmojiPopView.swift in Sources */,
|
55B222010000000100784831 /* AddEmojiPopView.swift in Sources */,
|
||||||
55B222030000000100784833 /* AddMessagePopView.swift in Sources */,
|
55B222030000000100784833 /* AddMessagePopView.swift in Sources */,
|
||||||
|
|
@ -2588,7 +2513,6 @@
|
||||||
305A76C72FCA8C7000227D26 /* UserConfigModel.swift in Sources */,
|
305A76C72FCA8C7000227D26 /* UserConfigModel.swift in Sources */,
|
||||||
30B74B472FF3608600F6744D /* ScheduleRecordModel.swift in Sources */,
|
30B74B472FF3608600F6744D /* ScheduleRecordModel.swift in Sources */,
|
||||||
305A76C82FCA8C7000227D26 /* UserConfigResponse.swift in Sources */,
|
305A76C82FCA8C7000227D26 /* UserConfigResponse.swift in Sources */,
|
||||||
30ACD54C2FF6336000174861 /* PopupWindow.swift in Sources */,
|
|
||||||
305A76C92FCA8C7000227D26 /* ApiManager.swift in Sources */,
|
305A76C92FCA8C7000227D26 /* ApiManager.swift in Sources */,
|
||||||
305A76CA2FCA8C7000227D26 /* AppSettings.swift in Sources */,
|
305A76CA2FCA8C7000227D26 /* AppSettings.swift in Sources */,
|
||||||
305A76CB2FCA8C7000227D26 /* Authorize.swift in Sources */,
|
305A76CB2FCA8C7000227D26 /* Authorize.swift in Sources */,
|
||||||
|
|
@ -2596,7 +2520,6 @@
|
||||||
30C6679E2FFB7FEF00E62B25 /* SharePopView.swift in Sources */,
|
30C6679E2FFB7FEF00E62B25 /* SharePopView.swift in Sources */,
|
||||||
305A76CC2FCA8C7000227D26 /* FileTools.swift in Sources */,
|
305A76CC2FCA8C7000227D26 /* FileTools.swift in Sources */,
|
||||||
305A76CD2FCA8C7000227D26 /* Permission.swift in Sources */,
|
305A76CD2FCA8C7000227D26 /* Permission.swift in Sources */,
|
||||||
30D74AB02FEA13ED0050EB2C /* ScheduleVC.swift in Sources */,
|
|
||||||
55B218B13024B00100784722 /* FeatureIntroVC.swift in Sources */,
|
55B218B13024B00100784722 /* FeatureIntroVC.swift in Sources */,
|
||||||
55B218B13024B00100784724 /* FeatureIntroView.swift in Sources */,
|
55B218B13024B00100784724 /* FeatureIntroView.swift in Sources */,
|
||||||
305A76CE2FCA8C7000227D26 /* RouterManager.swift in Sources */,
|
305A76CE2FCA8C7000227D26 /* RouterManager.swift in Sources */,
|
||||||
|
|
@ -2605,7 +2528,6 @@
|
||||||
305A76D02FCA8C7000227D26 /* MoneyFormatter.swift in Sources */,
|
305A76D02FCA8C7000227D26 /* MoneyFormatter.swift in Sources */,
|
||||||
305A76D12FCA8C7000227D26 /* TimeSpecificNotificationManager.swift in Sources */,
|
305A76D12FCA8C7000227D26 /* TimeSpecificNotificationManager.swift in Sources */,
|
||||||
305A76D22FCA8C7000227D26 /* ThemeManager.swift in Sources */,
|
305A76D22FCA8C7000227D26 /* ThemeManager.swift in Sources */,
|
||||||
55B217D13022F0A000784727 /* UnlockCountManager.swift in Sources */,
|
|
||||||
305A76D32FCA8C7000227D26 /* URLManager.swift in Sources */,
|
305A76D32FCA8C7000227D26 /* URLManager.swift in Sources */,
|
||||||
305A76D42FCA8C7000227D26 /* GroupModel.swift in Sources */,
|
305A76D42FCA8C7000227D26 /* GroupModel.swift in Sources */,
|
||||||
55B230073032000100785008 /* PigeonModel.swift in Sources */,
|
55B230073032000100785008 /* PigeonModel.swift in Sources */,
|
||||||
|
|
@ -2641,7 +2563,6 @@
|
||||||
55B250043038000100786504 /* MailboxView.swift in Sources */,
|
55B250043038000100786504 /* MailboxView.swift in Sources */,
|
||||||
55B250063038000100786506 /* MailboxViewController.swift in Sources */,
|
55B250063038000100786506 /* MailboxViewController.swift in Sources */,
|
||||||
55B250083038000100786508 /* MailboxDetailViewController.swift in Sources */,
|
55B250083038000100786508 /* MailboxDetailViewController.swift in Sources */,
|
||||||
30D74AB22FEA1D5D0050EB2C /* ScheduleViewModel.swift in Sources */,
|
|
||||||
30EFF3B52FD8F1D000EB35D4 /* ReviewMemberListVC.swift in Sources */,
|
30EFF3B52FD8F1D000EB35D4 /* ReviewMemberListVC.swift in Sources */,
|
||||||
30BAB84D2FCD2FDE00C33B5C /* InviteJoinView.swift in Sources */,
|
30BAB84D2FCD2FDE00C33B5C /* InviteJoinView.swift in Sources */,
|
||||||
30A87A592FEE5A4C0095E7C6 /* ScheduleViewedView.swift in Sources */,
|
30A87A592FEE5A4C0095E7C6 /* ScheduleViewedView.swift in Sources */,
|
||||||
|
|
@ -2649,12 +2570,10 @@
|
||||||
30CCDE5C2FE3A1A800F5214A /* SOSPracticeView.swift in Sources */,
|
30CCDE5C2FE3A1A800F5214A /* SOSPracticeView.swift in Sources */,
|
||||||
30EFF3E52FDAA93400EB35D4 /* PrivacyPolicyVC.swift in Sources */,
|
30EFF3E52FDAA93400EB35D4 /* PrivacyPolicyVC.swift in Sources */,
|
||||||
305A76E22FCA8C7000227D26 /* GroupViewModel.swift in Sources */,
|
305A76E22FCA8C7000227D26 /* GroupViewModel.swift in Sources */,
|
||||||
30CCDE4E2FE26CEA00F5214A /* PayResultPopVC.swift in Sources */,
|
|
||||||
305A76E32FCA8C7000227D26 /* GroupMemberView.swift in Sources */,
|
|
||||||
30BAB84F2FCD2FED00C33B5C /* InviteJoinVC.swift in Sources */,
|
30BAB84F2FCD2FED00C33B5C /* InviteJoinVC.swift in Sources */,
|
||||||
305A76E42FCA8C7000227D26 /* HomeView.swift in Sources */,
|
|
||||||
305A76E52FCA8C7000227D26 /* HomeViewController.swift in Sources */,
|
305A76E52FCA8C7000227D26 /* HomeViewController.swift in Sources */,
|
||||||
305A76E62FCA8C7000227D26 /* LaunchViewController.swift in Sources */,
|
305A76E62FCA8C7000227D26 /* LaunchViewController.swift in Sources */,
|
||||||
|
55B2A1013022F0A000784901 /* LaunchPrivacyConsentView.swift in Sources */,
|
||||||
3062E8B52FCE6BBA00CEF511 /* ScanVC.swift in Sources */,
|
3062E8B52FCE6BBA00CEF511 /* ScanVC.swift in Sources */,
|
||||||
30A1C0A12FEB000100CA0001 /* CameraCaptureView.swift in Sources */,
|
30A1C0A12FEB000100CA0001 /* CameraCaptureView.swift in Sources */,
|
||||||
30A1C0A32FEB000100CA0001 /* CameraCaptureVC.swift in Sources */,
|
30A1C0A32FEB000100CA0001 /* CameraCaptureVC.swift in Sources */,
|
||||||
|
|
@ -2722,16 +2641,13 @@
|
||||||
305A77032FCA8C7000227D26 /* ProgressHUD.swift in Sources */,
|
305A77032FCA8C7000227D26 /* ProgressHUD.swift in Sources */,
|
||||||
305A77042FCA8C7000227D26 /* MXParallaxHeader.m in Sources */,
|
305A77042FCA8C7000227D26 /* MXParallaxHeader.m in Sources */,
|
||||||
305A77052FCA8C7000227D26 /* MXScrollView.m in Sources */,
|
305A77052FCA8C7000227D26 /* MXScrollView.m in Sources */,
|
||||||
30D87CDD2FDFF07500E958FD /* InteractionView.swift in Sources */,
|
|
||||||
30BAB8652FCD718A00C33B5C /* JoinGroupView.swift in Sources */,
|
30BAB8652FCD718A00C33B5C /* JoinGroupView.swift in Sources */,
|
||||||
305A77062FCA8C7000227D26 /* MXScrollViewController.m in Sources */,
|
305A77062FCA8C7000227D26 /* MXScrollViewController.m in Sources */,
|
||||||
30B74B432FF2438800F6744D /* GroupMemberListView.swift in Sources */,
|
30B74B432FF2438800F6744D /* GroupMemberListView.swift in Sources */,
|
||||||
305A77072FCA8C7000227D26 /* Helper.swift in Sources */,
|
305A77072FCA8C7000227D26 /* Helper.swift in Sources */,
|
||||||
30BF30102FED0C8E00D9CB52 /* ScheduleDetailVM.swift in Sources */,
|
30BF30102FED0C8E00D9CB52 /* ScheduleDetailVM.swift in Sources */,
|
||||||
30DA36BD2FECC5AB008D5A2C /* CreateScheduleVipPopView.swift in Sources */,
|
|
||||||
305A77082FCA8C7000227D26 /* PageCollectionViewFlowLayout.swift in Sources */,
|
305A77082FCA8C7000227D26 /* PageCollectionViewFlowLayout.swift in Sources */,
|
||||||
55BF752D2FFE53F70055DA57 /* LocationPermissionPopView.swift in Sources */,
|
55BF752D2FFE53F70055DA57 /* LocationPermissionPopView.swift in Sources */,
|
||||||
3062E8C42FCFC90F00CEF511 /* CreateGroupVipPopView.swift in Sources */,
|
|
||||||
30D74ABA2FEA37AD0050EB2C /* ScheduleModel.swift in Sources */,
|
30D74ABA2FEA37AD0050EB2C /* ScheduleModel.swift in Sources */,
|
||||||
30CCDE512FE2785D00F5214A /* SignInVC.swift in Sources */,
|
30CCDE512FE2785D00F5214A /* SignInVC.swift in Sources */,
|
||||||
305A77092FCA8C7000227D26 /* PageContentView.swift in Sources */,
|
305A77092FCA8C7000227D26 /* PageContentView.swift in Sources */,
|
||||||
|
|
@ -2739,7 +2655,6 @@
|
||||||
305A770B2FCA8C7000227D26 /* PageTitleView.swift in Sources */,
|
305A770B2FCA8C7000227D26 /* PageTitleView.swift in Sources */,
|
||||||
305A770C2FCA8C7000227D26 /* PageView.swift in Sources */,
|
305A770C2FCA8C7000227D26 /* PageView.swift in Sources */,
|
||||||
305A770D2FCA8C7000227D26 /* PageViewManager.swift in Sources */,
|
305A770D2FCA8C7000227D26 /* PageViewManager.swift in Sources */,
|
||||||
30D891F52FE22E0600E958FD /* OrderAPI.swift in Sources */,
|
|
||||||
307073EA2FD2715A004C37CC /* GroupChatViewModel.swift in Sources */,
|
307073EA2FD2715A004C37CC /* GroupChatViewModel.swift in Sources */,
|
||||||
305A770E2FCA8C7000227D26 /* DLAlertPopVC.swift in Sources */,
|
305A770E2FCA8C7000227D26 /* DLAlertPopVC.swift in Sources */,
|
||||||
305A770F2FCA8C7000227D26 /* DLCustomPopVC.swift in Sources */,
|
305A770F2FCA8C7000227D26 /* DLCustomPopVC.swift in Sources */,
|
||||||
|
|
@ -2751,7 +2666,6 @@
|
||||||
30EFF3B72FD8F86200EB35D4 /* ReviewMemberListVM.swift in Sources */,
|
30EFF3B72FD8F86200EB35D4 /* ReviewMemberListVM.swift in Sources */,
|
||||||
305A77112FCA8C7000227D26 /* DLViewTransition.m in Sources */,
|
305A77112FCA8C7000227D26 /* DLViewTransition.m in Sources */,
|
||||||
3062E8BA2FCEAC6500CEF511 /* CreateGroupView.swift in Sources */,
|
3062E8BA2FCEAC6500CEF511 /* CreateGroupView.swift in Sources */,
|
||||||
30D891F72FE22E6E00E958FD /* OrderService.swift in Sources */,
|
|
||||||
305A77192FCA8C7000227D26 /* CollectionHFlowLayout.swift in Sources */,
|
305A77192FCA8C7000227D26 /* CollectionHFlowLayout.swift in Sources */,
|
||||||
30D74AC12FEA6EEF0050EB2C /* CreateSchedulePopView.swift in Sources */,
|
30D74AC12FEA6EEF0050EB2C /* CreateSchedulePopView.swift in Sources */,
|
||||||
305A771A2FCA8C7000227D26 /* JJPageControl.swift in Sources */,
|
305A771A2FCA8C7000227D26 /* JJPageControl.swift in Sources */,
|
||||||
|
|
@ -2772,6 +2686,8 @@
|
||||||
E3D4129BDA33540BA4E1292E /* LockDistractVC.swift in Sources */,
|
E3D4129BDA33540BA4E1292E /* LockDistractVC.swift in Sources */,
|
||||||
E866CAAE7D4E74EB7AD608B9 /* ITunesSearchService.swift in Sources */,
|
E866CAAE7D4E74EB7AD608B9 /* ITunesSearchService.swift in Sources */,
|
||||||
DB67C2EB2521042829A3DBA5 /* PairGuideStepsView.swift in Sources */,
|
DB67C2EB2521042829A3DBA5 /* PairGuideStepsView.swift in Sources */,
|
||||||
|
F9CE7D326B4F4F3C1FFAA447 /* ImageCropView.swift in Sources */,
|
||||||
|
4A69FEABC5F1BA738C35A607 /* ImageCropVC.swift in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|
@ -2837,9 +2753,12 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
CLANG_ENABLE_OBJC_WEAK = NO;
|
CLANG_ENABLE_OBJC_WEAK = NO;
|
||||||
CODE_SIGN_ENTITLEMENTS = DeviceActivityMonitorExtension/DeviceActivityMonitorExtension.entitlements;
|
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;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
DEVELOPMENT_TEAM = LRDLWZ2Y83;
|
DEVELOPMENT_TEAM = "";
|
||||||
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = LRDLWZ2Y83;
|
||||||
GENERATE_INFOPLIST_FILE = NO;
|
GENERATE_INFOPLIST_FILE = NO;
|
||||||
INFOPLIST_FILE = DeviceActivityMonitorExtension/Info.plist;
|
INFOPLIST_FILE = DeviceActivityMonitorExtension/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||||
|
|
@ -2851,6 +2770,8 @@
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = cn.zuomeng.jisuloca.DeviceActivityMonitor;
|
PRODUCT_BUNDLE_IDENTIFIER = cn.zuomeng.jisuloca.DeviceActivityMonitor;
|
||||||
PRODUCT_NAME = DeviceActivityMonitorExtension;
|
PRODUCT_NAME = DeviceActivityMonitorExtension;
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "jsdw DeviceActivityMonitor AppStore";
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_DEFAULT_ACTOR_ISOLATION = nonisolated;
|
SWIFT_DEFAULT_ACTOR_ISOLATION = nonisolated;
|
||||||
|
|
@ -2895,11 +2816,9 @@
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_ENTITLEMENTS = QuickLocation/QuickLocation.entitlements;
|
CODE_SIGN_ENTITLEMENTS = QuickLocation/QuickLocation.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CODE_SIGN_STYLE = Manual;
|
CURRENT_PROJECT_VERSION = 5;
|
||||||
CURRENT_PROJECT_VERSION = 2;
|
DEVELOPMENT_TEAM = LRDLWZ2Y83;
|
||||||
DEVELOPMENT_TEAM = "";
|
|
||||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = LRDLWZ2Y83;
|
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = "$(inherited)";
|
ENABLE_USER_SCRIPT_SANDBOXING = "$(inherited)";
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
INFOPLIST_FILE = QuickLocation/Info.plist;
|
INFOPLIST_FILE = QuickLocation/Info.plist;
|
||||||
|
|
@ -2926,7 +2845,6 @@
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = cn.zuomeng.jisuloca;
|
PRODUCT_BUNDLE_IDENTIFIER = cn.zuomeng.jisuloca;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = jsdw_dev;
|
|
||||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
|
@ -2950,9 +2868,9 @@
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_ENTITLEMENTS = QuickLocation/QuickLocation.entitlements;
|
CODE_SIGN_ENTITLEMENTS = QuickLocation/QuickLocation.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||||
CODE_SIGN_STYLE = Manual;
|
CODE_SIGN_STYLE = Manual;
|
||||||
CURRENT_PROJECT_VERSION = 2;
|
CURRENT_PROJECT_VERSION = 5;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = LRDLWZ2Y83;
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = LRDLWZ2Y83;
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = "$(inherited)";
|
ENABLE_USER_SCRIPT_SANDBOXING = "$(inherited)";
|
||||||
|
|
@ -2981,7 +2899,7 @@
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = cn.zuomeng.jisuloca;
|
PRODUCT_BUNDLE_IDENTIFIER = cn.zuomeng.jisuloca;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = jsdw_dev;
|
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = jsdw_AppStore;
|
||||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
|
@ -3185,7 +3103,7 @@
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||||
CODE_SIGN_STYLE = Manual;
|
CODE_SIGN_STYLE = Manual;
|
||||||
CURRENT_PROJECT_VERSION = 2;
|
CURRENT_PROJECT_VERSION = 5;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = LRDLWZ2Y83;
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = LRDLWZ2Y83;
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = "$(inherited)";
|
ENABLE_USER_SCRIPT_SANDBOXING = "$(inherited)";
|
||||||
|
|
@ -3328,9 +3246,12 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
CLANG_ENABLE_OBJC_WEAK = NO;
|
CLANG_ENABLE_OBJC_WEAK = NO;
|
||||||
CODE_SIGN_ENTITLEMENTS = ShieldConfigurationExtension/ShieldConfigurationExtension.entitlements;
|
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;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
DEVELOPMENT_TEAM = LRDLWZ2Y83;
|
DEVELOPMENT_TEAM = "";
|
||||||
|
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = LRDLWZ2Y83;
|
||||||
GENERATE_INFOPLIST_FILE = NO;
|
GENERATE_INFOPLIST_FILE = NO;
|
||||||
INFOPLIST_FILE = ShieldConfigurationExtension/Info.plist;
|
INFOPLIST_FILE = ShieldConfigurationExtension/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||||
|
|
@ -3342,6 +3263,8 @@
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = cn.zuomeng.jisuloca.ShieldConfiguration;
|
PRODUCT_BUNDLE_IDENTIFIER = cn.zuomeng.jisuloca.ShieldConfiguration;
|
||||||
PRODUCT_NAME = ShieldConfigurationExtension;
|
PRODUCT_NAME = ShieldConfigurationExtension;
|
||||||
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "jsdw ShieldConfiguration AppStore";
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_DEFAULT_ACTOR_ISOLATION = nonisolated;
|
SWIFT_DEFAULT_ACTOR_ISOLATION = nonisolated;
|
||||||
|
|
|
||||||
|
|
@ -148,14 +148,6 @@ enum GatewayStatusCode: Int {
|
||||||
case userLoginExpair3 = 1001005
|
case userLoginExpair3 = 1001005
|
||||||
// 权限不足
|
// 权限不足
|
||||||
case noAuthority = 500
|
case noAuthority = 500
|
||||||
// 审核中
|
|
||||||
case review = 201
|
|
||||||
|
|
||||||
/** ============== 业务 ============== */
|
|
||||||
// 需要开通vip
|
|
||||||
case needVip = 20000
|
|
||||||
// 您创建的圈子个数已达上限,请升级会员等级
|
|
||||||
case groupLimit = 20009
|
|
||||||
|
|
||||||
/** ============== 未知错误 ============== */
|
/** ============== 未知错误 ============== */
|
||||||
case unknownError = -9999
|
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 Foundation
|
||||||
import Moya
|
import Moya
|
||||||
import CommonCrypto
|
|
||||||
|
|
||||||
/// JiaMiKey 的 MD5,预计算避免每次请求都算
|
/// JiaMiKey 的 MD5,预计算避免每次请求都算
|
||||||
private let jiaMiKeyMD5: String = {
|
private let jiaMiKeyMD5: String = {
|
||||||
|
|
@ -73,10 +72,6 @@ final class SignPlugin: PluginType {
|
||||||
}
|
}
|
||||||
|
|
||||||
fileprivate static func md5(_ string: String) -> String {
|
fileprivate static func md5(_ string: String) -> String {
|
||||||
let cStr = string.cString(using: .utf8)
|
string.md5
|
||||||
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()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,6 @@ enum UserAPI {
|
||||||
/// 成员 APP 周期使用报告
|
/// 成员 APP 周期使用报告
|
||||||
case phoneUsagePeriod(userId: String, groupKey: String, period: String)
|
case phoneUsagePeriod(userId: String, groupKey: String, period: String)
|
||||||
|
|
||||||
/// 成员手机使用报告
|
|
||||||
case phoneUsageReport(userId: String, groupKey: String)
|
|
||||||
|
|
||||||
/// 成员历史行程
|
/// 成员历史行程
|
||||||
case phoneUsageTrips(userId: String, date: Int64)
|
case phoneUsageTrips(userId: String, date: Int64)
|
||||||
|
|
||||||
|
|
@ -164,8 +161,6 @@ extension UserAPI: MultiTargetProtocol {
|
||||||
return "mapi/phone/usage/today"
|
return "mapi/phone/usage/today"
|
||||||
case .phoneUsagePeriod:
|
case .phoneUsagePeriod:
|
||||||
return "mapi/phone/usage/period"
|
return "mapi/phone/usage/period"
|
||||||
case .phoneUsageReport:
|
|
||||||
return "mapi/phone/usage/report"
|
|
||||||
case .phoneUsageTrips:
|
case .phoneUsageTrips:
|
||||||
return "mapi/phone/usage/trips"
|
return "mapi/phone/usage/trips"
|
||||||
case .queryPhoneUsageIcon, .savePhoneUsageIcon:
|
case .queryPhoneUsageIcon, .savePhoneUsageIcon:
|
||||||
|
|
@ -229,7 +224,7 @@ extension UserAPI: MultiTargetProtocol {
|
||||||
|
|
||||||
var method: Moya.Method {
|
var method: Moya.Method {
|
||||||
switch self {
|
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
|
return .get
|
||||||
case .changePhone, .changeAvater:
|
case .changePhone, .changeAvater:
|
||||||
return .put
|
return .put
|
||||||
|
|
@ -270,13 +265,6 @@ extension UserAPI: MultiTargetProtocol {
|
||||||
]
|
]
|
||||||
return .requestParameters(parameters: params, encoding: URLEncoding.queryString)
|
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):
|
case let .phoneUsageTrips(userId, date):
|
||||||
let params: Parameters = [
|
let params: Parameters = [
|
||||||
"user_id": userId,
|
"user_id": userId,
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,11 @@ import SwiftDate
|
||||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
|
|
||||||
var window: UIWindow?
|
var window: UIWindow?
|
||||||
|
private var didSetupPrivacyGrantedSDKs = false
|
||||||
|
|
||||||
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
||||||
|
|
||||||
UnlockCountManager.shared.start(launchOptions: launchOptions)
|
|
||||||
FontManager.registerCustomFonts()
|
FontManager.registerCustomFonts()
|
||||||
setupLocation()
|
|
||||||
ApiManager.shared.setup()
|
ApiManager.shared.setup()
|
||||||
AppRouter.shared.setup()
|
AppRouter.shared.setup()
|
||||||
AppUnlockCoordinator.shared.start()
|
AppUnlockCoordinator.shared.start()
|
||||||
|
|
@ -38,23 +37,29 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
|
|
||||||
SwiftDate.defaultRegion = Region(zone: TimeZone.current, locale: Locale.current)
|
SwiftDate.defaultRegion = Region(zone: TimeZone.current, locale: Locale.current)
|
||||||
|
|
||||||
IAPManager.shared.startObserving()
|
|
||||||
|
|
||||||
IQKeyboardManager.shared.isEnabled = true
|
IQKeyboardManager.shared.isEnabled = true
|
||||||
IQKeyboardManager.shared.enableAutoToolbar = false
|
IQKeyboardManager.shared.enableAutoToolbar = false
|
||||||
IQKeyboardManager.shared.resignOnTouchOutside = true
|
IQKeyboardManager.shared.resignOnTouchOutside = true
|
||||||
|
|
||||||
// 微信
|
|
||||||
WXApi.registerApp(AppSettings.kAppsWXApiAppId, universalLink: AppSettings.kAppsUniversalLink)
|
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)
|
#if !targetEnvironment(simulator)
|
||||||
AMapServices.shared().apiKey = AppSettings.kAppsAMapAppId
|
AMapServices.shared().apiKey = AppSettings.kAppsAMapAppId
|
||||||
#endif
|
|
||||||
|
|
||||||
// 个推
|
|
||||||
#if !targetEnvironment(simulator)
|
|
||||||
GeYanSdk.setPreLoginTimeout(10)
|
GeYanSdk.setPreLoginTimeout(10)
|
||||||
GeYanSdk.setEloginTimeout(10)
|
GeYanSdk.setEloginTimeout(10)
|
||||||
GeYanSdk.start(withAppId: AppSettings.kAppsGeTuiAppId) { isSuccess, error, gtcid in
|
GeYanSdk.start(withAppId: AppSettings.kAppsGeTuiAppId) { isSuccess, error, gtcid in
|
||||||
|
|
@ -65,19 +70,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// OpenIM
|
|
||||||
GroupIMService.shared.initSDK()
|
GroupIMService.shared.initSDK()
|
||||||
|
|
||||||
// 友盟
|
|
||||||
UMConfigure.initWithAppkey(AppSettings.kAppsUMengAppKey, channel: "App Store")
|
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 {
|
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
|
||||||
|
|
@ -91,25 +85,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return WXApi.handleOpen(url, delegate: self)
|
||||||
// 处理支付宝支付结果(不限制 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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func application(_ application: UIApplication,
|
func application(_ application: UIApplication,
|
||||||
|
|
@ -118,15 +94,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
print("📱 continue userActivity: \(userActivity.webpageURL?.absoluteString ?? "")")
|
print("📱 continue userActivity: \(userActivity.webpageURL?.absoluteString ?? "")")
|
||||||
return WXApi.handleOpenUniversalLink(userActivity, delegate: self)
|
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 {
|
extension AppDelegate {
|
||||||
|
|
@ -197,22 +164,5 @@ extension AppDelegate: WXApiDelegate {
|
||||||
handleWechatLoginCode(code)
|
handleWechatLoginCode(code)
|
||||||
return
|
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"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "area_badge@2x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"filename" : "area_badge@3x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "3x"
|
"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 isReLogin: DefaultsKey<Bool> { .init("isReLogin", defaultValue: false) }
|
||||||
/// 显示引导页
|
/// 显示引导页
|
||||||
var isShowGuide: DefaultsKey<Bool> { .init("isShowGuide", defaultValue: true) }
|
var isShowGuide: DefaultsKey<Bool> { .init("isShowGuide", defaultValue: true) }
|
||||||
|
/// 启动页已同意服务协议及隐私政策
|
||||||
|
var didAgreeLaunchPrivacy: DefaultsKey<Bool> { .init("didAgreeLaunchPrivacy", defaultValue: false) }
|
||||||
/// 气泡持续时间
|
/// 气泡持续时间
|
||||||
var bubbleKeepTimes: DefaultsKey<Date?> { .init("bubbleKeepTimes") }
|
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: []) }
|
var appRestrictApprovedUserIds: DefaultsKey<[String]> { .init("appRestrictApprovedUserIds", defaultValue: []) }
|
||||||
/// 等待执行服务端配对全删的账号
|
/// 等待执行服务端配对全删的账号
|
||||||
|
|
@ -67,16 +47,12 @@ extension Notification.Name {
|
||||||
static let GroupChatHistoryDidClearNotification = Notification.Name("GroupChatHistoryDidClearNotification")
|
static let GroupChatHistoryDidClearNotification = Notification.Name("GroupChatHistoryDidClearNotification")
|
||||||
/// 查看成员位置
|
/// 查看成员位置
|
||||||
static let ShowMemberLocationNotification = Notification.Name("ShowMemberLocationNotification")
|
static let ShowMemberLocationNotification = Notification.Name("ShowMemberLocationNotification")
|
||||||
/// 支付宝/微信支付结果回调
|
|
||||||
static let RequestOrderPayStatusNotification = Notification.Name("RequestOrderPayStatusNotification")
|
|
||||||
/// 暂停弹窗队列(第三方登录/注册跳转时)
|
/// 暂停弹窗队列(第三方登录/注册跳转时)
|
||||||
static let pausePopupQueue = Notification.Name("pausePopupQueue")
|
static let pausePopupQueue = Notification.Name("pausePopupQueue")
|
||||||
/// 恢复弹窗队列(第三方登录取消/失败时)
|
/// 恢复弹窗队列(第三方登录取消/失败时)
|
||||||
static let resumePopupQueue = Notification.Name("resumePopupQueue")
|
static let resumePopupQueue = Notification.Name("resumePopupQueue")
|
||||||
/// 终止弹窗队列(登录成功后)
|
/// 终止弹窗队列(登录成功后)
|
||||||
static let invalidatePopupQueue = Notification.Name("invalidatePopupQueue")
|
static let invalidatePopupQueue = Notification.Name("invalidatePopupQueue")
|
||||||
/// 本机解锁次数变化
|
|
||||||
static let unlockCountDidChange = Notification.Name("unlockCountDidChange")
|
|
||||||
/// 本机应用配对数据变化
|
/// 本机应用配对数据变化
|
||||||
static let appRestrictPairingDataDidChange = Notification.Name("appRestrictPairingDataDidChange")
|
static let appRestrictPairingDataDidChange = Notification.Name("appRestrictPairingDataDidChange")
|
||||||
/// MQTT 应用锁定状态变化
|
/// 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 Foundation
|
||||||
import SwiftyJSON
|
import SwiftyJSON
|
||||||
import CommonCrypto
|
import CommonCrypto
|
||||||
|
import CryptoKit
|
||||||
import URLNavigator
|
import URLNavigator
|
||||||
import SwiftDate
|
import SwiftDate
|
||||||
|
|
||||||
|
|
@ -53,29 +54,7 @@ public extension String {
|
||||||
|
|
||||||
// MARK: md5
|
// MARK: md5
|
||||||
public extension String {
|
public extension String {
|
||||||
var MD5String: String {
|
var MD5String: String { md5 }
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// MARK: Base64
|
// MARK: Base64
|
||||||
|
|
||||||
|
|
@ -93,13 +72,7 @@ public extension String {
|
||||||
|
|
||||||
|
|
||||||
public extension String {
|
public extension String {
|
||||||
var md5: String {
|
var md5: String { data.md5Hex }
|
||||||
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 sha1: String {
|
var sha1: String {
|
||||||
let data = self.data
|
let data = self.data
|
||||||
|
|
@ -216,6 +189,10 @@ public extension Data {
|
||||||
var string: String {
|
var string: String {
|
||||||
return String(data: self, encoding: String.Encoding.utf8) ?? ""
|
return String(data: self, encoding: String.Encoding.utf8) ?? ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var md5Hex: String {
|
||||||
|
Insecure.MD5.hash(data: self).map { String(format: "%02x", $0) }.joined()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Int
|
// MARK: - Int
|
||||||
|
|
|
||||||
|
|
@ -4,16 +4,6 @@
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
|
||||||
<key>CFBundleTypeRole</key>
|
|
||||||
<string>Editor</string>
|
|
||||||
<key>CFBundleURLName</key>
|
|
||||||
<string>alipay</string>
|
|
||||||
<key>CFBundleURLSchemes</key>
|
|
||||||
<array>
|
|
||||||
<string>Alipay2021005185689681</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleTypeRole</key>
|
<key>CFBundleTypeRole</key>
|
||||||
<string>Editor</string>
|
<string>Editor</string>
|
||||||
|
|
@ -24,10 +14,18 @@
|
||||||
<string>wx1e38bba788d55cde</string>
|
<string>wx1e38bba788d55cde</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Editor</string>
|
||||||
|
<key>CFBundleURLSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>quciklocation</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>LSApplicationQueriesSchemes</key>
|
<key>LSApplicationQueriesSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>alipays</string>
|
<string>quciklocation</string>
|
||||||
<string>baidumap</string>
|
<string>baidumap</string>
|
||||||
<string>qqmap</string>
|
<string>qqmap</string>
|
||||||
<string>iosamap</string>
|
<string>iosamap</string>
|
||||||
|
|
@ -41,14 +39,14 @@
|
||||||
<false/>
|
<false/>
|
||||||
<key>NSExceptionDomains</key>
|
<key>NSExceptionDomains</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>cdn.u8t.cn</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||||
|
<true/>
|
||||||
|
<key>NSIncludesSubdomains</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
<key>cdn2.batiao8.com</key>
|
<key>cdn2.batiao8.com</key>
|
||||||
<dict>
|
|
||||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
|
||||||
<true/>
|
|
||||||
<key>NSIncludesSubdomains</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
<key>38.207.176.65</key>
|
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
|
@ -69,13 +67,6 @@
|
||||||
<key>NSIncludesSubdomains</key>
|
<key>NSIncludesSubdomains</key>
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
<key>cdn.u8t.cn</key>
|
|
||||||
<dict>
|
|
||||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
|
||||||
<true/>
|
|
||||||
<key>NSIncludesSubdomains</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
<key>UIAppFonts</key>
|
<key>UIAppFonts</key>
|
||||||
|
|
|
||||||
|
|
@ -56,13 +56,13 @@ class BaseViewController: UIViewController {
|
||||||
print(className)
|
print(className)
|
||||||
MobClick.beginLogPageView(className)
|
MobClick.beginLogPageView(className)
|
||||||
|
|
||||||
// 返回根页面时恢复 tabBar 可见性(UINavigationControllerDelegate 在 pop 时可能漏触发)
|
if navigationController?.transitionCoordinator == nil {
|
||||||
(tabBarController as? MainTabBarController)?.updateTabBarVisibility()
|
(tabBarController as? MainTabBarController)?.updateTabBarVisibility()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewDidAppear(_ animated: Bool) {
|
override func viewDidAppear(_ animated: Bool) {
|
||||||
super.viewDidAppear(animated)
|
super.viewDidAppear(animated)
|
||||||
// popToRoot 动画完成后 navigation stack 才减到 1,此时再恢复 tabBar
|
|
||||||
(tabBarController as? MainTabBarController)?.updateTabBarVisibility()
|
(tabBarController as? MainTabBarController)?.updateTabBarVisibility()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -186,16 +186,16 @@ extension BaseViewController {
|
||||||
|
|
||||||
// MARK: - FLEX
|
// MARK: - FLEX
|
||||||
extension BaseViewController {
|
extension BaseViewController {
|
||||||
private func setupFlex() {
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
private func setupFlex() {
|
||||||
FLEXManager.shared.showExplorer()
|
FLEXManager.shared.showExplorer()
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) {
|
override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) {
|
||||||
print("摇晃结束")
|
print("摇晃结束")
|
||||||
setupFlex()
|
setupFlex()
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// MAKR: - UIView查看大图
|
// MAKR: - UIView查看大图
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,21 @@ extension MainTabBarController: QuickLocationTabBarDelegate {
|
||||||
// MARK: - UINavigationControllerDelegate
|
// MARK: - UINavigationControllerDelegate
|
||||||
extension MainTabBarController: UINavigationControllerDelegate {
|
extension MainTabBarController: UINavigationControllerDelegate {
|
||||||
func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
|
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 {
|
var sex: Int {
|
||||||
account?.sex ?? -1
|
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、气泡等
|
/// 状态:0、无状态 1、SOS 2、气泡等
|
||||||
var status: Int {
|
var status: Int {
|
||||||
account?.status ?? 0
|
account?.status ?? 0
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,6 @@ struct UserConfigModel: Mappable {
|
||||||
/// 用户 ID
|
/// 用户 ID
|
||||||
var uid: String?
|
var uid: String?
|
||||||
|
|
||||||
/// 会员 1:非会员 2:普通会员 3:终身会员
|
|
||||||
var vip: Int = 1
|
|
||||||
/// 会员类型
|
|
||||||
var vip_name: String = ""
|
|
||||||
/// 会员过期时间
|
|
||||||
var vip_expire_time: String = ""
|
|
||||||
/// 状态:0、无状态 1、SOS 2、气泡等
|
/// 状态:0、无状态 1、SOS 2、气泡等
|
||||||
var status: Int = 0
|
var status: Int = 0
|
||||||
/// 心情:0、无状态 1、开心 2、愤怒
|
/// 心情:0、无状态 1、开心 2、愤怒
|
||||||
|
|
@ -59,9 +53,6 @@ struct UserConfigModel: Mappable {
|
||||||
sex <- map["sex"]
|
sex <- map["sex"]
|
||||||
head_pic <- (map["head_pic"], kFlexString)
|
head_pic <- (map["head_pic"], kFlexString)
|
||||||
config <- map["config"]
|
config <- map["config"]
|
||||||
vip <- map["vip"]
|
|
||||||
vip_name <- map["vip_name"]
|
|
||||||
vip_expire_time <- map["vip_expire_time"]
|
|
||||||
status <- map["status"]
|
status <- map["status"]
|
||||||
mood <- map["mood"]
|
mood <- map["mood"]
|
||||||
}
|
}
|
||||||
|
|
@ -70,9 +61,9 @@ struct UserConfigModel: Mappable {
|
||||||
struct SystemConfigModel: Mappable {
|
struct SystemConfigModel: Mappable {
|
||||||
|
|
||||||
/// 弹窗配置
|
/// 弹窗配置
|
||||||
var popupConfig: PopupWindowConfigModel?
|
// var popupConfig: PopupWindowConfigModel?
|
||||||
/// 弹窗时间配置
|
/// 弹窗时间配置
|
||||||
var timeConfig: PopupWindowTimeModel?
|
// var timeConfig: PopupWindowTimeModel?
|
||||||
/// 微信分享配置
|
/// 微信分享配置
|
||||||
var shareConfig: WxShareConfigModel?
|
var shareConfig: WxShareConfigModel?
|
||||||
/// 飞鸽传书发送次数
|
/// 飞鸽传书发送次数
|
||||||
|
|
@ -89,17 +80,6 @@ struct SystemConfigModel: Mappable {
|
||||||
/// 圈子里的banner
|
/// 圈子里的banner
|
||||||
var groupBannerList: [String] = []
|
var groupBannerList: [String] = []
|
||||||
|
|
||||||
/// 引导页显示开关
|
|
||||||
var guideDisplay: Bool = true
|
|
||||||
|
|
||||||
/// 全局控制显示隐藏 弹窗和充值
|
|
||||||
var globalDisplay: Bool = true
|
|
||||||
|
|
||||||
/// 是否拦截
|
|
||||||
var isIntercept: Bool {
|
|
||||||
return globalDisplay == false || !WXApi.isWXAppInstalled() // 未安装微信
|
|
||||||
}
|
|
||||||
|
|
||||||
init?(map: Map) {
|
init?(map: Map) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -107,63 +87,14 @@ struct SystemConfigModel: Mappable {
|
||||||
mutating func mapping(map: Map) {
|
mutating func mapping(map: Map) {
|
||||||
chatWarning <- map["client.chatwarning", nested: false]
|
chatWarning <- map["client.chatwarning", nested: false]
|
||||||
groupBannerList <- map["client.team.ad", 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]
|
pigeonConfig <- map["client.time.setting.pigeon", nested: false]
|
||||||
shareConfig <- map["client.weixin.share", 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]
|
versionUpgradeModel <- map["client.version.upgrade", nested: false]
|
||||||
bannerList <- map["client.banner.explore", 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 {
|
struct PigeonTimeSettingModel: Mappable {
|
||||||
/// 时间窗口内最多发送次数
|
/// 时间窗口内最多发送次数
|
||||||
var nums: Int = 0
|
var nums: Int = 0
|
||||||
|
|
@ -237,7 +168,7 @@ struct VersionUpgradeModel: Mappable {
|
||||||
struct BannerConfigModel: Mappable {
|
struct BannerConfigModel: Mappable {
|
||||||
/// 图片地址
|
/// 图片地址
|
||||||
var img: String = ""
|
var img: String = ""
|
||||||
/// url:member跳充值页 url:网页地址
|
/// url:网页地址
|
||||||
var url: String = ""
|
var url: String = ""
|
||||||
/// app:原生应用内跳转 web:跳转网页
|
/// app:原生应用内跳转 web:跳转网页
|
||||||
var type: String = ""
|
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 {
|
struct PhoneUsageInfoModel: Mappable {
|
||||||
var brand: String = ""
|
var brand: String = ""
|
||||||
var model: String = ""
|
var model: String = ""
|
||||||
|
|
|
||||||
|
|
@ -114,8 +114,6 @@ extension ApiManager {
|
||||||
handleTokenExpired(msg: message)
|
handleTokenExpired(msg: message)
|
||||||
case GatewayStatusCode.failure.rawValue, GatewayStatusCode.noAuthority.rawValue: // 退出当前界面
|
case GatewayStatusCode.failure.rawValue, GatewayStatusCode.noAuthority.rawValue: // 退出当前界面
|
||||||
handlePopView(message, handle)
|
handlePopView(message, handle)
|
||||||
case GatewayStatusCode.needVip.rawValue:
|
|
||||||
handleNeedVip(message)
|
|
||||||
default:
|
default:
|
||||||
// 接口没返回code的时候取success字段
|
// 接口没返回code的时候取success字段
|
||||||
if success != nil {
|
if success != nil {
|
||||||
|
|
@ -136,7 +134,6 @@ extension ApiManager {
|
||||||
return .failure(handleError(with: code,
|
return .failure(handleError(with: code,
|
||||||
domain: "Data Error",
|
domain: "Data Error",
|
||||||
message: message,
|
message: message,
|
||||||
isShowTip: code != GatewayStatusCode.needVip.rawValue,
|
|
||||||
data: response))
|
data: response))
|
||||||
case let .failure(error):
|
case let .failure(error):
|
||||||
let message = error.gatewayMessage ?? "请检查网络连接"
|
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 {
|
extension ApiManager {
|
||||||
|
|
@ -268,17 +257,7 @@ extension ApiManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
class func getMd5_32Bit_String(_ srcString: String, isUppercase: Bool) -> String {
|
class func getMd5_32Bit_String(_ srcString: String, isUppercase: Bool) -> String {
|
||||||
let cStr = srcString.cString(using: .utf8)
|
let result = srcString.md5
|
||||||
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])
|
|
||||||
}
|
|
||||||
|
|
||||||
return isUppercase ? result.uppercased() : result
|
return isUppercase ? result.uppercased() : result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class AppSettings: NSObject {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
/// AppStore ID
|
/// AppStore ID
|
||||||
var appId: String { "" }
|
var appId: String { "6790610409" }
|
||||||
|
|
||||||
/// UUID
|
/// UUID
|
||||||
var uuid: String = ""
|
var uuid: String = ""
|
||||||
|
|
@ -42,8 +42,6 @@ class AppSettings: NSObject {
|
||||||
public static let kAppsAMapAppId = "4f6b29cfedc0e117316b88008fa41c07"
|
public static let kAppsAMapAppId = "4f6b29cfedc0e117316b88008fa41c07"
|
||||||
/// wechat
|
/// wechat
|
||||||
public static let kAppsWXApiAppId = "wx1e38bba788d55cde"
|
public static let kAppsWXApiAppId = "wx1e38bba788d55cde"
|
||||||
/// 支付宝
|
|
||||||
public static let kAppsAlipayAppId = ""
|
|
||||||
/// 个推
|
/// 个推
|
||||||
public static let kAppsGeTuiAppId = "cYHNI4KThh6SxZUsf9RiU2"
|
public static let kAppsGeTuiAppId = "cYHNI4KThh6SxZUsf9RiU2"
|
||||||
/// 友盟
|
/// 友盟
|
||||||
|
|
|
||||||
|
|
@ -75,8 +75,6 @@ enum Route: String {
|
||||||
case itineraryTrace = "itineraryTrace"
|
case itineraryTrace = "itineraryTrace"
|
||||||
/// 今日轨迹详情
|
/// 今日轨迹详情
|
||||||
case todayTrackDetail = "todayTrackDetail"
|
case todayTrackDetail = "todayTrackDetail"
|
||||||
/// 手机报告详情
|
|
||||||
case phoneReportDetail = "phoneReportDetail"
|
|
||||||
/// APP 使用报告
|
/// APP 使用报告
|
||||||
case appUsageReport = "appUsageReport"
|
case appUsageReport = "appUsageReport"
|
||||||
/// 关于我们
|
/// 关于我们
|
||||||
|
|
@ -378,11 +376,6 @@ extension AppRouter: AppRouterProtocol {
|
||||||
TodayTrackDetailVC(userInfo: parameters)
|
TodayTrackDetailVC(userInfo: parameters)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - 手机报告详情
|
|
||||||
AppRouter.register(Route.phoneReportDetail) { url, parameters in
|
|
||||||
PhoneReportDetailVC(userInfo: parameters)
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - APP 使用报告
|
// MARK: - APP 使用报告
|
||||||
AppRouter.register(Route.appUsageReport) { _, parameters in
|
AppRouter.register(Route.appUsageReport) { _, parameters in
|
||||||
AppUsageReportVC(userInfo: parameters)
|
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 bubbleQuit = "bubblequit" // 退出气泡
|
||||||
case needTrack = "needtrack" // 追踪上报
|
case needTrack = "needtrack" // 追踪上报
|
||||||
case emote = "emote" // 接收表情
|
case emote = "emote" // 接收表情
|
||||||
case phone = "phone" // 手机信息上报
|
|
||||||
case phoneUsage = "phoneUsage" // 当前 App 使用次数上报
|
|
||||||
case lockApp = "lockApp" // 远程锁 App
|
case lockApp = "lockApp" // 远程锁 App
|
||||||
case appUnlock = "appUnlock" // 远程解锁 App
|
case appUnlock = "appUnlock" // 远程解锁 App
|
||||||
case lockAppsChanged = "lockAppsChanged" // 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
|
// MARK: - MQTTService
|
||||||
|
|
||||||
/// MQTT 5.0 服务,管理连接、订阅和消息收发
|
/// 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() {
|
override private init() {
|
||||||
super.init()
|
super.init()
|
||||||
UIDevice.current.isBatteryMonitoringEnabled = true
|
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: - 连接
|
// MARK: - 连接
|
||||||
|
|
@ -883,13 +781,11 @@ final class MQTTService: NSObject {
|
||||||
func disconnect() {
|
func disconnect() {
|
||||||
mqtt?.disconnect()
|
mqtt?.disconnect()
|
||||||
isConnected = false
|
isConnected = false
|
||||||
invalidatePhoneReportTimer()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - 切换用户
|
// MARK: - 切换用户
|
||||||
/// 更新 clientID 并重连(切换用户后调用)
|
/// 更新 clientID 并重连(切换用户后调用)
|
||||||
func updateClientID(_ newID: String) {
|
func updateClientID(_ newID: String) {
|
||||||
resetPhoneReportState()
|
|
||||||
clientID = newID
|
clientID = newID
|
||||||
disconnect()
|
disconnect()
|
||||||
connect()
|
connect()
|
||||||
|
|
@ -1064,206 +960,6 @@ final class MQTTService: NSObject {
|
||||||
publish(topic: "\(topic)\(AppContextManager.shared.userId)", message: payload.toJsonString())
|
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) {
|
private func performOnMain(_ work: @escaping () -> Void) {
|
||||||
if Thread.isMainThread {
|
if Thread.isMainThread {
|
||||||
work()
|
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
|
// MARK: - CocoaMQTT5Delegate
|
||||||
|
|
@ -1309,8 +987,6 @@ extension MQTTService: CocoaMQTT5Delegate {
|
||||||
}
|
}
|
||||||
onConnected?()
|
onConnected?()
|
||||||
flushPendingLockAppsChangedEvents()
|
flushPendingLockAppsChangedEvents()
|
||||||
reportPhoneUsageIfNeeded()
|
|
||||||
reportPhoneIfNeeded()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func mqtt5(_ mqtt5: CocoaMQTT5, didPublishMessage message: CocoaMQTT5Message, id: UInt16) {
|
func mqtt5(_ mqtt5: CocoaMQTT5, didPublishMessage message: CocoaMQTT5Message, id: UInt16) {
|
||||||
|
|
@ -1359,7 +1035,6 @@ extension MQTTService: CocoaMQTT5Delegate {
|
||||||
|
|
||||||
func mqtt5DidDisconnect(_ mqtt5: CocoaMQTT5, withError err: Error?) {
|
func mqtt5DidDisconnect(_ mqtt5: CocoaMQTT5, withError err: Error?) {
|
||||||
isConnected = false
|
isConnected = false
|
||||||
invalidatePhoneReportTimer()
|
|
||||||
print("MQTT5 disconnected: \(err?.localizedDescription ?? "")")
|
print("MQTT5 disconnected: \(err?.localizedDescription ?? "")")
|
||||||
onDisconnected?()
|
onDisconnected?()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,10 +80,6 @@ final class MemberWeatherService {
|
||||||
let snapshot = Self.snapshot(from: weather)
|
let snapshot = Self.snapshot(from: weather)
|
||||||
self?.finish(key: key, result: .success(snapshot))
|
self?.finish(key: key, result: .success(snapshot))
|
||||||
} catch {
|
} 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))
|
self?.finish(key: key, result: .failure(error))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,7 @@ import SwiftyUserDefaults
|
||||||
import RxSwift
|
import RxSwift
|
||||||
|
|
||||||
extension DefaultsKeys {
|
extension DefaultsKeys {
|
||||||
// 接口环境 0:测试环境 1:正式环境
|
|
||||||
var apiEnvKey: DefaultsKey<Int> { .init("ApiEnvKey", defaultValue: -99) }
|
|
||||||
// 接口地址
|
|
||||||
var apiServerURL: DefaultsKey<String> { .init("ApiServerURL", defaultValue: "") }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@objcMembers class URLManager: NSObject {
|
@objcMembers class URLManager: NSObject {
|
||||||
|
|
@ -32,8 +29,6 @@ extension DefaultsKeys {
|
||||||
var openIM_API = ""
|
var openIM_API = ""
|
||||||
var openIM_WS = ""
|
var openIM_WS = ""
|
||||||
|
|
||||||
///
|
|
||||||
var homeUrl: String { "https://u.batiao8.com/ushare/10057" }
|
|
||||||
/// 用户协议
|
/// 用户协议
|
||||||
var userAgreementUrl: String { "https://smartdrive.zuom8.cn/jisu/Agreement.html" }
|
var userAgreementUrl: String { "https://smartdrive.zuom8.cn/jisu/Agreement.html" }
|
||||||
/// 隐私政策
|
/// 隐私政策
|
||||||
|
|
@ -49,64 +44,27 @@ extension DefaultsKeys {
|
||||||
}
|
}
|
||||||
|
|
||||||
func setupNetworkMode() {
|
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)
|
setupApiEnv(1)
|
||||||
openIM_API = "https://imapi.zuom8.cn"
|
openIM_API = "https://imapi.zuom8.cn"
|
||||||
openIM_WS = "ws://imws.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) {
|
private func setupApiEnv(_ env: Int) {
|
||||||
// env
|
apiServerURL = apiServerURL(apiEnv)
|
||||||
if Defaults[\.apiEnvKey] != -99 {
|
|
||||||
apiEnv = Defaults[\.apiEnvKey]
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
apiEnv = env
|
|
||||||
}
|
|
||||||
// api
|
|
||||||
if Defaults[\.apiServerURL].isEmpty {
|
|
||||||
apiServerURL = apiServerURL(apiEnv)
|
|
||||||
} else {
|
|
||||||
apiServerURL = Defaults[\.apiServerURL]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - 接口地址
|
// MARK: - 接口地址
|
||||||
func apiServerURL(_ env: Int) -> String {
|
func apiServerURL(_ env: Int) -> String {
|
||||||
switch env {
|
switch env {
|
||||||
case 1: // 正式
|
case 1: // 正式
|
||||||
return "https://jsapi.zuom8.cn/"
|
return "https://speed.batiao8.com/"
|
||||||
case -1: // UAT
|
case -1: // UAT
|
||||||
return "https://jsapi.zuom8.cn/"
|
return "https://speed.batiao8.com/"
|
||||||
default: // SIT
|
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 {
|
static func normalizedServerURL(_ raw: String) -> String {
|
||||||
var url = raw.trimmingCharacters(in: .whitespacesAndNewlines)
|
var url = raw.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
guard !url.isEmpty else { return "" }
|
guard !url.isEmpty else { return "" }
|
||||||
|
|
@ -118,21 +76,9 @@ extension DefaultsKeys {
|
||||||
}
|
}
|
||||||
return url
|
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: - 大对象服务器地址
|
// MARK: - 大对象服务器地址
|
||||||
func uploadServerURL() -> String {
|
func uploadServerURL() -> String {
|
||||||
//#if DEBUG
|
|
||||||
// return ""
|
|
||||||
//#else
|
|
||||||
return ""
|
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 message: String?
|
||||||
var model: GroupInfoModel?
|
var model: GroupInfoModel?
|
||||||
var list: [GroupMemberModel] = []
|
var list: [GroupMemberModel] = []
|
||||||
var vip = GroupMemberVip()
|
|
||||||
var reviewCount: Int = 0
|
var reviewCount: Int = 0
|
||||||
|
|
||||||
init?(map: Map) {}
|
init?(map: Map) {}
|
||||||
|
|
@ -102,7 +101,6 @@ struct GroupUsersResponse: BaseModelProtocol {
|
||||||
message <- map["message"]
|
message <- map["message"]
|
||||||
model <- map["data.group"]
|
model <- map["data.group"]
|
||||||
list <- map["data.mates"]
|
list <- map["data.mates"]
|
||||||
vip <- map["data.vip"]
|
|
||||||
reviewCount <- (map["data.reviewCount"], kStrTransformInt)
|
reviewCount <- (map["data.reviewCount"], kStrTransformInt)
|
||||||
if reviewCount == 0 {
|
if reviewCount == 0 {
|
||||||
reviewCount <- (map["data.review_count"], kStrTransformInt)
|
reviewCount <- (map["data.review_count"], kStrTransformInt)
|
||||||
|
|
@ -231,7 +229,7 @@ struct GroupInfoModel: Mappable, Equatable {
|
||||||
var people_no: Int = 0
|
var people_no: Int = 0
|
||||||
/// 描述
|
/// 描述
|
||||||
var description: String = ""
|
var description: String = ""
|
||||||
/// 会员等级
|
/// 等级
|
||||||
var level: String = ""
|
var level: String = ""
|
||||||
/// 邀请码
|
/// 邀请码
|
||||||
var share_code: 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
|
private let kFlexibleBool = TransformOf<Bool, Any>(fromJSON: { value in
|
||||||
switch value {
|
switch value {
|
||||||
case let value as Bool:
|
case let value as Bool:
|
||||||
|
|
@ -327,31 +304,6 @@ private let kFlexibleBool = TransformOf<Bool, Any>(fromJSON: { value in
|
||||||
value
|
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 {
|
extension UIImageView {
|
||||||
@MainActor
|
@MainActor
|
||||||
func setGroupIcon(_ model: GroupInfoModel) {
|
func setGroupIcon(_ model: GroupInfoModel) {
|
||||||
|
|
@ -470,11 +422,6 @@ struct GroupMemberModel: Mappable, Equatable {
|
||||||
remark.isEmpty ? nick_name : remark
|
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、气泡等
|
/// 状态:0、无状态 1、SOS 2、气泡等
|
||||||
var status: Int = 0
|
var status: Int = 0
|
||||||
/// 入圈天数(若服务端下发)
|
/// 入圈天数(若服务端下发)
|
||||||
|
|
@ -530,7 +477,6 @@ struct GroupMemberModel: Mappable, Equatable {
|
||||||
if avater.isEmpty {
|
if avater.isEmpty {
|
||||||
avater <- (map["avatar"], kFlexString)
|
avater <- (map["avatar"], kFlexString)
|
||||||
}
|
}
|
||||||
level <- (map["level"], kStrTransformInt)
|
|
||||||
nick_name <- map["nick_name"]
|
nick_name <- map["nick_name"]
|
||||||
remark <- map["remark"]
|
remark <- map["remark"]
|
||||||
battery <- map["battery"]
|
battery <- map["battery"]
|
||||||
|
|
|
||||||
|
|
@ -255,20 +255,43 @@ enum HeadPic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private enum HeadPicAssociatedKeys {
|
||||||
|
static var lastValue: UInt8 = 0
|
||||||
|
}
|
||||||
|
|
||||||
extension UIImageView {
|
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?) {
|
func setHeadPic(_ value: String?) {
|
||||||
let trimmed = (value ?? "").trimmingCharacters(in: .whitespacesAndNewlines)
|
let trimmed = (value ?? "").trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
guard !trimmed.isEmpty else {
|
guard !trimmed.isEmpty else {
|
||||||
|
lastHeadPicValue = ""
|
||||||
kf.cancelDownloadTask()
|
kf.cancelDownloadTask()
|
||||||
image = HeadPic.placeholder
|
image = HeadPic.placeholder
|
||||||
return
|
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) {
|
if let url = HeadPic.remoteURL(for: trimmed) {
|
||||||
kf.cancelDownloadTask()
|
if !hasCachedImage {
|
||||||
kf.setImage(with: url, placeholder: nil, options: kNetworkImageFailureOptions)
|
kf.cancelDownloadTask()
|
||||||
|
image = nil
|
||||||
|
}
|
||||||
|
kf.setImage(
|
||||||
|
with: url,
|
||||||
|
placeholder: hasCachedImage ? cached : nil,
|
||||||
|
options: kNetworkImageFailureOptions
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
kf.cancelDownloadTask()
|
kf.cancelDownloadTask()
|
||||||
image = HeadPic.localImage(trimmed)
|
image = cached
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,140 @@
|
||||||
<key>NSPrivacyTrackingDomains</key>
|
<key>NSPrivacyTrackingDomains</key>
|
||||||
<array/>
|
<array/>
|
||||||
<key>NSPrivacyCollectedDataTypes</key>
|
<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>
|
<key>NSPrivacyAccessedAPITypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,4 @@
|
||||||
// 微信
|
// 微信
|
||||||
#import <WechatOpenSDK/WXApi.h>
|
#import <WechatOpenSDK/WXApi.h>
|
||||||
|
|
||||||
// 支付宝
|
|
||||||
#import <AlipaySDK/AlipaySDK.h>
|
|
||||||
|
|
||||||
#endif /* QuickLocation_Bridging_Header_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)
|
super.viewDidAppear(animated)
|
||||||
|
|
||||||
rootView.reloadFeatureItems()
|
rootView.reloadFeatureItems()
|
||||||
guard AppContextManager.shared.systemConfig?.isIntercept == false,
|
guard let config = AppContextManager.shared.systemConfig else { return }
|
||||||
let config = AppContextManager.shared.systemConfig else { return }
|
|
||||||
bannerList = config.bannerList
|
bannerList = config.bannerList
|
||||||
rootView.cycleScrollView.isHidden = config.bannerList.filter { $0.enable == true }.count == 0
|
rootView.cycleScrollView.isHidden = config.bannerList.filter { $0.enable == true }.count == 0
|
||||||
rootView.cycleScrollView.imageURLStringsGroup = config.bannerList.filter { $0.enable == true }.map { $0.img }
|
rootView.cycleScrollView.imageURLStringsGroup = config.bannerList.filter { $0.enable == true }.map { $0.img }
|
||||||
|
|
@ -58,7 +57,6 @@ final class FeatureIntroVC: BaseViewController {
|
||||||
case .pigeonMessage:
|
case .pigeonMessage:
|
||||||
AppRouter.push(Route.pigeonMessage)
|
AppRouter.push(Route.pigeonMessage)
|
||||||
case .searchLocation:
|
case .searchLocation:
|
||||||
guard AppContextManager.shared.systemConfig?.isIntercept != true else { return }
|
|
||||||
AppRouter.push(Route.searchLocation)
|
AppRouter.push(Route.searchLocation)
|
||||||
case .sos:
|
case .sos:
|
||||||
AppRouter.push(Route.sos)
|
AppRouter.push(Route.sos)
|
||||||
|
|
@ -79,10 +77,6 @@ extension FeatureIntroVC: SDCycleScrollViewDelegate {
|
||||||
let model = bannerList[index]
|
let model = bannerList[index]
|
||||||
|
|
||||||
switch model.type {
|
switch model.type {
|
||||||
case "app":
|
|
||||||
if model.url == "member" {
|
|
||||||
AppRouter.push(Route.web, userInfo: ["url": URLManager.shared.homeUrl])
|
|
||||||
}
|
|
||||||
case "web":
|
case "web":
|
||||||
AppRouter.push(Route.web, userInfo: ["url": model.url])
|
AppRouter.push(Route.web, userInfo: ["url": model.url])
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -154,8 +154,7 @@ final class FeatureIntroView: UIView {
|
||||||
}
|
}
|
||||||
|
|
||||||
func reloadFeatureItems() {
|
func reloadFeatureItems() {
|
||||||
let hideSearch = AppContextManager.shared.systemConfig?.isIntercept == true
|
displayedItems = Self.allItems
|
||||||
displayedItems = Self.allItems.filter { !hideSearch || $0.action != .searchLocation }
|
|
||||||
rebuildGrid()
|
rebuildGrid()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -128,15 +128,7 @@ class CreateGroupViewModel {
|
||||||
"labels": selectedTagList]).subscribe(onNext: { [weak self] _ in
|
"labels": selectedTagList]).subscribe(onNext: { [weak self] _ in
|
||||||
self?.createSucceeded.accept(())
|
self?.createSucceeded.accept(())
|
||||||
}, onError: { (error) in
|
}, onError: { (error) in
|
||||||
guard let code = error.underlyingError?.code else { return }
|
DLToast.show(error)
|
||||||
|
|
||||||
guard let systemConfig = AppContextManager.shared.systemConfig, systemConfig.isIntercept == false else { return }
|
|
||||||
if code == 20009 { // "您创建的圈子个数已达上限,请升级会员等级"
|
|
||||||
CreateGroupVipPopView.show()
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
DLToast.show(error)
|
|
||||||
}
|
|
||||||
}).disposed(by: disposeBag)
|
}).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() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
viewModel.isChatActive = true
|
||||||
fd_interactivePopDisabled = true
|
fd_interactivePopDisabled = true
|
||||||
bindViewModel()
|
bindViewModel()
|
||||||
reactiveAction()
|
reactiveAction()
|
||||||
|
|
@ -93,15 +94,16 @@ final class GroupChatVC: BaseViewController {
|
||||||
|
|
||||||
override func viewWillAppear(_ animated: Bool) {
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
super.viewWillAppear(animated)
|
super.viewWillAppear(animated)
|
||||||
|
viewModel.isChatActive = true
|
||||||
setupKeyboard()
|
setupKeyboard()
|
||||||
IQKeyboardManager.shared.isEnabled = false
|
IQKeyboardManager.shared.isEnabled = false
|
||||||
IQKeyboardManager.shared.resignOnTouchOutside = false
|
IQKeyboardManager.shared.resignOnTouchOutside = false
|
||||||
rootView.updateVipMediaAccess(isUnlocked: isVipUnlocked)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewWillDisappear(_ animated: Bool) {
|
override func viewWillDisappear(_ animated: Bool) {
|
||||||
super.viewWillDisappear(animated)
|
super.viewWillDisappear(animated)
|
||||||
viewModel.markAsRead()
|
viewModel.markAsRead()
|
||||||
|
viewModel.isChatActive = false
|
||||||
VoicePlayerManager.shared.stop()
|
VoicePlayerManager.shared.stop()
|
||||||
if isVoiceRecording {
|
if isVoiceRecording {
|
||||||
finishVoiceRecording(action: .discard)
|
finishVoiceRecording(action: .discard)
|
||||||
|
|
@ -115,6 +117,9 @@ final class GroupChatVC: BaseViewController {
|
||||||
override func viewDidDisappear(_ animated: Bool) {
|
override func viewDidDisappear(_ animated: Bool) {
|
||||||
super.viewDidDisappear(animated)
|
super.viewDidDisappear(animated)
|
||||||
NotificationCenter.default.removeObserver(self)
|
NotificationCenter.default.removeObserver(self)
|
||||||
|
if isMovingFromParent || isBeingDismissed {
|
||||||
|
removeMessageListener()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Keyboard
|
// MARK: - Keyboard
|
||||||
|
|
@ -292,7 +297,6 @@ final class GroupChatVC: BaseViewController {
|
||||||
rootView.bringSubviewToFront(rootView.mentionPickerView)
|
rootView.bringSubviewToFront(rootView.mentionPickerView)
|
||||||
rootView.bringSubviewToFront(rootView.quoteBar)
|
rootView.bringSubviewToFront(rootView.quoteBar)
|
||||||
rootView.bringSubviewToFront(rootView.bottomBar)
|
rootView.bringSubviewToFront(rootView.bottomBar)
|
||||||
rootView.bringSubviewToFront(rootView.disableIMView)
|
|
||||||
rootView.bringSubviewToFront(rootView.voiceRecordView)
|
rootView.bringSubviewToFront(rootView.voiceRecordView)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -430,6 +434,12 @@ final class GroupChatVC: BaseViewController {
|
||||||
OIMManager.callbacker.addAdvancedMsgListener(listener: msgListener!)
|
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 @)
|
// MARK: - Long press (quote / revoke / avatar @)
|
||||||
private func setupChatLongPress() {
|
private func setupChatLongPress() {
|
||||||
let longPress = UILongPressGestureRecognizer(target: self, action: #selector(handleChatLongPress(_:)))
|
let longPress = UILongPressGestureRecognizer(target: self, action: #selector(handleChatLongPress(_:)))
|
||||||
|
|
@ -580,18 +590,6 @@ final class GroupChatVC: BaseViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Actions
|
// 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() {
|
private func reactiveAction() {
|
||||||
rootView.backBtn.rx.tap
|
rootView.backBtn.rx.tap
|
||||||
.subscribe(onNext: { _ in
|
.subscribe(onNext: { _ in
|
||||||
|
|
@ -641,7 +639,7 @@ final class GroupChatVC: BaseViewController {
|
||||||
|
|
||||||
rootView.galleryBtn.rx.tap
|
rootView.galleryBtn.rx.tap
|
||||||
.subscribe(onNext: { [weak self] in
|
.subscribe(onNext: { [weak self] in
|
||||||
guard let self, self.requireVipForMedia() else { return }
|
guard let self else { return }
|
||||||
self.rootView.dismissAllPanels()
|
self.rootView.dismissAllPanels()
|
||||||
self.showAlbum()
|
self.showAlbum()
|
||||||
})
|
})
|
||||||
|
|
@ -649,7 +647,7 @@ final class GroupChatVC: BaseViewController {
|
||||||
|
|
||||||
rootView.cameraBtn.rx.tap
|
rootView.cameraBtn.rx.tap
|
||||||
.subscribe(onNext: { [weak self] in
|
.subscribe(onNext: { [weak self] in
|
||||||
guard let self, self.requireVipForMedia() else { return }
|
guard let self else { return }
|
||||||
self.rootView.dismissAllPanels()
|
self.rootView.dismissAllPanels()
|
||||||
self.showCamera()
|
self.showCamera()
|
||||||
})
|
})
|
||||||
|
|
@ -714,10 +712,9 @@ final class GroupChatVC: BaseViewController {
|
||||||
|
|
||||||
// MARK: - 显示相册
|
// MARK: - 显示相册
|
||||||
private func showAlbum() {
|
private func showAlbum() {
|
||||||
guard requireVipForMedia() else { return }
|
|
||||||
let picker = PhotoPickerVC(maxCount: 9)
|
let picker = PhotoPickerVC(maxCount: 9)
|
||||||
picker.onConfirm = { [weak self] images in
|
picker.onConfirm = { [weak self] images in
|
||||||
guard let self, self.requireVipForMedia() else { return }
|
guard let self else { return }
|
||||||
for image in images {
|
for image in images {
|
||||||
self.sendImageMessage(image)
|
self.sendImageMessage(image)
|
||||||
}
|
}
|
||||||
|
|
@ -726,7 +723,6 @@ final class GroupChatVC: BaseViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func showCamera() {
|
private func showCamera() {
|
||||||
guard requireVipForMedia() else { return }
|
|
||||||
guard UIImagePickerController.isSourceTypeAvailable(.camera) else {
|
guard UIImagePickerController.isSourceTypeAvailable(.camera) else {
|
||||||
DLToast.showError(text: "当前设备不支持拍照")
|
DLToast.showError(text: "当前设备不支持拍照")
|
||||||
return
|
return
|
||||||
|
|
@ -769,11 +765,6 @@ final class GroupChatVC: BaseViewController {
|
||||||
private var currentVoiceHover: VoiceRecordView.HoverTarget = .none
|
private var currentVoiceHover: VoiceRecordView.HoverTarget = .none
|
||||||
|
|
||||||
private func enterVoiceInputMode() {
|
private func enterVoiceInputMode() {
|
||||||
guard isVipUnlocked else {
|
|
||||||
rootView.dismissAllPanels()
|
|
||||||
rootView.setVoiceInputMode(true)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
let status = AVCaptureDevice.authorizationStatus(for: .audio)
|
let status = AVCaptureDevice.authorizationStatus(for: .audio)
|
||||||
switch status {
|
switch status {
|
||||||
case .authorized:
|
case .authorized:
|
||||||
|
|
@ -857,7 +848,6 @@ final class GroupChatVC: BaseViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func startVoiceRecording() {
|
private func startVoiceRecording() {
|
||||||
guard requireVipForMedia() else { return }
|
|
||||||
guard !isVoiceRecording else { return }
|
guard !isVoiceRecording else { return }
|
||||||
AudioServicesPlaySystemSound(1519)
|
AudioServicesPlaySystemSound(1519)
|
||||||
currentVoiceHover = .none
|
currentVoiceHover = .none
|
||||||
|
|
@ -972,11 +962,6 @@ final class GroupChatVC: BaseViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func sendVoiceMessage(url: URL, durationMs: Int) {
|
private func sendVoiceMessage(url: URL, durationMs: Int) {
|
||||||
guard requireVipForMedia() else {
|
|
||||||
deleteRecordFile()
|
|
||||||
rootView.voiceRecordView.reset()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
GroupIMService.shared.sendGroupMessage(groupId: viewModel.groupId,
|
GroupIMService.shared.sendGroupMessage(groupId: viewModel.groupId,
|
||||||
makeMessage: {
|
makeMessage: {
|
||||||
OIMMessageInfo.createSoundMessage(fromFullPath: url.path, duration: durationMs)
|
OIMMessageInfo.createSoundMessage(fromFullPath: url.path, duration: durationMs)
|
||||||
|
|
@ -1235,7 +1220,6 @@ private class MessageListenerProxy: NSObject, OIMAdvancedMsgListener {
|
||||||
|
|
||||||
extension GroupChatVC {
|
extension GroupChatVC {
|
||||||
private func sendImageMessage(_ image: UIImage) {
|
private func sendImageMessage(_ image: UIImage) {
|
||||||
guard requireVipForMedia() else { return }
|
|
||||||
let sendImage = image.cgImage != nil ? image.fixOrientation() : image
|
let sendImage = image.cgImage != nil ? image.fixOrientation() : image
|
||||||
guard let data = sendImage.jpegData(compressionQuality: 0.8) else { return }
|
guard let data = sendImage.jpegData(compressionQuality: 0.8) else { return }
|
||||||
let dir = NSTemporaryDirectory()
|
let dir = NSTemporaryDirectory()
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,6 @@ class GroupChatView: UIView {
|
||||||
|
|
||||||
/// 收起所有浮层面板
|
/// 收起所有浮层面板
|
||||||
private var isVoiceInputMode = false
|
private var isVoiceInputMode = false
|
||||||
private var isVipMediaUnlocked = true
|
|
||||||
|
|
||||||
func setVoiceInputMode(_ enabled: Bool) {
|
func setVoiceInputMode(_ enabled: Bool) {
|
||||||
isVoiceInputMode = enabled
|
isVoiceInputMode = enabled
|
||||||
|
|
@ -228,18 +227,6 @@ class GroupChatView: UIView {
|
||||||
refreshComposer()
|
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() {
|
func refreshComposer() {
|
||||||
let hasText = !(textField.text ?? "").trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
|
let hasText = !(textField.text ?? "").trimmingCharacters(in: .whitespacesAndNewlines).isEmpty
|
||||||
textField.updatePlaceholderVisibility()
|
textField.updatePlaceholderVisibility()
|
||||||
|
|
@ -292,9 +279,7 @@ class GroupChatView: UIView {
|
||||||
private func updateHoldSpeakAppearance() {
|
private func updateHoldSpeakAppearance() {
|
||||||
var configuration = UIButton.Configuration.plain()
|
var configuration = UIButton.Configuration.plain()
|
||||||
configuration.title = "按住 说话"
|
configuration.title = "按住 说话"
|
||||||
configuration.image = isVipMediaUnlocked ? nil : UIImage(named: "VipFeature/crown")
|
|
||||||
configuration.imagePlacement = .leading
|
configuration.imagePlacement = .leading
|
||||||
configuration.imagePadding = isVipMediaUnlocked ? 0 : 10
|
|
||||||
configuration.contentInsets = .zero
|
configuration.contentInsets = .zero
|
||||||
configuration.baseForegroundColor = UIColor(hexStr: "#293445")
|
configuration.baseForegroundColor = UIColor(hexStr: "#293445")
|
||||||
configuration.titleTextAttributesTransformer = UIConfigurationTextAttributesTransformer { attributes in
|
configuration.titleTextAttributesTransformer = UIConfigurationTextAttributesTransformer { attributes in
|
||||||
|
|
@ -389,7 +374,6 @@ class GroupChatView: UIView {
|
||||||
addSubview(mentionPickerView)
|
addSubview(mentionPickerView)
|
||||||
addSubview(quickActionBar)
|
addSubview(quickActionBar)
|
||||||
addSubview(bottomBar)
|
addSubview(bottomBar)
|
||||||
addSubview(disableIMView)
|
|
||||||
bottomBar.addSubview(bottomBarCornerView)
|
bottomBar.addSubview(bottomBarCornerView)
|
||||||
addSubview(voiceRecordView)
|
addSubview(voiceRecordView)
|
||||||
addSubview(emojiPanelView)
|
addSubview(emojiPanelView)
|
||||||
|
|
@ -522,11 +506,6 @@ class GroupChatView: UIView {
|
||||||
bottomBarHeightConstraint = bottomBar.heightAnchor.constraint(equalToConstant: minimumBottomBarHeight)
|
bottomBarHeightConstraint = bottomBar.heightAnchor.constraint(equalToConstant: minimumBottomBarHeight)
|
||||||
bottomBarHeightConstraint?.isActive = true
|
bottomBarHeightConstraint?.isActive = true
|
||||||
|
|
||||||
disableIMView.layoutChain
|
|
||||||
.edgesHorzontal(15)
|
|
||||||
.height(50)
|
|
||||||
.bottom(kSafeBottomMargin)
|
|
||||||
|
|
||||||
bottomBarBottomConstraint = bottomBar.jh_constraint(.bottom, toAttribute: .bottom, otherView: bottomBar.superview, relation: .equal)
|
bottomBarBottomConstraint = bottomBar.jh_constraint(.bottom, toAttribute: .bottom, otherView: bottomBar.superview, relation: .equal)
|
||||||
|
|
||||||
bottomBarCornerView.layoutChain.edges()
|
bottomBarCornerView.layoutChain.edges()
|
||||||
|
|
@ -883,32 +862,6 @@ class GroupChatView: UIView {
|
||||||
return btn
|
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 = {
|
lazy var voiceRecordView: VoiceRecordView = {
|
||||||
let v = VoiceRecordView()
|
let v = VoiceRecordView()
|
||||||
|
|
|
||||||
|
|
@ -710,8 +710,11 @@ final class GroupChatViewModel {
|
||||||
messagesSubject.accept([])
|
messagesSubject.accept([])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 仅当前聊天页在前台时为 true,避免退出后仍把新消息标成已读。
|
||||||
|
var isChatActive = false
|
||||||
|
|
||||||
func markAsRead() {
|
func markAsRead() {
|
||||||
guard !conversationID.isEmpty else { return }
|
guard isChatActive, !conversationID.isEmpty else { return }
|
||||||
OIMManager.manager.markConversationMessage(asRead: conversationID,
|
OIMManager.manager.markConversationMessage(asRead: conversationID,
|
||||||
onSuccess: nil,
|
onSuccess: nil,
|
||||||
onFailure: nil)
|
onFailure: nil)
|
||||||
|
|
@ -735,7 +738,7 @@ final class GroupChatViewModel {
|
||||||
// MARK: - Receive
|
// MARK: - Receive
|
||||||
func onReceiveMessage(_ msg: OIMMessageInfo) {
|
func onReceiveMessage(_ msg: OIMMessageInfo) {
|
||||||
cacheMessage(msg)
|
cacheMessage(msg)
|
||||||
if msg.sendID != AppContextManager.shared.userId {
|
if isChatActive, msg.sendID != AppContextManager.shared.userId {
|
||||||
markAsRead()
|
markAsRead()
|
||||||
}
|
}
|
||||||
guard let item = toSectionItem(msg) else { return }
|
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 minutes = max(1, (end.expected_timestamp - start.expected_timestamp) / 60_000)
|
||||||
let hours = minutes / 60
|
let hours = minutes / 60
|
||||||
let remainder = 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 UIKit
|
||||||
|
import Kingfisher
|
||||||
|
|
||||||
final class GroupMemberListView: UIView {
|
final class GroupMemberListView: UIView {
|
||||||
|
|
||||||
|
|
@ -257,6 +258,7 @@ final class GroupMemberListCell: UICollectionViewCell {
|
||||||
super.prepareForReuse()
|
super.prepareForReuse()
|
||||||
updateSOSBlink(false)
|
updateSOSBlink(false)
|
||||||
bubbleImageView.isHidden = true
|
bubbleImageView.isHidden = true
|
||||||
|
avatarImageView.kf.cancelDownloadTask()
|
||||||
}
|
}
|
||||||
|
|
||||||
func configure(model: GroupMemberModel, isCurrentUser: Bool, isSelected: Bool) {
|
func configure(model: GroupMemberModel, isCurrentUser: Bool, isSelected: Bool) {
|
||||||
|
|
@ -264,7 +266,6 @@ final class GroupMemberListCell: UICollectionViewCell {
|
||||||
nameLabel.text = model.showName
|
nameLabel.text = model.showName
|
||||||
nameLabel.textColor = UIColor(hexStr: isCurrentUser ? "#16B3FF" : "#0F2846")
|
nameLabel.textColor = UIColor(hexStr: isCurrentUser ? "#16B3FF" : "#0F2846")
|
||||||
selectionImageView.isHidden = !isSelected
|
selectionImageView.isHidden = !isSelected
|
||||||
vipBackgroundView.isHidden = !model.shouldShowVipAvatarFrame
|
|
||||||
|
|
||||||
let isSOS = model.status == 1
|
let isSOS = model.status == 1
|
||||||
updateSOSBlink(isSOS)
|
updateSOSBlink(isSOS)
|
||||||
|
|
@ -291,10 +292,9 @@ final class GroupMemberListCell: UICollectionViewCell {
|
||||||
contentView.addSubview(avatarImageView)
|
contentView.addSubview(avatarImageView)
|
||||||
contentView.addSubview(bubbleImageView)
|
contentView.addSubview(bubbleImageView)
|
||||||
contentView.addSubview(sosImageView)
|
contentView.addSubview(sosImageView)
|
||||||
contentView.addSubview(vipBackgroundView)
|
|
||||||
contentView.addSubview(nameLabel)
|
contentView.addSubview(nameLabel)
|
||||||
|
|
||||||
[selectionImageView, avatarImageView, bubbleImageView, sosImageView, vipBackgroundView, nameLabel].forEach {
|
[selectionImageView, avatarImageView, bubbleImageView, sosImageView, nameLabel].forEach {
|
||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -319,9 +319,6 @@ final class GroupMemberListCell: UICollectionViewCell {
|
||||||
sosImageView.trailingAnchor.constraint(equalTo: avatarImageView.trailingAnchor),
|
sosImageView.trailingAnchor.constraint(equalTo: avatarImageView.trailingAnchor),
|
||||||
sosImageView.bottomAnchor.constraint(equalTo: avatarImageView.bottomAnchor),
|
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.topAnchor.constraint(equalTo: avatarImageView.bottomAnchor, constant: 7),
|
||||||
nameLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
|
nameLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
|
||||||
nameLabel.trailingAnchor.constraint(equalTo: contentView.trailingAnchor)
|
nameLabel.trailingAnchor.constraint(equalTo: contentView.trailingAnchor)
|
||||||
|
|
@ -360,12 +357,6 @@ final class GroupMemberListCell: UICollectionViewCell {
|
||||||
return view
|
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 = {
|
private lazy var nameLabel: UILabel = {
|
||||||
let label = UILabel()
|
let label = UILabel()
|
||||||
label.font = .systemFont(ofSize: 12, weight: .medium)
|
label.font = .systemFont(ofSize: 12, weight: .medium)
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ final class GroupViewController: BaseViewController {
|
||||||
private var hasSetupIMListeners = false
|
private var hasSetupIMListeners = false
|
||||||
private var hasRequestedIMData = false
|
private var hasRequestedIMData = false
|
||||||
private var isRequestingIMData = false
|
private var isRequestingIMData = false
|
||||||
|
private var conversationListRequestID = UUID()
|
||||||
|
|
||||||
/// 进入页面加载 IM 会话:圈子集合已由业务接口给出,这里只补未读/最后一条
|
/// 进入页面加载 IM 会话:圈子集合已由业务接口给出,这里只补未读/最后一条
|
||||||
private func loadIMData(showsLoading: Bool = false) {
|
private func loadIMData(showsLoading: Bool = false) {
|
||||||
|
|
@ -92,6 +93,7 @@ final class GroupViewController: BaseViewController {
|
||||||
|
|
||||||
GroupIMService.shared.setConversationListener({ [weak self] conversations in
|
GroupIMService.shared.setConversationListener({ [weak self] conversations in
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
|
self?.conversationListRequestID = UUID()
|
||||||
self?.viewModel.updateConversations(conversations)
|
self?.viewModel.updateConversations(conversations)
|
||||||
}
|
}
|
||||||
}, onNeedsRefresh: { [weak self] in
|
}, onNeedsRefresh: { [weak self] in
|
||||||
|
|
@ -110,12 +112,15 @@ final class GroupViewController: BaseViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func refreshIMData(showsLoading: Bool = false) {
|
private func refreshIMData(showsLoading: Bool = false) {
|
||||||
|
let requestID = UUID()
|
||||||
|
conversationListRequestID = requestID
|
||||||
GroupIMService.shared.getConversationList { [weak self] conversations in
|
GroupIMService.shared.getConversationList { [weak self] conversations in
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
if showsLoading {
|
if showsLoading {
|
||||||
DLToast.dismiss()
|
DLToast.dismiss()
|
||||||
}
|
}
|
||||||
self?.viewModel.loadConversations(conversations)
|
guard let self, self.conversationListRequestID == requestID else { return }
|
||||||
|
self.viewModel.loadConversations(conversations)
|
||||||
}
|
}
|
||||||
} onFailure: {
|
} onFailure: {
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
|
|
|
||||||
|
|
@ -72,17 +72,32 @@ final class GroupViewModel {
|
||||||
/// 仅更新会话元数据(未读、时间)- 消息监听回调(只返回变更的会话,需合并)
|
/// 仅更新会话元数据(未读、时间)- 消息监听回调(只返回变更的会话,需合并)
|
||||||
func updateConversations(_ conversations: [OIMConversationInfo]) {
|
func updateConversations(_ conversations: [OIMConversationInfo]) {
|
||||||
var merged: [String: OIMConversationInfo] = [:]
|
var merged: [String: OIMConversationInfo] = [:]
|
||||||
for c in cachedConversations { if let gid = c.groupID { merged[gid] = c } }
|
for c in cachedConversations {
|
||||||
for c in conversations { if let gid = c.groupID { merged[gid] = c } }
|
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)
|
cachedConversations = Array(merged.values)
|
||||||
reloadData()
|
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() {
|
private func reloadData() {
|
||||||
let convMap: [String: OIMConversationInfo] = {
|
let convMap: [String: OIMConversationInfo] = {
|
||||||
var m: [String: OIMConversationInfo] = [:]
|
var m: [String: OIMConversationInfo] = [:]
|
||||||
for c in cachedConversations where c.groupID != nil && !(c.groupID?.isEmpty ?? true) {
|
for c in cachedConversations {
|
||||||
m[c.groupID!] = c
|
if let key = Self.conversationGroupKey(c) {
|
||||||
|
m[key] = c
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return m
|
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 subtitleLab = UILabel()
|
||||||
private let titleLab = UILabel()
|
private let titleLab = UILabel()
|
||||||
private let hourPicker = BubbleHourPickerView()
|
private let hourPicker = BubbleHourPickerView()
|
||||||
private let vipOfferImageView = UIImageView(image: UIImage(named: "VipFeature/limited_offer"))
|
|
||||||
|
|
||||||
private let sheetOverlay = UIView()
|
private let sheetOverlay = UIView()
|
||||||
private let sheetPanel = UIView()
|
private let sheetPanel = UIView()
|
||||||
|
|
@ -84,7 +83,6 @@ final class CreateBubbleSetupView: UIView {
|
||||||
addSubview(subtitleLab)
|
addSubview(subtitleLab)
|
||||||
addSubview(hourPicker)
|
addSubview(hourPicker)
|
||||||
addSubview(confirmBtn)
|
addSubview(confirmBtn)
|
||||||
addSubview(vipOfferImageView)
|
|
||||||
|
|
||||||
heroView.showsOuterDecorBubbles = false
|
heroView.showsOuterDecorBubbles = false
|
||||||
heroView.layoutChain
|
heroView.layoutChain
|
||||||
|
|
@ -115,25 +113,6 @@ final class CreateBubbleSetupView: UIView {
|
||||||
confirmBtn.setBackgroundImage(UIImage(named: "Common/button_bg_2"), for: .normal)
|
confirmBtn.setBackgroundImage(UIImage(named: "Common/button_bg_2"), for: .normal)
|
||||||
confirmBtn.cornerRadius = 20
|
confirmBtn.cornerRadius = 20
|
||||||
confirmBtn.layoutChain.left(30).right(30).bottom(34).height(56)
|
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() {
|
private func setupSheet() {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ class CreateBubbleVC: BaseViewController {
|
||||||
|
|
||||||
override func viewWillAppear(_ animated: Bool) {
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
super.viewWillAppear(animated)
|
super.viewWillAppear(animated)
|
||||||
rootView.updateVipAccess(isUnlocked: isVipUnlocked)
|
|
||||||
requestUserStatus()
|
requestUserStatus()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -49,10 +48,6 @@ class CreateBubbleVC: BaseViewController {
|
||||||
rootView.setupView.confirmBtn.rx.tap
|
rootView.setupView.confirmBtn.rx.tap
|
||||||
.subscribe(onNext: { [weak self] in
|
.subscribe(onNext: { [weak self] in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
guard self.isVipUnlocked else {
|
|
||||||
AppRouter.push(Route.web, userInfo: ["url": URLManager.shared.homeUrl])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
let hours = self.rootView.setupView.selectedHour.value
|
let hours = self.rootView.setupView.selectedHour.value
|
||||||
let message = self.rootView.setupView.buildMessage(for: hours)
|
let message = self.rootView.setupView.buildMessage(for: hours)
|
||||||
self.rootView.setupView.showNotifySheet(message: message)
|
self.rootView.setupView.showNotifySheet(message: message)
|
||||||
|
|
@ -85,19 +80,10 @@ class CreateBubbleVC: BaseViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func submitCreate() {
|
private func submitCreate() {
|
||||||
guard isVipUnlocked else {
|
|
||||||
rootView.setupView.dismissNotifySheet()
|
|
||||||
AppRouter.push(Route.web, userInfo: ["url": URLManager.shared.homeUrl])
|
|
||||||
return
|
|
||||||
}
|
|
||||||
let hours = rootView.setupView.selectedHour.value
|
let hours = rootView.setupView.selectedHour.value
|
||||||
requestSetBubble(enable: true, keep_time: hours)
|
requestSetBubble(enable: true, keep_time: hours)
|
||||||
}
|
}
|
||||||
|
|
||||||
private var isVipUnlocked: Bool {
|
|
||||||
return AppContextManager.shared.vip > 1
|
|
||||||
}
|
|
||||||
|
|
||||||
private func restoreCachedBubbleIfNeeded() {
|
private func restoreCachedBubbleIfNeeded() {
|
||||||
guard AppContextManager.shared.status == 2,
|
guard AppContextManager.shared.status == 2,
|
||||||
let endDate = Defaults[\.bubbleKeepTimes],
|
let endDate = Defaults[\.bubbleKeepTimes],
|
||||||
|
|
|
||||||
|
|
@ -90,8 +90,4 @@ class CreateBubbleView: UIView {
|
||||||
func updateNavTitleForSheet(_ visible: Bool) {
|
func updateNavTitleForSheet(_ visible: Bool) {
|
||||||
navView.titleLabel.text = visible ? "通知您的圈子" : "设置气泡时间"
|
navView.titleLabel.text = visible ? "通知您的圈子" : "设置气泡时间"
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateVipAccess(isUnlocked: Bool) {
|
|
||||||
setupView.updateVipAccess(isUnlocked: isUnlocked)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,478 +0,0 @@
|
||||||
//
|
|
||||||
// GroupMemberView.swift
|
|
||||||
// QuickLocation
|
|
||||||
//
|
|
||||||
// Created by 八条 on 2026/5/29.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
|
||||||
import RxSwift
|
|
||||||
import RxCocoa
|
|
||||||
import Lottie
|
|
||||||
|
|
||||||
class GroupMemberView: UIView {
|
|
||||||
|
|
||||||
func setupCountData(_ memberCount: Int, _ memberOnlineCount: Int) {
|
|
||||||
groupContentLab.text = "共\(memberCount)成员/\(memberOnlineCount)在线"
|
|
||||||
}
|
|
||||||
|
|
||||||
private func setupRx() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private func setupUI() {
|
|
||||||
addSubview(headerBgView)
|
|
||||||
addSubview(bgView)
|
|
||||||
addSubview(groupIcon)
|
|
||||||
addSubview(titleIcon)
|
|
||||||
addSubview(groupContentLab)
|
|
||||||
addSubview(refreshBtn)
|
|
||||||
addSubview(inviteJoinBtn)
|
|
||||||
addSubview(tableView)
|
|
||||||
|
|
||||||
headerBgView.layoutChain
|
|
||||||
.edges(excludingEdge: .bottom)
|
|
||||||
.heightToWidth(136/375)
|
|
||||||
|
|
||||||
bgView.layoutChain
|
|
||||||
.topToBottomOfView(headerBgView)
|
|
||||||
.edges(excludingEdge: .top)
|
|
||||||
|
|
||||||
groupIcon.layoutChain
|
|
||||||
.top()
|
|
||||||
.left()
|
|
||||||
.width(52)
|
|
||||||
.height(52)
|
|
||||||
|
|
||||||
titleIcon.layoutChain
|
|
||||||
.top(5)
|
|
||||||
.leftToRightOfView(groupIcon)
|
|
||||||
.width(110)
|
|
||||||
.height(26)
|
|
||||||
|
|
||||||
groupContentLab.layoutChain
|
|
||||||
.topToBottomOfView(titleIcon, offset: 8)
|
|
||||||
.leftToView(titleIcon)
|
|
||||||
|
|
||||||
inviteJoinBtn.layoutChain
|
|
||||||
.top(23)
|
|
||||||
.right(15)
|
|
||||||
.height(20)
|
|
||||||
|
|
||||||
refreshBtn.layoutChain
|
|
||||||
.topToView(inviteJoinBtn)
|
|
||||||
.rightToLeftOfView(inviteJoinBtn, offset: -20)
|
|
||||||
.height(20)
|
|
||||||
|
|
||||||
inviteJoinBtn.sizeToFit()
|
|
||||||
refreshBtn.sizeToFit()
|
|
||||||
|
|
||||||
tableView.layoutChain
|
|
||||||
.topToBottomOfView(groupContentLab, offset: 8)
|
|
||||||
.edges(excludingEdge: .top)
|
|
||||||
}
|
|
||||||
|
|
||||||
lazy var headerBgView: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.image = UIImage(named: "Home/group_member_bg")
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
view.contentMode = .scaleAspectFill
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var bgView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = .white
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var groupIcon: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.image = UIImage(named: "Home/group_icon")
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
view.contentMode = .scaleAspectFill
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var titleIcon: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.image = UIImage(named: "Home/title_icon")
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
view.contentMode = .scaleAspectFill
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var groupContentLab: UILabel = {
|
|
||||||
let label = UILabel()
|
|
||||||
label.text = "共0成员/0在线"
|
|
||||||
label.font = .systemFont(ofSize: 12, weight: .medium)
|
|
||||||
label.textColor = UIColor(hexStr: "#0F2846")
|
|
||||||
return label
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var refreshBtn: UIButton = {
|
|
||||||
let btn = UIButton(type: .custom)
|
|
||||||
btn.setTitle(" 刷新列表", for: .normal)
|
|
||||||
btn.setTitleColor(UIColor(hexStr: "#1A1A1A"), for: .normal)
|
|
||||||
btn.titleLabel?.font = .systemFont(ofSize: 12, weight: .regular)
|
|
||||||
btn.setImage(UIImage(named: "Home/refresh"), for: .normal)
|
|
||||||
return btn
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var inviteJoinBtn: UIButton = {
|
|
||||||
let btn = UIButton(type: .custom)
|
|
||||||
btn.setTitle(" 邀请加入", for: .normal)
|
|
||||||
btn.setTitleColor(UIColor(hexStr: "#1A1A1A"), for: .normal)
|
|
||||||
btn.titleLabel?.font = .systemFont(ofSize: 12, weight: .regular)
|
|
||||||
btn.setImage(UIImage(named: "Home/member"), for: .normal)
|
|
||||||
return btn
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var tableView: UITableView = {
|
|
||||||
let tableView = UITableView(frame: .zero, style: .plain)
|
|
||||||
tableView.backgroundColor = .clear
|
|
||||||
tableView.separatorStyle = .none
|
|
||||||
tableView.estimatedRowHeight = 76
|
|
||||||
tableView.showsVerticalScrollIndicator = false
|
|
||||||
tableView.register(GroupMemberCell.self)
|
|
||||||
tableView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 97 + kSafeBottomMargin, right: 0)
|
|
||||||
return tableView
|
|
||||||
}()
|
|
||||||
|
|
||||||
override init(frame: CGRect) {
|
|
||||||
super.init(frame: frame)
|
|
||||||
backgroundColor = .clear
|
|
||||||
setupUI()
|
|
||||||
setupRx()
|
|
||||||
}
|
|
||||||
|
|
||||||
required init?(coder aDecoder: NSCoder) {
|
|
||||||
fatalError("init(coder:) has not been implemented")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - GroupMemberCell
|
|
||||||
class GroupMemberCell: UITableViewCell {
|
|
||||||
|
|
||||||
func configure(model: GroupMemberModel, isCurrentUser: Bool, isOwn: Bool) {
|
|
||||||
ownView.isHidden = !isOwn
|
|
||||||
avaterImgView.setHeadPic(model.displayHeadPic)
|
|
||||||
nameLab.text = model.showName
|
|
||||||
// 位置
|
|
||||||
locationLab.text = "在 " + model.lastLocation
|
|
||||||
|
|
||||||
nameLab.textColor = UIColor(hexStr: isCurrentUser ? "#16B3FF" : "#0F2846")
|
|
||||||
|
|
||||||
// 会员权益
|
|
||||||
batteryInfoView.isHidden = true
|
|
||||||
if AppContextManager.shared.vip > 1, model.is_online {
|
|
||||||
batteryInfoView.isHidden = model.battery.int == 0
|
|
||||||
// 电量 16是电池图标宽度,右边有电池造型需要减去
|
|
||||||
let batteryPercent = min(CGFloat(model.battery.int), 100)
|
|
||||||
batteryView.layoutChain.width(CGFloat(16 - 1) * batteryPercent / 100.0)
|
|
||||||
batteryLab.text = "\(model.battery)%"
|
|
||||||
}
|
|
||||||
|
|
||||||
// 在线状态
|
|
||||||
if model.is_online {
|
|
||||||
onlineDotView.isHidden = false
|
|
||||||
onlineStatusLab.text = "在线"
|
|
||||||
onlineStatusLab.textColor = ThemeManager.shared.color.titleAuxColor
|
|
||||||
} else {
|
|
||||||
onlineDotView.isHidden = true
|
|
||||||
onlineStatusLab.text = model.lastUpdateText
|
|
||||||
onlineStatusLab.textColor = UIColor(hexStr: "#999999")
|
|
||||||
}
|
|
||||||
|
|
||||||
// sos
|
|
||||||
sosLottieView.isHidden = model.status != 1
|
|
||||||
model.status == 1 ? sosLottieView.play() : sosLottieView.stop()
|
|
||||||
|
|
||||||
// 气泡
|
|
||||||
shieldIconView.isHidden = model.status != 2
|
|
||||||
}
|
|
||||||
|
|
||||||
private func setupSubviews() {
|
|
||||||
contentView.addSubview(selectedBgView)
|
|
||||||
contentView.addSubview(avaterImgView)
|
|
||||||
contentView.addSubview(batteryInfoView)
|
|
||||||
batteryInfoView.addSubview(cornerView)
|
|
||||||
cornerView.addSubview(batteryView)
|
|
||||||
cornerView.addSubview(batteryIcon)
|
|
||||||
cornerView.addSubview(batteryLab)
|
|
||||||
contentView.addSubview(nameLab)
|
|
||||||
contentView.addSubview(locationIcon)
|
|
||||||
contentView.addSubview(locationLab)
|
|
||||||
contentView.addSubview(tagView)
|
|
||||||
contentView.addSubview(onlineView)
|
|
||||||
|
|
||||||
setupLayout()
|
|
||||||
}
|
|
||||||
|
|
||||||
private func setupLayout() {
|
|
||||||
selectedBgView.layoutChain
|
|
||||||
.edgesHorzontal(15)
|
|
||||||
.edgesVertical()
|
|
||||||
|
|
||||||
avaterImgView.layoutChain
|
|
||||||
.edgesVertical(13)
|
|
||||||
.left(28)
|
|
||||||
.width(50)
|
|
||||||
.height(50)
|
|
||||||
|
|
||||||
batteryInfoView.layoutChain
|
|
||||||
.leftToView(avaterImgView)
|
|
||||||
.rightToView(avaterImgView)
|
|
||||||
.bottomToView(avaterImgView)
|
|
||||||
.height(12)
|
|
||||||
|
|
||||||
cornerView.layoutChain.edges()
|
|
||||||
|
|
||||||
batteryIcon.layoutChain
|
|
||||||
.left(7)
|
|
||||||
.centerY()
|
|
||||||
.width(16)
|
|
||||||
.height(8)
|
|
||||||
|
|
||||||
batteryView.layoutChain
|
|
||||||
.topToView(batteryIcon)
|
|
||||||
.leftToView(batteryIcon, offset: -1)
|
|
||||||
.bottomToView(batteryIcon)
|
|
||||||
|
|
||||||
batteryLab.layoutChain
|
|
||||||
.leftToRightOfView(batteryIcon, offset: 4)
|
|
||||||
.right(5)
|
|
||||||
.centerY()
|
|
||||||
|
|
||||||
nameLab.layoutChain
|
|
||||||
.topToView(avaterImgView, offset: 6)
|
|
||||||
.leftToRightOfView(avaterImgView, offset: 8)
|
|
||||||
|
|
||||||
locationLab.layoutChain
|
|
||||||
.bottomToView(avaterImgView, offset: -6)
|
|
||||||
.leftToView(nameLab)
|
|
||||||
|
|
||||||
locationIcon.layoutChain
|
|
||||||
.leftToRightOfView(locationLab, offset: 4)
|
|
||||||
.centerY(locationLab)
|
|
||||||
.width(10)
|
|
||||||
.height(10)
|
|
||||||
.right(80, relation: .greaterThanOrEqual)
|
|
||||||
|
|
||||||
tagView.layoutChain
|
|
||||||
.leftToRightOfView(nameLab, offset: 4)
|
|
||||||
.centerY(nameLab)
|
|
||||||
.height(30)
|
|
||||||
|
|
||||||
ownView.layoutChain.height(15)
|
|
||||||
|
|
||||||
offlineView.layoutChain.height(15)
|
|
||||||
|
|
||||||
onlineView.layoutChain
|
|
||||||
.right(26)
|
|
||||||
.bottom(18)
|
|
||||||
}
|
|
||||||
|
|
||||||
lazy var selectedBgView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = UIColor(hexStr: "#EAFBFF")
|
|
||||||
view.cornerRadius = 10
|
|
||||||
view.isHidden = true
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var avaterImgView: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.backgroundColor = .lightGray
|
|
||||||
view.contentMode = .scaleAspectFill
|
|
||||||
view.cornerRadius = 25
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var batteryInfoView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
view.layer.shadowColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.1).cgColor
|
|
||||||
view.layer.shadowOffset = CGSize(width: 0, height: 2)
|
|
||||||
view.layer.shadowOpacity = 1
|
|
||||||
view.layer.shadowRadius = 6
|
|
||||||
view.isHidden = true
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var cornerView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = .white
|
|
||||||
view.cornerRadius = 6
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var batteryView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = UIColor(hexStr: "#75E582")
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var batteryIcon: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
view.image = UIImage(named: "Home/battery")
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var batteryLab: UILabel = {
|
|
||||||
let label = UILabel()
|
|
||||||
label.textColor = UIColor(hexStr: "#D4D4D4")
|
|
||||||
label.font = .systemFont(ofSize: 6, weight: .medium)
|
|
||||||
return label
|
|
||||||
}()
|
|
||||||
|
|
||||||
|
|
||||||
lazy var nameLab: UILabel = {
|
|
||||||
let label = UILabel()
|
|
||||||
label.textColor = UIColor(hexStr: "#0F2846")
|
|
||||||
label.font = .systemFont(ofSize: 14, weight: .semibold)
|
|
||||||
return label
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var locationIcon: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.image = UIImage(named: "Home/member_location")
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var locationLab: UILabel = {
|
|
||||||
let label = UILabel()
|
|
||||||
label.textColor = UIColor(hexStr: "#8D8D8D")
|
|
||||||
label.font = .systemFont(ofSize: 10, weight: .regular)
|
|
||||||
return label
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var tagView: UIStackView = {
|
|
||||||
let view = UIStackView(arrangedSubviews: [ownView, offlineView, sosLottieView, shieldIconView])
|
|
||||||
view.axis = .horizontal
|
|
||||||
view.alignment = .center
|
|
||||||
view.spacing = 5
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
// 圈主
|
|
||||||
lazy var ownView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = UIColor(hexStr: "#9FD9FF")
|
|
||||||
view.cornerRadius = 2
|
|
||||||
|
|
||||||
let label = UILabel()
|
|
||||||
label.textColor = UIColor(hexStr: "#194045")
|
|
||||||
label.font = .systemFont(ofSize: 8, weight: .medium)
|
|
||||||
label.text = "圈主"
|
|
||||||
|
|
||||||
view.addSubview(label)
|
|
||||||
label.layoutChain
|
|
||||||
.edgesVertical(2)
|
|
||||||
.edgesHorzontal(8)
|
|
||||||
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
// 离线
|
|
||||||
lazy var offlineView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = UIColor(hexStr: "#EDEDED")
|
|
||||||
view.cornerRadius = 2
|
|
||||||
|
|
||||||
let label = UILabel()
|
|
||||||
label.textColor = ThemeManager.shared.color.contentColor
|
|
||||||
label.font = .systemFont(ofSize: 8, weight: .medium)
|
|
||||||
label.text = "离线"
|
|
||||||
|
|
||||||
view.addSubview(label)
|
|
||||||
label.layoutChain
|
|
||||||
.edgesVertical(2)
|
|
||||||
.edgesHorzontal(8)
|
|
||||||
|
|
||||||
view.isHidden = true
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
// sos
|
|
||||||
lazy var sosLottieView: LottieAnimationView = {
|
|
||||||
let view = LottieAnimationView(name: "siren")
|
|
||||||
view.loopMode = .loop
|
|
||||||
view.isHidden = true
|
|
||||||
|
|
||||||
view.layoutChain.width(26).height(26)
|
|
||||||
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
// 气泡(盾牌)
|
|
||||||
lazy var shieldIconView: UIImageView = {
|
|
||||||
let view = UIImageView(image: UIImage(named: "Home/shield"))
|
|
||||||
view.contentMode = .scaleAspectFill
|
|
||||||
view.isHidden = true
|
|
||||||
|
|
||||||
view.layoutChain.width(20).height(20)
|
|
||||||
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
// 在线
|
|
||||||
lazy var onlineView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
|
|
||||||
view.addSubview(onlineDotView)
|
|
||||||
view.addSubview(onlineStatusLab)
|
|
||||||
|
|
||||||
onlineDotView.layoutChain
|
|
||||||
.left()
|
|
||||||
.centerY()
|
|
||||||
.height(8)
|
|
||||||
.width(8)
|
|
||||||
|
|
||||||
onlineStatusLab.layoutChain
|
|
||||||
.edgesVertical()
|
|
||||||
.leftToRightOfView(onlineDotView, offset: 3)
|
|
||||||
.right()
|
|
||||||
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var onlineDotView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = UIColor(hexStr: "#67EA76")
|
|
||||||
view.cornerRadius = 4
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var onlineStatusLab: UILabel = {
|
|
||||||
let label = UILabel()
|
|
||||||
label.textColor = ThemeManager.shared.color.titleAuxColor
|
|
||||||
label.font = .systemFont(ofSize: 10, weight: .medium)
|
|
||||||
label.text = "在线"
|
|
||||||
return label
|
|
||||||
}()
|
|
||||||
|
|
||||||
override func awakeFromNib() {
|
|
||||||
super.awakeFromNib()
|
|
||||||
// Initialization code
|
|
||||||
}
|
|
||||||
|
|
||||||
override init(style: CellStyle, reuseIdentifier: String?) {
|
|
||||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
|
||||||
selectionStyle = .none
|
|
||||||
backgroundColor = .clear
|
|
||||||
setupSubviews()
|
|
||||||
}
|
|
||||||
|
|
||||||
required init?(coder: NSCoder) {
|
|
||||||
fatalError("init(coder:) has not been implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
override func setSelected(_ selected: Bool, animated: Bool) {
|
|
||||||
super.setSelected(selected, animated: animated)
|
|
||||||
selectedBgView.isHidden = !selected
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -12,7 +12,6 @@ import SwiftyUserDefaults
|
||||||
|
|
||||||
enum MemberFeatureAccessState: Equatable {
|
enum MemberFeatureAccessState: Equatable {
|
||||||
case available
|
case available
|
||||||
case vipRequired
|
|
||||||
case privilegeDenied
|
case privilegeDenied
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -21,14 +20,11 @@ class GroupMemberView2: UIView {
|
||||||
private var navBarHeightConstraint: NSLayoutConstraint?
|
private var navBarHeightConstraint: NSLayoutConstraint?
|
||||||
private var todayTrackTopToInteraction: NSLayoutConstraint?
|
private var todayTrackTopToInteraction: NSLayoutConstraint?
|
||||||
private var todayTrackTopToMember: NSLayoutConstraint?
|
private var todayTrackTopToMember: NSLayoutConstraint?
|
||||||
private var appUsageTopToPhoneReportConstraint: NSLayoutConstraint?
|
|
||||||
private var appUsageTopToTodayTrackConstraint: NSLayoutConstraint?
|
private var appUsageTopToTodayTrackConstraint: NSLayoutConstraint?
|
||||||
private var todayTrackBottomConstraint: NSLayoutConstraint?
|
private var todayTrackBottomConstraint: NSLayoutConstraint?
|
||||||
private var phoneReportBottomConstraint: NSLayoutConstraint?
|
|
||||||
private var appUsageBottomConstraint: NSLayoutConstraint?
|
private var appUsageBottomConstraint: NSLayoutConstraint?
|
||||||
private var isAppUsageVisible = false
|
private var isAppUsageVisible = false
|
||||||
private var currentMemberModel: GroupMemberModel?
|
private var currentMemberModel: GroupMemberModel?
|
||||||
private var currentGroupVip = GroupMemberVip()
|
|
||||||
private var emojiEchoByUserId: [String: String] = [:]
|
private var emojiEchoByUserId: [String: String] = [:]
|
||||||
private var messageEchoByUserId: [String: String] = [:]
|
private var messageEchoByUserId: [String: String] = [:]
|
||||||
private var phoneStatusObserver: NSObjectProtocol?
|
private var phoneStatusObserver: NSObjectProtocol?
|
||||||
|
|
@ -37,7 +33,6 @@ class GroupMemberView2: UIView {
|
||||||
private var localWeatherSnapshotKey: String?
|
private var localWeatherSnapshotKey: String?
|
||||||
private var localWeatherUpdatedAt: Date?
|
private var localWeatherUpdatedAt: Date?
|
||||||
private var pendingWeatherLocationKey: String?
|
private var pendingWeatherLocationKey: String?
|
||||||
private(set) var isTodayTrackVipRequired = false
|
|
||||||
var onCoupleMemberTap: ((GroupMemberModel) -> Void)?
|
var onCoupleMemberTap: ((GroupMemberModel) -> Void)?
|
||||||
|
|
||||||
private static let weatherRefreshInterval: TimeInterval = 15 * 60
|
private static let weatherRefreshInterval: TimeInterval = 15 * 60
|
||||||
|
|
@ -55,11 +50,9 @@ class GroupMemberView2: UIView {
|
||||||
func setupMemberInfo(
|
func setupMemberInfo(
|
||||||
_ model: GroupMemberModel,
|
_ model: GroupMemberModel,
|
||||||
isOwner: Bool,
|
isOwner: Bool,
|
||||||
phoneUsage: PhoneUsageTodayModel?,
|
phoneUsage: PhoneUsageTodayModel?
|
||||||
groupVip: GroupMemberVip
|
|
||||||
) {
|
) {
|
||||||
currentMemberModel = model
|
currentMemberModel = model
|
||||||
currentGroupVip = groupVip
|
|
||||||
memberNameLab.text = model.showName
|
memberNameLab.text = model.showName
|
||||||
ownView.isHidden = !isOwner
|
ownView.isHidden = !isOwner
|
||||||
relationIconView.configure(relationIdx: model.extra.relation_idx)
|
relationIconView.configure(relationIdx: model.extra.relation_idx)
|
||||||
|
|
@ -78,7 +71,7 @@ class GroupMemberView2: UIView {
|
||||||
}
|
}
|
||||||
|
|
||||||
applyPhoneUsage(phoneUsage)
|
applyPhoneUsage(phoneUsage)
|
||||||
if isCurrentUser, !isPhoneDeviceVipRequired {
|
if isCurrentUser {
|
||||||
requestLocalWeather()
|
requestLocalWeather()
|
||||||
}
|
}
|
||||||
updateRealtimeInteractionVisibility(isCurrentUser: isCurrentUser)
|
updateRealtimeInteractionVisibility(isCurrentUser: isCurrentUser)
|
||||||
|
|
@ -87,7 +80,6 @@ class GroupMemberView2: UIView {
|
||||||
|
|
||||||
func clearMemberInfo() {
|
func clearMemberInfo() {
|
||||||
currentMemberModel = nil
|
currentMemberModel = nil
|
||||||
currentGroupVip = GroupMemberVip()
|
|
||||||
memberNameLab.text = ""
|
memberNameLab.text = ""
|
||||||
ownView.isHidden = true
|
ownView.isHidden = true
|
||||||
relationIconView.configure(relationIdx: "")
|
relationIconView.configure(relationIdx: "")
|
||||||
|
|
@ -105,20 +97,18 @@ class GroupMemberView2: UIView {
|
||||||
func updatePhoneUsage(_ phoneUsage: PhoneUsageTodayModel?, for userId: String) {
|
func updatePhoneUsage(_ phoneUsage: PhoneUsageTodayModel?, for userId: String) {
|
||||||
guard currentMemberModel?.user_id == userId else { return }
|
guard currentMemberModel?.user_id == userId else { return }
|
||||||
applyPhoneUsage(phoneUsage)
|
applyPhoneUsage(phoneUsage)
|
||||||
if Self.isCurrentUser(userId), !isPhoneDeviceVipRequired {
|
if Self.isCurrentUser(userId) {
|
||||||
applyLocalDeviceInfo()
|
applyLocalDeviceInfo()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func refreshLocalDeviceInfoIfNeeded() {
|
func refreshLocalDeviceInfoIfNeeded() {
|
||||||
guard isShowingCurrentUser, !isPhoneDeviceVipRequired else { return }
|
guard isShowingCurrentUser else { return }
|
||||||
applyLocalDeviceInfo()
|
applyLocalDeviceInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
func refreshInterceptState() {
|
func refreshInterceptState() {
|
||||||
memberCV.reloadData()
|
memberCV.reloadData()
|
||||||
coupleLeftSlot.refreshVipVisibility()
|
|
||||||
coupleRightSlot.refreshVipVisibility()
|
|
||||||
updateFeatureVisibilityLayout()
|
updateFeatureVisibilityLayout()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -206,9 +196,7 @@ class GroupMemberView2: UIView {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func applyPhoneUsage(_ usage: PhoneUsageTodayModel?) {
|
private func applyPhoneUsage(_ usage: PhoneUsageTodayModel?) {
|
||||||
if isPhoneDeviceVipRequired {
|
if isShowingCurrentUser {
|
||||||
stopLocalPhoneStatusObserving()
|
|
||||||
} else if isShowingCurrentUser {
|
|
||||||
applyLocalDeviceInfo()
|
applyLocalDeviceInfo()
|
||||||
startLocalPhoneStatusObserving()
|
startLocalPhoneStatusObserving()
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -219,52 +207,33 @@ class GroupMemberView2: UIView {
|
||||||
applyDeviceInfo(usage?.phoneInfo)
|
applyDeviceInfo(usage?.phoneInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
applyPhoneDeviceAccessState()
|
|
||||||
if isShowingOfflineOther {
|
if isShowingOfflineOther {
|
||||||
phoneReportView.configure(with: nil)
|
|
||||||
appUsageView.configure(with: nil)
|
appUsageView.configure(with: nil)
|
||||||
applyFeatureAccessStates(appUsagePreview: nil)
|
applyFeatureAccessStates(appUsagePreview: nil)
|
||||||
applyOfflineStayPoints()
|
applyOfflineStayPoints()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
phoneReportView.configure(with: Self.phoneReportPreview(from: usage))
|
|
||||||
let appUsagePreview = MemberAppUsagePreview(topApps: usage?.topApps ?? [])
|
let appUsagePreview = MemberAppUsagePreview(topApps: usage?.topApps ?? [])
|
||||||
appUsageView.configure(with: appUsagePreview)
|
appUsageView.configure(with: appUsagePreview)
|
||||||
applyFeatureAccessStates(appUsagePreview: appUsagePreview)
|
applyFeatureAccessStates(appUsagePreview: appUsagePreview)
|
||||||
applyStayPoints(usage?.stayPoints ?? [])
|
applyStayPoints(usage?.stayPoints ?? [])
|
||||||
}
|
}
|
||||||
|
|
||||||
var isPhoneReportDenied: Bool { phoneReportView.isDenied }
|
|
||||||
var isAppUsageDenied: Bool { appUsageView.isDenied }
|
var isAppUsageDenied: Bool { appUsageView.isDenied }
|
||||||
var isPhoneReportVipRequired: Bool { phoneReportView.isVipRequired }
|
|
||||||
var isAppUsageVipRequired: Bool { appUsageView.isVipRequired }
|
|
||||||
var onPhoneReportRemind: (() -> Void)?
|
|
||||||
var onAppUsageRemind: (() -> Void)?
|
var onAppUsageRemind: (() -> Void)?
|
||||||
|
|
||||||
private func applyFeatureAccessStates(appUsagePreview: MemberAppUsagePreview?) {
|
private func applyFeatureAccessStates(appUsagePreview: MemberAppUsagePreview?) {
|
||||||
guard currentMemberModel != nil else {
|
guard currentMemberModel != nil else {
|
||||||
isTodayTrackVipRequired = false
|
|
||||||
todayTrackVipView.isHidden = true
|
|
||||||
phoneReportView.setAccessState(.available)
|
|
||||||
appUsageView.setAccessState(.available)
|
appUsageView.setAccessState(.available)
|
||||||
updateAppUsageVisibility(appUsagePreview != nil)
|
updateAppUsageVisibility(appUsagePreview != nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let isSelf = isShowingCurrentUser
|
let isSelf = isShowingCurrentUser
|
||||||
let memberPrivilege = currentMemberModel?.extra.privilege ?? GroupPrivilege()
|
let memberPrivilege = currentMemberModel?.extra.privilege ?? GroupPrivilege()
|
||||||
let phoneState = Self.accessState(
|
|
||||||
vipAllowed: currentGroupVip.phone_report,
|
|
||||||
privilegeAllowed: isSelf || memberPrivilege.phone_report
|
|
||||||
)
|
|
||||||
let appUsageState = Self.accessState(
|
let appUsageState = Self.accessState(
|
||||||
vipAllowed: currentGroupVip.app_usage_record,
|
|
||||||
privilegeAllowed: isSelf || memberPrivilege.app_usage_record
|
privilegeAllowed: isSelf || memberPrivilege.app_usage_record
|
||||||
)
|
)
|
||||||
|
|
||||||
isTodayTrackVipRequired = !isSelf && currentGroupVip.trip_analysis_others == false
|
|
||||||
todayTrackVipView.isHidden = !isTodayTrackVipRequired
|
|
||||||
phoneReportView.setAccessState(phoneState)
|
|
||||||
phoneReportView.onDeniedAction = { [weak self] in self?.onPhoneReportRemind?() }
|
|
||||||
appUsageView.setAccessState(appUsageState)
|
appUsageView.setAccessState(appUsageState)
|
||||||
appUsageView.onDeniedAction = { [weak self] in self?.onAppUsageRemind?() }
|
appUsageView.onDeniedAction = { [weak self] in self?.onAppUsageRemind?() }
|
||||||
let showUsage = appUsagePreview != nil || appUsageState != .available
|
let showUsage = appUsagePreview != nil || appUsageState != .available
|
||||||
|
|
@ -274,13 +243,7 @@ class GroupMemberView2: UIView {
|
||||||
updateAppUsageVisibility(showUsage)
|
updateAppUsageVisibility(showUsage)
|
||||||
}
|
}
|
||||||
|
|
||||||
private static func accessState(
|
private static func accessState(privilegeAllowed: Bool) -> MemberFeatureAccessState {
|
||||||
vipAllowed: Bool?,
|
|
||||||
privilegeAllowed: Bool
|
|
||||||
) -> MemberFeatureAccessState {
|
|
||||||
if vipAllowed == false {
|
|
||||||
return .vipRequired
|
|
||||||
}
|
|
||||||
if !privilegeAllowed {
|
if !privilegeAllowed {
|
||||||
return .privilegeDenied
|
return .privilegeDenied
|
||||||
}
|
}
|
||||||
|
|
@ -291,23 +254,6 @@ class GroupMemberView2: UIView {
|
||||||
Self.isCurrentUser(currentMemberModel?.user_id)
|
Self.isCurrentUser(currentMemberModel?.user_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
private var isPhoneDeviceVipRequired: Bool {
|
|
||||||
currentMemberModel != nil && !isShowingCurrentUser && currentGroupVip.view_phone == false
|
|
||||||
}
|
|
||||||
|
|
||||||
private func applyPhoneDeviceAccessState() {
|
|
||||||
let requiresVip = isPhoneDeviceVipRequired
|
|
||||||
phoneModelView.isHidden = requiresVip
|
|
||||||
batteryView.isHidden = requiresVip
|
|
||||||
networkView.isHidden = requiresVip
|
|
||||||
weatherView.isHidden = requiresVip
|
|
||||||
phoneDeviceVipButton.isHidden = !requiresVip
|
|
||||||
}
|
|
||||||
|
|
||||||
@objc private func handlePhoneDeviceVipTap() {
|
|
||||||
AppRouter.push(Route.web, userInfo: ["url": URLManager.shared.homeUrl])
|
|
||||||
}
|
|
||||||
|
|
||||||
private static func isCurrentUser(_ userId: String?) -> Bool {
|
private static func isCurrentUser(_ userId: String?) -> Bool {
|
||||||
let memberId = userId?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
|
let memberId = userId?.trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
|
||||||
let selfId = AppContextManager.shared.userId.trimmingCharacters(in: .whitespacesAndNewlines)
|
let selfId = AppContextManager.shared.userId.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
|
|
@ -346,7 +292,7 @@ class GroupMemberView2: UIView {
|
||||||
object: nil,
|
object: nil,
|
||||||
queue: .main
|
queue: .main
|
||||||
) { [weak self] _ in
|
) { [weak self] _ in
|
||||||
guard let self, self.isShowingCurrentUser, !self.isPhoneDeviceVipRequired else { return }
|
guard let self, self.isShowingCurrentUser else { return }
|
||||||
self.applyLocalDeviceInfo()
|
self.applyLocalDeviceInfo()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -375,7 +321,6 @@ class GroupMemberView2: UIView {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func requestLocalWeather() {
|
private func requestLocalWeather() {
|
||||||
guard !isPhoneDeviceVipRequired else { return }
|
|
||||||
guard let latitude = Defaults[\.currentLatitude],
|
guard let latitude = Defaults[\.currentLatitude],
|
||||||
let longitude = Defaults[\.currentLongitude] else {
|
let longitude = Defaults[\.currentLongitude] else {
|
||||||
if localWeatherSnapshot == nil {
|
if localWeatherSnapshot == nil {
|
||||||
|
|
@ -409,7 +354,7 @@ class GroupMemberView2: UIView {
|
||||||
MemberWeatherService.shared.weather(for: location) { [weak self] result in
|
MemberWeatherService.shared.weather(for: location) { [weak self] result in
|
||||||
guard let self, self.weatherRequestID == requestID else { return }
|
guard let self, self.weatherRequestID == requestID else { return }
|
||||||
self.pendingWeatherLocationKey = nil
|
self.pendingWeatherLocationKey = nil
|
||||||
guard self.isShowingCurrentUser, !self.isPhoneDeviceVipRequired else { return }
|
guard self.isShowingCurrentUser else { return }
|
||||||
switch result {
|
switch result {
|
||||||
case .success(let snapshot):
|
case .success(let snapshot):
|
||||||
self.localWeatherSnapshot = snapshot
|
self.localWeatherSnapshot = snapshot
|
||||||
|
|
@ -442,15 +387,10 @@ class GroupMemberView2: UIView {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func updateFeatureVisibilityLayout() {
|
private func updateFeatureVisibilityLayout() {
|
||||||
let hidesPhoneReport = AppContextManager.shared.systemConfig?.isIntercept == true
|
appUsageView.isHidden = !isAppUsageVisible
|
||||||
phoneReportView.isHidden = hidesPhoneReport
|
appUsageTopToTodayTrackConstraint?.isActive = true
|
||||||
appUsageView.isHidden = hidesPhoneReport
|
|
||||||
|
|
||||||
appUsageTopToPhoneReportConstraint?.isActive = !hidesPhoneReport
|
|
||||||
appUsageTopToTodayTrackConstraint?.isActive = hidesPhoneReport
|
|
||||||
phoneReportBottomConstraint?.isActive = !hidesPhoneReport && !isAppUsageVisible
|
|
||||||
appUsageBottomConstraint?.isActive = isAppUsageVisible
|
appUsageBottomConstraint?.isActive = isAppUsageVisible
|
||||||
todayTrackBottomConstraint?.isActive = hidesPhoneReport && !isAppUsageVisible
|
todayTrackBottomConstraint?.isActive = !isAppUsageVisible
|
||||||
setNeedsLayout()
|
setNeedsLayout()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -514,23 +454,6 @@ class GroupMemberView2: UIView {
|
||||||
return min(max(percent, 0), 100)
|
return min(max(percent, 0), 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
private static func phoneReportPreview(from usage: PhoneUsageTodayModel?) -> MemberPhoneReportPreview? {
|
|
||||||
guard let usage else { return nil }
|
|
||||||
let info = usage.phoneInfo
|
|
||||||
return MemberPhoneReportPreview(
|
|
||||||
screenTimeSeconds: screenTimeSeconds(from: info?.useTime),
|
|
||||||
usageCount: usage.appCount,
|
|
||||||
unlockCount: Int(info?.unlockCount.trimmed ?? "")
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
private static func screenTimeSeconds(from value: String?) -> Int? {
|
|
||||||
guard let value else { return nil }
|
|
||||||
let text = value.trimmed
|
|
||||||
guard !text.isEmpty, let seconds = Int(text) else { return nil }
|
|
||||||
return max(0, seconds)
|
|
||||||
}
|
|
||||||
|
|
||||||
private func applyStayPoints(_ stayPoints: [PhoneUsageStayPointModel]) {
|
private func applyStayPoints(_ stayPoints: [PhoneUsageStayPointModel]) {
|
||||||
stayNumLab.text = "\(stayPoints.count)"
|
stayNumLab.text = "\(stayPoints.count)"
|
||||||
guard let latest = stayPoints.max(by: {
|
guard let latest = stayPoints.max(by: {
|
||||||
|
|
@ -660,29 +583,15 @@ class GroupMemberView2: UIView {
|
||||||
todayTrackView.layoutChain
|
todayTrackView.layoutChain
|
||||||
.edgesHorzontal()
|
.edgesHorzontal()
|
||||||
todayTrackTopToMember = todayTrackView.jh_pinEdge(.top, toEdge: .bottom, of: memberView, offset: 12)
|
todayTrackTopToMember = todayTrackView.jh_pinEdge(.top, toEdge: .bottom, of: memberView, offset: 12)
|
||||||
|
|
||||||
scrollContentView.addSubview(phoneReportView)
|
|
||||||
phoneReportView.layoutChain
|
|
||||||
.topToBottomOfView(todayTrackView, offset: 15)
|
|
||||||
.edgesHorzontal()
|
|
||||||
|
|
||||||
scrollContentView.addSubview(appUsageView)
|
scrollContentView.addSubview(appUsageView)
|
||||||
appUsageView.layoutChain
|
appUsageView.layoutChain
|
||||||
.edgesHorzontal()
|
.edgesHorzontal()
|
||||||
appUsageTopToPhoneReportConstraint = appUsageView.topAnchor.constraint(
|
|
||||||
equalTo: phoneReportView.bottomAnchor,
|
|
||||||
constant: 15
|
|
||||||
)
|
|
||||||
appUsageTopToPhoneReportConstraint?.isActive = true
|
|
||||||
appUsageTopToTodayTrackConstraint = appUsageView.topAnchor.constraint(
|
appUsageTopToTodayTrackConstraint = appUsageView.topAnchor.constraint(
|
||||||
equalTo: todayTrackView.bottomAnchor,
|
equalTo: todayTrackView.bottomAnchor,
|
||||||
constant: 15
|
constant: 15
|
||||||
)
|
)
|
||||||
|
appUsageTopToTodayTrackConstraint?.isActive = true
|
||||||
phoneReportBottomConstraint = phoneReportView.bottomAnchor.constraint(
|
|
||||||
equalTo: scrollContentView.bottomAnchor,
|
|
||||||
constant: -(49 + kSafeBottomMargin)
|
|
||||||
)
|
|
||||||
appUsageBottomConstraint = appUsageView.bottomAnchor.constraint(
|
appUsageBottomConstraint = appUsageView.bottomAnchor.constraint(
|
||||||
equalTo: scrollContentView.bottomAnchor,
|
equalTo: scrollContentView.bottomAnchor,
|
||||||
constant: -(49 + kSafeBottomMargin)
|
constant: -(49 + kSafeBottomMargin)
|
||||||
|
|
@ -691,7 +600,7 @@ class GroupMemberView2: UIView {
|
||||||
equalTo: scrollContentView.bottomAnchor,
|
equalTo: scrollContentView.bottomAnchor,
|
||||||
constant: -(49 + kSafeBottomMargin)
|
constant: -(49 + kSafeBottomMargin)
|
||||||
)
|
)
|
||||||
phoneReportBottomConstraint?.isActive = true
|
todayTrackBottomConstraint?.isActive = true
|
||||||
|
|
||||||
return view
|
return view
|
||||||
}()
|
}()
|
||||||
|
|
@ -950,7 +859,6 @@ class GroupMemberView2: UIView {
|
||||||
view.addSubview(batteryView)
|
view.addSubview(batteryView)
|
||||||
view.addSubview(networkView)
|
view.addSubview(networkView)
|
||||||
view.addSubview(weatherView)
|
view.addSubview(weatherView)
|
||||||
view.addSubview(phoneDeviceVipButton)
|
|
||||||
|
|
||||||
phoneModelView.layoutChain
|
phoneModelView.layoutChain
|
||||||
.topToBottomOfView(locationLab, offset: 20)
|
.topToBottomOfView(locationLab, offset: 20)
|
||||||
|
|
@ -971,12 +879,6 @@ class GroupMemberView2: UIView {
|
||||||
.leftToRightOfView(networkView)
|
.leftToRightOfView(networkView)
|
||||||
.right()
|
.right()
|
||||||
.widthToView(phoneModelView)
|
.widthToView(phoneModelView)
|
||||||
|
|
||||||
phoneDeviceVipButton.layoutChain
|
|
||||||
.centerX()
|
|
||||||
.centerY(phoneModelView)
|
|
||||||
.width(174)
|
|
||||||
.height(34)
|
|
||||||
|
|
||||||
return view
|
return view
|
||||||
}()
|
}()
|
||||||
|
|
@ -1239,20 +1141,8 @@ class GroupMemberView2: UIView {
|
||||||
label.font = .systemFont(ofSize: 12, weight: .medium)
|
label.font = .systemFont(ofSize: 12, weight: .medium)
|
||||||
return label
|
return label
|
||||||
}()
|
}()
|
||||||
|
|
||||||
private lazy var phoneDeviceVipButton: UIButton = {
|
|
||||||
let button = UIButton(type: .custom)
|
|
||||||
button.setTitle("开通会员 解锁功能", for: .normal)
|
|
||||||
button.setTitleColor(.white, for: .normal)
|
|
||||||
button.titleLabel?.font = FontManager.boboBold(14)
|
|
||||||
button.setBackgroundImage(UIImage(named: "VipFeature/narrow_button_bg"), for: .normal)
|
|
||||||
button.isHidden = true
|
|
||||||
button.addTarget(self, action: #selector(handlePhoneDeviceVipTap), for: .touchUpInside)
|
|
||||||
return button
|
|
||||||
}()
|
|
||||||
|
|
||||||
// MARK: - 手机报告 / APP使用记录
|
// MARK: - APP使用记录
|
||||||
lazy var phoneReportView = MemberPhoneReportView()
|
|
||||||
lazy var appUsageView: MemberAppUsageView = {
|
lazy var appUsageView: MemberAppUsageView = {
|
||||||
let view = MemberAppUsageView()
|
let view = MemberAppUsageView()
|
||||||
view.isHidden = true
|
view.isHidden = true
|
||||||
|
|
@ -1463,28 +1353,9 @@ class GroupMemberView2: UIView {
|
||||||
stayNodataView.layoutChain
|
stayNodataView.layoutChain
|
||||||
.topToBottomOfView(stayTxtLab, offset: 14)
|
.topToBottomOfView(stayTxtLab, offset: 14)
|
||||||
.leftToView(stayTxtLab)
|
.leftToView(stayTxtLab)
|
||||||
|
|
||||||
view.addSubview(todayTrackVipView)
|
|
||||||
todayTrackVipView.translatesAutoresizingMaskIntoConstraints = false
|
|
||||||
NSLayoutConstraint.activate([
|
|
||||||
todayTrackVipView.topAnchor.constraint(equalTo: infoView.topAnchor),
|
|
||||||
todayTrackVipView.leadingAnchor.constraint(equalTo: infoView.leadingAnchor),
|
|
||||||
todayTrackVipView.trailingAnchor.constraint(equalTo: infoView.trailingAnchor),
|
|
||||||
todayTrackVipView.bottomAnchor.constraint(equalTo: infoView.bottomAnchor)
|
|
||||||
])
|
|
||||||
|
|
||||||
return view
|
return view
|
||||||
}()
|
}()
|
||||||
|
|
||||||
private lazy var todayTrackVipView: UIImageView = {
|
|
||||||
let view = UIImageView(image: UIImage(named: "MemberVipRequired/today_track"))
|
|
||||||
view.contentMode = .scaleAspectFill
|
|
||||||
view.clipsToBounds = true
|
|
||||||
view.cornerRadius = 16
|
|
||||||
view.isHidden = true
|
|
||||||
view.isUserInteractionEnabled = false
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var stayNumLab: UILabel = {
|
lazy var stayNumLab: UILabel = {
|
||||||
let label = UILabel()
|
let label = UILabel()
|
||||||
|
|
@ -1630,20 +1501,13 @@ private final class CoupleMemberSlot: UIControl {
|
||||||
avatarImageView.setHeadPic(model?.displayHeadPic)
|
avatarImageView.setHeadPic(model?.displayHeadPic)
|
||||||
avatarImageView.layer.borderColor = UIColor(hexStr: isSelected ? "#FFD43B" : "#FFFFFF").cgColor
|
avatarImageView.layer.borderColor = UIColor(hexStr: isSelected ? "#FFD43B" : "#FFFFFF").cgColor
|
||||||
nameLabel.text = model?.showName
|
nameLabel.text = model?.showName
|
||||||
refreshVipVisibility()
|
|
||||||
}
|
|
||||||
|
|
||||||
func refreshVipVisibility() {
|
|
||||||
vipImageView.isHidden = member?.shouldShowVipAvatarFrame != true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func setupUI() {
|
private func setupUI() {
|
||||||
addSubview(avatarImageView)
|
addSubview(avatarImageView)
|
||||||
addSubview(vipImageView)
|
|
||||||
addSubview(nameLabel)
|
addSubview(nameLabel)
|
||||||
|
|
||||||
avatarImageView.translatesAutoresizingMaskIntoConstraints = false
|
avatarImageView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
vipImageView.translatesAutoresizingMaskIntoConstraints = false
|
|
||||||
nameLabel.translatesAutoresizingMaskIntoConstraints = false
|
nameLabel.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
|
||||||
NSLayoutConstraint.activate([
|
NSLayoutConstraint.activate([
|
||||||
|
|
@ -1652,9 +1516,6 @@ private final class CoupleMemberSlot: UIControl {
|
||||||
avatarImageView.widthAnchor.constraint(equalToConstant: 50),
|
avatarImageView.widthAnchor.constraint(equalToConstant: 50),
|
||||||
avatarImageView.heightAnchor.constraint(equalToConstant: 50),
|
avatarImageView.heightAnchor.constraint(equalToConstant: 50),
|
||||||
|
|
||||||
vipImageView.topAnchor.constraint(equalTo: avatarImageView.topAnchor, constant: -2),
|
|
||||||
vipImageView.centerXAnchor.constraint(equalTo: avatarImageView.centerXAnchor),
|
|
||||||
|
|
||||||
nameLabel.topAnchor.constraint(equalTo: avatarImageView.bottomAnchor, constant: 9),
|
nameLabel.topAnchor.constraint(equalTo: avatarImageView.bottomAnchor, constant: 9),
|
||||||
nameLabel.leadingAnchor.constraint(equalTo: leadingAnchor),
|
nameLabel.leadingAnchor.constraint(equalTo: leadingAnchor),
|
||||||
nameLabel.trailingAnchor.constraint(equalTo: trailingAnchor)
|
nameLabel.trailingAnchor.constraint(equalTo: trailingAnchor)
|
||||||
|
|
@ -1671,13 +1532,6 @@ private final class CoupleMemberSlot: UIControl {
|
||||||
return view
|
return view
|
||||||
}()
|
}()
|
||||||
|
|
||||||
private let vipImageView: UIImageView = {
|
|
||||||
let view = UIImageView(image: UIImage(named: "GroupMemberList/vip"))
|
|
||||||
view.contentMode = .scaleAspectFit
|
|
||||||
view.isHidden = true
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
private let nameLabel: UILabel = {
|
private let nameLabel: UILabel = {
|
||||||
let label = UILabel()
|
let label = UILabel()
|
||||||
label.font = .systemFont(ofSize: 12, weight: .medium)
|
label.font = .systemFont(ofSize: 12, weight: .medium)
|
||||||
|
|
|
||||||
|
|
@ -1,913 +0,0 @@
|
||||||
//
|
|
||||||
// HomeView.swift
|
|
||||||
// QuickLocation
|
|
||||||
//
|
|
||||||
// Created by 八条 on 2026/5/27.
|
|
||||||
//
|
|
||||||
|
|
||||||
import UIKit
|
|
||||||
import RxSwift
|
|
||||||
import RxCocoa
|
|
||||||
import Lottie
|
|
||||||
#if !targetEnvironment(simulator)
|
|
||||||
import AMapNaviKit
|
|
||||||
import MarqueeLabel
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class HomeView: UIView {
|
|
||||||
|
|
||||||
var disposeBag = DisposeBag()
|
|
||||||
|
|
||||||
let groupMemberView = GroupMemberView(frame: .zero)
|
|
||||||
|
|
||||||
let quickMessageView = QuickMessageView(frame: CGRectMake(0, kScreenHeight, kScreenWidth, 93))
|
|
||||||
|
|
||||||
let interactionView = InteractionView(frame: CGRectMake(0, kScreenHeight, kScreenWidth, 384))
|
|
||||||
|
|
||||||
var gpsSignalViewList: [UIView] = []
|
|
||||||
|
|
||||||
/// 根据信号格数更新信号条颜色
|
|
||||||
func updateGPSSignal(bars: Int) {
|
|
||||||
let filled = max(0, min(bars, gpsSignalViewList.count))
|
|
||||||
for (i, view) in gpsSignalViewList.enumerated() {
|
|
||||||
view.backgroundColor = i < filled ? UIColor(hexStr: "#4ED178") : UIColor(hexStr: "#E0E0E0")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - groupMemberView 拖拽
|
|
||||||
private var groupMemberTopConstraint: NSLayoutConstraint?
|
|
||||||
private var groupMemberUpLimit: CGFloat = 0
|
|
||||||
private var groupMemberDownLimit: CGFloat = 0
|
|
||||||
private var isGroupMemberLimitsSet = false
|
|
||||||
private var panStartTop: CGFloat = 0
|
|
||||||
/// 内嵌 tableView 是否可滑动(最大化时才可)
|
|
||||||
private var isSubCanScroll = false
|
|
||||||
|
|
||||||
private var groupMemberTableTopOffset: CGFloat {
|
|
||||||
-groupMemberView.tableView.adjustedContentInset.top
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - Map
|
|
||||||
#if !targetEnvironment(simulator)
|
|
||||||
lazy var mapView: MAMapView! = {
|
|
||||||
let mv = MAMapView()
|
|
||||||
mv.zoomLevel = 16
|
|
||||||
mv.showsUserLocation = true
|
|
||||||
mv.userTrackingMode = .none
|
|
||||||
mv.showsCompass = false
|
|
||||||
mv.showsScale = false
|
|
||||||
mv.isRotateEnabled = false
|
|
||||||
mv.isRotateCameraEnabled = false
|
|
||||||
DispatchQueue.main.async { mv.logoCenter = CGPoint(x: kScreenWidth - 50, y: kScreenHeight / 2 + 65) }
|
|
||||||
return mv
|
|
||||||
}()
|
|
||||||
#else
|
|
||||||
lazy var mapPlaceholderView: UIView = {
|
|
||||||
let v = UIView()
|
|
||||||
v.backgroundColor = UIColor(hexStr: "#EDEDED")
|
|
||||||
let label = UILabel()
|
|
||||||
label.text = "Map requires a real device"
|
|
||||||
label.font = UIFont.systemFont(ofSize: 14)
|
|
||||||
label.textColor = UIColor(hexStr: "#999999")
|
|
||||||
label.textAlignment = .center
|
|
||||||
v.addSubview(label)
|
|
||||||
label.translatesAutoresizingMaskIntoConstraints = false
|
|
||||||
NSLayoutConstraint.activate([
|
|
||||||
label.centerXAnchor.constraint(equalTo: v.centerXAnchor),
|
|
||||||
label.centerYAnchor.constraint(equalTo: v.centerYAnchor)
|
|
||||||
])
|
|
||||||
return v
|
|
||||||
}()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/// 面板关闭回调
|
|
||||||
var onDismissPanel: (() -> Void)?
|
|
||||||
|
|
||||||
// MARK: - Setup
|
|
||||||
private func setupRx() {
|
|
||||||
quickMessageView.closeBtn.rx.tap
|
|
||||||
.subscribe(onNext: { [weak self] _ in
|
|
||||||
self?.dismissMemberPanel()
|
|
||||||
self?.onDismissPanel?()
|
|
||||||
})
|
|
||||||
.disposed(by: disposeBag)
|
|
||||||
|
|
||||||
groupMemberView.tableView.rx.setDelegate(self)
|
|
||||||
.disposed(by: disposeBag)
|
|
||||||
|
|
||||||
// 查找位置
|
|
||||||
searchLottieView.rx.tapGesture.subscribe { _ in
|
|
||||||
AppRouter.push(Route.searchLocation)
|
|
||||||
}.disposed(by: disposeBag)
|
|
||||||
|
|
||||||
// 感叹号
|
|
||||||
warningIconView.rx.tapGesture.subscribe { _ in
|
|
||||||
LocationPermissionPopView.show()
|
|
||||||
}.disposed(by: disposeBag)
|
|
||||||
}
|
|
||||||
|
|
||||||
private func setupUI() {
|
|
||||||
#if !targetEnvironment(simulator)
|
|
||||||
addSubview(mapView)
|
|
||||||
#else
|
|
||||||
addSubview(mapPlaceholderView)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
addSubview(navBarBg)
|
|
||||||
addSubview(avatarImgView)
|
|
||||||
addSubview(groupView)
|
|
||||||
groupView.addSubview(groupIconView)
|
|
||||||
groupView.addSubview(groupNameLab)
|
|
||||||
groupView.addSubview(groupArrowIconView)
|
|
||||||
addSubview(messageView)
|
|
||||||
addSubview(messageStackView)
|
|
||||||
addSubview(toolsView)
|
|
||||||
addSubview(warningIconView)
|
|
||||||
addSubview(searchLottieView)
|
|
||||||
addSubview(locationView)
|
|
||||||
locationView.addSubview(locationIconView)
|
|
||||||
addSubview(emojiPopView)
|
|
||||||
addSubview(sosPopView)
|
|
||||||
|
|
||||||
#if !targetEnvironment(simulator)
|
|
||||||
mapView.layoutChain
|
|
||||||
.top()
|
|
||||||
.edges(excludingEdge: .top)
|
|
||||||
sendSubviewToBack(mapView)
|
|
||||||
#else
|
|
||||||
mapPlaceholderView.layoutChain
|
|
||||||
.topToBottomOfView(navBarBg)
|
|
||||||
.left(0).right(0).bottom(0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
navBarBg.layoutChain
|
|
||||||
.edges(excludingEdge: .bottom)
|
|
||||||
.heightToWidth(160/375)
|
|
||||||
|
|
||||||
avatarImgView.layoutChain
|
|
||||||
.top(59)
|
|
||||||
.left(15)
|
|
||||||
.width(36)
|
|
||||||
.heightToWidth(1)
|
|
||||||
|
|
||||||
groupView.layoutChain
|
|
||||||
.centerY(avatarImgView)
|
|
||||||
.height(36)
|
|
||||||
.centerX()
|
|
||||||
.width(185, relation: .greaterThanOrEqual)
|
|
||||||
|
|
||||||
groupIconView.layoutChain
|
|
||||||
.left(11)
|
|
||||||
.centerY()
|
|
||||||
.width(30)
|
|
||||||
.height(30)
|
|
||||||
|
|
||||||
groupArrowIconView.layoutChain
|
|
||||||
.right(15)
|
|
||||||
.centerY()
|
|
||||||
.width(15)
|
|
||||||
.height(8.5)
|
|
||||||
|
|
||||||
groupNameLab.layoutChain
|
|
||||||
.edgesVertical()
|
|
||||||
.leftToRightOfView(groupIconView)
|
|
||||||
.rightToLeftOfView(groupArrowIconView)
|
|
||||||
|
|
||||||
messageView.layoutChain
|
|
||||||
.right(15)
|
|
||||||
.centerY(groupView)
|
|
||||||
.width(36)
|
|
||||||
.height(36)
|
|
||||||
|
|
||||||
messageStackView.layoutChain
|
|
||||||
.topToBottomOfView(messageView, offset: 23)
|
|
||||||
.edgesHorzontal(15)
|
|
||||||
|
|
||||||
toolsView.layoutChain
|
|
||||||
.left(15)
|
|
||||||
.width(40)
|
|
||||||
.centerY(self, offset: -50)
|
|
||||||
|
|
||||||
warningIconView.layoutChain
|
|
||||||
.bottomToTopOfView(toolsView, offset: -10)
|
|
||||||
.centerX(toolsView)
|
|
||||||
.width(28)
|
|
||||||
.heightToWidth(1)
|
|
||||||
|
|
||||||
searchLottieView.layoutChain
|
|
||||||
.centerY(toolsView)
|
|
||||||
.right()
|
|
||||||
.width(100)
|
|
||||||
.height(100)
|
|
||||||
|
|
||||||
locationView.layoutChain
|
|
||||||
.right(15)
|
|
||||||
.bottomToView(toolsView, offset: -10)
|
|
||||||
.width(40)
|
|
||||||
.height(40)
|
|
||||||
|
|
||||||
locationIconView.layoutChain
|
|
||||||
.centerX()
|
|
||||||
.centerY()
|
|
||||||
|
|
||||||
emojiPopView.layoutChain
|
|
||||||
.centerX().centerY()
|
|
||||||
.width(180).height(180)
|
|
||||||
|
|
||||||
sosPopView.layoutChain
|
|
||||||
.bottomToView(toolsView)
|
|
||||||
.leftToRightOfView(toolsView)
|
|
||||||
.height(57).width(57)
|
|
||||||
|
|
||||||
// 圈子成员View
|
|
||||||
addSubview(groupMemberView)
|
|
||||||
|
|
||||||
groupMemberView.layoutChain
|
|
||||||
.topToBottomOfView(toolsView, offset: 10)
|
|
||||||
.edgesHorzontal()
|
|
||||||
.bottom()
|
|
||||||
|
|
||||||
groupMemberTopConstraint = groupMemberView.jh_constraint(
|
|
||||||
.top, toAttribute: .bottom, otherView: toolsView, relation: .equal
|
|
||||||
)
|
|
||||||
|
|
||||||
let pan = UIPanGestureRecognizer(target: self, action: #selector(handleGroupMemberPan(_:)))
|
|
||||||
pan.delegate = self
|
|
||||||
groupMemberView.addGestureRecognizer(pan)
|
|
||||||
groupMemberView.tableView.isScrollEnabled = false
|
|
||||||
|
|
||||||
// 底部弹出面板(quickMessageView 在上,interactionView 在下)
|
|
||||||
addSubview(interactionView)
|
|
||||||
addSubview(quickMessageView)
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - 底部面板显隐
|
|
||||||
func showMemberPanel(member: CircleMember) {
|
|
||||||
interactionView.configure(member: member)
|
|
||||||
quickMessageView.isHidden = false
|
|
||||||
interactionView.isHidden = false
|
|
||||||
toolsView.isHidden = true
|
|
||||||
searchLottieView.isHidden = true
|
|
||||||
quickMessageView.frame.origin.y = kScreenHeight - 384 - 93
|
|
||||||
interactionView.frame.origin.y = kScreenHeight - 384
|
|
||||||
}
|
|
||||||
|
|
||||||
func dismissMemberPanel() {
|
|
||||||
quickMessageView.frame.origin.y = kScreenHeight
|
|
||||||
interactionView.frame.origin.y = kScreenHeight
|
|
||||||
quickMessageView.isHidden = true
|
|
||||||
interactionView.isHidden = true
|
|
||||||
toolsView.isHidden = false
|
|
||||||
searchLottieView.isHidden = AppContextManager.shared.systemConfig?.isIntercept == true
|
|
||||||
onDismissPanel?()
|
|
||||||
}
|
|
||||||
|
|
||||||
override init(frame: CGRect) {
|
|
||||||
super.init(frame: .zero)
|
|
||||||
backgroundColor = .white
|
|
||||||
setupUI()
|
|
||||||
setupRx()
|
|
||||||
|
|
||||||
searchLottieView.play()
|
|
||||||
}
|
|
||||||
|
|
||||||
required init?(coder aDecoder: NSCoder) {
|
|
||||||
fatalError("init(coder:) has not been implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - Layout
|
|
||||||
override func layoutSubviews() {
|
|
||||||
super.layoutSubviews()
|
|
||||||
|
|
||||||
noticeView.layoutIfNeeded()
|
|
||||||
noticeInfoView.setGradientLayer(frame: noticeInfoView.bounds,
|
|
||||||
startPoint: CGPoint(x: 0, y: 0.5),
|
|
||||||
endPoint: CGPoint(x: 1, y: 0.5),
|
|
||||||
colors: [UIColor(hexStr: "#FFFFFF", alpha: 0), UIColor(hexStr: "#FFFFFF"), UIColor(hexStr: "#FFFFFF", alpha: 0)],
|
|
||||||
locations: [0, 0.5, 1])
|
|
||||||
|
|
||||||
if !isGroupMemberLimitsSet {
|
|
||||||
isGroupMemberLimitsSet = true
|
|
||||||
groupMemberDownLimit = groupMemberView.frame.minY
|
|
||||||
groupMemberUpLimit = groupView.frame.maxY + 20
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - Pan Gesture
|
|
||||||
@objc private func handleGroupMemberPan(_ pan: UIPanGestureRecognizer) {
|
|
||||||
guard isGroupMemberLimitsSet, let topConstraint = groupMemberTopConstraint else { return }
|
|
||||||
|
|
||||||
switch pan.state {
|
|
||||||
case .began:
|
|
||||||
layoutIfNeeded()
|
|
||||||
panStartTop = groupMemberView.frame.minY
|
|
||||||
|
|
||||||
case .changed:
|
|
||||||
let newTop = panStartTop + pan.translation(in: self).y
|
|
||||||
let scrollOffset = groupMemberView.tableView.contentOffset.y
|
|
||||||
|
|
||||||
// 最大化状态下,tableView 可以向下滑时,不干扰自身滑动;
|
|
||||||
// 只有 tableView 到达顶部继续下拉时,才切换为 view 拖拽
|
|
||||||
if isSubCanScroll {
|
|
||||||
if scrollOffset > groupMemberTableTopOffset + 0.5 {
|
|
||||||
// 内容正在滑动,不移动 GroupMemberView
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if pan.velocity(in: self).y > 0 || groupMemberView.frame.minY > groupMemberUpLimit + 1 {
|
|
||||||
// 内容真正到顶并继续下拉 → 切回面板拖拽
|
|
||||||
isSubCanScroll = false
|
|
||||||
panStartTop = groupMemberView.frame.minY
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// GroupMemberView 在顶部且继续上滑 → 激活内容滑动
|
|
||||||
if groupMemberView.frame.minY <= groupMemberUpLimit && newTop <= groupMemberUpLimit {
|
|
||||||
isSubCanScroll = true
|
|
||||||
panStartTop = groupMemberView.frame.minY
|
|
||||||
topConstraint.constant = groupMemberUpLimit - groupMemberDownLimit + 10
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let clamped = max(groupMemberUpLimit, min(groupMemberDownLimit, newTop))
|
|
||||||
topConstraint.constant = clamped - groupMemberDownLimit + 10
|
|
||||||
|
|
||||||
case .ended, .cancelled:
|
|
||||||
let velocity = pan.velocity(in: self)
|
|
||||||
let isNearUp = abs(groupMemberView.frame.minY - groupMemberUpLimit) < abs(groupMemberView.frame.minY - groupMemberDownLimit)
|
|
||||||
let target: CGFloat
|
|
||||||
if groupMemberView.frame.minY <= groupMemberUpLimit + 5 {
|
|
||||||
// 顶部附近由位置决定去向,避免 tableView 松手速度触发父面板误回收
|
|
||||||
target = isNearUp ? groupMemberUpLimit : groupMemberDownLimit
|
|
||||||
} else if abs(velocity.y) > 200 {
|
|
||||||
target = velocity.y < 0 ? groupMemberUpLimit : groupMemberDownLimit
|
|
||||||
} else {
|
|
||||||
target = isNearUp ? groupMemberUpLimit : groupMemberDownLimit
|
|
||||||
}
|
|
||||||
topConstraint.constant = target - groupMemberDownLimit + 10
|
|
||||||
let atTop = target == self.groupMemberUpLimit
|
|
||||||
if !atTop {
|
|
||||||
isSubCanScroll = false
|
|
||||||
groupMemberView.tableView.isScrollEnabled = false
|
|
||||||
groupMemberView.tableView.setContentOffset(CGPoint(x: 0, y: groupMemberTableTopOffset), animated: false)
|
|
||||||
}
|
|
||||||
isSubCanScroll = atTop
|
|
||||||
|
|
||||||
UIView.animate(withDuration: 0.25, delay: 0,
|
|
||||||
options: [.curveEaseOut, .allowUserInteraction]) {
|
|
||||||
self.layoutIfNeeded()
|
|
||||||
} completion: { _ in
|
|
||||||
self.groupMemberView.tableView.isScrollEnabled = atTop
|
|
||||||
}
|
|
||||||
|
|
||||||
default:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 收起 GroupMemberView(选中成员后调用)
|
|
||||||
func dismissGroupMemberView() {
|
|
||||||
guard isGroupMemberLimitsSet, let topConstraint = groupMemberTopConstraint else { return }
|
|
||||||
isSubCanScroll = false
|
|
||||||
groupMemberView.tableView.isScrollEnabled = false
|
|
||||||
topConstraint.constant = groupMemberDownLimit - groupMemberDownLimit + 10
|
|
||||||
groupMemberView.tableView.setContentOffset(CGPoint(x: 0, y: groupMemberTableTopOffset), animated: false)
|
|
||||||
UIView.animate(withDuration: 0.25, delay: 0, options: .curveEaseOut) {
|
|
||||||
self.layoutIfNeeded()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - UI Components
|
|
||||||
lazy var navBarBg: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.image = UIImage(named: "Home/navBar_bg")
|
|
||||||
view.contentMode = .scaleAspectFill
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var avatarImgView: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.backgroundColor = .lightGray
|
|
||||||
view.contentMode = .scaleAspectFill
|
|
||||||
view.cornerRadius = 18
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
// 圈子选择
|
|
||||||
lazy var groupView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = .white
|
|
||||||
view.cornerRadius = 18
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var groupIconView: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.image = UIImage(named: "Home/group")
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
view.contentMode = .scaleAspectFill
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var groupNameLab: UILabel = {
|
|
||||||
let label = UILabel()
|
|
||||||
label.font = .systemFont(ofSize: 16, weight: .medium)
|
|
||||||
label.textColor = UIColor(hexStr: "#0F2846")
|
|
||||||
label.textAlignment = .center
|
|
||||||
return label
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var groupArrowIconView: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.image = UIImage(named: "Home/arrow_down")
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
view.contentMode = .scaleAspectFill
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
/// 消息
|
|
||||||
lazy var messageView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = .white
|
|
||||||
view.cornerRadius = 18
|
|
||||||
view.clipsToBounds = false
|
|
||||||
view.isHidden = true
|
|
||||||
|
|
||||||
view.addSubview(messageIcon)
|
|
||||||
view.addSubview(messageDotView)
|
|
||||||
|
|
||||||
messageIcon.layoutChain
|
|
||||||
.centerX().centerY()
|
|
||||||
|
|
||||||
messageDotView.layoutChain
|
|
||||||
.top()
|
|
||||||
.right()
|
|
||||||
.width(10)
|
|
||||||
.height(10)
|
|
||||||
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var messageIcon: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.image = UIImage(named: "Home/message")
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
view.contentMode = .scaleAspectFill
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var messageDotView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = UIColor(hexStr: "#FD5E61")
|
|
||||||
view.cornerRadius = 5
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var messageStackView: UIStackView = {
|
|
||||||
let view = UIStackView(arrangedSubviews: [tipsView, messageBubbleView])
|
|
||||||
view.axis = .vertical
|
|
||||||
view.alignment = .leading
|
|
||||||
view.spacing = 5
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var tipsView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
view.layoutChain.height(22)
|
|
||||||
|
|
||||||
view.addSubview(gpsSignalView)
|
|
||||||
gpsSignalView.layoutChain
|
|
||||||
.left()
|
|
||||||
.centerY()
|
|
||||||
|
|
||||||
view.addSubview(noticeView)
|
|
||||||
noticeView.layoutChain
|
|
||||||
.leftToRightOfView(gpsSignalView, offset: 0)
|
|
||||||
.right(15)
|
|
||||||
.edgesVertical()
|
|
||||||
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
// MARK: - 卫星信号
|
|
||||||
lazy var gpsSignalView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.cornerRadius = 5
|
|
||||||
view.backgroundColor = .black.withAlphaComponent(0.4)
|
|
||||||
|
|
||||||
let signalView1 = UIView()
|
|
||||||
signalView1.backgroundColor = UIColor(hexStr: "#E6E6E6")
|
|
||||||
view.addSubview(signalView1)
|
|
||||||
signalView1.layoutChain
|
|
||||||
.left(7)
|
|
||||||
.bottom(5)
|
|
||||||
.width(3)
|
|
||||||
.height(4)
|
|
||||||
|
|
||||||
let signalView2 = UIView()
|
|
||||||
signalView2.backgroundColor = UIColor(hexStr: "#E6E6E6")
|
|
||||||
view.addSubview(signalView2)
|
|
||||||
signalView2.layoutChain
|
|
||||||
.leftToRightOfView(signalView1, offset: 2)
|
|
||||||
.bottomToView(signalView1)
|
|
||||||
.width(3)
|
|
||||||
.height(6)
|
|
||||||
|
|
||||||
let signalView3 = UIView()
|
|
||||||
signalView3.backgroundColor = UIColor(hexStr: "#E6E6E6")
|
|
||||||
view.addSubview(signalView3)
|
|
||||||
signalView3.layoutChain
|
|
||||||
.leftToRightOfView(signalView2, offset: 2)
|
|
||||||
.bottomToView(signalView1)
|
|
||||||
.width(3)
|
|
||||||
.height(8)
|
|
||||||
|
|
||||||
let signalView4 = UIView()
|
|
||||||
signalView4.backgroundColor = UIColor(hexStr: "#E6E6E6")
|
|
||||||
view.addSubview(signalView4)
|
|
||||||
signalView4.layoutChain
|
|
||||||
.leftToRightOfView(signalView3, offset: 2)
|
|
||||||
.bottomToView(signalView1)
|
|
||||||
.width(3)
|
|
||||||
.height(10)
|
|
||||||
|
|
||||||
let label = UILabel()
|
|
||||||
label.text = "卫星信号"
|
|
||||||
label.font = .systemFont(ofSize: 10, weight: .medium)
|
|
||||||
label.textColor = .white
|
|
||||||
view.addSubview(label)
|
|
||||||
label.layoutChain
|
|
||||||
.leftToRightOfView(signalView4, offset: 2)
|
|
||||||
.edgesVertical(4)
|
|
||||||
.right(7)
|
|
||||||
|
|
||||||
gpsSignalViewList = [signalView1, signalView2, signalView3, signalView4]
|
|
||||||
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
// MARK: - 公告
|
|
||||||
lazy var noticeView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
|
|
||||||
view.addSubview(noticeInfoView)
|
|
||||||
noticeInfoView.layoutChain
|
|
||||||
.left()
|
|
||||||
.right()
|
|
||||||
.edgesVertical()
|
|
||||||
|
|
||||||
view.addSubview(noticeCloseBtn)
|
|
||||||
noticeCloseBtn.layoutChain
|
|
||||||
.right()
|
|
||||||
.width(16)
|
|
||||||
.height(16)
|
|
||||||
.centerY()
|
|
||||||
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var noticeInfoView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
|
|
||||||
// let titleLab = UILabel()
|
|
||||||
// titleLab.text = "公告信息"
|
|
||||||
// titleLab.font = .systemFont(ofSize: 10, weight: .medium)
|
|
||||||
// titleLab.textColor = UIColor(hexStr: "#0F2948")
|
|
||||||
// view.addSubview(titleLab)
|
|
||||||
// titleLab.layoutChain
|
|
||||||
// .left(16)
|
|
||||||
// .centerY()
|
|
||||||
// .width(40)
|
|
||||||
|
|
||||||
view.addSubview(noticeLab)
|
|
||||||
noticeLab.layoutChain
|
|
||||||
.left(16)
|
|
||||||
.centerY()
|
|
||||||
.right(24)
|
|
||||||
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var noticeLab: CallbackMarqueeLabel = {
|
|
||||||
let label = CallbackMarqueeLabel()
|
|
||||||
label.font = .systemFont(ofSize: 10, weight: .medium)
|
|
||||||
label.textColor = UIColor(hexStr: "#0F2948")
|
|
||||||
return label
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var noticeCloseBtn: UIButton = {
|
|
||||||
let btn = UIButton()
|
|
||||||
btn.setImage(UIImage(named: "Common/x_black"), for: .normal)
|
|
||||||
btn.backgroundColor = .white
|
|
||||||
btn.cornerRadius = 8
|
|
||||||
btn.extendEdgeInsets = UIEdgeInsets(top: 15, left: 15, bottom: 15, right: 15)
|
|
||||||
btn.rx.tap.subscribe(onNext: { [weak self] _ in
|
|
||||||
self?.noticeView.isHidden = true
|
|
||||||
}).disposed(by: disposeBag)
|
|
||||||
return btn
|
|
||||||
}()
|
|
||||||
|
|
||||||
// MARK: - 消息气泡
|
|
||||||
lazy var messageBubbleView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = .white.withAlphaComponent(0.8)
|
|
||||||
view.cornerRadius = 10
|
|
||||||
view.isHidden = true
|
|
||||||
|
|
||||||
view.addSubview(messageLab)
|
|
||||||
messageLab.layoutChain
|
|
||||||
.edges(all: 12)
|
|
||||||
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var messageLab: UILabel = {
|
|
||||||
let label = UILabel()
|
|
||||||
label.font = .systemFont(ofSize: 12, weight: .medium)
|
|
||||||
label.textColor = UIColor(hexStr: "#0F2846")
|
|
||||||
return label
|
|
||||||
}()
|
|
||||||
|
|
||||||
// MARK: - SOS
|
|
||||||
lazy var sosPopView: LottieAnimationView = {
|
|
||||||
let view = LottieAnimationView(name: "siren")
|
|
||||||
view.loopMode = .loop
|
|
||||||
view.isHidden = true
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
// MARK: - 表情展示
|
|
||||||
lazy var emojiPopView: LottieAnimationView = {
|
|
||||||
let view = LottieAnimationView()
|
|
||||||
view.loopMode = .playOnce
|
|
||||||
view.isHidden = true
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
// MARK: - warning 惊叹号图标
|
|
||||||
lazy var warningIconView: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.image = UIImage(named: "Home/warning")
|
|
||||||
view.contentMode = .scaleAspectFill
|
|
||||||
view.isHidden = true
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
// MARK: - 侧边工具栏
|
|
||||||
lazy var toolsView: UIStackView = {
|
|
||||||
let view = UIStackView(arrangedSubviews: [bubbleView, signInView, sosView, scheduleView])
|
|
||||||
view.axis = .vertical
|
|
||||||
view.distribution = .fill
|
|
||||||
view.alignment = .fill
|
|
||||||
view.backgroundColor = .black.withAlphaComponent(0.5)
|
|
||||||
view.cornerRadius = 20
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
// 气泡
|
|
||||||
lazy var bubbleView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
|
|
||||||
view.addSubview(bubbleIcon)
|
|
||||||
bubbleIcon.layoutChain
|
|
||||||
.top(10)
|
|
||||||
.centerX()
|
|
||||||
.width(28)
|
|
||||||
.height(28)
|
|
||||||
|
|
||||||
view.addSubview(bubbleLab)
|
|
||||||
bubbleLab.layoutChain
|
|
||||||
.topToBottomOfView(bubbleIcon, offset: 4)
|
|
||||||
.edgesHorzontal()
|
|
||||||
|
|
||||||
let lineView = UIView()
|
|
||||||
lineView.backgroundColor = .white
|
|
||||||
view.addSubview(lineView)
|
|
||||||
lineView.layoutChain
|
|
||||||
.width(12)
|
|
||||||
.height(2)
|
|
||||||
.centerX()
|
|
||||||
.bottom(7)
|
|
||||||
lineView.layoutChain.topToBottomOfView(bubbleLab, offset: 4)
|
|
||||||
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var bubbleIcon: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.image = UIImage(named: "Home/bubble")
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
view.contentMode = .scaleAspectFill
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var bubbleLab: UILabel = {
|
|
||||||
let label = UILabel()
|
|
||||||
label.text = "气泡"
|
|
||||||
label.font = .systemFont(ofSize: 10, weight: .medium)
|
|
||||||
label.textColor = .white
|
|
||||||
label.textAlignment = .center
|
|
||||||
return label
|
|
||||||
}()
|
|
||||||
|
|
||||||
// 签到
|
|
||||||
lazy var signInView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
|
|
||||||
view.addSubview(signInIcon)
|
|
||||||
signInIcon.layoutChain
|
|
||||||
.top()
|
|
||||||
.centerX()
|
|
||||||
.width(28)
|
|
||||||
.height(28)
|
|
||||||
|
|
||||||
view.addSubview(signInLab)
|
|
||||||
signInLab.layoutChain
|
|
||||||
.topToBottomOfView(signInIcon, offset: 4)
|
|
||||||
.edgesHorzontal()
|
|
||||||
|
|
||||||
let lineView = UIView()
|
|
||||||
lineView.backgroundColor = .white
|
|
||||||
view.addSubview(lineView)
|
|
||||||
lineView.layoutChain
|
|
||||||
.width(12)
|
|
||||||
.height(2)
|
|
||||||
.centerX()
|
|
||||||
.bottom(7)
|
|
||||||
lineView.layoutChain.topToBottomOfView(signInLab, offset: 4)
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var signInIcon: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.image = UIImage(named: "Home/signIn")
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
view.contentMode = .scaleAspectFill
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var signInLab: UILabel = {
|
|
||||||
let label = UILabel()
|
|
||||||
label.text = "签到"
|
|
||||||
label.font = .systemFont(ofSize: 10, weight: .medium)
|
|
||||||
label.textColor = .white
|
|
||||||
label.textAlignment = .center
|
|
||||||
return label
|
|
||||||
}()
|
|
||||||
|
|
||||||
// SOS
|
|
||||||
lazy var sosView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
view.addSubview(sosIcon)
|
|
||||||
view.addSubview(sosLab)
|
|
||||||
|
|
||||||
sosIcon.layoutChain
|
|
||||||
.top()
|
|
||||||
.centerX()
|
|
||||||
.width(28)
|
|
||||||
.height(28)
|
|
||||||
|
|
||||||
sosLab.layoutChain
|
|
||||||
.topToBottomOfView(sosIcon, offset: 4)
|
|
||||||
.edgesHorzontal()
|
|
||||||
|
|
||||||
let lineView = UIView()
|
|
||||||
lineView.backgroundColor = .white
|
|
||||||
view.addSubview(lineView)
|
|
||||||
lineView.layoutChain
|
|
||||||
.width(12)
|
|
||||||
.height(2)
|
|
||||||
.centerX()
|
|
||||||
.bottom(7)
|
|
||||||
lineView.layoutChain.topToBottomOfView(sosLab, offset: 4)
|
|
||||||
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var sosIcon: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.image = UIImage(named: "Home/sos")
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
view.contentMode = .scaleAspectFill
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var sosLab: UILabel = {
|
|
||||||
let label = UILabel()
|
|
||||||
label.text = "SOS"
|
|
||||||
label.font = .systemFont(ofSize: 10, weight: .medium)
|
|
||||||
label.textColor = .white
|
|
||||||
label.textAlignment = .center
|
|
||||||
return label
|
|
||||||
}()
|
|
||||||
|
|
||||||
// 行程
|
|
||||||
lazy var scheduleView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
|
|
||||||
let icon = UIImageView(image: UIImage(named: "Home/schedule"))
|
|
||||||
icon.contentMode = .scaleAspectFill
|
|
||||||
view.addSubview(icon)
|
|
||||||
icon.layoutChain
|
|
||||||
.top()
|
|
||||||
.centerX()
|
|
||||||
.width(28)
|
|
||||||
.height(28)
|
|
||||||
|
|
||||||
let label = UILabel()
|
|
||||||
label.text = "行程"
|
|
||||||
label.font = .systemFont(ofSize: 10, weight: .medium)
|
|
||||||
label.textColor = .white
|
|
||||||
label.textAlignment = .center
|
|
||||||
view.addSubview(label)
|
|
||||||
label.layoutChain
|
|
||||||
.topToBottomOfView(icon, offset: 4)
|
|
||||||
.edgesHorzontal()
|
|
||||||
label.layoutChain.bottom(10)
|
|
||||||
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
// MARK: - 查位置
|
|
||||||
lazy var searchLottieView: LottieAnimationView = {
|
|
||||||
let view = LottieAnimationView(name: "home_search")
|
|
||||||
view.loopMode = .loop
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
// MARK: - 定位按钮
|
|
||||||
lazy var locationView: UIView = {
|
|
||||||
let view = UIView()
|
|
||||||
view.backgroundColor = .black.withAlphaComponent(0.4)
|
|
||||||
view.cornerRadius = 20
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
|
|
||||||
lazy var locationIconView: UIImageView = {
|
|
||||||
let view = UIImageView()
|
|
||||||
view.backgroundColor = .clear
|
|
||||||
view.image = UIImage(named: "Home/location")
|
|
||||||
return view
|
|
||||||
}()
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - UIScrollViewDelegate
|
|
||||||
extension HomeView: UIScrollViewDelegate {
|
|
||||||
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
|
|
||||||
guard scrollView == groupMemberView.tableView else { return }
|
|
||||||
if scrollView.contentOffset.y > groupMemberTableTopOffset {
|
|
||||||
isSubCanScroll = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
|
||||||
guard scrollView == groupMemberView.tableView else { return }
|
|
||||||
if isSubCanScroll {
|
|
||||||
if scrollView.contentOffset.y <= groupMemberTableTopOffset {
|
|
||||||
isSubCanScroll = false
|
|
||||||
scrollView.contentOffset = CGPoint(x: 0, y: groupMemberTableTopOffset)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
scrollView.contentOffset = CGPoint(x: 0, y: groupMemberTableTopOffset)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - UIGestureRecognizerDelegate
|
|
||||||
extension HomeView: UIGestureRecognizerDelegate {
|
|
||||||
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer,
|
|
||||||
shouldRecognizeSimultaneouslyWith other: UIGestureRecognizer) -> Bool {
|
|
||||||
// 允许 GroupMemberView 的 pan 与 tableView 的 pan 同时识别
|
|
||||||
// 滚动状态由 isSubCanScroll + contentOffset 控制,不影响手势判定
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - CallbackMarqueeLabel
|
|
||||||
class CallbackMarqueeLabel: MarqueeLabel {
|
|
||||||
// 闭包回调对外抛出事件
|
|
||||||
var onScrollLoopComplete: (() -> Void)?
|
|
||||||
var onScrollStart: (() -> Void)?
|
|
||||||
|
|
||||||
// 滚动开始
|
|
||||||
override func labelWillBeginScroll() {
|
|
||||||
super.labelWillBeginScroll()
|
|
||||||
onScrollStart?()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 单次滚动一圈完成
|
|
||||||
override func labelReturnedToHome(_ finished: Bool) {
|
|
||||||
super.labelReturnedToHome(finished)
|
|
||||||
// 只处理正常滚动结束,过滤中途重置
|
|
||||||
guard finished else { return }
|
|
||||||
onScrollLoopComplete?()
|
|
||||||
}
|
|
||||||
}
|
|
||||||