refactor: 移除分享相关代码以简化项目结构

主要变更:
1. 从 Podfile 中移除 FBSDKShareKit 和 mob_sharesdk 相关依赖,减少项目依赖。
2. 从 AppDelegate 和相关文件中删除 ShareSDK 初始化及相关逻辑,清理未使用的代码。
3. 删除与分享功能相关的 XPShareView 及其模型文件,简化项目结构。

此更新旨在提升项目的可维护性,减少冗余依赖,确保代码结构更加清晰。
This commit is contained in:
edwinQQQ
2025-10-20 15:10:45 +08:00
parent 4706f4bcc6
commit 7b88912b37
17 changed files with 103 additions and 1227 deletions

View File

@@ -8,7 +8,6 @@ target 'YuMi' do
pod 'Bugly' pod 'Bugly'
pod 'FBSDKLoginKit' pod 'FBSDKLoginKit'
pod 'FBSDKCoreKit' pod 'FBSDKCoreKit'
pod 'FBSDKShareKit'
# 滑动标签栏 # 滑动标签栏
pod 'JXCategoryView' pod 'JXCategoryView'
pod 'JXPagingView/Pager' pod 'JXPagingView/Pager'
@@ -54,9 +53,6 @@ target 'YuMi' do
pod 'GKCycleScrollView' pod 'GKCycleScrollView'
pod 'SVGAPlayer' pod 'SVGAPlayer'
pod 'GoogleSignIn' pod 'GoogleSignIn'
pod 'mob_sharesdk'
pod 'mob_sharesdk/ShareSDKPlatforms/Apple'
pod 'mob_sharesdk/ShareSDKExtension'
pod 'ZLCollectionViewFlowLayout' pod 'ZLCollectionViewFlowLayout'
pod 'TABAnimated' pod 'TABAnimated'

View File

@@ -14,75 +14,74 @@ PODS:
- AFNetworking/Serialization (4.0.1) - AFNetworking/Serialization (4.0.1)
- AFNetworking/UIKit (4.0.1): - AFNetworking/UIKit (4.0.1):
- AFNetworking/NSURLSession - AFNetworking/NSURLSession
- AppAuth (1.7.6): - AppAuth (2.0.0):
- AppAuth/Core (= 1.7.6) - AppAuth/Core (= 2.0.0)
- AppAuth/ExternalUserAgent (= 1.7.6) - AppAuth/ExternalUserAgent (= 2.0.0)
- AppAuth/Core (1.7.6) - AppAuth/Core (2.0.0)
- AppAuth/ExternalUserAgent (1.7.6): - AppAuth/ExternalUserAgent (2.0.0):
- AppAuth/Core - AppAuth/Core
- AppCheckCore (11.2.0):
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/UserDefaults (~> 8.0)
- PromisesObjC (~> 2.4)
- Base64 (1.1.2) - Base64 (1.1.2)
- Bugly (2.6.1) - Bugly (2.6.1)
- CocoaAsyncSocket (7.6.5) - CocoaAsyncSocket (7.6.5)
- FBAEMKit (14.1.0): - FBAEMKit (18.0.1):
- FBSDKCoreKit_Basics (= 14.1.0) - FBSDKCoreKit_Basics (= 18.0.1)
- FBSDKCoreKit (14.1.0): - FBSDKCoreKit (18.0.1):
- FBAEMKit (= 14.1.0) - FBAEMKit (= 18.0.1)
- FBSDKCoreKit_Basics (= 14.1.0) - FBSDKCoreKit_Basics (= 18.0.1)
- FBSDKCoreKit_Basics (14.1.0) - FBSDKCoreKit_Basics (18.0.1)
- FBSDKLoginKit (14.1.0): - FBSDKLoginKit (18.0.1):
- FBSDKCoreKit (= 14.1.0) - FBSDKCoreKit (= 18.0.1)
- FBSDKShareKit (14.1.0):
- FBSDKCoreKit (= 14.1.0)
- FFPopup (1.1.5) - FFPopup (1.1.5)
- FLAnimatedImage (1.0.17) - FLAnimatedImage (1.0.17)
- FlyVerifyCSDK (1.0.7)
- GKCycleScrollView (1.2.3) - GKCycleScrollView (1.2.3)
- GoogleSignIn (7.1.0): - GoogleSignIn (9.0.0):
- AppAuth (< 2.0, >= 1.7.3) - AppAuth (~> 2.0)
- GTMAppAuth (< 5.0, >= 4.1.1) - AppCheckCore (~> 11.0)
- GTMAppAuth (~> 5.0)
- GTMSessionFetcher/Core (~> 3.3) - GTMSessionFetcher/Core (~> 3.3)
- GTMAppAuth (4.1.1): - GoogleUtilities/Environment (8.1.0):
- AppAuth/Core (~> 1.7) - GoogleUtilities/Privacy
- GoogleUtilities/Logger (8.1.0):
- GoogleUtilities/Environment
- GoogleUtilities/Privacy
- GoogleUtilities/Privacy (8.1.0)
- GoogleUtilities/UserDefaults (8.1.0):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GTMAppAuth (5.0.0):
- AppAuth/Core (~> 2.0)
- GTMSessionFetcher/Core (< 4.0, >= 3.3) - GTMSessionFetcher/Core (< 4.0, >= 3.3)
- GTMSessionFetcher/Core (3.5.0) - GTMSessionFetcher/Core (3.5.0)
- IQKeyboardManager (6.5.19) - IQKeyboardManager (6.5.19)
- JXCategoryView (1.6.8) - JXCategoryView (1.6.8)
- JXPagingView/Pager (2.1.3) - JXPagingView/Pager (2.1.3)
- libpag (4.4.32) - libpag (4.5.3)
- MarqueeLabel (4.4.0) - MarqueeLabel (4.5.3)
- Masonry (1.1.0) - Masonry (1.1.0)
- MBProgressHUD (1.2.0) - MBProgressHUD (1.2.0)
- MJExtension (3.4.2) - MJExtension (3.4.2)
- MJRefresh (3.7.9) - MJRefresh (3.7.9)
- mob_sharesdk (4.4.35): - NIMSDK_LITE (10.9.53):
- mob_sharesdk/ShareSDK (= 4.4.35) - NIMSDK_LITE/NOS (= 10.9.53)
- MOBFoundation (>= 3.2.9)
- mob_sharesdk/ShareSDK (4.4.35):
- MOBFoundation (>= 3.2.9)
- mob_sharesdk/ShareSDKExtension (4.4.35):
- mob_sharesdk/ShareSDK
- MOBFoundation (>= 3.2.9)
- mob_sharesdk/ShareSDKPlatforms/Apple (4.4.35):
- mob_sharesdk/ShareSDK
- MOBFoundation (>= 3.2.9)
- MOBFoundation (20250528):
- FlyVerifyCSDK (>= 0.0.7)
- NIMSDK_LITE (10.9.42):
- NIMSDK_LITE/NOS (= 10.9.42)
- YXArtemis_XCFramework - YXArtemis_XCFramework
- NIMSDK_LITE/NOS (10.9.42): - NIMSDK_LITE/NOS (10.9.53):
- YXArtemis_XCFramework - YXArtemis_XCFramework
- pop (1.0.12) - pop (1.0.12)
- PromisesObjC (2.4.0)
- Protobuf (3.29.5) - Protobuf (3.29.5)
- QCloudCore (6.4.9): - QCloudCore (6.5.1):
- QCloudCore/Default (= 6.4.9) - QCloudCore/Default (= 6.5.1)
- QCloudCore/Default (6.4.9): - QCloudCore/Default (6.5.1):
- QCloudTrack/Beacon (= 6.4.9) - QCloudTrack/Beacon (= 6.5.1)
- QCloudCOSXML (6.4.9): - QCloudCOSXML (6.5.1):
- QCloudCOSXML/Default (= 6.4.9) - QCloudCOSXML/Default (= 6.5.1)
- QCloudCOSXML/Default (6.4.9): - QCloudCOSXML/Default (6.5.1):
- QCloudCore (= 6.4.9) - QCloudCore (= 6.5.1)
- QCloudTrack/Beacon (6.4.9) - QCloudTrack/Beacon (6.5.1)
- QGVAPlayer (1.0.19) - QGVAPlayer (1.0.19)
- ReactiveObjC (3.1.1) - ReactiveObjC (3.1.1)
- SDCycleScrollView (1.82): - SDCycleScrollView (1.82):
@@ -106,9 +105,9 @@ PODS:
- Protobuf (~> 3.4) - Protobuf (~> 3.4)
- SZTextView (1.3.0) - SZTextView (1.3.0)
- TABAnimated (2.6.6) - TABAnimated (2.6.6)
- TXLiteAVSDK_TRTC (12.6.18866): - TXLiteAVSDK_TRTC (12.8.19666):
- TXLiteAVSDK_TRTC/TRTC (= 12.6.18866) - TXLiteAVSDK_TRTC/TRTC (= 12.8.19666)
- TXLiteAVSDK_TRTC/TRTC (12.6.18866) - TXLiteAVSDK_TRTC/TRTC (12.8.19666)
- TYCyclePagerView (1.2.0) - TYCyclePagerView (1.2.0)
- TZImagePickerController (3.8.9): - TZImagePickerController (3.8.9):
- TZImagePickerController/Basic (= 3.8.9) - TZImagePickerController/Basic (= 3.8.9)
@@ -134,7 +133,6 @@ DEPENDENCIES:
- CocoaAsyncSocket - CocoaAsyncSocket
- FBSDKCoreKit - FBSDKCoreKit
- FBSDKLoginKit - FBSDKLoginKit
- FBSDKShareKit
- FFPopup - FFPopup
- FLAnimatedImage - FLAnimatedImage
- GKCycleScrollView - GKCycleScrollView
@@ -148,9 +146,6 @@ DEPENDENCIES:
- MBProgressHUD - MBProgressHUD
- MJExtension (= 3.4.2) - MJExtension (= 3.4.2)
- MJRefresh (= 3.7.9) - MJRefresh (= 3.7.9)
- mob_sharesdk
- mob_sharesdk/ShareSDKExtension
- mob_sharesdk/ShareSDKPlatforms/Apple
- NIMSDK_LITE (~> 10.9.40) - NIMSDK_LITE (~> 10.9.40)
- pop - pop
- QCloudCOSXML - QCloudCOSXML
@@ -176,6 +171,7 @@ SPEC REPOS:
https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git: https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git:
- AFNetworking - AFNetworking
- AppAuth - AppAuth
- AppCheckCore
- Base64 - Base64
- Bugly - Bugly
- CocoaAsyncSocket - CocoaAsyncSocket
@@ -183,12 +179,11 @@ SPEC REPOS:
- FBSDKCoreKit - FBSDKCoreKit
- FBSDKCoreKit_Basics - FBSDKCoreKit_Basics
- FBSDKLoginKit - FBSDKLoginKit
- FBSDKShareKit
- FFPopup - FFPopup
- FLAnimatedImage - FLAnimatedImage
- FlyVerifyCSDK
- GKCycleScrollView - GKCycleScrollView
- GoogleSignIn - GoogleSignIn
- GoogleUtilities
- GTMAppAuth - GTMAppAuth
- GTMSessionFetcher - GTMSessionFetcher
- IQKeyboardManager - IQKeyboardManager
@@ -200,10 +195,9 @@ SPEC REPOS:
- MBProgressHUD - MBProgressHUD
- MJExtension - MJExtension
- MJRefresh - MJRefresh
- mob_sharesdk
- MOBFoundation
- NIMSDK_LITE - NIMSDK_LITE
- pop - pop
- PromisesObjC
- Protobuf - Protobuf
- QCloudCore - QCloudCore
- QCloudCOSXML - QCloudCOSXML
@@ -235,39 +229,38 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58 AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58
AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73 AppAuth: 1c1a8afa7e12f2ec3a294d9882dfa5ab7d3cb063
AppCheckCore: cc8fd0a3a230ddd401f326489c99990b013f0c4f
Base64: cecfb41a004124895a7bcee567a89bae5a89d49b Base64: cecfb41a004124895a7bcee567a89bae5a89d49b
Bugly: 217ac2ce5f0f2626d43dbaa4f70764c953a26a31 Bugly: 217ac2ce5f0f2626d43dbaa4f70764c953a26a31
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
FBAEMKit: a899515e45476027f73aef377b5cffadcd56ca3a FBAEMKit: b2ed182002dbcb65d5a60059c9693d322186cd00
FBSDKCoreKit: 24f8bc8d3b5b2a8c5c656a1329492a12e8efa792 FBSDKCoreKit: 7f96852f2539bdb88ba8d47e5ab4ae70a6f8d691
FBSDKCoreKit_Basics: 6e578c9bdc7aa1365dbbbde633c9ebb536bcaa98 FBSDKCoreKit_Basics: 22d4c1a509ded4e45116f3bb167a14907550f62e
FBSDKLoginKit: 787de205d524c3a4b17d527916f1d066e4361660 FBSDKLoginKit: f48c06446995cd209332831f692cea28b26e51da
FBSDKShareKit: b9c1cd1fa6a320a50f0f353cf30d589049c8db77
FFPopup: a208dcee8db3e54ec4a88fcd6481f6f5d85b7a83 FFPopup: a208dcee8db3e54ec4a88fcd6481f6f5d85b7a83
FLAnimatedImage: bbf914596368867157cc71b38a8ec834b3eeb32b FLAnimatedImage: bbf914596368867157cc71b38a8ec834b3eeb32b
FlyVerifyCSDK: e0a13f11d4f29aca7fb7fdcff3f27e3b7ba2de5d
GKCycleScrollView: 8ed79d2142e62895a701973358b6f94b661b4829 GKCycleScrollView: 8ed79d2142e62895a701973358b6f94b661b4829
GoogleSignIn: d4281ab6cf21542b1cfaff85c191f230b399d2db GoogleSignIn: c7f09cfbc85a1abf69187be091997c317cc33b77
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
GTMAppAuth: 217a876b249c3c585a54fd6f73e6b58c4f5c4238
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
IQKeyboardManager: c8665b3396bd0b79402b4c573eac345a31c7d485 IQKeyboardManager: c8665b3396bd0b79402b4c573eac345a31c7d485
JXCategoryView: 262d503acea0b1278c79a1c25b7332ffaef4d518 JXCategoryView: 262d503acea0b1278c79a1c25b7332ffaef4d518
JXPagingView: afdd2e9af09c90160dd232b970d603cc6e7ddd0e JXPagingView: afdd2e9af09c90160dd232b970d603cc6e7ddd0e
libpag: 6e8253018ee4e7f310c8c07d9d9a89d7ae58ae27 libpag: c59ae60dbae9e025465e9541ee03ee96994f4c73
MarqueeLabel: d2388949ac58d587303178d56a792ba8a001b037 MarqueeLabel: 0c57d4c6634e04a6d015af79f7c9a175b2309525
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406 MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
MJExtension: e97d164cb411aa9795cf576093a1fa208b4a8dd8 MJExtension: e97d164cb411aa9795cf576093a1fa208b4a8dd8
MJRefresh: ff9e531227924c84ce459338414550a05d2aea78 MJRefresh: ff9e531227924c84ce459338414550a05d2aea78
mob_sharesdk: 409503324d18f231dd27b4d26428c0c168b20c36 NIMSDK_LITE: 79bc52b8ad905e6c088053d8d29e7863fb9cdb98
MOBFoundation: a1f193058aba95440dadeb799fb398ff92cfe45e
NIMSDK_LITE: 67f6815667acefdc8f9969f8c955b5c1fab490df
pop: d582054913807fd11fd50bfe6a539d91c7e1a55a pop: d582054913807fd11fd50bfe6a539d91c7e1a55a
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
Protobuf: 164aea2ae380c3951abdc3e195220c01d17400e0 Protobuf: 164aea2ae380c3951abdc3e195220c01d17400e0
QCloudCore: 0e70cda608d1ac485e039e83be1c4a1197197e6b QCloudCore: 6f8c67b96448472d2c6a92b9cfe1bdb5abbb1798
QCloudCOSXML: b7f0b9cac61780a03318d40367a879f8d7eb3d86 QCloudCOSXML: 92f50a787b4e8d9a7cb6ea8e626775256b4840a7
QCloudTrack: cc101dd57be7f87bffc3f2fb692a781d5efeda98 QCloudTrack: 20b79388365b4c8ed150019c82a56f1569f237f8
QGVAPlayer: a0bca68c9bd6f1c8de5ac2d10ddf98be6038cce9 QGVAPlayer: a0bca68c9bd6f1c8de5ac2d10ddf98be6038cce9
ReactiveObjC: 011caa393aa0383245f2dcf9bf02e86b80b36040 ReactiveObjC: 011caa393aa0383245f2dcf9bf02e86b80b36040
SDCycleScrollView: a0d74c3384caa72bdfc81470bdbc8c14b3e1fbcf SDCycleScrollView: a0d74c3384caa72bdfc81470bdbc8c14b3e1fbcf
@@ -279,7 +272,7 @@ SPEC CHECKSUMS:
SVGAPlayer: 318b85a78b61292d6ae9dfcd651f3f0d1cdadd86 SVGAPlayer: 318b85a78b61292d6ae9dfcd651f3f0d1cdadd86
SZTextView: 094dc6acc9beec537685c545d6e3e0d4975174e1 SZTextView: 094dc6acc9beec537685c545d6e3e0d4975174e1
TABAnimated: 75fece541a774193565697c7a11539d3c6f631b3 TABAnimated: 75fece541a774193565697c7a11539d3c6f631b3
TXLiteAVSDK_TRTC: 09552a5bb5571c85c851d8dd858064724639f55e TXLiteAVSDK_TRTC: b576b0c6a477fa98b5d2b33be63fa9aa7c41f0eb
TYCyclePagerView: 2b051dade0615c70784aa34f40c646feeddb7344 TYCyclePagerView: 2b051dade0615c70784aa34f40c646feeddb7344
TZImagePickerController: 456f470b5dea97b37226ec7a694994a8663340b2 TZImagePickerController: 456f470b5dea97b37226ec7a694994a8663340b2
YuMi: 6c5f00f1eccbcea3304feae03cbe659025fdb9cb YuMi: 6c5f00f1eccbcea3304feae03cbe659025fdb9cb
@@ -290,6 +283,6 @@ SPEC CHECKSUMS:
YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928 YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928
ZLCollectionViewFlowLayout: c99024652ce9f0c57d33ab53052c9b85e4a936b7 ZLCollectionViewFlowLayout: c99024652ce9f0c57d33ab53052c9b85e4a936b7
PODFILE CHECKSUM: b0aa65c81098b0d5d2e755c0b427cfbab05d21c7 PODFILE CHECKSUM: 4ae0a76c5f1e815186f5f38306131c4d372fa23d
COCOAPODS: 1.16.2 COCOAPODS: 1.16.2

View File

@@ -704,13 +704,10 @@
4CD19E702E9CDF980069DAA0 /* emoji_118@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CD19D142E9CDF980069DAA0 /* emoji_118@2x.png */; }; 4CD19E702E9CDF980069DAA0 /* emoji_118@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CD19D142E9CDF980069DAA0 /* emoji_118@2x.png */; };
4CD19E712E9CDF980069DAA0 /* emoji_21@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CD19CB32E9CDF980069DAA0 /* emoji_21@2x.png */; }; 4CD19E712E9CDF980069DAA0 /* emoji_21@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4CD19CB32E9CDF980069DAA0 /* emoji_21@2x.png */; };
4CD19E722E9CDF980069DAA0 /* UIButton+MSRTL.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D692E9CDF980069DAA0 /* UIButton+MSRTL.m */; }; 4CD19E722E9CDF980069DAA0 /* UIButton+MSRTL.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D692E9CDF980069DAA0 /* UIButton+MSRTL.m */; };
4CD19E732E9CDF980069DAA0 /* XPShareItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D7A2E9CDF980069DAA0 /* XPShareItem.m */; };
4CD19E742E9CDF980069DAA0 /* TTNewAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19DA02E9CDF980069DAA0 /* TTNewAlertView.m */; }; 4CD19E742E9CDF980069DAA0 /* TTNewAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19DA02E9CDF980069DAA0 /* TTNewAlertView.m */; };
4CD19E752E9CDF980069DAA0 /* QPhotoImageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D5B2E9CDF980069DAA0 /* QPhotoImageModel.m */; }; 4CD19E752E9CDF980069DAA0 /* QPhotoImageModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D5B2E9CDF980069DAA0 /* QPhotoImageModel.m */; };
4CD19E762E9CDF980069DAA0 /* XPShareInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D782E9CDF980069DAA0 /* XPShareInfoModel.m */; };
4CD19E772E9CDF980069DAA0 /* UITextView+MSRTL.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D732E9CDF980069DAA0 /* UITextView+MSRTL.m */; }; 4CD19E772E9CDF980069DAA0 /* UITextView+MSRTL.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D732E9CDF980069DAA0 /* UITextView+MSRTL.m */; };
4CD19E782E9CDF980069DAA0 /* NSMutableAttributedString+MSRTL.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D672E9CDF980069DAA0 /* NSMutableAttributedString+MSRTL.m */; }; 4CD19E782E9CDF980069DAA0 /* NSMutableAttributedString+MSRTL.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D672E9CDF980069DAA0 /* NSMutableAttributedString+MSRTL.m */; };
4CD19E792E9CDF980069DAA0 /* XPShareItemCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D7D2E9CDF980069DAA0 /* XPShareItemCell.m */; };
4CD19E7A2E9CDF980069DAA0 /* SexAgeLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19DC42E9CDF980069DAA0 /* SexAgeLabel.m */; }; 4CD19E7A2E9CDF980069DAA0 /* SexAgeLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19DC42E9CDF980069DAA0 /* SexAgeLabel.m */; };
4CD19E7B2E9CDF980069DAA0 /* QKeyboardManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D592E9CDF980069DAA0 /* QKeyboardManager.m */; }; 4CD19E7B2E9CDF980069DAA0 /* QKeyboardManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D592E9CDF980069DAA0 /* QKeyboardManager.m */; };
4CD19E7C2E9CDF980069DAA0 /* TTPopupService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D982E9CDF980069DAA0 /* TTPopupService.m */; }; 4CD19E7C2E9CDF980069DAA0 /* TTPopupService.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D982E9CDF980069DAA0 /* TTPopupService.m */; };
@@ -739,7 +736,6 @@
4CD19E932E9CDF980069DAA0 /* NetImageConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19DAC2E9CDF980069DAA0 /* NetImageConfig.m */; }; 4CD19E932E9CDF980069DAA0 /* NetImageConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19DAC2E9CDF980069DAA0 /* NetImageConfig.m */; };
4CD19E942E9CDF980069DAA0 /* UIButton+EnlargeTouchArea.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19DA62E9CDF980069DAA0 /* UIButton+EnlargeTouchArea.m */; }; 4CD19E942E9CDF980069DAA0 /* UIButton+EnlargeTouchArea.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19DA62E9CDF980069DAA0 /* UIButton+EnlargeTouchArea.m */; };
4CD19E952E9CDF980069DAA0 /* MSBaseRTLFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D632E9CDF980069DAA0 /* MSBaseRTLFlowLayout.m */; }; 4CD19E952E9CDF980069DAA0 /* MSBaseRTLFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D632E9CDF980069DAA0 /* MSBaseRTLFlowLayout.m */; };
4CD19E962E9CDF980069DAA0 /* XPShareView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D802E9CDF980069DAA0 /* XPShareView.m */; };
4CD19E972E9CDF980069DAA0 /* QEmotion.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D452E9CDF980069DAA0 /* QEmotion.m */; }; 4CD19E972E9CDF980069DAA0 /* QEmotion.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D452E9CDF980069DAA0 /* QEmotion.m */; };
4CD19E982E9CDF980069DAA0 /* AdvertiseModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19C952E9CDF980069DAA0 /* AdvertiseModel.m */; }; 4CD19E982E9CDF980069DAA0 /* AdvertiseModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19C952E9CDF980069DAA0 /* AdvertiseModel.m */; };
4CD19E992E9CDF980069DAA0 /* XPSVGAPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D832E9CDF980069DAA0 /* XPSVGAPlayer.m */; }; 4CD19E992E9CDF980069DAA0 /* XPSVGAPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CD19D832E9CDF980069DAA0 /* XPSVGAPlayer.m */; };
@@ -1656,7 +1652,6 @@
E8F63CB4298B563D00B338BA /* Api+SayHello.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F63CB3298B563D00B338BA /* Api+SayHello.m */; }; E8F63CB4298B563D00B338BA /* Api+SayHello.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F63CB3298B563D00B338BA /* Api+SayHello.m */; };
E8F63CB7298B566D00B338BA /* XPSessionSayHelloPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F63CB6298B566D00B338BA /* XPSessionSayHelloPresenter.m */; }; E8F63CB7298B566D00B338BA /* XPSessionSayHelloPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F63CB6298B566D00B338BA /* XPSessionSayHelloPresenter.m */; };
E8F63CBB298B648300B338BA /* SessionSayHelloListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F63CBA298B648300B338BA /* SessionSayHelloListModel.m */; }; E8F63CBB298B648300B338BA /* SessionSayHelloListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F63CBA298B648300B338BA /* SessionSayHelloListModel.m */; };
E8F65C1F286998C9009BB5B9 /* XPMineShareViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F65C1E286998C9009BB5B9 /* XPMineShareViewController.m */; };
E8F65C222869A36F009BB5B9 /* ContentShareMonentsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F65C212869A36F009BB5B9 /* ContentShareMonentsModel.m */; }; E8F65C222869A36F009BB5B9 /* ContentShareMonentsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F65C212869A36F009BB5B9 /* ContentShareMonentsModel.m */; };
F1D8556F2931FC86008C418F /* XPRoomYearActivityView.m in Sources */ = {isa = PBXBuildFile; fileRef = F1D8556E2931FC86008C418F /* XPRoomYearActivityView.m */; }; F1D8556F2931FC86008C418F /* XPRoomYearActivityView.m in Sources */ = {isa = PBXBuildFile; fileRef = F1D8556E2931FC86008C418F /* XPRoomYearActivityView.m */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
@@ -2921,14 +2916,6 @@
4CD19D732E9CDF980069DAA0 /* UITextView+MSRTL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UITextView+MSRTL.m"; sourceTree = "<group>"; }; 4CD19D732E9CDF980069DAA0 /* UITextView+MSRTL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UITextView+MSRTL.m"; sourceTree = "<group>"; };
4CD19D742E9CDF980069DAA0 /* YYLabel+MSRTL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "YYLabel+MSRTL.h"; sourceTree = "<group>"; }; 4CD19D742E9CDF980069DAA0 /* YYLabel+MSRTL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "YYLabel+MSRTL.h"; sourceTree = "<group>"; };
4CD19D752E9CDF980069DAA0 /* YYLabel+MSRTL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "YYLabel+MSRTL.m"; sourceTree = "<group>"; }; 4CD19D752E9CDF980069DAA0 /* YYLabel+MSRTL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "YYLabel+MSRTL.m"; sourceTree = "<group>"; };
4CD19D772E9CDF980069DAA0 /* XPShareInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPShareInfoModel.h; sourceTree = "<group>"; };
4CD19D782E9CDF980069DAA0 /* XPShareInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPShareInfoModel.m; sourceTree = "<group>"; };
4CD19D792E9CDF980069DAA0 /* XPShareItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPShareItem.h; sourceTree = "<group>"; };
4CD19D7A2E9CDF980069DAA0 /* XPShareItem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPShareItem.m; sourceTree = "<group>"; };
4CD19D7C2E9CDF980069DAA0 /* XPShareItemCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPShareItemCell.h; sourceTree = "<group>"; };
4CD19D7D2E9CDF980069DAA0 /* XPShareItemCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPShareItemCell.m; sourceTree = "<group>"; };
4CD19D7F2E9CDF980069DAA0 /* XPShareView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPShareView.h; sourceTree = "<group>"; };
4CD19D802E9CDF980069DAA0 /* XPShareView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPShareView.m; sourceTree = "<group>"; };
4CD19D822E9CDF980069DAA0 /* XPSVGAPlayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSVGAPlayer.h; sourceTree = "<group>"; }; 4CD19D822E9CDF980069DAA0 /* XPSVGAPlayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSVGAPlayer.h; sourceTree = "<group>"; };
4CD19D832E9CDF980069DAA0 /* XPSVGAPlayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSVGAPlayer.m; sourceTree = "<group>"; }; 4CD19D832E9CDF980069DAA0 /* XPSVGAPlayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSVGAPlayer.m; sourceTree = "<group>"; };
4CD19D852E9CDF980069DAA0 /* XPSwitch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSwitch.h; sourceTree = "<group>"; }; 4CD19D852E9CDF980069DAA0 /* XPSwitch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSwitch.h; sourceTree = "<group>"; };
@@ -4805,8 +4792,6 @@
E8F63CB8298B5F3D00B338BA /* XPSessionSayHelloProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSessionSayHelloProtocol.h; sourceTree = "<group>"; }; E8F63CB8298B5F3D00B338BA /* XPSessionSayHelloProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSessionSayHelloProtocol.h; sourceTree = "<group>"; };
E8F63CB9298B648300B338BA /* SessionSayHelloListModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SessionSayHelloListModel.h; sourceTree = "<group>"; }; E8F63CB9298B648300B338BA /* SessionSayHelloListModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SessionSayHelloListModel.h; sourceTree = "<group>"; };
E8F63CBA298B648300B338BA /* SessionSayHelloListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SessionSayHelloListModel.m; sourceTree = "<group>"; }; E8F63CBA298B648300B338BA /* SessionSayHelloListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SessionSayHelloListModel.m; sourceTree = "<group>"; };
E8F65C1D286998C9009BB5B9 /* XPMineShareViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineShareViewController.h; sourceTree = "<group>"; };
E8F65C1E286998C9009BB5B9 /* XPMineShareViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineShareViewController.m; sourceTree = "<group>"; };
E8F65C202869A36F009BB5B9 /* ContentShareMonentsModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContentShareMonentsModel.h; sourceTree = "<group>"; }; E8F65C202869A36F009BB5B9 /* ContentShareMonentsModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContentShareMonentsModel.h; sourceTree = "<group>"; };
E8F65C212869A36F009BB5B9 /* ContentShareMonentsModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContentShareMonentsModel.m; sourceTree = "<group>"; }; E8F65C212869A36F009BB5B9 /* ContentShareMonentsModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContentShareMonentsModel.m; sourceTree = "<group>"; };
ECF5B2AAE493057A3DBCCFAF /* Pods-YuMi.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YuMi.debug.xcconfig"; path = "Target Support Files/Pods-YuMi/Pods-YuMi.debug.xcconfig"; sourceTree = "<group>"; }; ECF5B2AAE493057A3DBCCFAF /* Pods-YuMi.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YuMi.debug.xcconfig"; path = "Target Support Files/Pods-YuMi/Pods-YuMi.debug.xcconfig"; sourceTree = "<group>"; };
@@ -6957,37 +6942,6 @@
path = MSRTL; path = MSRTL;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
4CD19D7B2E9CDF980069DAA0 /* Model */ = {
isa = PBXGroup;
children = (
4CD19D772E9CDF980069DAA0 /* XPShareInfoModel.h */,
4CD19D782E9CDF980069DAA0 /* XPShareInfoModel.m */,
4CD19D792E9CDF980069DAA0 /* XPShareItem.h */,
4CD19D7A2E9CDF980069DAA0 /* XPShareItem.m */,
);
path = Model;
sourceTree = "<group>";
};
4CD19D7E2E9CDF980069DAA0 /* View */ = {
isa = PBXGroup;
children = (
4CD19D7C2E9CDF980069DAA0 /* XPShareItemCell.h */,
4CD19D7D2E9CDF980069DAA0 /* XPShareItemCell.m */,
);
path = View;
sourceTree = "<group>";
};
4CD19D812E9CDF980069DAA0 /* ShareView */ = {
isa = PBXGroup;
children = (
4CD19D7B2E9CDF980069DAA0 /* Model */,
4CD19D7E2E9CDF980069DAA0 /* View */,
4CD19D7F2E9CDF980069DAA0 /* XPShareView.h */,
4CD19D802E9CDF980069DAA0 /* XPShareView.m */,
);
path = ShareView;
sourceTree = "<group>";
};
4CD19D842E9CDF980069DAA0 /* SVGA */ = { 4CD19D842E9CDF980069DAA0 /* SVGA */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@@ -7140,7 +7094,6 @@
4CD19C9A2E9CDF980069DAA0 /* Adbvertise */, 4CD19C9A2E9CDF980069DAA0 /* Adbvertise */,
4CD19D612E9CDF980069DAA0 /* InputView */, 4CD19D612E9CDF980069DAA0 /* InputView */,
4CD19D762E9CDF980069DAA0 /* MSRTL */, 4CD19D762E9CDF980069DAA0 /* MSRTL */,
4CD19D812E9CDF980069DAA0 /* ShareView */,
4CD19D842E9CDF980069DAA0 /* SVGA */, 4CD19D842E9CDF980069DAA0 /* SVGA */,
4CD19D872E9CDF980069DAA0 /* SwitchView */, 4CD19D872E9CDF980069DAA0 /* SwitchView */,
4CD19DA42E9CDF980069DAA0 /* TTPopup */, 4CD19DA42E9CDF980069DAA0 /* TTPopup */,
@@ -10530,8 +10483,6 @@
E896EFA12771AE9400AD2CC1 /* XPMineFriendViewController.m */, E896EFA12771AE9400AD2CC1 /* XPMineFriendViewController.m */,
E84CBCDF28436D3C00D43221 /* XPMineContactViewController.h */, E84CBCDF28436D3C00D43221 /* XPMineContactViewController.h */,
E84CBCE028436D3C00D43221 /* XPMineContactViewController.m */, E84CBCE028436D3C00D43221 /* XPMineContactViewController.m */,
E8F65C1D286998C9009BB5B9 /* XPMineShareViewController.h */,
E8F65C1E286998C9009BB5B9 /* XPMineShareViewController.m */,
E84CBCE2284372D800D43221 /* XPRoomHalfMessageView.h */, E84CBCE2284372D800D43221 /* XPRoomHalfMessageView.h */,
E84CBCE3284372D800D43221 /* XPRoomHalfMessageView.m */, E84CBCE3284372D800D43221 /* XPRoomHalfMessageView.m */,
E8DAC5AA2858305A00012CFD /* XPRoomMessageBubbleView.h */, E8DAC5AA2858305A00012CFD /* XPRoomMessageBubbleView.h */,
@@ -12029,7 +11980,6 @@
9BE01ADA289296B500B50299 /* XPDressUpShopPresenter.m in Sources */, 9BE01ADA289296B500B50299 /* XPDressUpShopPresenter.m in Sources */,
E8751E6628A6465A0056EF44 /* XPSailingRankSubView.m in Sources */, E8751E6628A6465A0056EF44 /* XPSailingRankSubView.m in Sources */,
9B2EA7C32804052E00ED17BF /* AnchorPKMicroView.m in Sources */, 9B2EA7C32804052E00ED17BF /* AnchorPKMicroView.m in Sources */,
E8F65C1F286998C9009BB5B9 /* XPMineShareViewController.m in Sources */,
E85E7BAB2A4EC99300B6D00A /* XPMineChooseGiveGiftView.m in Sources */, E85E7BAB2A4EC99300B6D00A /* XPMineChooseGiveGiftView.m in Sources */,
E85E7B3D2A4EB0D300B6D00A /* XPGuildIncomeDetailCollectionViewCell.m in Sources */, E85E7B3D2A4EB0D300B6D00A /* XPGuildIncomeDetailCollectionViewCell.m in Sources */,
181D7F1B2726CE2A00B7C059 /* StageView.m in Sources */, 181D7F1B2726CE2A00B7C059 /* StageView.m in Sources */,
@@ -12134,13 +12084,10 @@
E8412FA22779BE8F006E1101 /* XPRoomSettingViewController.m in Sources */, E8412FA22779BE8F006E1101 /* XPRoomSettingViewController.m in Sources */,
E89D60BD271D647A001F8895 /* XPRoomPresenter.m in Sources */, E89D60BD271D647A001F8895 /* XPRoomPresenter.m in Sources */,
4CD19E722E9CDF980069DAA0 /* UIButton+MSRTL.m in Sources */, 4CD19E722E9CDF980069DAA0 /* UIButton+MSRTL.m in Sources */,
4CD19E732E9CDF980069DAA0 /* XPShareItem.m in Sources */,
4CD19E742E9CDF980069DAA0 /* TTNewAlertView.m in Sources */, 4CD19E742E9CDF980069DAA0 /* TTNewAlertView.m in Sources */,
4CD19E752E9CDF980069DAA0 /* QPhotoImageModel.m in Sources */, 4CD19E752E9CDF980069DAA0 /* QPhotoImageModel.m in Sources */,
4CD19E762E9CDF980069DAA0 /* XPShareInfoModel.m in Sources */,
4CD19E772E9CDF980069DAA0 /* UITextView+MSRTL.m in Sources */, 4CD19E772E9CDF980069DAA0 /* UITextView+MSRTL.m in Sources */,
4CD19E782E9CDF980069DAA0 /* NSMutableAttributedString+MSRTL.m in Sources */, 4CD19E782E9CDF980069DAA0 /* NSMutableAttributedString+MSRTL.m in Sources */,
4CD19E792E9CDF980069DAA0 /* XPShareItemCell.m in Sources */,
4CD19E7A2E9CDF980069DAA0 /* SexAgeLabel.m in Sources */, 4CD19E7A2E9CDF980069DAA0 /* SexAgeLabel.m in Sources */,
4CD19E7B2E9CDF980069DAA0 /* QKeyboardManager.m in Sources */, 4CD19E7B2E9CDF980069DAA0 /* QKeyboardManager.m in Sources */,
4CD19E7C2E9CDF980069DAA0 /* TTPopupService.m in Sources */, 4CD19E7C2E9CDF980069DAA0 /* TTPopupService.m in Sources */,
@@ -12169,7 +12116,6 @@
4CD19E932E9CDF980069DAA0 /* NetImageConfig.m in Sources */, 4CD19E932E9CDF980069DAA0 /* NetImageConfig.m in Sources */,
4CD19E942E9CDF980069DAA0 /* UIButton+EnlargeTouchArea.m in Sources */, 4CD19E942E9CDF980069DAA0 /* UIButton+EnlargeTouchArea.m in Sources */,
4CD19E952E9CDF980069DAA0 /* MSBaseRTLFlowLayout.m in Sources */, 4CD19E952E9CDF980069DAA0 /* MSBaseRTLFlowLayout.m in Sources */,
4CD19E962E9CDF980069DAA0 /* XPShareView.m in Sources */,
4CD19E972E9CDF980069DAA0 /* QEmotion.m in Sources */, 4CD19E972E9CDF980069DAA0 /* QEmotion.m in Sources */,
4CD19E982E9CDF980069DAA0 /* AdvertiseModel.m in Sources */, 4CD19E982E9CDF980069DAA0 /* AdvertiseModel.m in Sources */,
4CD19E992E9CDF980069DAA0 /* XPSVGAPlayer.m in Sources */, 4CD19E992E9CDF980069DAA0 /* XPSVGAPlayer.m in Sources */,

View File

@@ -8,10 +8,8 @@
#import "AppDelegate+ThirdConfig.h" #import "AppDelegate+ThirdConfig.h"
///Third ///Third
#import <NIMSDK/NIMSDK.h> #import <NIMSDK/NIMSDK.h>
#import <ShareSDK/ShareSDK.h>
#import <UserNotifications/UNUserNotificationCenter.h> #import <UserNotifications/UNUserNotificationCenter.h>
#import <UserNotifications/UserNotifications.h> #import <UserNotifications/UserNotifications.h>
#import <MOBFoundation/MobSDK+Privacy.h>
///Tool ///Tool
#import "YUMIConstant.h" #import "YUMIConstant.h"
#import "CustomAttachmentDecoder.h" #import "CustomAttachmentDecoder.h"
@@ -40,7 +38,6 @@ UIKIT_EXTERN NSString * adImageName;
/// ///
- (void)initThirdConfig{ - (void)initThirdConfig{
[self setLanguage]; [self setLanguage];
[self configShareSDK];
[self configNIMSDK]; [self configNIMSDK];
[self configBugly]; [self configBugly];
[self registerNot]; [self registerNot];
@@ -123,17 +120,6 @@ UIKIT_EXTERN NSString * adImageName;
#endif #endif
} }
- (void)configShareSDK {
// [PILineLoginManager registerLine];
[ShareSDK registPlatforms:^(SSDKRegister *platformsRegister) {
///faceBook
// [platformsRegister setupFacebookWithAppkey:@"1266232494209868" appSecret:@"c9b170b383f8be9cdf118823b8632821" displayName:YMLocalizedString(@"AppDelegate_ThirdConfig0")];
[platformsRegister setupLineAuthType:SSDKAuthorizeTypeBoth];
}];
}
#pragma mark - #pragma mark -
- (void)initEmojiData { - (void)initEmojiData {
dispatch_async(dispatch_get_global_queue(0, 0), ^{ dispatch_async(dispatch_get_global_queue(0, 0), ^{

View File

@@ -1,55 +0,0 @@
//
// YMShareModel.h
// YUMI
//
// Created by YUMI on 2021/11/23.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, ShareType) {
///分享房间
ShareType_Room = 1,
///分享h5
ShareType_H5 = 2,
///大转盘 目前没用到
ShareType_User_Draw = 888,
};
@interface XPShareInfoModel : PIBaseModel
///分享的标题
@property (nonatomic,copy) NSString *shareTitle;
///分享的内容
@property (nonatomic,copy) NSString *shareContent;
///分享的地址
@property (nonatomic,copy) NSString *shareUrl;
///分享图片
@property (nonatomic,copy) NSString *shareImageUrl;
///分享图片
@property (nonatomic,copy) UIImage *shareImage;
///分享的类型
@property (nonatomic,assign) ShareType type;
///分享类型1微信好友2微信朋友圈3QQ好友4QQ空间
@property (nonatomic,assign) NSInteger shareType;
///分享房间的uid
@property (nonatomic,assign) NSInteger roomUid;
#pragma mark - 动态分享
///被分享动态的那个人
@property (nonatomic,copy) NSString *uid;
///动态分享
@property (nonatomic,copy) NSString *dynamicId;
///话题id
@property (nonatomic,copy) NSString *worldId;
///封面
@property (nonatomic,copy) NSString *imageUrl;
///名称
@property (nonatomic,copy) NSString *nick;
///发布者的uid
@property (nonatomic,copy) NSString *publishUid;
///内容
@property (nonatomic,copy) NSString *content;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,12 +0,0 @@
//
// YMShareModel.m
// YUMI
//
// Created by YUMI on 2021/11/23.
//
#import "XPShareInfoModel.h"
@implementation XPShareInfoModel
@end

View File

@@ -1,45 +0,0 @@
//
// YMShareItem.h
// YUMI
//
// Created by YUMI on 2021/11/23.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef enum : NSUInteger {
///微信好友
XPShareItemTagWeChat = 1,
///微信朋友圈
XPShareItemTagMoments,
///QQ好友
XPShareItemTagQQ,
///QQ空间
XPShareItemTagQQZone,
///LIne
XPShareItemTagLine,
///FaceBook
XPShareItemTagFaceBook,
///复制链接
XPShareItemTagCopyLink,
///应用好友
XPShareItemTagAppFriends,
///保存到相册
XPShareItemTagAppSaveAlbum,
} XPShareItemTag;
@interface XPShareItem : NSObject
@property(nonatomic,assign) BOOL isShareInvite;
@property (nonatomic, copy) NSString *inviteTitle;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *imageName;
@property (nonatomic, copy) NSString *disableImageName;
@property (nonatomic, assign) BOOL disable;
@property (nonatomic, assign) XPShareItemTag type;
+ (instancetype)itemWitTag:(XPShareItemTag)itemTag title:(NSString *)title imageName:(NSString *)imageName disableImageName:(NSString *)disableImageName;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,23 +0,0 @@
//
// YMShareItem.m
// YUMI
//
// Created by YUMI on 2021/11/23.
//
#import "XPShareItem.h"
@implementation XPShareItem
+ (instancetype)itemWitTag:(XPShareItemTag)itemTag title:(NSString *)title imageName:(NSString *)imageName disableImageName:(NSString *)disableImageName {
XPShareItem *item = [[self alloc] init];
item.type = itemTag;
item.title = title;
item.imageName = imageName;
item.disableImageName = disableImageName;
item.disable = NO;
return item;
}
@end

View File

@@ -1,16 +0,0 @@
//
// YMShareItemCell.h
// YMRoomMoudle
//
// Created by YUMI on 2022/9/2.
// Copyright © 2023 YUMI. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "XPShareItem.h"
@interface XPShareItemCell : UICollectionViewCell
@property (nonatomic, strong) XPShareItem *shareItem;
@end

View File

@@ -1,78 +0,0 @@
//
// YMShareItemCell.m
// YMRoomMoudle
//
// Created by YUMI on 2022/9/2.
// Copyright © 2023 YUMI. All rights reserved.
//
#import "XPShareItemCell.h"
#import "DJDKMIMOMColor.h"
#import <Masonry/Masonry.h>
@interface XPShareItemCell()
@property (nonatomic, strong) UIImageView *iconImageView;
@property (nonatomic, strong) UILabel *titleLabel;
@end
@implementation XPShareItemCell
#pragma mark - Life Style
- (instancetype)initWithFrame:(CGRect)frame{
if (self=[super initWithFrame:frame]) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews{
[self.contentView addSubview:self.iconImageView];
[self.contentView addSubview:self.titleLabel];
}
- (void)initSubViewConstraints{
CGFloat wh = 30;
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.equalTo(@(wh));
make.top.equalTo(self.contentView);
make.centerX.equalTo(self.contentView);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.leading.equalTo(self.contentView).inset(5);
make.top.equalTo(self.iconImageView.mas_bottom).offset(10);
}];
}
#pragma mark - Getters And Setters
- (void)setShareItem:(XPShareItem *)shareItem{
_shareItem = shareItem;
self.userInteractionEnabled = shareItem.disable;
if (!shareItem.disable) {
self.iconImageView.image = [UIImage imageNamed:shareItem.disableImageName];
}else{
self.iconImageView.image = [UIImage imageNamed:shareItem.imageName];
}
self.titleLabel.text = shareItem.title;
}
- (UIImageView *)iconImageView{
if (!_iconImageView) {
_iconImageView = [[UIImageView alloc] init];
}
return _iconImageView;
}
- (UILabel *)titleLabel{
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.textColor = [DJDKMIMOMColor alertMessageColor];
_titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:12];
_titleLabel.numberOfLines = 2;
_titleLabel.textAlignment = NSTextAlignmentCenter;
}
return _titleLabel;
}
@end

View File

@@ -1,34 +0,0 @@
//
// XCShareView.h
// XCRoomMoudle
//
// Created by KevinWang on 2018/9/2.
// Copyright © 2018年 YiZhuan. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "XPShareItem.h"
#import "XPShareInfoModel.h"
@class XPShareView;
@protocol XCShareViewDelegate <NSObject>
@optional
///点击保存图片到相册
- (void)shareView:(XPShareView *)shareView savePhoto:(XPShareInfoModel *)shareInfo;
///点了取消分享
- (void)shareViewDidClickCancel:(XPShareView *)shareView;
///分享成功
- (void)shareView:(XPShareView *)shareView didSuccess:(XPShareInfoModel *)shareInfo;
///分享失败
- (void)shareView:(XPShareView *)shareView shareFail:(NSString *)message;
@end;
@interface XPShareView : UIView
@property (nonatomic, weak) id<XCShareViewDelegate> delegate;
@property (nonatomic,assign) BOOL isFromWebVeiw;
- (instancetype)initWithItems:(NSArray<XPShareItem *> *)items itemSize:(CGSize)itemSize shareInfo:(XPShareInfoModel *)shareInfo;
@end

View File

@@ -1,329 +0,0 @@
//
// XCShareView.m
// XCRoomMoudle
//
// Created by KevinWang on 2018/9/2.
// Copyright © 2018 YiZhuan. All rights reserved.
//
#import "XPShareView.h"
///Third
#import <Masonry/Masonry.h>
#import <ShareSDK/ShareSDK.h>
#import <ShareSDKExtension/ShareSDK+Extension.h>
#import <FBSDKShareKit/FBSDKShareKit.h>
#import "XCCurrentVCStackManager.h"
///Tool
#import "TTPopup.h"
///View
#import "XPShareItemCell.h"
#import "XPMineShareViewController.h"
#import "ClientConfig.h"
@interface XPShareView()<UICollectionViewDataSource,UICollectionViewDelegate,FBSDKSharingDelegate>
///
@property (nonatomic, strong) UIButton *cancleButton;
///
@property (nonatomic, strong) UICollectionView *collectionView;
///
@property (nonatomic, strong) NSArray<XPShareItem *> *items;
///item
@property (nonatomic,assign) CGSize itemSize;
///
@property (nonatomic,strong) XPShareInfoModel *shareInfo;
@end
@implementation XPShareView
#pragma mark - Life Style
- (instancetype)initWithItems:(NSArray<XPShareItem *> *)items itemSize:(CGSize)itemSize shareInfo:(XPShareInfoModel *)shareInfo {
if (self = [super init]) {
for (XPShareItem * item in items) {
if (item.type == XPShareItemTagAppFriends || item.type == XPShareItemTagCopyLink) {
item.disable = YES;
} else {
item.disable = [self isInstallClient:[self getSharePlatformType:item.type]];
}
}
self.items = [NSMutableArray arrayWithArray:items];
self.itemSize =itemSize;
self.shareInfo = shareInfo;
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
[self addSubview:self.collectionView];
[self addSubview:self.cancleButton];
}
- (void)initSubViewConstraints {
CGFloat collectionWidth = KScreenWidth - 15 * 2;
///
int numberLine = collectionWidth / self.itemSize.width;
int page = self.items.count % numberLine > 0 ? (int)self.items.count / numberLine + 1 : (int)self.items.count / numberLine;
CGFloat collectionHeight = page * self.itemSize.height + 20 + (page-1) * 10 + 10;
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self);
make.height.mas_equalTo(collectionHeight);
make.leading.trailing.mas_equalTo(self).inset(15);
}];
[self.cancleButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(45);
make.leading.trailing.mas_equalTo(self.collectionView);
make.top.mas_equalTo(self.collectionView.mas_bottom).offset(15);
}];
[self mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(KScreenWidth);
make.bottom.mas_equalTo(self.cancleButton.mas_bottom).offset(30);
}];
}
- (BOOL)isInstallClient:(SSDKPlatformType)platform {
return [ShareSDK isClientInstalled:platform];
}
- (SSDKPlatformType)getSharePlatformType:(XPShareItemTag)itemTag {
SSDKPlatformType type;
switch (itemTag) {
case XPShareItemTagFaceBook:
type = SSDKPlatformTypeFacebook;
break;
case XPShareItemTagLine:
type = SSDKPlatformTypeLine;
break;
default:
type = SSDKPlatformTypeUnknown;
break;
}
return type;
}
#pragma mark - UICollectionViewDelegate
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return self.items.count;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
XPShareItemCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPShareItemCell class]) forIndexPath:indexPath];
XPShareItem * item = [self.items xpSafeObjectAtIndex:indexPath.item];
item.disable = YES;
cell.shareItem = item;
return cell;
}
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
NSMutableDictionary *shareParams = [NSMutableDictionary dictionary];
NSString * title = [self.shareInfo shareTitle].length > 0 ? self.shareInfo.shareTitle : @"";
NSString * content = self.shareInfo.shareContent.length > 0 ? self.shareInfo.shareContent : @"";
NSString * urlString = self.shareInfo.shareUrl.length > 0 ?self.shareInfo.shareUrl : @"";
if ([urlString containsString:@"?"]){
urlString = [NSString stringWithFormat:@"%@&lang=%@",urlString,[NSBundle uploadLanguageText]];
}else{
urlString = [NSString stringWithFormat:@"%@?lang=%@",urlString,[NSBundle uploadLanguageText]];
}
NSString *encodedUrl = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
XPShareItem * item = [self.items xpSafeObjectAtIndex:indexPath.item];
if (item == nil){
[TTPopup dismiss];
return;
};
if (item.type == XPShareItemTagAppSaveAlbum){
[TTPopup dismiss];
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:savePhoto:)]){
[self.delegate shareView:self savePhoto:self.shareInfo];
}
return;
}
if (item.type == XPShareItemTagAppFriends) {
[TTPopup dismiss];
XPMineShareViewController * shareVC = [[XPMineShareViewController alloc] init];
shareVC.shareType = MineShareType_Monents;
shareVC.shareInfo = self.shareInfo;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:shareVC animated:YES];
return;
} else if(item.type == XPShareItemTagCopyLink) {
NSString * urlString = self.shareInfo.shareUrl;
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
[pasteboard setString:urlString];
[XNDJTDDLoadingTool showSuccessWithMessage:YMLocalizedString(@"XPShareView0")];
[TTPopup dismiss];
return;
}
if([self isInstallClient:[self getSharePlatformType:item.type]] == NO){
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPShareView9")];
[TTPopup dismiss];
return;
}
// NSTaggedPointerString
if ([self.shareInfo isKindOfClass:[XPShareInfoModel class]] && [item isKindOfClass:[XPShareItem class]]) {
self.shareInfo.shareType = item.type;
} else {
NSLog(@"警告self.shareInfo不是XPShareInfoModel类型而是%@类型", NSStringFromClass([self.shareInfo class]));
[TTPopup dismiss];
return;
}
SSDKPlatformType platformType = SSDKPlatformTypeCopy;
if (item.type == XPShareItemTagLine) {
title = YMLocalizedString(@"XPShareView1");
platformType = SSDKPlatformTypeLine;
if (![ShareSDK isClientInstalled:platformType]) {
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPShareView2")];
return;
}
NSString*contentKey= [encodedUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet];
NSString*contentType =@"text";
NSString*urlString = [NSString stringWithFormat:@"line://msg/%@/%@",contentType, contentKey];
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:urlString] options:@{} completionHandler:^(BOOL success) {
}];
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:didSuccess:)]) {
[self.delegate shareView:self didSuccess:self.shareInfo];
}
return;
}
if(item.type == XPShareItemTagFaceBook){
FBSDKShareLinkContent*linkContent = [[FBSDKShareLinkContent alloc]init];
urlString = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]];
linkContent.contentURL= [NSURL URLWithString:urlString];
linkContent.quote = content;
FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc]initWithViewController:[XCCurrentVCStackManager shareManager].getCurrentVC content:linkContent delegate:self];
// web
shareDialog.mode = FBSDKShareDialogModeNative;
if (![shareDialog canShow]) {
shareDialog.mode = FBSDKShareDialogModeWeb;
}
[shareDialog show];
return;
}
[ShareSDK share:platformType parameters:shareParams onStateChanged:^(SSDKResponseState state, NSDictionary *userData, SSDKContentEntity *contentEntity, NSError *error) {
switch (state) {
case SSDKResponseStateSuccess:
{
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:didSuccess:)]) {
[self.delegate shareView:self didSuccess:self.shareInfo];
}
}
break;
case SSDKResponseStateFail:
{
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:shareFail:)]) {
[self.delegate shareView:self shareFail:YMLocalizedString(@"XPShareView5")];
}
}
break;
case SSDKResponseStateCancel:
{
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:shareFail:)]) {
[self.delegate shareView:self shareFail:YMLocalizedString(@"XPShareView6")];
}
}
break;
default:
break;
}
}];
}
#pragma mark - FBSDKSharingDelegate
/// Sent to the delegate when sharing completes without error or cancellation.
/// @param sharer The sharer that completed.
/// @param results The results from the sharer. This may be nil or empty.
- (void)sharer:(id <FBSDKSharing> _Nonnull)sharer didCompleteWithResults:(NSDictionary<NSString *, id> * _Nonnull)results{
NSString *postId = results[@"postId"];
FBSDKShareDialog *dialog = (FBSDKShareDialog *)sharer;
if (dialog.mode == FBSDKShareDialogModeBrowser && (postId == nil || [postId isEqualToString:@""])) {
// 使webviewpostId
//
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:shareFail:)]) {
[self.delegate shareView:self shareFail:YMLocalizedString(@"XPShareView6")];
}
} else {
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:didSuccess:)]) {
[self.delegate shareView:self didSuccess:self.shareInfo];
}
}
}
/// Sent to the delegate when the sharer encounters an error.
/// @param sharer The sharer that completed.
/// @param error The error.
- (void)sharer:(id <FBSDKSharing> _Nonnull)sharer didFailWithError:(NSError * _Nonnull)error{
FBSDKShareDialog *dialog = (FBSDKShareDialog *)sharer;
if (error == nil && dialog.mode == FBSDKShareDialogModeNative) {
// 使errorFacebook app
// dialogmode
dialog.mode = FBSDKShareDialogModeBrowser;
[dialog show];
} else {
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:shareFail:)]) {
[self.delegate shareView:self shareFail:YMLocalizedString(@"XPShareView5")];
}
}
}
/// Sent to the delegate when the sharer is cancelled.
/// @param sharer The sharer that completed.
- (void)sharerDidCancel:(id <FBSDKSharing> _Nonnull)sharer{
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:shareFail:)]) {
[self.delegate shareView:self shareFail:YMLocalizedString(@"XPShareView6")];
}
}
#pragma mark - Event Response
- (void)cancleButtonDidClck:(UIButton *)button{
if (self.delegate && [self.delegate respondsToSelector:@selector(shareViewDidClickCancel:)]) {
[self.delegate shareViewDidClickCancel:self];
}
}
#pragma mark - Getters And Setters
- (UICollectionView *)collectionView{
if (!_collectionView) {
MSBaseRTLFlowLayout *layout = [[MSBaseRTLFlowLayout alloc] init];
layout.itemSize = self.itemSize;
layout.minimumInteritemSpacing = 0;
layout.minimumLineSpacing = 10;
layout.sectionInset = UIEdgeInsetsMake(20, 0, 10, 0);
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
_collectionView.backgroundColor = [UIColor whiteColor];
_collectionView.dataSource = self;
_collectionView.delegate = self;
_collectionView.layer.masksToBounds = YES;
_collectionView.layer.cornerRadius = 15;
[_collectionView registerClass:[XPShareItemCell class] forCellWithReuseIdentifier:NSStringFromClass([XPShareItemCell class])];
}
return _collectionView;
}
- (UIButton *)cancleButton{
if (!_cancleButton) {
_cancleButton = [[UIButton alloc] init];
[_cancleButton setBackgroundColor:[UIColor whiteColor]];
[_cancleButton setTitle:YMLocalizedString(@"XPShareView7") forState:UIControlStateNormal];
_cancleButton.titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:15];
_cancleButton.layer.masksToBounds = YES;
_cancleButton.layer.cornerRadius = 45/2;
[_cancleButton setTitleColor:[DJDKMIMOMColor textThirdColor] forState:UIControlStateNormal];
[_cancleButton addTarget:self action:@selector(cancleButtonDidClck:) forControlEvents:UIControlEventTouchUpInside];
}
return _cancleButton;
}
@end

View File

@@ -8,7 +8,6 @@
#import "LoginPresenter.h" #import "LoginPresenter.h"
///Third ///Third
#import <ReactiveObjC/ReactiveObjC.h> #import <ReactiveObjC/ReactiveObjC.h>
#import <ShareSDK/ShareSDK.h>
///APi ///APi
#import "Api+Login.h" #import "Api+Login.h"
///Tool ///Tool
@@ -56,75 +55,7 @@ static NSString *clinet_s = @"uyzjdhds";
/// ///
/// @param type /// @param type
- (void)thirdLoginWithType:(ThirdLoginType)type{ - (void)thirdLoginWithType:(ThirdLoginType)type{
// TODO: Apple Login
SSDKPlatformType platformType;
switch (type) {
case ThirdLoginType_FB:
platformType = SSDKPlatformTypeFacebook;
break;
case ThirdLoginType_Line:
platformType = SSDKPlatformTypeLine;
break;
case ThirdLoginType_Apple:
platformType = SSDKPlatformTypeAppleAccount;
break;
case ThirdLoginType_Gmail:
platformType = SSDKPlatformTypeGooglePlus;
break;
default:
platformType = SSDKPlatformTypeAppleAccount;
break;
}
NSDictionary * settings;
if (type == SSDKPlatformTypeFacebook) {
settings = @{@"isBrowser":@(YES)};
}
@kWeakify(self);
[ShareSDK cancelAuthorize:platformType result:nil];
[ShareSDK authorize:platformType
settings:settings
onStateChanged:^(SSDKResponseState state, SSDKUser *user, NSError *error) {
@kStrongify(self);
if (state == SSDKResponseStateSuccess) {///
ThirdUserInfo * userInfo = [[ThirdUserInfo alloc] init];
NSString * openid = @"";
NSString * access_token = user.credential.token.length > 0 ? user.credential.token : @"";
NSString * unionid = @"";
if (platformType == SSDKPlatformTypeLine) {
openid = user.credential.uid.length > 0 ? user.credential.uid : user.uid;
unionid = user.credential.uid.length > 0 ? user.credential.uid : user.uid;
userInfo.userName = user.nickname;
userInfo.avatarUrl = user.icon;
} else if (platformType == SSDKPlatformTypeFacebook) { //
openid = user.credential.uid.length > 0 ? user.credential.uid : user.uid;;
unionid = user.credential.uid.length > 0 ? user.credential.uid : user.uid;;
userInfo.userName = user.nickname;
userInfo.avatarUrl = user.icon;
} else if (platformType == SSDKPlatformTypeAppleAccount) { //
// openid = user.credential.token;
unionid = [user.credential rawData][@"user"];
NSString * familyName = [user.credential rawData][@"fullName"][@"familyName"];
NSString * givenName = [user.credential rawData][@"fullName"][@"givenName"];
if (familyName.length > 0 && givenName.length> 0) {
userInfo.userName = [NSString stringWithFormat:@"%@%@", familyName, givenName];
}
}
if (unionid == nil) {
unionid = @"";
}
openid = unionid;
userInfo.openid = openid;
userInfo.access_token = access_token;
userInfo.unionid = unionid;
///
[AccountInfoStorage instance].thirdUserInfo = userInfo;
[self loginWithThirdPartWithType:type];
} else if(state == SSDKResponseStateCancel) {///
[[self getView] showErrorToast:YMLocalizedString(@"LoginPresenter0")];
} else if (state == SSDKResponseStateFail) {///
[[self getView] showErrorToast:YMLocalizedString(@"LoginPresenter1")];
}
}];
} }
-(void)loginWithThirdPartWithType:(ThirdLoginType)type{ -(void)loginWithThirdPartWithType:(ThirdLoginType)type{
[XNDJTDDLoadingTool showOnlyView:kWindow]; [XNDJTDDLoadingTool showOnlyView:kWindow];

View File

@@ -1,24 +0,0 @@
//
// YMMineShareViewController.h
// YUMI
//
// Created by YUMI on 2022/6/27.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@class XPShareInfoModel;
typedef NS_ENUM(NSInteger, MineShareType) {
///分享动态
MineShareType_Monents = 1,
};
@interface XPMineShareViewController : BaseViewController
@property (nonatomic,strong) XPShareInfoModel *shareInfo;
///分享的类型
@property (nonatomic,assign) MineShareType shareType;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,232 +0,0 @@
//
// YMMineShareViewController.m
// YUMI
//
// Created by YUMI on 2022/6/27.
//
#import "XPMineShareViewController.h"
///Third
#import <Masonry/Masonry.h>
#import <NIMSDK/NIMSDK.h>
#import <JXCategoryView/JXCategoryView.h>
#import <JXCategoryView/JXCategoryListContainerView.h>
///Tool
#import "DJDKMIMOMColor.h"
#import "YUMIMacroUitls.h"
#import "TTPopup.h"
///Model
#import "XPShareInfoModel.h"
#import "FansInfoModel.h"
#import "UserInfoModel.h"
#import "AttachMentModel.h"
#import "ContentShareMonentsModel.h"
///View
#import "SessionViewController.h"
#import "SessionListViewController.h"
#import "XPMineFriendViewController.h"
#import "XPMineAttentionViewController.h"
#import "XPMineFansViewController.h"
@interface XPMineShareViewController ()<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate, XPMineAttentionViewControllerDelegate, XPMineFansViewControllerDelegate, XPMineFriendViewControllerDelegate>
///
@property (nonatomic,strong) NSArray<NSString *> *titles;
///
@property (nonatomic,strong) JXCategoryTitleView *titleView;
@property (nonatomic, strong) JXCategoryListContainerView *listContainerView;
///
@property (nonatomic,strong) XPMineFriendViewController *friendVC;
///
@property (nonatomic,strong) XPMineAttentionViewController *attentionVC;
///
@property (nonatomic,strong) XPMineFansViewController *fansVC;
///id
@property (nonatomic,copy) NSString *sessionId;
@end
@implementation XPMineShareViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self initSubViews];
[self initSubViewConstraints];
}
#pragma mark - Private Method
- (void)initSubViews {
self.title = YMLocalizedString(@"XPMineShareViewController0");
[self.view addSubview:self.titleView];
[self.view addSubview:self.listContainerView];
}
- (void)initSubViewConstraints {
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.top.mas_equalTo(self.view);
make.height.mas_equalTo(50);
}];
[self.listContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.bottom.mas_equalTo(self.view);
make.top.mas_equalTo(self.titleView.mas_bottom);
}];
}
- (void)sendCustomMessage:(AttachmentModel *)attachment {
NIMMessage *message = [[NIMMessage alloc]init];
NIMCustomObject *object = [[NIMCustomObject alloc] init];
object.attachment = attachment;
message.messageObject = object;
NIMSessionType sessionType = NIMSessionTypeP2P;
//
NIMSession *session = [NIMSession session:self.sessionId type:sessionType];
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session error:nil];
}
- (void)shareToUser:(NSString *)nick {
NSString * title;
AttachmentModel * attachment = [[AttachmentModel alloc] init];
//
if (![self.shareInfo isKindOfClass:[XPShareInfoModel class]]) {
NSLog(@"警告self.shareInfo不是XPShareInfoModel类型而是%@类型", NSStringFromClass([self.shareInfo class]));
return;
}
switch (self.shareType) {
case MineShareType_Monents:
{
title = [NSString stringWithFormat:YMLocalizedString(@"XPMineShareViewController1"), nick];
attachment.first = CustomMessageType_Monents;
attachment.second = Custom_Message_Sub_Monents_Share;
ContentShareMonentsModel * shareInfo = [[ContentShareMonentsModel alloc] init];
shareInfo.imageUrl = self.shareInfo.imageUrl;
shareInfo.nick = self.shareInfo.nick;
shareInfo.content = self.shareInfo.content;
shareInfo.dynamicId= self.shareInfo.dynamicId;
shareInfo.routerValue = self.shareInfo.dynamicId;
shareInfo.routerType = 50;
attachment.data = shareInfo.model2dictionary;
}
break;
default:
break;
}
if (title.length > 0) {
[TTPopup alertWithMessage:title confirmHandler:^{
[self sendCustomMessage:attachment];
} cancelHandler:^{
}];
}
}
#pragma mark - JXCategoryListContainerViewDelegate
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView {
return self.titles.count;
}
// index `JXCategoryListContentViewDelegate`
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
if (index == 0) {
return self.friendVC;
} else if(index == 1) {
return self.fansVC;
} else {
return self.attentionVC;
}
}
#pragma mark - XPMineAttentionViewControllerDelegate
///
- (void)xPMineAttentionViewController:(XPMineAttentionViewController *)viewController didSelectItem:(FansInfoModel *)userInfo {
self.sessionId = userInfo.uid;
[self shareToUser:userInfo.nick];
}
#pragma mark - XPMineFansViewControllerDelegate
///
- (void)xPMineFansViewController:(XPMineFansViewController *)view didSelectItem:(FansInfoModel *)userInfo {
self.sessionId = userInfo.uid;
[self shareToUser:userInfo.nick];
}
#pragma mark - XPMineFriendViewControllerDelegate
///
- (void)xPMineFriendViewController:(XPMineFriendViewController *)viewController didSelectItem:(UserInfoModel *)userInfo {
self.sessionId = [NSString stringWithFormat:@"%ld", userInfo.uid];
[self shareToUser:userInfo.nick];
}
#pragma mark - Getters And Setters
- (JXCategoryListContainerView *)listContainerView {
if (!_listContainerView) {
_listContainerView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self];
_listContainerView.listCellBackgroundColor = [UIColor clearColor];
}
return _listContainerView;
}
- (NSArray<NSString *> *)titles {
if (!_titles) {
_titles = @[YMLocalizedString(@"XPMonentsTooBarView3"),YMLocalizedString(@"XPMineContactViewController3"), YMLocalizedString(@"XPMineShareViewController4")];
}
return _titles;
}
- (JXCategoryTitleView *)titleView {
if (!_titleView) {
_titleView = [[JXCategoryTitleView alloc] initWithFrame:CGRectZero];
_titleView.backgroundColor =[UIColor clearColor];
_titleView.titleColor = UIColorFromRGB(0x444444);
_titleView.titleSelectedColor = [DJDKMIMOMColor mainTextColor];
_titleView.titleFont = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
_titleView.titleSelectedFont = [UIFont systemFontOfSize:18 weight:UIFontWeightHeavy];
_titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter;
_titleView.contentScrollViewClickTransitionAnimationEnabled = NO;
_titleView.averageCellSpacingEnabled = NO;
_titleView.defaultSelectedIndex = 0;
_titleView.titles = self.titles;
_titleView.delegate = self;
_titleView.cellSpacing = 0;
_titleView.cellWidth = (CGFloat)KScreenWidth/ 3.0;
_titleView.listContainer = self.listContainerView;
JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init];
lineView.indicatorColor = [DJDKMIMOMColor appMainColor];
lineView.indicatorWidth = 8.f;
lineView.indicatorHeight = 4.f;
lineView.indicatorCornerRadius = 2.f;
_titleView.indicators = @[lineView];
}
return _titleView;
}
- (XPMineAttentionViewController *)attentionVC {
if (!_attentionVC) {
_attentionVC = [[XPMineAttentionViewController alloc] init];
_attentionVC.type = ContactUseingType_Share;
_attentionVC.delegate = self;
}
return _attentionVC;
}
- (XPMineFriendViewController *)friendVC {
if (!_friendVC) {
_friendVC = [[XPMineFriendViewController alloc] init];
_friendVC.type = ContactUseingType_Share;
_friendVC.delegate = self;
}
return _friendVC;
}
- (XPMineFansViewController *)fansVC {
if (!_fansVC) {
_fansVC = [[XPMineFansViewController alloc] init];
_fansVC.type = ContactUseingType_Share;
_fansVC.delegate = self;
}
return _fansVC;
}
@end

View File

@@ -26,12 +26,11 @@
///View ///View
#import "XPArrangeMicEmptyTableViewCell.h" #import "XPArrangeMicEmptyTableViewCell.h"
#import "XPArrangeMicTableViewCell.h" #import "XPArrangeMicTableViewCell.h"
#import "XPShareView.h"
///P ///P
#import "XPArrangeMicPresenter.h" #import "XPArrangeMicPresenter.h"
#import "XPArrangeMicProtocol.h" #import "XPArrangeMicProtocol.h"
@interface XPArrangeMicViewController ()<UITableViewDelegate, UITableViewDataSource, XPArrangeMicTableViewCellDelegate,XPArrangeMicProtocol,NIMChatManagerDelegate, XCShareViewDelegate> @interface XPArrangeMicViewController ()<UITableViewDelegate, UITableViewDataSource, XPArrangeMicTableViewCellDelegate,XPArrangeMicProtocol,NIMChatManagerDelegate>
/// ///
@property (nonatomic,strong) UIView * topView; @property (nonatomic,strong) UIView * topView;
/// ///
@@ -348,7 +347,7 @@
if (message.messageType == NIMMessageTypeCustom) { if (message.messageType == NIMMessageTypeCustom) {
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject; NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) { if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
AttachmentModel * attachment = obj.attachment; AttachmentModel * attachment = (AttachmentModel *)obj.attachment;
if (attachment.first == CustomMessageType_Arrange_Mic) { if (attachment.first == CustomMessageType_Arrange_Mic) {
switch (attachment.second) { switch (attachment.second) {
case Custom_Message_Sub_Room_PK_Empty: case Custom_Message_Sub_Room_PK_Empty:
@@ -553,19 +552,6 @@
self.titleLabel.textAlignment = NSTextAlignmentCenter; self.titleLabel.textAlignment = NSTextAlignmentCenter;
} }
#pragma mark - XCShareViewDelegate
- (void)shareView:(XPShareView *)shareView shareFail:(NSString *)message {
[TTPopup dismiss];
[self showErrorToast:message];
}
- (void)shareView:(XPShareView *)shareView didSuccess:(XPShareInfoModel *)shareInfo{
[TTPopup dismiss];
}
- (void)shareViewDidClickCancel:(XPShareView *)shareView {
[TTPopup dismiss];
}
#pragma mark - XPArrangeMicTableViewCellDelegate #pragma mark - XPArrangeMicTableViewCellDelegate
- (void)xPArrangeMicTableViewCell:(XPArrangeMicTableViewCell *)view inviteUser:(ArrangeMicUserModel *)userInfo { - (void)xPArrangeMicTableViewCell:(XPArrangeMicTableViewCell *)view inviteUser:(ArrangeMicUserModel *)userInfo {
@@ -664,24 +650,24 @@
self.userInfo.isManager = NO; self.userInfo.isManager = NO;
#endif #endif
if (self.userInfo.isManager) { if (self.userInfo.isManager) {
XPShareItem *cycle = [XPShareItem itemWitTag:XPShareItemTagFaceBook title:@"FaceBook" imageName:@"share_fb" disableImageName:@"share_fb"]; // XPShareItem *cycle = [XPShareItem itemWitTag:XPShareItemTagFaceBook title:@"FaceBook" imageName:@"share_fb" disableImageName:@"share_fb"];
XPShareItem *wechat = [XPShareItem itemWitTag:XPShareItemTagLine title:@"Line" imageName:@"share_line" disableImageName:@"share_line"]; // XPShareItem *wechat = [XPShareItem itemWitTag:XPShareItemTagLine title:@"Line" imageName:@"share_line" disableImageName:@"share_line"];
XPShareItem *qq = [XPShareItem itemWitTag:XPShareItemTagCopyLink title:YMLocalizedString(@"RoomHeaderView3") imageName:@"share_copy_link" disableImageName:@"share_copy_link"]; // XPShareItem *qq = [XPShareItem itemWitTag:XPShareItemTagCopyLink title:YMLocalizedString(@"RoomHeaderView3") imageName:@"share_copy_link" disableImageName:@"share_copy_link"];
NSArray * items = @[wechat,cycle, qq]; // NSArray * items = @[wechat,cycle, qq];
XPShareInfoModel * shareInfo = [[XPShareInfoModel alloc] init]; // XPShareInfoModel * shareInfo = [[XPShareInfoModel alloc] init];
shareInfo.shareTitle = self.userInfo.roomTitle; // shareInfo.shareTitle = self.userInfo.roomTitle;
shareInfo.shareContent = self.userInfo.nick; // shareInfo.shareContent = self.userInfo.nick;
shareInfo.shareImageUrl = self.userInfo.roomAvatar; // shareInfo.shareImageUrl = self.userInfo.roomAvatar;
shareInfo.type = ShareType_Room; // shareInfo.type = ShareType_Room;
shareInfo.roomUid = self.userInfo.roomUid.integerValue; // shareInfo.roomUid = self.userInfo.roomUid.integerValue;
NSString * uid = [AccountInfoStorage instance].getUid; // NSString * uid = [AccountInfoStorage instance].getUid;
NSString * urlString = [NSString stringWithFormat:@"%@/%@?shareUid=%@&uid=%@&room_name=%@&room_id=%@&room_avatar=%@&share_name=%@",[HttpRequestHelper getHostUrl],URLWithType(kShareRoomURL),uid,self.userInfo.roomUid,self.userInfo.nick,self.userInfo.roomId,self.userInfo.roomAvatar,self.userInfo.nick]; // NSString * urlString = [NSString stringWithFormat:@"%@/%@?shareUid=%@&uid=%@&room_name=%@&room_id=%@&room_avatar=%@&share_name=%@",[HttpRequestHelper getHostUrl],URLWithType(kShareRoomURL),uid,self.userInfo.roomUid,self.userInfo.nick,self.userInfo.roomId,self.userInfo.roomAvatar,self.userInfo.nick];
shareInfo.shareUrl = urlString; // shareInfo.shareUrl = urlString;
CGFloat margin = 15; // CGFloat margin = 15;
CGSize itemSize = CGSizeMake((KScreenWidth-2*margin)/4, 65); // CGSize itemSize = CGSizeMake((KScreenWidth-2*margin)/4, 65);
XPShareView *shareView = [[XPShareView alloc] initWithItems:items itemSize:itemSize shareInfo:shareInfo]; // XPShareView *shareView = [[XPShareView alloc] initWithItems:items itemSize:itemSize shareInfo:shareInfo];
shareView.delegate = self; // shareView.delegate = self;
[TTPopup popupView:shareView style:TTPopupStyleActionSheet]; // [TTPopup popupView:shareView style:TTPopupStyleActionSheet];
} else { } else {
if (self.arrangeMicInfo.myPos.integerValue > 0) { if (self.arrangeMicInfo.myPos.integerValue > 0) {
[TTPopup alertWithMessage:YMLocalizedString(@"XPArrangeMicViewController19") confirmHandler:^{ [TTPopup alertWithMessage:YMLocalizedString(@"XPArrangeMicViewController19") confirmHandler:^{

View File

@@ -11,7 +11,6 @@
#import "YUMIMacroUitls.h" #import "YUMIMacroUitls.h"
#import "YYUtility.h" #import "YYUtility.h"
#import "HttpRequestHelper.h" #import "HttpRequestHelper.h"
#import "XPShareView.h"
#import "TTPopup.h" #import "TTPopup.h"
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
#import <MJExtension/MJExtension.h> #import <MJExtension/MJExtension.h>
@@ -79,15 +78,11 @@ typedef NS_ENUM(NSUInteger, RightNavigationPushType){
@end @end
@interface XPWebViewController () <WKNavigationDelegate, WKScriptMessageHandler, XCShareViewDelegate,XPWebViewNavViewDelegate> @interface XPWebViewController () <WKNavigationDelegate, WKScriptMessageHandler, XPWebViewNavViewDelegate>
@property (nonatomic,strong) WalletInfoModel *model ; @property (nonatomic,strong) WalletInfoModel *model ;
//@property (strong, nonatomic) WKWebView *webview; //@property (strong, nonatomic) WKWebView *webview;
@property (strong, nonatomic) UIProgressView *progressView; @property (strong, nonatomic) UIProgressView *progressView;
@property (nonatomic, strong) WKUserContentController *pi_userContentController; @property (nonatomic, strong) WKUserContentController *pi_userContentController;
///
@property (nonatomic,copy) NSDictionary *shareDic;
///
@property (nonatomic,copy) NSDictionary *savePhotoDic;
/// ///
@property (nonatomic,strong) XPWebViewNavView *navView; @property (nonatomic,strong) XPWebViewNavView *navView;
@@ -389,8 +384,7 @@ NSString * const kJSShowShareCallBack = @"showShareAction";
} else if ([message.body isKindOfClass:[NSString class]]) { } else if ([message.body isKindOfClass:[NSString class]]) {
body = [message.body toJSONObject]; body = [message.body toJSONObject];
} }
self.shareDic = body[@"data"]; //
[self showSharePanel];
} }
} else if ([message.name isEqualToString:kJSGetUid]) { } else if ([message.name isEqualToString:kJSGetUid]) {
NSString *uid = [[AccountInfoStorage instance] getUid]; NSString *uid = [[AccountInfoStorage instance] getUid];
@@ -570,7 +564,7 @@ NSString * const kJSShowShareCallBack = @"showShareAction";
if ([type isEqualToString:@"2"]){ if ([type isEqualToString:@"2"]){
[self saveImageToPhotoAlbum:bodyDic]; [self saveImageToPhotoAlbum:bodyDic];
}else if ([type isEqualToString:@"1"]){ }else if ([type isEqualToString:@"1"]){
self.savePhotoDic = bodyDic; // self.savePhotoDic = bodyDic;
[self showShareSavePhote]; [self showShareSavePhote];
} }
} else if([message.name isEqualToString:kJSGoToExchangeGold]){ } else if([message.name isEqualToString:kJSGoToExchangeGold]){
@@ -726,7 +720,7 @@ NSString * const kJSShowShareCallBack = @"showShareAction";
#pragma mark - #pragma mark -
- (void)initNav:(NSDictionary *)response{ - (void)initNav:(NSDictionary *)response{
if(!response || ![response isKindOfClass:[NSDictionary class]])return; if(!response || ![response isKindOfClass:[NSDictionary class]])return;
self.shareDic = response[@"data"]; // self.shareDic = response[@"data"];
if ([response[@"type"] intValue]== RightNavigationPushType_Web) { if ([response[@"type"] intValue]== RightNavigationPushType_Web) {
[self addNavigationItemWithTitles:@[response[@"data"][@"title"]] titleColor:[DJDKMIMOMColor alertTitleColor] isLeft:NO target:self action:@selector(gotoWebView) tags:nil]; [self addNavigationItemWithTitles:@[response[@"data"][@"title"]] titleColor:[DJDKMIMOMColor alertTitleColor] isLeft:NO target:self action:@selector(gotoWebView) tags:nil];
}else if ([response[@"type"] intValue]== RightNavigationPushType_Share || [response[@"type"] intValue]== RightNavigationPushType_SharePicture){ }else if ([response[@"type"] intValue]== RightNavigationPushType_Share || [response[@"type"] intValue]== RightNavigationPushType_SharePicture){
@@ -736,124 +730,16 @@ NSString * const kJSShowShareCallBack = @"showShareAction";
} }
- (void)gotoWebView { - (void)gotoWebView {
if (self.shareDic[@"link"]) { // if (self.shareDic[@"link"]) {
XPWebViewController * webVC = [[XPWebViewController alloc] init]; // XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.url = self.shareDic[@"link"]; // webVC.url = self.shareDic[@"link"];
[self.navigationController pushViewController:webVC animated:YES]; // [self.navigationController pushViewController:webVC animated:YES];
} // }
} }
-(void)showShareSavePhote{ -(void)showShareSavePhote{
if (self.savePhotoDic.allKeys.count <= 0) {
return;
}
NSDictionary * dic = self.savePhotoDic;
XPShareInfoModel * shareInfo = [[XPShareInfoModel alloc] init];
shareInfo.shareContent = dic[@"shareText"];
shareInfo.type = ShareType_H5;
shareInfo.uid = [AccountInfoStorage instance].getUid;
NSString *urlStr = ((NSString *)dic[@"toUrl"]).length > 0 ? dic[@"toUrl"] : @"";
NSString *title = ((NSString *)dic[@"shareTitle"]).length > 0 ? dic[@"shareTitle"] : @"";
NSString *shareText = ((NSString *)dic[@"shareText"]).length > 0 ? dic[@"shareText"] : @"";
NSString *shareImg = ((NSString *)dic[@"shareImg"]).length > 0 ? dic[@"shareImg"] : @"";
shareInfo.shareUrl = [NSString stringWithFormat:@"%@&image=%@&title=%@&subTitle=%@",urlStr,shareImg,title,shareText];
XPShareItem *cycle = [XPShareItem itemWitTag:XPShareItemTagFaceBook title:@"FaceBook" imageName:@"share_fb" disableImageName:@"share_fb"];
XPShareItem *wechat = [XPShareItem itemWitTag:XPShareItemTagLine title:@"Line" imageName:@"share_line" disableImageName:@"share_line"];
wechat.isShareInvite = YES;
wechat.inviteTitle = title;
XPShareItem *qq = [XPShareItem itemWitTag:XPShareItemTagCopyLink title:YMLocalizedString(@"XPWebViewNavView1") imageName:@"share_copy_link" disableImageName:@"share_copy_link"];
XPShareItem *save = [XPShareItem itemWitTag:XPShareItemTagAppSaveAlbum title:YMLocalizedString(@"PIWebViewSavePhotoView4") imageName:@"share_save_icon" disableImageName:@"share_save_icon"];
NSArray * items = @[wechat,cycle, qq,save];
CGFloat margin = 15;
CGSize itemSize = CGSizeMake((KScreenWidth-2*margin)/4, 65);
XPShareView *shareView = [[XPShareView alloc] initWithItems:items itemSize:itemSize shareInfo:shareInfo];
shareView.delegate = self;
[TTPopup popupView:shareView style:TTPopupStyleActionSheet];
} }
- (void)showSharePanel { - (void)showSharePanel {
if (self.shareDic.allKeys.count <= 0) {
return;
}
NSDictionary * dic = self.shareDic;
XPShareInfoModel * shareInfo = [[XPShareInfoModel alloc] init];
shareInfo.shareTitle = self.shareDic[@"title"];
shareInfo.shareContent = dic[@"desc"];
shareInfo.shareImageUrl = dic[@"imgUrl"];
shareInfo.type = ShareType_H5;
shareInfo.uid = [AccountInfoStorage instance].getUid;
NSString *urlStr = ((NSString *)dic[@"url"]).length > 0 ? dic[@"url"] : dic[@"showUrl"];
if (urlStr.length) {
if ([urlStr containsString:@"?"]) {
urlStr = [NSString stringWithFormat:@"%@&shareUid=%@",urlStr,[AccountInfoStorage instance].getUid];
} else {
urlStr = [NSString stringWithFormat:@"%@?shareUid=%@",urlStr,[AccountInfoStorage instance].getUid];
}
}
shareInfo.shareUrl = urlStr;
XPShareItem *cycle = [XPShareItem itemWitTag:XPShareItemTagFaceBook title:@"FaceBook" imageName:@"share_fb" disableImageName:@"share_fb"];
XPShareItem *wechat = [XPShareItem itemWitTag:XPShareItemTagLine title:@"Line" imageName:@"share_line" disableImageName:@"share_line"];
XPShareItem *qq = [XPShareItem itemWitTag:XPShareItemTagCopyLink title:YMLocalizedString(@"XPWebViewNavView1") imageName:@"share_copy_link" disableImageName:@"share_copy_link"];
XPShareItem *save = [XPShareItem itemWitTag:XPShareItemTagAppSaveAlbum title:YMLocalizedString(@"PIWebViewSavePhotoView4") imageName:@"share_save_icon" disableImageName:@"share_save_icon"];
NSArray * items = @[wechat,cycle, qq,save];
CGFloat margin = 15;
CGSize itemSize = CGSizeMake((KScreenWidth-2*margin)/4, 65);
XPShareView *shareView = [[XPShareView alloc] initWithItems:items itemSize:itemSize shareInfo:shareInfo];
shareView.delegate = self;
[TTPopup popupView:shareView style:TTPopupStyleActionSheet];
}
#pragma mark - XCShareViewDelegate
- (void)shareView:(XPShareView *)shareView savePhoto:(XPShareInfoModel *)shareInfo{
[self saveImageToPhotoAlbum:self.savePhotoDic];
}
- (void)shareViewDidClickCancle:(XPShareView *)shareView {
[TTPopup dismiss];
}
- (void)shareView:(XPShareView *)shareView didSuccess:(XPShareInfoModel *)shareInfo {
[TTPopup dismiss];
NSMutableDictionary *params = [NSMutableDictionary dictionary];
NSString *uid = [AccountInfoStorage instance].getUid;
NSString *ticket = [AccountInfoStorage instance].getTicket;
[params setObject:uid forKey:@"uid"];
// NSTaggedPointerString
if ([shareInfo isKindOfClass:[XPShareInfoModel class]]) {
[params setObject:@(shareInfo.shareType) forKey:@"shareType"];
} else {
//
[params setObject:@(0) forKey:@"shareType"];
NSLog(@"警告shareInfo不是XPShareInfoModel类型而是%@类型", NSStringFromClass([shareInfo class]));
}
[params setObject:ticket forKey:@"ticket"];
if ([shareInfo isKindOfClass:[XPShareInfoModel class]]) {
[params setObject:@(shareInfo.type) forKey:@"sharePageId"];
if (shareInfo.shareUrl.length > 0) {
[params setObject:shareInfo.shareUrl forKey:@"shareUrl"];
}
if (shareInfo.roomUid > 0) {
[params setObject:@(shareInfo.roomUid) forKey:@"targetUid"];
}
}
[HttpRequestHelper POST:@"usershare/save" params:params success:^(BaseModel * _Nonnull data) {
} failure:^(NSInteger resCode, NSString * _Nonnull message) {
}];
}
- (void)shareView:(XPShareView *)shareView shareFail:(NSString *)message {
[TTPopup dismiss];
[self showErrorToast:message];
}
- (void)shareViewDidClickCancel:(XPShareView *)shareView {
[TTPopup dismiss];
} }
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context { - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context {
@@ -911,7 +797,7 @@ NSString * const kJSShowShareCallBack = @"showShareAction";
configuration.preferences.javaScriptEnabled = YES; configuration.preferences.javaScriptEnabled = YES;
configuration.preferences.javaScriptCanOpenWindowsAutomatically = YES; configuration.preferences.javaScriptCanOpenWindowsAutomatically = YES;
configuration.preferences.minimumFontSize = 10; configuration.preferences.minimumFontSize = 10;
configuration.selectionGranularity = WKSelectionGranularityCharacter; // configuration.selectionGranularity = WKSelectionGranularityCharacter;
configuration.userContentController = self.pi_userContentController; configuration.userContentController = self.pi_userContentController;
CGSize size = [UIScreen mainScreen].bounds.size; CGSize size = [UIScreen mainScreen].bounds.size;