├── .gitignore
├── LICENSE
├── Other
└── Screenshots
│ ├── wechatplugin.png
│ ├── wechatplugin_1.png
│ └── wechatplugin_2.png
├── README.md
└── WeChatPlugin
├── .theos
├── _
│ ├── DEBIAN
│ │ └── control
│ └── Library
│ │ ├── Application Support
│ │ └── WeChatPlugin
│ │ │ ├── RemoteControlCommands.plist
│ │ │ ├── Safari@2x.png
│ │ │ ├── lockscreen@2x.png
│ │ │ ├── shutdown@2x.png
│ │ │ └── sleep@2x.png
│ │ └── MobileSubstrate
│ │ └── DynamicLibraries
│ │ ├── WeChatPlugin.dylib
│ │ └── WeChatPlugin.plist
├── build_session
├── fakeroot
├── last_package
├── obj
│ └── debug
│ │ ├── WeChatPlugin.dylib
│ │ ├── arm64
│ │ ├── WeChatPlugin.dylib
│ │ ├── WeChatPlugin.dylib.dSYM
│ │ │ └── Contents
│ │ │ │ ├── Info.plist
│ │ │ │ └── Resources
│ │ │ │ └── DWARF
│ │ │ │ └── WeChatPlugin.dylib
│ │ └── src
│ │ │ ├── Tweak.xm.b105e1f4.Td
│ │ │ ├── WCPluginManager.m.b105e1f4.Td
│ │ │ ├── WCPluginSettingController.m.b105e1f4.Td
│ │ │ └── WCRemoteControlManager.m.b105e1f4.Td
│ │ ├── armv7
│ │ ├── WeChatPlugin.dylib
│ │ ├── WeChatPlugin.dylib.dSYM
│ │ │ └── Contents
│ │ │ │ ├── Info.plist
│ │ │ │ └── Resources
│ │ │ │ └── DWARF
│ │ │ │ └── WeChatPlugin.dylib
│ │ └── src
│ │ │ ├── Tweak.xm.f693e1dc.Td
│ │ │ ├── WCPluginManager.m.f693e1dc.Td
│ │ │ ├── WCPluginSettingController.m.f693e1dc.Td
│ │ │ └── WCRemoteControlManager.m.f693e1dc.Td
│ │ └── src
│ │ └── .stamp
└── packages
│ └── net.codetips.wechatplugin-1.0.0
├── Makefile
├── WeChatPlugin.plist
├── control
├── layout
└── Library
│ └── Application Support
│ └── WeChatPlugin
│ ├── RemoteControlCommands.plist
│ ├── Safari@2x.png
│ ├── lockscreen@2x.png
│ ├── shutdown@2x.png
│ └── sleep@2x.png
└── src
├── Tweak.xm
├── WCPluginManager.h
├── WCPluginManager.m
├── WCPluginSettingController.h
├── WCPluginSettingController.m
├── WCRemoteControlManager.h
├── WCRemoteControlManager.m
└── WeChat.h
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | *.xcuserstate
3 | *.deb
4 | *.o
5 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Loveletter
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Other/Screenshots/wechatplugin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/Other/Screenshots/wechatplugin.png
--------------------------------------------------------------------------------
/Other/Screenshots/wechatplugin_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/Other/Screenshots/wechatplugin_1.png
--------------------------------------------------------------------------------
/Other/Screenshots/wechatplugin_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/Other/Screenshots/wechatplugin_2.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # WeChatPlugin
2 |  [](https://github.com/CodeTips/WeChatPlugin/blob/master/LICENSE)
3 |
4 | 

5 |
6 | ### 说明
7 | * 免责声明:本项目旨在学习 iOS 逆向的一点实践,不可使用于商业和个人其他意图。若使用不当,均由个人承担。
8 | * 包含功能:一键远程控制、自动抢红包、消息防撤回等功能。
9 | * 本项目大部分功能代码来源于网络,太多我就不列举了。一键远程控制请配合[WeChatPlugin-macOS](https://github.com/CodeTips/WeChatPlugin-macOS)使用。部分功能完善中~
10 |
11 | ### 依赖
12 |
13 | * [theos](https://github.com/theos/theos)
14 |
15 | ### 最后
16 | * 使用愉快~
17 |
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/_/DEBIAN/control:
--------------------------------------------------------------------------------
1 | Package: net.codetips.wechatplugin
2 | Name: WeChatPlugin
3 | Depends: mobilesubstrate
4 | Architecture: iphoneos-arm
5 | Description: 微信小助手!
6 | Maintainer: Loveletter
7 | Author: Loveletter
8 | Section: Tweaks
9 | Version: 1.0.0-51+debug
10 | Installed-Size: 404
11 |
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/_/Library/Application Support/WeChatPlugin/RemoteControlCommands.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | function
8 | 屏幕保护
9 | enable
10 |
11 | command
12 | #remote.screensaver
13 |
14 |
15 | function
16 | 锁屏
17 | enable
18 |
19 | command
20 | #remote.lockscreen
21 |
22 |
23 | function
24 | 休眠
25 | enable
26 |
27 | command
28 | #remote.sleep
29 |
30 |
31 | function
32 | 关机
33 | enable
34 |
35 | command
36 | #remote.shutdown
37 |
38 |
39 | function
40 | 重启
41 | enable
42 |
43 | command
44 | #remote.restart
45 |
46 |
47 | function
48 | 清空废纸篓
49 | enable
50 |
51 | command
52 | #remote.emptytrash
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/_/Library/Application Support/WeChatPlugin/Safari@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/.theos/_/Library/Application Support/WeChatPlugin/Safari@2x.png
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/_/Library/Application Support/WeChatPlugin/lockscreen@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/.theos/_/Library/Application Support/WeChatPlugin/lockscreen@2x.png
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/_/Library/Application Support/WeChatPlugin/shutdown@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/.theos/_/Library/Application Support/WeChatPlugin/shutdown@2x.png
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/_/Library/Application Support/WeChatPlugin/sleep@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/.theos/_/Library/Application Support/WeChatPlugin/sleep@2x.png
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/_/Library/MobileSubstrate/DynamicLibraries/WeChatPlugin.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/.theos/_/Library/MobileSubstrate/DynamicLibraries/WeChatPlugin.dylib
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/_/Library/MobileSubstrate/DynamicLibraries/WeChatPlugin.plist:
--------------------------------------------------------------------------------
1 | { Filter = { Bundles = ( "com.tencent.xin" ); }; }
2 |
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/build_session:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/.theos/build_session
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/fakeroot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/.theos/fakeroot
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/last_package:
--------------------------------------------------------------------------------
1 | ./packages/net.codetips.wechatplugin_1.0.0-51+debug_iphoneos-arm.deb
2 |
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/WeChatPlugin.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/.theos/obj/debug/WeChatPlugin.dylib
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/arm64/WeChatPlugin.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/.theos/obj/debug/arm64/WeChatPlugin.dylib
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/arm64/WeChatPlugin.dylib.dSYM/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleIdentifier
8 | com.apple.xcode.dsym.WeChatPlugin.dylib
9 | CFBundleInfoDictionaryVersion
10 | 6.0
11 | CFBundlePackageType
12 | dSYM
13 | CFBundleSignature
14 | ????
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleVersion
18 | 1
19 |
20 |
21 |
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/arm64/WeChatPlugin.dylib.dSYM/Contents/Resources/DWARF/WeChatPlugin.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/.theos/obj/debug/arm64/WeChatPlugin.dylib.dSYM/Contents/Resources/DWARF/WeChatPlugin.dylib
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/arm64/src/Tweak.xm.b105e1f4.Td:
--------------------------------------------------------------------------------
1 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/.theos/obj/debug/arm64/src/Tweak.xm.b105e1f4.o: \
2 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/.theos/obj/debug/arm64/src/Tweak.xm.mm \
3 | /opt/theos/Prefix.pch \
4 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h \
5 | /opt/theos/vendor/include/_Prefix/IOSMacros.h \
6 | /opt/theos/vendor/include/HBLog.h \
7 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h \
8 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WeChat.h \
9 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WCPluginManager.h \
10 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WCPluginSettingController.h \
11 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WCRemoteControlManager.h \
12 | /opt/theos/vendor/include/substrate.h
13 |
14 | /opt/theos/Prefix.pch:
15 |
16 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h:
17 |
18 | /opt/theos/vendor/include/_Prefix/IOSMacros.h:
19 |
20 | /opt/theos/vendor/include/HBLog.h:
21 |
22 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
23 |
24 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WeChat.h:
25 |
26 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WCPluginManager.h:
27 |
28 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WCPluginSettingController.h:
29 |
30 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WCRemoteControlManager.h:
31 |
32 | /opt/theos/vendor/include/substrate.h:
33 |
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/arm64/src/WCPluginManager.m.b105e1f4.Td:
--------------------------------------------------------------------------------
1 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/.theos/obj/debug/arm64/src/WCPluginManager.m.b105e1f4.o: \
2 | src/WCPluginManager.m /opt/theos/Prefix.pch \
3 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h \
4 | /opt/theos/vendor/include/_Prefix/IOSMacros.h \
5 | /opt/theos/vendor/include/HBLog.h \
6 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h \
7 | src/WCPluginManager.h src/WeChat.h
8 |
9 | /opt/theos/Prefix.pch:
10 |
11 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h:
12 |
13 | /opt/theos/vendor/include/_Prefix/IOSMacros.h:
14 |
15 | /opt/theos/vendor/include/HBLog.h:
16 |
17 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
18 |
19 | src/WCPluginManager.h:
20 |
21 | src/WeChat.h:
22 |
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/arm64/src/WCPluginSettingController.m.b105e1f4.Td:
--------------------------------------------------------------------------------
1 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/.theos/obj/debug/arm64/src/WCPluginSettingController.m.b105e1f4.o: \
2 | src/WCPluginSettingController.m /opt/theos/Prefix.pch \
3 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h \
4 | /opt/theos/vendor/include/_Prefix/IOSMacros.h \
5 | /opt/theos/vendor/include/HBLog.h \
6 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h \
7 | src/WCPluginSettingController.h src/WeChat.h src/WCPluginManager.h \
8 | src/WCRemoteControlManager.h
9 |
10 | /opt/theos/Prefix.pch:
11 |
12 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h:
13 |
14 | /opt/theos/vendor/include/_Prefix/IOSMacros.h:
15 |
16 | /opt/theos/vendor/include/HBLog.h:
17 |
18 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
19 |
20 | src/WCPluginSettingController.h:
21 |
22 | src/WeChat.h:
23 |
24 | src/WCPluginManager.h:
25 |
26 | src/WCRemoteControlManager.h:
27 |
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/arm64/src/WCRemoteControlManager.m.b105e1f4.Td:
--------------------------------------------------------------------------------
1 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/.theos/obj/debug/arm64/src/WCRemoteControlManager.m.b105e1f4.o: \
2 | src/WCRemoteControlManager.m /opt/theos/Prefix.pch \
3 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h \
4 | /opt/theos/vendor/include/_Prefix/IOSMacros.h \
5 | /opt/theos/vendor/include/HBLog.h \
6 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h \
7 | src/WCRemoteControlManager.h src/WeChat.h
8 |
9 | /opt/theos/Prefix.pch:
10 |
11 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h:
12 |
13 | /opt/theos/vendor/include/_Prefix/IOSMacros.h:
14 |
15 | /opt/theos/vendor/include/HBLog.h:
16 |
17 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
18 |
19 | src/WCRemoteControlManager.h:
20 |
21 | src/WeChat.h:
22 |
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/armv7/WeChatPlugin.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/.theos/obj/debug/armv7/WeChatPlugin.dylib
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/armv7/WeChatPlugin.dylib.dSYM/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleIdentifier
8 | com.apple.xcode.dsym.WeChatPlugin.dylib
9 | CFBundleInfoDictionaryVersion
10 | 6.0
11 | CFBundlePackageType
12 | dSYM
13 | CFBundleSignature
14 | ????
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleVersion
18 | 1
19 |
20 |
21 |
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/armv7/WeChatPlugin.dylib.dSYM/Contents/Resources/DWARF/WeChatPlugin.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/.theos/obj/debug/armv7/WeChatPlugin.dylib.dSYM/Contents/Resources/DWARF/WeChatPlugin.dylib
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/armv7/src/Tweak.xm.f693e1dc.Td:
--------------------------------------------------------------------------------
1 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/.theos/obj/debug/armv7/src/Tweak.xm.f693e1dc.o: \
2 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/.theos/obj/debug/armv7/src/Tweak.xm.mm \
3 | /opt/theos/Prefix.pch \
4 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h \
5 | /opt/theos/vendor/include/_Prefix/IOSMacros.h \
6 | /opt/theos/vendor/include/HBLog.h \
7 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h \
8 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WeChat.h \
9 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WCPluginManager.h \
10 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WCPluginSettingController.h \
11 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WCRemoteControlManager.h \
12 | /opt/theos/vendor/include/substrate.h
13 |
14 | /opt/theos/Prefix.pch:
15 |
16 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h:
17 |
18 | /opt/theos/vendor/include/_Prefix/IOSMacros.h:
19 |
20 | /opt/theos/vendor/include/HBLog.h:
21 |
22 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
23 |
24 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WeChat.h:
25 |
26 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WCPluginManager.h:
27 |
28 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WCPluginSettingController.h:
29 |
30 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/src/WCRemoteControlManager.h:
31 |
32 | /opt/theos/vendor/include/substrate.h:
33 |
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/armv7/src/WCPluginManager.m.f693e1dc.Td:
--------------------------------------------------------------------------------
1 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/.theos/obj/debug/armv7/src/WCPluginManager.m.f693e1dc.o: \
2 | src/WCPluginManager.m /opt/theos/Prefix.pch \
3 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h \
4 | /opt/theos/vendor/include/_Prefix/IOSMacros.h \
5 | /opt/theos/vendor/include/HBLog.h \
6 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h \
7 | src/WCPluginManager.h src/WeChat.h
8 |
9 | /opt/theos/Prefix.pch:
10 |
11 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h:
12 |
13 | /opt/theos/vendor/include/_Prefix/IOSMacros.h:
14 |
15 | /opt/theos/vendor/include/HBLog.h:
16 |
17 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
18 |
19 | src/WCPluginManager.h:
20 |
21 | src/WeChat.h:
22 |
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/armv7/src/WCPluginSettingController.m.f693e1dc.Td:
--------------------------------------------------------------------------------
1 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/.theos/obj/debug/armv7/src/WCPluginSettingController.m.f693e1dc.o: \
2 | src/WCPluginSettingController.m /opt/theos/Prefix.pch \
3 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h \
4 | /opt/theos/vendor/include/_Prefix/IOSMacros.h \
5 | /opt/theos/vendor/include/HBLog.h \
6 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h \
7 | src/WCPluginSettingController.h src/WeChat.h src/WCPluginManager.h \
8 | src/WCRemoteControlManager.h
9 |
10 | /opt/theos/Prefix.pch:
11 |
12 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h:
13 |
14 | /opt/theos/vendor/include/_Prefix/IOSMacros.h:
15 |
16 | /opt/theos/vendor/include/HBLog.h:
17 |
18 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
19 |
20 | src/WCPluginSettingController.h:
21 |
22 | src/WeChat.h:
23 |
24 | src/WCPluginManager.h:
25 |
26 | src/WCRemoteControlManager.h:
27 |
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/armv7/src/WCRemoteControlManager.m.f693e1dc.Td:
--------------------------------------------------------------------------------
1 | /Users/loveletter/Documents/Github/WeChatPlugin/WeChatPlugin/.theos/obj/debug/armv7/src/WCRemoteControlManager.m.f693e1dc.o: \
2 | src/WCRemoteControlManager.m /opt/theos/Prefix.pch \
3 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h \
4 | /opt/theos/vendor/include/_Prefix/IOSMacros.h \
5 | /opt/theos/vendor/include/HBLog.h \
6 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h \
7 | src/WCRemoteControlManager.h src/WeChat.h
8 |
9 | /opt/theos/Prefix.pch:
10 |
11 | /opt/theos/vendor/include/_Prefix/BackwardsCompat.h:
12 |
13 | /opt/theos/vendor/include/_Prefix/IOSMacros.h:
14 |
15 | /opt/theos/vendor/include/HBLog.h:
16 |
17 | /opt/theos/vendor/include/CoreFoundation/CFLogUtilities.h:
18 |
19 | src/WCRemoteControlManager.h:
20 |
21 | src/WeChat.h:
22 |
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/obj/debug/src/.stamp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/.theos/obj/debug/src/.stamp
--------------------------------------------------------------------------------
/WeChatPlugin/.theos/packages/net.codetips.wechatplugin-1.0.0:
--------------------------------------------------------------------------------
1 | 51
--------------------------------------------------------------------------------
/WeChatPlugin/Makefile:
--------------------------------------------------------------------------------
1 | THEOS_DEVICE_IP = localhost
2 | THEOS_DEVICE_PORT = 2222
3 |
4 | include $(THEOS)/makefiles/common.mk
5 |
6 | SRC = $(wildcard src/*.m)
7 |
8 | TWEAK_NAME = WeChatPlugin
9 | WeChatPlugin_FILES = $(wildcard src/*.m) $(wildcard src/*.xm)
10 | WeChatPlugin_CFLAGS = -std=c++11 -stdlib=libc++
11 | WeChatPlugin_LDFLAGS = -stdlib=libc++
12 |
13 | include $(THEOS_MAKE_PATH)/tweak.mk
14 |
15 | after-install::
16 | install.exec "killall -9 WeChat"
17 |
--------------------------------------------------------------------------------
/WeChatPlugin/WeChatPlugin.plist:
--------------------------------------------------------------------------------
1 | { Filter = { Bundles = ( "com.tencent.xin" ); }; }
2 |
--------------------------------------------------------------------------------
/WeChatPlugin/control:
--------------------------------------------------------------------------------
1 | Package: net.codetips.wechatplugin
2 | Name: WeChatPlugin
3 | Depends: mobilesubstrate
4 | Version: 1.0.0
5 | Architecture: iphoneos-arm
6 | Description: 微信小助手!
7 | Maintainer: Loveletter
8 | Author: Loveletter
9 | Section: Tweaks
10 |
--------------------------------------------------------------------------------
/WeChatPlugin/layout/Library/Application Support/WeChatPlugin/RemoteControlCommands.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | function
8 | 屏幕保护
9 | enable
10 |
11 | command
12 | #remote.screensaver
13 |
14 |
15 | function
16 | 锁屏
17 | enable
18 |
19 | command
20 | #remote.lockscreen
21 |
22 |
23 | function
24 | 休眠
25 | enable
26 |
27 | command
28 | #remote.sleep
29 |
30 |
31 | function
32 | 关机
33 | enable
34 |
35 | command
36 | #remote.shutdown
37 |
38 |
39 | function
40 | 重启
41 | enable
42 |
43 | command
44 | #remote.restart
45 |
46 |
47 | function
48 | 清空废纸篓
49 | enable
50 |
51 | command
52 | #remote.emptytrash
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/WeChatPlugin/layout/Library/Application Support/WeChatPlugin/Safari@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/layout/Library/Application Support/WeChatPlugin/Safari@2x.png
--------------------------------------------------------------------------------
/WeChatPlugin/layout/Library/Application Support/WeChatPlugin/lockscreen@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/layout/Library/Application Support/WeChatPlugin/lockscreen@2x.png
--------------------------------------------------------------------------------
/WeChatPlugin/layout/Library/Application Support/WeChatPlugin/shutdown@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/layout/Library/Application Support/WeChatPlugin/shutdown@2x.png
--------------------------------------------------------------------------------
/WeChatPlugin/layout/Library/Application Support/WeChatPlugin/sleep@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeTips/WeChatPlugin/c03bfc935243e0d7de9914ea483467a4622f0e5a/WeChatPlugin/layout/Library/Application Support/WeChatPlugin/sleep@2x.png
--------------------------------------------------------------------------------
/WeChatPlugin/src/Tweak.xm:
--------------------------------------------------------------------------------
1 | #import "WeChat.h"
2 | #import "WCPluginManager.h"
3 | #import "WCPluginSettingController.h"
4 | #import
5 | #import "WCRemoteControlManager.h"
6 |
7 | %hook WCDeviceStepObject
8 |
9 | - (unsigned long)m7StepCount{
10 | if([WCPluginManager shared].isOpenSportHelper){
11 | return [[WCPluginManager shared] getSportStepCount]; // max value is 98800
12 | } else {
13 | return %orig;
14 | }
15 | }
16 |
17 | %end
18 |
19 | %hook UINavigationController
20 |
21 | - (void)PushViewController:(UIViewController *)controller animated:(BOOL)animated{
22 | if ([WCPluginManager shared].isOpenRedEnvelopesHelper && [WCPluginManager shared].isHongBaoPush && [controller isMemberOfClass:NSClassFromString(@"BaseMsgContentViewController")]) {
23 | [WCPluginManager shared].isHongBaoPush = NO;
24 | [[WCPluginManager shared] handleRedEnvelopesPushVC:(BaseMsgContentViewController *)controller];
25 | } else {
26 | %orig;
27 | }
28 | }
29 |
30 | %end
31 |
32 | %hook UIViewController
33 |
34 | - (void)presentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)flag completion:(void (^)(void))completion{
35 | WCPluginManager *manager = [WCPluginManager shared];
36 | if (manager.isOpenRedEnvelopesHelper && manager.isHiddenRedEnvelopesReceiveView && [viewControllerToPresent isKindOfClass:NSClassFromString(@"MMUINavigationController")]){
37 | manager.isHiddenRedEnvelopesReceiveView = NO;
38 | UINavigationController *navController = (UINavigationController *)viewControllerToPresent;
39 | if (navController.viewControllers.count > 0){
40 | if ([navController.viewControllers[0] isKindOfClass:NSClassFromString(@"WCRedEnvelopesRedEnvelopesDetailViewController")]){
41 | //模态红包详情视图
42 | if([manager isMySendMsgWithMsgWrap:manager.msgWrap]){
43 | //领取的是自己发的红包,不自动回复和自动留言
44 | return;
45 | }
46 | if(manager.isOpenAutoReply && [self isMemberOfClass:%c(BaseMsgContentViewController)]){
47 | BaseMsgContentViewController *baseMsgVC = (BaseMsgContentViewController *)self;
48 | [baseMsgVC AsyncSendMessage:manager.autoReplyText];
49 | }
50 | if(manager.isOpenAutoLeaveMessage){
51 | WCRedEnvelopesReceiveControlLogic *redEnvelopeLogic = MSHookIvar(navController.viewControllers[0],"m_delegate");
52 | [redEnvelopeLogic OnCommitWCRedEnvelopes:manager.autoLeaveMessageText];
53 | }
54 | return;
55 | }
56 | }
57 | }
58 | %orig;
59 | }
60 |
61 | %end
62 |
63 | %hook CMessageMgr
64 |
65 | - (void)MainThreadNotifyToExt:(NSDictionary *)ext{
66 | %orig;
67 | if([WCPluginManager shared].isOpenRedEnvelopesHelper){
68 | CMessageWrap *msgWrap = ext[@"3"];
69 | [[WCPluginManager shared] handleMessageWithMessageWrap:msgWrap isBackground:NO];
70 | }
71 | }
72 |
73 | - (void)onNewSyncShowPush:(NSDictionary *)message{
74 | %orig;
75 | if ([WCPluginManager shared].isOpenRedEnvelopesHelper && [WCPluginManager shared].isOpenBackgroundMode && [UIApplication sharedApplication].applicationState == UIApplicationStateBackground){
76 | //app在后台运行
77 | CMessageWrap *msgWrap = (CMessageWrap *)message;
78 | [[WCPluginManager shared] handleMessageWithMessageWrap:msgWrap isBackground:YES];
79 | }
80 | }
81 |
82 | %end
83 |
84 | %hook WCRedEnvelopesReceiveHomeView
85 |
86 | - (id)initWithFrame:(CGRect)frame andData:(id)data delegate:(id)delegate{
87 | WCRedEnvelopesReceiveHomeView *view = %orig;
88 | if([WCPluginManager shared].isOpenRedEnvelopesHelper && [WCPluginManager shared].isHiddenRedEnvelopesReceiveView){
89 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)([WCPluginManager shared].openRedEnvelopesDelaySecond * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
90 | //打开红包
91 | [view OnOpenRedEnvelopes];
92 | });
93 | view.hidden = YES;
94 | }
95 | return view;
96 | }
97 |
98 | - (void)showSuccessOpenAnimation{
99 | %orig;
100 | if ([WCPluginManager shared].isOpenRedEnvelopesHelper && [UIApplication sharedApplication].applicationState == UIApplicationStateBackground){
101 | [[WCPluginManager shared] successOpenRedEnvelopesNotification];
102 | }
103 | }
104 |
105 | %end
106 |
107 | %hook MMUIWindow
108 |
109 | - (void)addSubview:(UIView *)subView{
110 | if ([WCPluginManager shared].isOpenRedEnvelopesHelper && [subView isKindOfClass:NSClassFromString(@"WCRedEnvelopesReceiveHomeView")] && [WCPluginManager shared].isHiddenRedEnvelopesReceiveView){
111 | //隐藏弹出红包领取完成页面所在window
112 | ((UIView *)self).hidden = YES;
113 | } else {
114 | %orig;
115 | }
116 | }
117 |
118 | - (void)dealloc{
119 | if ([WCPluginManager shared].isOpenRedEnvelopesHelper && [WCPluginManager shared].isHiddenRedEnvelopesReceiveView){
120 | [WCPluginManager shared].isHiddenRedEnvelopesReceiveView = NO;
121 | } else {
122 | %orig;
123 | }
124 | }
125 |
126 | %end
127 |
128 | %hook NewMainFrameViewController
129 |
130 | - (void)viewDidLoad{
131 | %orig;
132 | [WCPluginManager shared].openRedEnvelopesBlock = ^{
133 | if([WCPluginManager shared].isOpenRedEnvelopesHelper && [WCPluginManager shared].haveNewRedEnvelopes){
134 | [WCPluginManager shared].haveNewRedEnvelopes = NO;
135 | [WCPluginManager shared].isHongBaoPush = YES;
136 | [[WCPluginManager shared] openRedEnvelopes:self];
137 | }
138 | };
139 | }
140 |
141 | - (void)reloadSessions{
142 | %orig;
143 | if([WCPluginManager shared].isOpenRedEnvelopesHelper && [WCPluginManager shared].openRedEnvelopesBlock){
144 | [WCPluginManager shared].openRedEnvelopesBlock();
145 | }
146 | }
147 |
148 | %end
149 |
150 | %hook WCRedEnvelopesControlLogic
151 |
152 | - (void)startLoading{
153 | if ([WCPluginManager shared].isOpenRedEnvelopesHelper && [WCPluginManager shared].isHiddenRedEnvelopesReceiveView){
154 | //隐藏加载菊花
155 | //do nothing
156 | } else {
157 | %orig;
158 | }
159 | }
160 |
161 | %end
162 |
163 | %hook NewSettingViewController
164 |
165 | - (void)reloadTableData{
166 | %orig;
167 | WCTableViewNormalCellManager *configCell = [%c(WCTableViewNormalCellManager) normalCellForSel:@selector(configHandler) target:self title:@"Plugin" accessoryType:1];
168 | MMTableViewSectionInfo *sectionInfo = [%c(WCTableViewSectionManager) sectionInfoDefaut];
169 | [sectionInfo addCell:configCell];
170 | MMTableViewInfo *tableViewInfo = [self valueForKey:@"m_tableViewMgr"];
171 | [tableViewInfo insertSection:sectionInfo At:0];
172 | [[tableViewInfo getTableView] reloadData];
173 | }
174 |
175 | %new
176 | - (void)configHandler{
177 | WCPluginSettingController *settingVC = [[WCPluginSettingController alloc] init];
178 | [((UIViewController *)self).navigationController PushViewController:settingVC animated:YES];
179 | }
180 |
181 | %end
182 |
183 | %hook MicroMessengerAppDelegate
184 |
185 | - (void)applicationWillEnterForeground:(UIApplication *)application {
186 | %orig;
187 | [[WCPluginManager shared] reset];
188 | }
189 |
190 | - (void)applicationDidEnterBackground:(UIApplication *)application{
191 | %orig;
192 | [[WCPluginManager shared] enterBackgroundHandler];
193 | }
194 |
195 | %end
196 |
197 | %hook MMMsgLogicManager
198 |
199 | - (id)GetCurrentLogicController{
200 | if([WCPluginManager shared].isHiddenRedEnvelopesReceiveView && [WCPluginManager shared].logicController){
201 | return [WCPluginManager shared].logicController;
202 | }
203 | return %orig;
204 | }
205 |
206 | %end
207 |
208 | %hook OnlineDeviceInfoViewController
209 |
210 | - (void)viewDidAppear:(BOOL)arg1
211 | {
212 | %orig;
213 | [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(setupRemoteBtn) userInfo:nil repeats:NO];
214 | }
215 |
216 | %new
217 | - (void)setupRemoteBtn
218 | {
219 | if([WCRemoteControlManager sharedManager].enableRemoteCommands.count)
220 | {
221 | NSMutableArray *controlButtons = [self valueForKey:@"_controlButtons"];
222 | UIView *controlView = [controlButtons.firstObject superview];
223 | controlView.frame = CGRectMake(controlView.frame.origin.x, controlView.frame.origin.y - 40, controlView.frame.size.width, controlView.frame.size.height);
224 | UIView *remoteView = [[UIView alloc] initWithFrame:CGRectMake(controlView.frame.origin.x, controlView.frame.origin.y + controlView.frame.size.height + 10, controlView.frame.size.width, controlView.frame.size.height)];
225 | [controlView.superview addSubview:remoteView];
226 | NSArray *commands = [WCRemoteControlManager sharedManager].enableRemoteCommands;
227 | for (int i = 0; i < (commands.count > 3 ? 3 : commands.count); i ++) {
228 | WCRemoteControlModel *model = commands[i];
229 | NSString *imageName = [model.command componentsSeparatedByString:@"."].lastObject;
230 | NSString *imagePath = [PluginPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@@2x.png",imageName]];
231 | NSData *imageData = [NSData dataWithContentsOfFile:imagePath];
232 | UIImage *image = [UIImage imageWithData:imageData scale:2];
233 | UIButton *button = [self makeControlButtonWithTitle:model.function image:image highlightedImage:image target:[WCRemoteControlManager sharedManager] action:@selector(sendRemoteControlCommand:)];
234 | button.frame = CGRectMake(i * (81 + (remoteView.frame.size.width - 3 * 81) / 2), 0, button.frame.size.width, button.frame.size.height);
235 | button.tag = i + 100;
236 | [remoteView addSubview:button];
237 | }
238 | }
239 | }
240 |
241 |
242 | %end
243 |
244 | %hook VoipCXMgr
245 |
246 | + (BOOL)isCallkitAvailable{
247 | return YES;
248 | }
249 | + (BOOL)isDeviceCallkitAvailable{
250 | return YES;
251 | }
252 |
253 | %end
254 |
255 |
256 | %hook MMLocationMgr
257 |
258 | - (void)locationManager:(CLLocationManager *)manager
259 | didUpdateToLocation:(CLLocation *)newLocation
260 | fromLocation:(CLLocation *)oldLocation{
261 | if([WCPluginManager shared].isOpenVirtualLocation && newLocation && [newLocation isMemberOfClass:[CLLocation class]]){
262 | CLLocation *virutalLocation = [[WCPluginManager shared] getVirutalLocationWithRealLocation:newLocation];
263 | %orig(manager,virutalLocation,oldLocation?virutalLocation:nil);
264 | } else {
265 | %orig;
266 | }
267 | }
268 |
269 | - (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(CLLocation *)location{
270 | if([WCPluginManager shared].isOpenVirtualLocation && location && [location isMemberOfClass:[CLLocation class]]){
271 | %orig(mapView,[[WCPluginManager shared] getVirutalLocationWithRealLocation:location]);
272 | } else {
273 | %orig;
274 | }
275 | }
276 |
277 | %end
278 |
279 | %hook QMapView
280 |
281 | - (void)locationManager:(CLLocationManager *)manager
282 | didUpdateToLocation:(CLLocation *)newLocation
283 | fromLocation:(CLLocation *)oldLocation{
284 | if([WCPluginManager shared].isOpenVirtualLocation && newLocation && [newLocation isMemberOfClass:[CLLocation class]]){
285 | CLLocation *virutalLocation = [[WCPluginManager shared] getVirutalLocationWithRealLocation:newLocation];
286 | %orig(manager,virutalLocation,oldLocation?virutalLocation:nil);
287 | } else {
288 | %orig;
289 | }
290 | }
291 |
292 | - (id)correctLocation:(id)arg1{
293 | return [WCPluginManager shared].isOpenVirtualLocation ? arg1 : %orig;
294 | }
295 |
296 | %end
297 |
298 | %hook CMessageMgr
299 |
300 | - (void)onRevokeMsg:(CMessageWrap*)arg1{
301 |
302 | if(![WCPluginManager shared].isOpenAvoidRevokeMessage){
303 | %orig;
304 | }
305 | else
306 | {
307 | if ([arg1.m_nsContent rangeOfString:@""].location == NSNotFound) { return; }
308 | if ([arg1.m_nsContent rangeOfString:@""].location == NSNotFound) { return; }
309 |
310 | NSString *(^parseParam)(NSString *, NSString *,NSString *) = ^NSString *(NSString *content, NSString *paramBegin,NSString *paramEnd) {
311 | NSUInteger startIndex = [content rangeOfString:paramBegin].location + paramBegin.length;
312 | NSUInteger endIndex = [content rangeOfString:paramEnd].location;
313 | NSRange range = NSMakeRange(startIndex, endIndex - startIndex);
314 | return [content substringWithRange:range];
315 | };
316 |
317 |
318 | NSString *(^parseSender)(NSString *, NSString *) = ^NSString *(NSString *m_nsContent, NSString *m_nsSession) {
319 | NSString *regularPattern = [m_nsContent containsString:@"recalled a message"] ? @"" : @"";
320 | NSRegularExpression *regexCN = [NSRegularExpression regularExpressionWithPattern:regularPattern options:NSRegularExpressionCaseInsensitive error:nil];
321 | NSRange range = NSMakeRange(0, m_nsContent.length);
322 | NSTextCheckingResult *nameResult = [regexCN matchesInString:m_nsContent options:0 range:range].firstObject;
323 | if (nameResult.numberOfRanges < 2) { return nil; }
324 | NSString *senderName = [m_nsContent substringWithRange:[nameResult rangeAtIndex:1]];
325 |
326 | if ([m_nsSession hasSuffix:@"@chatroom"]) {
327 | NSArray *result = [m_nsContent componentsSeparatedByString:@":"];
328 | NSString *wxid = result.firstObject;
329 | return [NSString stringWithFormat:@"%@(%@)",senderName,wxid];
330 | }
331 | return senderName;
332 | };
333 |
334 | NSString *session = parseParam(arg1.m_nsContent, @"", @"");
335 | NSString *newmsgid = parseParam(arg1.m_nsContent, @"", @"");
336 |
337 | CContactMgr *contactMgr = [[objc_getClass("MMServiceCenter") defaultCenter] getService:objc_getClass("CContactMgr")];
338 | CContact *selfContact = [contactMgr getSelfContact];
339 |
340 | CMessageWrap *revokemsg = [self GetMsg:session n64SvrID:[newmsgid integerValue]];
341 | BOOL isSender = [revokemsg.m_nsFromUsr isEqualToString:selfContact.m_nsUsrName];
342 |
343 | BOOL en = [arg1.m_nsContent containsString:@"recalled a message"];
344 |
345 | if (isSender) {
346 | %orig;
347 | }
348 | else
349 | {
350 | CMessageWrap *msgWrap = [[objc_getClass("CMessageWrap") alloc] initWithMsgType:0x2710];
351 | [msgWrap setM_nsFromUsr:arg1.m_nsToUsr];
352 | [msgWrap setM_nsToUsr:arg1.m_nsFromUsr];
353 | [msgWrap setM_uiStatus:0x4];
354 | [msgWrap setM_uiCreateTime:[arg1 m_uiCreateTime]];
355 | NSString *sender = parseSender(arg1.m_nsContent,session);
356 | NSString * sendContent = [NSString stringWithFormat:en ? @"Prevent %@ recalled a message." : @"拦截 %@ 的一条撤回消息", sender ? sender : arg1.m_nsFromUsr];
357 | [msgWrap setM_nsContent:sendContent];
358 |
359 | [self AddLocalMsg:session MsgWrap:msgWrap fixTime:0x1 NewMsgArriveNotify:0x0];
360 | }
361 | }
362 | }
363 |
364 | %new
365 | - (void)sendMsg:(NSString *)msg toContactUsrName:(NSString *)userName{
366 | CMessageWrap *wrap = [[NSClassFromString(@"CMessageWrap") alloc] initWithMsgType:1];
367 | id usrName = [NSClassFromString(@"SettingUtil") getLocalUsrName:0];
368 | [wrap setM_nsFromUsr:usrName];
369 | [wrap setM_nsContent:msg];
370 | [wrap setM_nsToUsr:userName];
371 | MMNewSessionMgr *sessionMgr = [[objc_getClass("MMServiceCenter") defaultCenter] getService:[objc_getClass("MMNewSessionMgr") class]];
372 | [wrap setM_uiCreateTime:[sessionMgr GenSendMsgTime]];
373 | [wrap setM_uiStatus:YES];
374 |
375 | CMessageMgr *chatMgr = [[objc_getClass("MMServiceCenter") defaultCenter] getService:[objc_getClass("CMessageMgr") class]];
376 | [chatMgr AddMsg:userName MsgWrap:wrap];
377 | }
378 |
379 | - (id)GetMsgByCreateTime:(id)arg1 FromID:(unsigned int)arg2 FromCreateTime:(unsigned int)arg3 Limit:(unsigned int)arg4 LeftCount:(unsigned int *)arg5 FromSequence:(unsigned int)arg6
380 | {
381 | id result = %orig;
382 | return [WCRemoteControlManager filterMessageWrapArr:result];
383 | }
384 |
385 | %end
386 |
387 | %subclass LLFilterChatRoomController : ChatRoomListViewController
388 |
389 | %property (nonatomic, retain) NSMutableDictionary *filterRoomDic;
390 |
391 | - (void)viewDidLoad{
392 | %orig;
393 |
394 | [self setNavigationBar];
395 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
396 | [self commonInit];
397 | });
398 | }
399 |
400 | - (void)initSearchBar{
401 |
402 | }
403 |
404 | %new
405 | - (void)commonInit{
406 | MMTableView *tableView = MSHookIvar(self,"m_tableView");
407 | [tableView setEditing:YES animated:YES];
408 |
409 | MemberDataLogic *memberData = MSHookIvar(self,"m_memberData");
410 | NSUInteger sectionCount = [memberData getSectionCount];
411 | [self.filterRoomDic enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull usrName, NSString * _Nonnull aliasName, BOOL * _Nonnull stop) {
412 | BOOL isBreak = NO;
413 | for(int i = 0; i < sectionCount; i++){
414 | NSUInteger rowCount = [memberData getSectionItemCount:i];
415 | for(int j = 0; j < rowCount; j++){
416 | CContact *contact = [memberData getItemInSection:i atRow:j];
417 | if([contact.m_nsUsrName isEqualToString:usrName]){
418 | isBreak = YES;
419 | [tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:j inSection:i] animated:YES scrollPosition:UITableViewScrollPositionNone];
420 | break;
421 | }
422 | }
423 | if(isBreak){
424 | break;
425 | }
426 | }
427 | }];
428 | }
429 |
430 | %new
431 | - (void)setNavigationBar{
432 | self.title = @"过滤群聊设置";
433 |
434 | UIBarButtonItem *confirmItem = [NSClassFromString(@"MMUICommonUtil") getBarButtonWithTitle:@"确定" target:self action:@selector(clickConfirmItem) style:0 color:[UIColor whiteColor]];
435 | self.navigationItem.rightBarButtonItem = confirmItem;
436 | }
437 |
438 | %new
439 | - (void)clickConfirmItem{
440 | MMTableView *tableView = MSHookIvar(self,"m_tableView");
441 | MemberDataLogic *memberData = MSHookIvar(self,"m_memberData");
442 | NSMutableDictionary *filterRoomDic = [NSMutableDictionary dictionary];
443 | [[tableView indexPathsForSelectedRows] enumerateObjectsUsingBlock:^(NSIndexPath * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
444 | CContact *contact = [memberData getItemInSection:obj.section atRow:obj.row];
445 | if(contact.m_nsUsrName){
446 | [filterRoomDic setObject:contact.m_nsAliasName?:@"alias" forKey:contact.m_nsUsrName];
447 | }
448 | }];
449 | [[NSNotificationCenter defaultCenter] postNotificationName:@"kConfirmFilterChatRoomNotification" object:filterRoomDic];
450 | [self.navigationController popViewControllerAnimated:YES];
451 | }
452 |
453 | - (void)didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
454 |
455 | }
456 |
457 | - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{
458 | return NO;
459 | }
460 |
461 | - (int)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{
462 | return UITableViewCellEditingStyleDelete | UITableViewCellEditingStyleInsert;
463 | }
464 |
465 | %end
466 |
--------------------------------------------------------------------------------
/WeChatPlugin/src/WCPluginManager.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import
4 | #import "WeChat.h"
5 |
6 | @class POIInfo;
7 |
8 | @interface WCPluginManager : NSObject
9 |
10 | @property (nonatomic, assign) BOOL haveNewRedEnvelopes; //是否有新的红包
11 | @property (nonatomic, assign) BOOL isHiddenRedEnvelopesReceiveView; //是否隐藏红包接受页面
12 | @property (nonatomic, assign) BOOL isHongBaoPush; //是否是红包push
13 | @property (nonatomic, assign) BOOL isOpenRedEnvelopesHelper; //是否开启红包助手
14 | @property (nonatomic, assign) BOOL isOpenSportHelper; //是否开启步数助手
15 | @property (nonatomic, assign) BOOL isOpenBackgroundMode; //是否开启后台模式
16 | @property (nonatomic, assign) BOOL isOpenRedEnvelopesAlert; //是否开启红包提醒
17 | @property (nonatomic, assign) BOOL isOpenVirtualLocation; //是否打开虚拟定位
18 | @property (nonatomic, assign) BOOL isOpenAutoReply; //是否打开自动回复
19 | @property (nonatomic, assign) BOOL isOpenAutoLeaveMessage; //是否打开自动留言
20 | @property (nonatomic, assign) BOOL isOpenKeywordFilter; //是否打开关键字过滤
21 | @property (nonatomic, assign) BOOL isSnatchSelfRedEnvelopes; //是否抢自己的发的红包
22 | @property (nonatomic, assign) BOOL isOpenAvoidRevokeMessage; //是否打开防止好友撤回消息
23 | @property (nonatomic, assign) BOOL sportStepCountMode; //运动步数模式 true: 范围随机 false:固定步数
24 | @property (nonatomic, assign) NSInteger sportStepCountUpperLimit; //运动步数上限
25 | @property (nonatomic, assign) NSInteger sportStepCountLowerLimit; //运动步数下限
26 | @property (nonatomic, copy) NSString *keywordFilterText; //要过滤的关键字
27 | @property (nonatomic, copy) NSString *autoReplyText; //自动回复内容
28 | @property (nonatomic, copy) NSString *autoLeaveMessageText; //自动留言内容
29 | @property (nonatomic, assign) CGFloat openRedEnvelopesDelaySecond; //打开红包延迟时间
30 | @property (nonatomic, assign) NSInteger wantSportStepCount; //想要的运动步数
31 | @property (nonatomic, assign) UIBackgroundTaskIdentifier bgTaskIdentifier; //后台任务标识符
32 | @property (nonatomic, strong) NSTimer *bgTaskTimer; //后台任务定时器
33 | @property (nonatomic, strong) AVAudioPlayer *blankPlayer; //无声音频播放器
34 | @property (nonatomic, strong) CMessageWrap *lastMsgWrap; //上一个消息model
35 | @property (nonatomic, strong) CMessageWrap *msgWrap; //当前的消息model
36 | @property (nonatomic, strong) BaseMsgContentLogicController *logicController;
37 | @property (nonatomic, strong) NSMutableDictionary *filterRoomDic; //过滤群组字典
38 | @property (nonatomic, strong) POIInfo *virtualLocation; //虚拟位置POIInfo
39 |
40 | @property (nonatomic, copy) void(^openRedEnvelopesBlock)(void); //打开红包block
41 |
42 | + (WCPluginManager *)shared;
43 |
44 | - (void)reset;
45 |
46 | //保存用户设置
47 | - (void)saveUserSetting;
48 |
49 | //处理微信消息,过滤红包消息
50 | - (void)handleMessageWithMessageWrap:(CMessageWrap *)msgWrap isBackground:(BOOL)isBackground;
51 |
52 | //判断是否是我发送的消息
53 | - (BOOL)isMySendMsgWithMsgWrap:(CMessageWrap *)msgWrap;
54 |
55 | //判断是否抢红包
56 | - (BOOL)isSnatchRedEnvelopes:(CMessageWrap *)msgWrap;
57 |
58 | - (void)openRedEnvelopes:(NewMainFrameViewController *)mainVC;
59 |
60 | - (void)handleRedEnvelopesPushVC:(BaseMsgContentViewController *)baseMsgVC;
61 |
62 | - (void)successOpenRedEnvelopesNotification;
63 |
64 | //程序进入后台处理
65 | - (void)enterBackgroundHandler;
66 |
67 | //保存虚拟位置POIInfo
68 | - (void)saveVirtualLocation:(POIInfo *)virtualLocation;
69 | //获取虚拟位置
70 | - (CLLocation *)getVirutalLocationWithRealLocation:(CLLocation *)realLocation;
71 |
72 | //处理运动步数
73 | - (long)getSportStepCount;
74 |
75 | @end
76 |
--------------------------------------------------------------------------------
/WeChatPlugin/src/WCPluginManager.m:
--------------------------------------------------------------------------------
1 | #import "WCPluginManager.h"
2 |
3 | #define kArchiverLocationFilePath [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0] stringByAppendingPathComponent:@"LLVirutalLocationPOIInfomation"]
4 |
5 | static NSString * const isOpenRedEnvelopesHelperKey = @"isOpenRedEnvelopesHelperKey";
6 | static NSString * const isOpenSportHelperKey = @"isOpenSportHelperKey";
7 | static NSString * const isOpenBackgroundModeKey = @"isOpenBackgroundModeKey";
8 | static NSString * const isOpenRedEnvelopesAlertKey = @"isOpenRedEnvelopesAlertKey";
9 | static NSString * const isOpenVirtualLocationKey = @"isOpenVirtualLocationKey";
10 | static NSString * const isOpenAutoReplyKey = @"isOpenAutoReplyKey";
11 | static NSString * const isOpenAutoLeaveMessageKey = @"isOpenAutoLeaveMessageKey";
12 | static NSString * const isOpenKeywordFilterKey = @"isOpenKeywordFilterKey";
13 | static NSString * const isSnatchSelfRedEnvelopesKey = @"isSnatchSelfRedEnvelopesKey";
14 | static NSString * const isOpenAvoidRevokeMessageKey = @"isOpenAvoidRevokeMessageKey";
15 | static NSString * const sportStepCountModeKey = @"sportStepCountModeKey";
16 | static NSString * const sportStepCountUpperLimitKey = @"sportStepCountUpperLimitKey";
17 | static NSString * const sportStepCountLowerLimitkey = @"sportStepCountLowerLimitkey";
18 | static NSString * const keywordFilterTextKey = @"keywordFilterTextKey";
19 | static NSString * const autoReplyTextKey = @"autoReplyTextKey";
20 | static NSString * const autoLeaveMessageTextKey = @"autoLeaveMessageTextKey";
21 | static NSString * const openRedEnvelopesDelaySecondKey = @"openRedEnvelopesDelaySecondKey";
22 | static NSString * const wantSportStepCountKey = @"wantSportStepCountKey";
23 | static NSString * const filterRoomDicKey = @"filterRoomDicKey";
24 |
25 | @implementation WCPluginManager
26 |
27 | + (WCPluginManager *)shared{
28 | static WCPluginManager *manager = nil;
29 | static dispatch_once_t onceToken;
30 | dispatch_once(&onceToken, ^{
31 | manager = [[WCPluginManager alloc] init];
32 | });
33 | return manager;
34 | }
35 |
36 | - (id)init{
37 | if(self = [super init]){
38 | NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
39 | _isOpenRedEnvelopesHelper = [userDefaults boolForKey:isOpenRedEnvelopesHelperKey];
40 | _isOpenSportHelper = [userDefaults boolForKey:isOpenSportHelperKey];
41 | _isOpenBackgroundMode = [userDefaults boolForKey:isOpenBackgroundModeKey];
42 | _isOpenRedEnvelopesAlert = [userDefaults boolForKey:isOpenRedEnvelopesAlertKey];
43 | _isOpenVirtualLocation = [userDefaults boolForKey:isOpenVirtualLocationKey];
44 | _isOpenAutoReply = [userDefaults boolForKey:isOpenAutoReplyKey];
45 | _isOpenAutoLeaveMessage = [userDefaults boolForKey:isOpenAutoLeaveMessageKey];
46 | _isOpenKeywordFilter = [userDefaults boolForKey:isOpenKeywordFilterKey];
47 | _isSnatchSelfRedEnvelopes = [userDefaults boolForKey:isSnatchSelfRedEnvelopesKey];
48 | _isOpenAvoidRevokeMessage = [userDefaults boolForKey:isOpenAvoidRevokeMessageKey];
49 | _sportStepCountMode = [userDefaults boolForKey:sportStepCountModeKey];
50 | _sportStepCountUpperLimit = [userDefaults integerForKey:sportStepCountUpperLimitKey];
51 | _sportStepCountLowerLimit = [userDefaults integerForKey:sportStepCountLowerLimitkey];
52 | _keywordFilterText = [userDefaults objectForKey:keywordFilterTextKey];
53 | _autoReplyText = [userDefaults objectForKey:autoReplyTextKey];
54 | _autoLeaveMessageText = [userDefaults objectForKey:autoLeaveMessageTextKey];
55 | _openRedEnvelopesDelaySecond = [userDefaults floatForKey:openRedEnvelopesDelaySecondKey];
56 | _wantSportStepCount = [userDefaults integerForKey:wantSportStepCountKey];
57 | _filterRoomDic = [userDefaults objectForKey:filterRoomDicKey];
58 |
59 | NSData *data = [NSData dataWithContentsOfFile:kArchiverLocationFilePath];
60 | if(data){
61 | @try{
62 | self.virtualLocation = [NSKeyedUnarchiver unarchiveObjectWithData:data];
63 | } @catch (NSException *exception) {
64 | return self;
65 | }
66 | }
67 | }
68 | return self;
69 | }
70 |
71 | //保存用户设置
72 | - (void)saveUserSetting{
73 | NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
74 | [userDefaults setBool:_isOpenRedEnvelopesHelper forKey:isOpenRedEnvelopesHelperKey];
75 | [userDefaults setBool:_isOpenSportHelper forKey:isOpenSportHelperKey];
76 | [userDefaults setBool:_isOpenBackgroundMode forKey:isOpenBackgroundModeKey];
77 | [userDefaults setBool:_isOpenRedEnvelopesAlert forKey:isOpenRedEnvelopesAlertKey];
78 | [userDefaults setBool:_isOpenVirtualLocation forKey:isOpenVirtualLocationKey];
79 | [userDefaults setBool:_isOpenAutoReply forKey:isOpenAutoReplyKey];
80 | [userDefaults setBool:_isOpenAutoLeaveMessage forKey:isOpenAutoLeaveMessageKey];
81 | [userDefaults setBool:_isOpenKeywordFilter forKey:isOpenKeywordFilterKey];
82 | [userDefaults setBool:_isSnatchSelfRedEnvelopes forKey:isSnatchSelfRedEnvelopesKey];
83 | [userDefaults setBool:_isOpenAvoidRevokeMessage forKey:isOpenAvoidRevokeMessageKey];
84 | [userDefaults setBool:_sportStepCountMode forKey:sportStepCountModeKey];
85 | [userDefaults setInteger:_sportStepCountUpperLimit forKey:sportStepCountUpperLimitKey];
86 | [userDefaults setInteger:_sportStepCountLowerLimit forKey:sportStepCountLowerLimitkey];
87 | [userDefaults setObject:_keywordFilterText forKey:keywordFilterTextKey];
88 | [userDefaults setObject:_autoReplyText forKey:autoReplyTextKey];
89 | [userDefaults setObject:_autoLeaveMessageText forKey:autoLeaveMessageTextKey];
90 | [userDefaults setFloat:_openRedEnvelopesDelaySecond forKey:openRedEnvelopesDelaySecondKey];
91 | [userDefaults setInteger:_wantSportStepCount forKey:wantSportStepCountKey];
92 | [userDefaults setObject:_filterRoomDic forKey:filterRoomDicKey];
93 | [userDefaults synchronize];
94 | }
95 |
96 | - (void)reset{
97 | _haveNewRedEnvelopes = NO;
98 | _isHiddenRedEnvelopesReceiveView = NO;
99 | _isHongBaoPush = NO;
100 | }
101 |
102 | #pragma mark SET GET METHOD
103 |
104 | - (void)setHaveNewRedEnvelopes:(BOOL)haveNewRedEnvelopes{
105 | _haveNewRedEnvelopes = haveNewRedEnvelopes;
106 | }
107 |
108 | - (void)setIsHongBaoPush:(BOOL)isHongBaoPush{
109 | _isHongBaoPush = isHongBaoPush;
110 | }
111 |
112 | - (void)setIsHiddenRedEnvelopesReceiveView:(BOOL)isHiddenRedEnvelopesReceiveView{
113 | _isHiddenRedEnvelopesReceiveView = isHiddenRedEnvelopesReceiveView;
114 | }
115 |
116 | - (void)setBgTaskIdentifier:(UIBackgroundTaskIdentifier)bgTaskIdentifier{
117 | _bgTaskIdentifier = bgTaskIdentifier;
118 | }
119 |
120 | - (void)setBgTaskTimer:(NSTimer *)bgTaskTimer{
121 | _bgTaskTimer = bgTaskTimer;
122 | }
123 |
124 | - (void)setOpenRedEnvelopesBlock:(void (^)(void))openRedEnvelopesBlock{
125 | _openRedEnvelopesBlock = [openRedEnvelopesBlock copy];
126 | }
127 |
128 | - (void)setIsOpenRedEnvelopesHelper:(BOOL)isOpenRedEnvelopesHelper{
129 | _isOpenRedEnvelopesHelper = isOpenRedEnvelopesHelper;
130 | }
131 |
132 | - (void)setIsOpenSportHelper:(BOOL)isOpenSportHelper{
133 | _isOpenSportHelper = isOpenSportHelper;
134 | }
135 |
136 | - (void)setIsOpenBackgroundMode:(BOOL)isOpenBackgroundMode{
137 | _isOpenBackgroundMode = isOpenBackgroundMode;
138 | }
139 |
140 | - (void)setIsOpenRedEnvelopesAlert:(BOOL)isOpenRedEnvelopesAlert{
141 | _isOpenRedEnvelopesAlert = isOpenRedEnvelopesAlert;
142 | }
143 |
144 | - (void)setIsOpenVirtualLocation:(BOOL)isOpenVirtualLocation{
145 | _isOpenVirtualLocation = isOpenVirtualLocation;
146 | }
147 |
148 | - (void)setIsOpenAutoReply:(BOOL)isOpenAutoReply{
149 | _isOpenAutoReply = isOpenAutoReply;
150 | }
151 |
152 | - (void)setIsOpenAutoLeaveMessage:(BOOL)isOpenAutoLeaveMessage{
153 | _isOpenAutoLeaveMessage = isOpenAutoLeaveMessage;
154 | }
155 |
156 | - (void)setAutoReplyText:(NSString *)autoReplyText{
157 | _autoReplyText = [autoReplyText copy];
158 | }
159 |
160 | - (void)setAutoLeaveMessageText:(NSString *)autoLeaveMessageText{
161 | _autoLeaveMessageText = [autoLeaveMessageText copy];
162 | }
163 |
164 | - (void)setOpenRedEnvelopesDelaySecond:(CGFloat)openRedEnvelopesDelaySecond{
165 | _openRedEnvelopesDelaySecond = openRedEnvelopesDelaySecond;
166 | }
167 |
168 | - (void)setWantSportStepCount:(NSInteger)wantSportStepCount{
169 | _wantSportStepCount = wantSportStepCount;
170 | }
171 |
172 | - (void)setFilterRoomDic:(NSMutableDictionary *)filterRoomDic{
173 | _filterRoomDic = filterRoomDic;
174 | }
175 |
176 | - (void)setVirtualLocation:(POIInfo *)virtualLocation{
177 | _virtualLocation = [virtualLocation retain];
178 | }
179 | //处理微信消息,过滤红包消息
180 | - (void)handleMessageWithMessageWrap:(CMessageWrap *)msgWrap isBackground:(BOOL)isBackground{
181 | if (msgWrap && msgWrap.m_uiMessageType == 49 && [self isSnatchRedEnvelopes:msgWrap]){
182 | //红包消息
183 | self.lastMsgWrap = self.msgWrap;
184 | self.msgWrap = msgWrap;
185 | self.haveNewRedEnvelopes = YES;
186 | if(isBackground && self.openRedEnvelopesBlock){
187 | self.openRedEnvelopesBlock();
188 | }
189 | }
190 | }
191 |
192 | //判断是否是我发送的消息
193 | - (BOOL)isMySendMsgWithMsgWrap:(CMessageWrap *)msgWrap{
194 | CContactMgr *contactMgr = [[NSClassFromString(@"MMServiceCenter") defaultCenter] getService:NSClassFromString(@"CContactMgr")];
195 | CContact *selfContact = [contactMgr getSelfContact];
196 | CContact *senderContact = [contactMgr getContactByName:msgWrap.m_nsFromUsr];
197 | return [selfContact isEqualToContact:senderContact];
198 | }
199 |
200 | //判断是否抢红包
201 | - (BOOL)isSnatchRedEnvelopes:(CMessageWrap *)msgWrap{
202 | unsigned int appMsgInnerType = msgWrap.m_uiAppMsgInnerType;
203 | if(appMsgInnerType == 0x1 || appMsgInnerType == 0xa){
204 | return NO;
205 | }
206 | if(!(appMsgInnerType != 0x7d0 || msgWrap.m_oWCPayInfoItem.m_uiPaySubType >= 0xb)){
207 | return NO;
208 | }
209 | if(appMsgInnerType != 0x7d1 || msgWrap.m_oWCPayInfoItem.m_sceneId != 0x3ea){
210 | return NO;
211 | }
212 | if(!((msgWrap.m_n64MesSvrID == 0 && msgWrap.m_oWCPayInfoItem.m_nsPayMsgID != self.lastMsgWrap.m_oWCPayInfoItem.m_nsPayMsgID) || msgWrap.m_n64MesSvrID != self.lastMsgWrap.m_n64MesSvrID)){
213 | return NO; //过滤领取红包消息
214 | }
215 | if([self isMySendMsgWithMsgWrap:msgWrap]){
216 | return _isSnatchSelfRedEnvelopes;
217 | }
218 | if(_filterRoomDic && _filterRoomDic[msgWrap.m_nsFromUsr]){
219 | return NO; //过滤群组
220 | }
221 | if(_isOpenKeywordFilter){
222 | NSString *wishing = [msgWrap wishingString];
223 | NSArray *keywords = [_keywordFilterText componentsSeparatedByString:@","];
224 | for (NSString *keyword in keywords) {
225 | if ([wishing containsString:keyword]) {
226 | return NO; //过滤关键字
227 | }
228 | }
229 | }
230 | return YES;
231 | }
232 |
233 | #pragma mark HANDLER METHOD
234 |
235 | - (void)openRedEnvelopes:(NewMainFrameViewController *)mainVC{
236 | NSArray *controllers = mainVC.navigationController.viewControllers;
237 | UIViewController *msgContentVC = nil;
238 | for (UIViewController *aController in controllers) {
239 | if ([aController isMemberOfClass:NSClassFromString(@"BaseMsgContentViewController")]) {
240 | msgContentVC = aController;
241 | break;
242 | }
243 | }
244 | if (msgContentVC) {
245 | [mainVC.navigationController PushViewController:msgContentVC animated:YES];
246 | } else {
247 | [mainVC tableView:[mainVC valueForKey:@"m_tableView"] didSelectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:1]];
248 | }
249 | }
250 |
251 | - (void)handleRedEnvelopesPushVC:(BaseMsgContentViewController *)baseMsgVC{
252 | //红包push
253 | if(![[self.msgWrap nativeUrl] containsString:@"weixin://openNativeUrl/weixinHB/startreceivebizhbrequest?"]){
254 | CContactMgr *contactMgr = [[NSClassFromString(@"MMServiceCenter") defaultCenter] getService:NSClassFromString(@"CContactMgr")];
255 | CContact *fromContact = [contactMgr getContactByName:self.msgWrap.m_nsFromUsr];
256 | BOOL isMySendMsg = [self isMySendMsgWithMsgWrap:self.msgWrap];
257 | if(!isMySendMsg && ![[baseMsgVC getChatContact] isEqualToContact:fromContact]){
258 | BaseMsgContentLogicController *logicController = [[NSClassFromString(@"BaseMsgContentLogicController") alloc] initWithLocalID:self.msgWrap.m_uiMesLocalID CreateTime:self.msgWrap.m_uiCreateTime ContentViewDisshowStatus:0x4];
259 | [logicController setM_contact:fromContact];
260 | [logicController setM_dicExtraInfo:nil];
261 | [logicController onWillEnterRoom];
262 | self.logicController = logicController;
263 | baseMsgVC = [logicController getMsgContentViewController];
264 | } else {
265 | self.logicController = nil;
266 | }
267 | WCRedEnvelopesControlData *data = [[NSClassFromString(@"WCRedEnvelopesControlData") alloc] init];
268 | [data setM_oSelectedMessageWrap:self.msgWrap];
269 | WCRedEnvelopesControlMgr *controlMgr = [[NSClassFromString(@"MMServiceCenter") defaultCenter] getService:NSClassFromString(@"WCRedEnvelopesControlMgr")];
270 | self.isHiddenRedEnvelopesReceiveView = YES;
271 | [controlMgr startReceiveRedEnvelopesLogic:baseMsgVC Data:data];
272 | }
273 | }
274 |
275 | - (void)successOpenRedEnvelopesNotification{
276 | if(self.isOpenRedEnvelopesAlert){
277 | UILocalNotification *localNotification = [[UILocalNotification alloc] init];
278 | localNotification.alertBody = @"帮您领了一个大红包!快去查看吧~";
279 | localNotification.soundName = UILocalNotificationDefaultSoundName;
280 | [[UIApplication sharedApplication] presentLocalNotificationNow:localNotification];
281 | [self playCashReceivedAudio];
282 | }
283 | }
284 |
285 | //程序进入后台处理
286 | - (void)enterBackgroundHandler{
287 | if(!self.isOpenBackgroundMode){
288 | return;
289 | }
290 | UIApplication *app = [UIApplication sharedApplication];
291 | self.bgTaskIdentifier = [app beginBackgroundTaskWithExpirationHandler:^{
292 | [app endBackgroundTask:self.bgTaskIdentifier];
293 | self.bgTaskIdentifier = UIBackgroundTaskInvalid;
294 | }];
295 | self.bgTaskTimer = [NSTimer scheduledTimerWithTimeInterval:10.0 target:self selector:@selector(requestMoreTime) userInfo:nil repeats:YES];
296 | [self.bgTaskTimer fire];
297 | }
298 |
299 | - (void)requestMoreTime{
300 | if ([UIApplication sharedApplication].backgroundTimeRemaining < 30) {
301 | [self playBlankAudio];
302 | [[UIApplication sharedApplication] endBackgroundTask:self.bgTaskIdentifier];
303 | self.bgTaskIdentifier = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
304 | [[UIApplication sharedApplication] endBackgroundTask:self.bgTaskIdentifier];
305 | self.bgTaskIdentifier = UIBackgroundTaskInvalid;
306 | }];
307 | }
308 | }
309 |
310 | //播放收到红包音频
311 | - (void)playCashReceivedAudio{
312 | [self playAudioForResource:@"cash_received" ofType:@"caf"];
313 | }
314 |
315 | //播放无声音频
316 | - (void)playBlankAudio{
317 | [self playAudioForResource:@"blank" ofType:@"caf"];
318 | }
319 |
320 | //开始播放音频
321 | - (void)playAudioForResource:(NSString *)resource ofType:(NSString *)ofType{
322 | NSError *setCategoryErr = nil;
323 | NSError *activationErr = nil;
324 | [[AVAudioSession sharedInstance]
325 | setCategory: AVAudioSessionCategoryPlayback
326 | withOptions: AVAudioSessionCategoryOptionMixWithOthers
327 | error: &setCategoryErr];
328 | [[AVAudioSession sharedInstance]
329 | setActive: YES
330 | error: &activationErr];
331 | NSURL *blankSoundURL = [[NSURL alloc]initWithString:[[NSBundle mainBundle] pathForResource:resource ofType:ofType]];
332 | if(blankSoundURL){
333 | self.blankPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:blankSoundURL error:nil];
334 | [self.blankPlayer play];
335 | }
336 | }
337 |
338 | //保存虚拟位置POIInfo
339 | - (void)saveVirtualLocation:(POIInfo *)virtualLocation{
340 | self.virtualLocation = virtualLocation;
341 | if ([[NSFileManager defaultManager] fileExistsAtPath:kArchiverLocationFilePath]) {
342 | NSError *error = nil;
343 | [[NSFileManager defaultManager] removeItemAtPath:kArchiverLocationFilePath error:&error];
344 | if (error) {
345 | //[self showMessage:[NSString stringWithFormat:@"%@",error] completion:nil];
346 | return;
347 | }
348 | }
349 | NSData *data = [NSKeyedArchiver archivedDataWithRootObject:virtualLocation];
350 | if(data){
351 | [data writeToFile:kArchiverLocationFilePath atomically:YES];
352 | }
353 | }
354 |
355 | //获取虚拟位置
356 | - (CLLocation *)getVirutalLocationWithRealLocation:(CLLocation *)realLocation{
357 | return _virtualLocation ? [[CLLocation alloc] initWithCoordinate:_virtualLocation.coordinate altitude:realLocation.altitude horizontalAccuracy: realLocation.horizontalAccuracy verticalAccuracy:realLocation.verticalAccuracy course:realLocation.course speed:realLocation.speed timestamp:realLocation.timestamp] : realLocation;
358 | }
359 |
360 | //处理运动步数
361 | - (long)getSportStepCount{
362 | if(_sportStepCountMode){
363 | return [self genRandomNumberFrom:_sportStepCountUpperLimit to:_sportStepCountLowerLimit];
364 | } else {
365 | return _wantSportStepCount;
366 | }
367 | }
368 |
369 | //在指定范围生成随机数
370 | - (long)genRandomNumberFrom:(long)from to:(long)to{
371 | return (long)(from + (arc4random() % (to - from + 1)));
372 | }
373 |
374 | @end
375 |
--------------------------------------------------------------------------------
/WeChatPlugin/src/WCPluginSettingController.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @class POIInfo;
4 |
5 | @interface WCPluginSettingParam : NSObject
6 |
7 | @property (nonatomic, assign) BOOL isOpenRedEnvelopesHelper; //是否开启红包助手
8 | @property (nonatomic, assign) BOOL isOpenSportHelper; //是否开启步数助手
9 | @property (nonatomic, assign) BOOL isOpenBackgroundMode; //是否开启后台模式
10 | @property (nonatomic, assign) BOOL isOpenRedEnvelopesAlert; //是否打卡红包提醒
11 | @property (nonatomic, assign) BOOL isOpenVirtualLocation; //是否打开虚拟定位
12 | @property (nonatomic, assign) BOOL isOpenAutoReply; //是否打开自动回复
13 | @property (nonatomic, assign) BOOL isOpenAutoLeaveMessage; //是否打开自动留言
14 | @property (nonatomic, assign) BOOL isOpenKeywordFilter; //是否打开关键字过滤
15 | @property (nonatomic, assign) BOOL isSnatchSelfRedEnvelopes; //是否抢自己的发的红包
16 | @property (nonatomic, assign) BOOL isOpenAvoidRevokeMessage; //是否打开防止好友撤回消息
17 | @property (nonatomic, assign) BOOL sportStepCountMode; //运动步数模式 true: 范围随机 false:固定步数
18 | @property (nonatomic, assign) NSInteger sportStepCountUpperLimit; //运动步数上限
19 | @property (nonatomic, assign) NSInteger sportStepCountLowerLimit; //运动步数下限
20 | @property (nonatomic, copy) NSString *keywordFilterText; //要过滤的关键字
21 | @property (nonatomic, copy) NSString *autoReplyText; //自动回复内容
22 | @property (nonatomic, copy) NSString *autoLeaveMessageText; //自动留言内容
23 | @property (nonatomic, assign) CGFloat openRedEnvelopesDelaySecond; //打开红包延迟时间
24 | @property (nonatomic, assign) NSInteger wantSportStepCount; //想要的运动步数
25 | @property (nonatomic, strong) NSMutableDictionary *filterRoomDic; //过滤群组字典
26 | @property (nonatomic, strong) POIInfo *virtualLocation; //虚拟位置
27 |
28 | @end
29 |
30 | @interface WCPluginSettingController : UIViewController
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/WeChatPlugin/src/WCPluginSettingController.m:
--------------------------------------------------------------------------------
1 | #import "WCPluginSettingController.h"
2 | #import "WeChat.h"
3 | #import "WCPluginManager.h"
4 | #import "WCRemoteControlManager.h"
5 | #import
6 |
7 | static NSString * const kSettingControllerKey = @"SettingControllerKey";
8 |
9 | @interface WCPluginSettingController ()
10 |
11 | @property (nonatomic, strong) WCPluginSettingParam *settingParam; //设置参数
12 |
13 | @property (nonatomic, strong) ContactsDataLogic *contactsDataLogic;
14 |
15 | @property (nonatomic, strong) MMTableViewInfo *tableViewInfo;
16 | @property (nonatomic, strong) MMPickLocationViewController *pickLocationController;
17 |
18 | @end
19 |
20 | @implementation WCPluginSettingParam
21 |
22 | @end
23 |
24 | @implementation WCPluginSettingController
25 |
26 | - (void)viewDidLoad {
27 | [super viewDidLoad];
28 | self.title = @"Plugin";
29 | [self commonInit];
30 | [self setTableView];
31 | [self reloadTableData];
32 | }
33 |
34 | - (void)commonInit{
35 | _settingParam = [[WCPluginSettingParam alloc] init];
36 |
37 | WCPluginManager *manager = [WCPluginManager shared];
38 | _settingParam.isOpenRedEnvelopesHelper = manager.isOpenRedEnvelopesHelper;
39 | _settingParam.isOpenSportHelper = manager.isOpenSportHelper;
40 | _settingParam.isOpenBackgroundMode = manager.isOpenBackgroundMode;
41 | _settingParam.isOpenRedEnvelopesAlert = manager.isOpenRedEnvelopesAlert;
42 | _settingParam.openRedEnvelopesDelaySecond = manager.openRedEnvelopesDelaySecond;
43 | _settingParam.isOpenVirtualLocation = manager.isOpenVirtualLocation;
44 | _settingParam.isOpenAutoReply = manager.isOpenAutoReply;
45 | _settingParam.isOpenAutoLeaveMessage = manager.isOpenAutoLeaveMessage;
46 | _settingParam.autoReplyText = manager.autoReplyText;
47 | _settingParam.autoLeaveMessageText = manager.autoLeaveMessageText;
48 | _settingParam.isOpenKeywordFilter = manager.isOpenKeywordFilter;
49 | _settingParam.keywordFilterText = manager.keywordFilterText;
50 | _settingParam.isSnatchSelfRedEnvelopes = manager.isSnatchSelfRedEnvelopes;
51 | _settingParam.isOpenAvoidRevokeMessage = manager.isOpenAvoidRevokeMessage;
52 | _settingParam.sportStepCountMode = manager.sportStepCountMode;
53 | _settingParam.sportStepCountUpperLimit = manager.sportStepCountUpperLimit;
54 | _settingParam.sportStepCountLowerLimit = manager.sportStepCountLowerLimit;
55 | _settingParam.wantSportStepCount = manager.wantSportStepCount;
56 | _settingParam.filterRoomDic = manager.filterRoomDic;
57 | _settingParam.virtualLocation = manager.virtualLocation;
58 |
59 | _contactsDataLogic = [[NSClassFromString(@"ContactsDataLogic") alloc] initWithScene:0x0 delegate:nil sort:0x1 extendChatRoom:0x0];
60 |
61 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onConfirmFilterChatRoom:) name:@"kConfirmFilterChatRoomNotification" object:nil];
62 | }
63 |
64 | - (void)exchangeMethod{
65 | method_exchangeImplementations(class_getInstanceMethod(NSClassFromString(@"WCTableViewNormalCellManager"), @selector(actionEditorCell:)), class_getInstanceMethod([WCPluginSettingController class], @selector(onTextFieldEditChanged:)));
66 | }
67 |
68 | - (void)setTableView{
69 | _tableViewInfo = [[NSClassFromString(@"MMTableViewInfo") alloc] initWithFrame:[UIScreen mainScreen].bounds style:0];
70 | [self.view addSubview:[_tableViewInfo getTableView]];
71 | [_tableViewInfo setDelegate:self];
72 | if (@available(iOS 11, *)) {
73 | [_tableViewInfo getTableView].contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentAlways;
74 | }else{
75 | self.automaticallyAdjustsScrollViewInsets = YES;
76 | }
77 | }
78 |
79 | - (void)reloadTableData{
80 | WCTableViewNormalCellManager *openRedEnvelopesCell = [NSClassFromString(@"WCTableViewNormalCellManager") switchCellForSel:@selector(openRedEnvelopesSwitchHandler:) target:self title:@"是否开启红包助手" on:_settingParam.isOpenRedEnvelopesHelper];
81 | WCTableViewNormalCellManager *backgroundModeCell = [NSClassFromString(@"WCTableViewNormalCellManager") switchCellForSel:@selector(openBackgroundMode:) target:self title:@"是否开启后台模式" on:_settingParam.isOpenBackgroundMode];
82 | WCTableViewNormalCellManager *openAlertCell = [NSClassFromString(@"WCTableViewNormalCellManager") switchCellForSel:@selector(openRedEnvelopesAlertHandler:) target:self title:@"是否开启红包提醒" on:_settingParam.isOpenRedEnvelopesAlert];
83 | WCTableViewNormalCellManager *delayTimeCell = [NSClassFromString(@"WCTableViewNormalCellManager") editorCellForSel:nil target:nil title:@"延迟秒数" tip:@"请输入延迟抢红包秒数" focus:NO autoCorrect:NO text:[NSString stringWithFormat:@"%.2f",_settingParam.openRedEnvelopesDelaySecond]];
84 | [delayTimeCell addUserInfoValue:@(UIKeyboardTypeDecimalPad) forKey:@"keyboardType"];
85 | [delayTimeCell addUserInfoValue:@"delayTimeCell" forKey:@"cellType"];
86 | WCTableViewNormalCellManager *filterRoomCell = [NSClassFromString(@"WCTableViewNormalCellManager") normalCellForSel:@selector(onfilterRoomCellClicked) target:self title:@"过滤群聊" rightValue:self.settingParam.filterRoomDic.count?[NSString stringWithFormat:@"已选%ld个群聊",(long)self.settingParam.filterRoomDic.count]:@"暂未选择" accessoryType:1];
87 | objc_setAssociatedObject(delayTimeCell, &kSettingControllerKey, self, OBJC_ASSOCIATION_ASSIGN);
88 | WCTableViewNormalCellManager *openAutoReplyCell = [NSClassFromString(@"WCTableViewNormalCellManager") switchCellForSel:@selector(openAutoReplySwitchHandler:) target:self title:@"红包领取后自动回复" on:_settingParam.isOpenAutoReply];
89 | WCTableViewNormalCellManager *autoReplyTextCell = [NSClassFromString(@"WCTableViewNormalCellManager") editorCellForSel:nil target:nil title:@"自动回复内容" tip:@"请输入自动回复内容" focus:NO autoCorrect:NO text:_settingParam.autoReplyText];
90 | [autoReplyTextCell addUserInfoValue:@"autoReplyTextCell" forKey:@"cellType"];
91 | objc_setAssociatedObject(autoReplyTextCell, &kSettingControllerKey, self, OBJC_ASSOCIATION_ASSIGN);
92 | WCTableViewNormalCellManager *openAutoLeaveMessageCell = [NSClassFromString(@"WCTableViewNormalCellManager") switchCellForSel:@selector(openAutoLeaveMessageSwitchHandler:) target:self title:@"红包领取后自动留言" on:_settingParam.isOpenAutoLeaveMessage];
93 | WCTableViewNormalCellManager *autoLeaveMessageTextCell = [NSClassFromString(@"WCTableViewNormalCellManager") editorCellForSel:nil target:nil title:@"自动留言内容" tip:@"请输入自动留言内容" focus:NO autoCorrect:NO text:_settingParam.autoLeaveMessageText];
94 | [autoLeaveMessageTextCell addUserInfoValue:@"autoLeaveMessageTextCell" forKey:@"cellType"];
95 | objc_setAssociatedObject(autoLeaveMessageTextCell, &kSettingControllerKey, self, OBJC_ASSOCIATION_ASSIGN);
96 | WCTableViewNormalCellManager *openKeywordFilterCell = [NSClassFromString(@"WCTableViewNormalCellManager") switchCellForSel:@selector(openKeywordFilterSwitchHandler:) target:self title:@"是否打开关键字过滤" on:_settingParam.isOpenKeywordFilter];
97 | WCTableViewNormalCellManager *keywordFilterTextCell = [NSClassFromString(@"WCTableViewNormalCellManager") editorCellForSel:nil target:nil title:@"关键字过滤" tip:@"多个关键字以英文逗号分隔" focus:NO autoCorrect:NO text:_settingParam.keywordFilterText];
98 | [keywordFilterTextCell addUserInfoValue:@"keywordFilterTextCell" forKey:@"cellType"];
99 | objc_setAssociatedObject(keywordFilterTextCell, &kSettingControllerKey, self, OBJC_ASSOCIATION_ASSIGN);
100 | WCTableViewNormalCellManager *isSnatchSelfCell = [NSClassFromString(@"WCTableViewNormalCellManager") switchCellForSel:@selector(isSnatchSelfRedEnvelopesSwitchHandler:) target:self title:@"是否抢自己发的红包" on:_settingParam.isSnatchSelfRedEnvelopes];
101 |
102 | MMTableViewSectionInfo *redEnvelopesSection = [NSClassFromString(@"WCTableViewSectionManager") sectionInfoDefaut];
103 | [redEnvelopesSection setHeaderView:[[UIView alloc] initWithFrame:CGRectMake(0,0,0,20)]];
104 | [redEnvelopesSection addCell:openRedEnvelopesCell];
105 | [redEnvelopesSection addCell:backgroundModeCell];
106 | [redEnvelopesSection addCell:openAlertCell];
107 | [redEnvelopesSection addCell:delayTimeCell];
108 | [redEnvelopesSection addCell:filterRoomCell];
109 | [redEnvelopesSection addCell:openAutoReplyCell];
110 | [redEnvelopesSection addCell:autoReplyTextCell];
111 | [redEnvelopesSection addCell:openAutoLeaveMessageCell];
112 | [redEnvelopesSection addCell:autoLeaveMessageTextCell];
113 | [redEnvelopesSection addCell:openKeywordFilterCell];
114 | [redEnvelopesSection addCell:keywordFilterTextCell];
115 | [redEnvelopesSection addCell:isSnatchSelfCell];
116 |
117 | WCTableViewNormalCellManager *openVirtualLocationCell = [NSClassFromString(@"WCTableViewNormalCellManager") switchCellForSel:@selector(openVirtualLocationSwitchHandler:) target:self title:@"是否开启虚拟定位" on:_settingParam.isOpenVirtualLocation];
118 | WCTableViewNormalCellManager *selectVirtualLocationCell = [NSClassFromString(@"WCTableViewNormalCellManager") normalCellForSel:@selector(onVirtualLocationCellClicked) target:self title:@"选择虚拟位置" rightValue:_settingParam.virtualLocation.poiName?:@"暂未选择" accessoryType:1];
119 |
120 | MMTableViewSectionInfo *virtualLocationSection = [NSClassFromString(@"WCTableViewSectionManager") sectionInfoDefaut];
121 | [virtualLocationSection setHeaderView:[[UIView alloc] initWithFrame:CGRectMake(0,0,0,20)]];
122 | [virtualLocationSection addCell:openVirtualLocationCell];
123 | [virtualLocationSection addCell:selectVirtualLocationCell];
124 |
125 | WCTableViewNormalCellManager *openStepCountCell = [NSClassFromString(@"WCTableViewNormalCellManager") switchCellForSel:@selector(openStepCountSwitchHandler:) target:self title:@"是否开启运动助手" on:_settingParam.isOpenSportHelper];
126 | WCTableViewNormalCellManager *stepCountModeCell = [NSClassFromString(@"WCTableViewNormalCellManager") switchCellForSel:@selector(stepCountModeSwitchHandler:) target:self title:@"范围随机/固定步数" on:_settingParam.sportStepCountMode];
127 | WCTableViewNormalCellManager *stepCell = [NSClassFromString(@"WCTableViewNormalCellManager") editorCellForSel:nil target:nil title:@"固定运动步数" tip:@"请输入想要的运动步数" focus:NO autoCorrect:NO text:[NSString stringWithFormat:@"%ld",(long)_settingParam.wantSportStepCount]];
128 | [stepCell addUserInfoValue:@(UIKeyboardTypeNumberPad) forKey:@"keyboardType"];
129 | [stepCell addUserInfoValue:@"stepCell" forKey:@"cellType"];
130 | objc_setAssociatedObject(stepCell, &kSettingControllerKey, self, OBJC_ASSOCIATION_ASSIGN);
131 | WCTableViewNormalCellManager *stepUpperLimitCell = [NSClassFromString(@"WCTableViewNormalCellManager") editorCellForSel:nil target:nil title:@"运动步数上限" tip:@"请输入运动步数上限" focus:NO autoCorrect:NO text:[NSString stringWithFormat:@"%ld",(long)_settingParam.sportStepCountUpperLimit]];
132 | [stepUpperLimitCell addUserInfoValue:@(UIKeyboardTypeNumberPad) forKey:@"keyboardType"];
133 | [stepUpperLimitCell addUserInfoValue:@"stepUpperLimitCell" forKey:@"cellType"];
134 | objc_setAssociatedObject(stepUpperLimitCell, &kSettingControllerKey, self, OBJC_ASSOCIATION_ASSIGN);
135 | WCTableViewNormalCellManager *stepLowerLimitCell = [NSClassFromString(@"WCTableViewNormalCellManager") editorCellForSel:nil target:nil title:@"运动步数下限" tip:@"请输入运动步数下限" focus:NO autoCorrect:NO text:[NSString stringWithFormat:@"%ld",(long)_settingParam.sportStepCountLowerLimit]];
136 | [stepLowerLimitCell addUserInfoValue:@(UIKeyboardTypeNumberPad) forKey:@"keyboardType"];
137 | [stepLowerLimitCell addUserInfoValue:@"stepLowerLimitCell" forKey:@"cellType"];
138 | objc_setAssociatedObject(stepLowerLimitCell, &kSettingControllerKey, self, OBJC_ASSOCIATION_ASSIGN);
139 |
140 | MMTableViewSectionInfo *stepCountSection = [NSClassFromString(@"WCTableViewSectionManager") sectionInfoDefaut];
141 | [stepCountSection setHeaderView:[[UIView alloc] initWithFrame:CGRectMake(0,0,0,20)]];
142 | [stepCountSection addCell:openStepCountCell];
143 | [stepCountSection addCell:stepCountModeCell];
144 | if(_settingParam.sportStepCountMode){
145 | [stepCountSection addCell:stepUpperLimitCell];
146 | [stepCountSection addCell:stepLowerLimitCell];
147 | } else {
148 | [stepCountSection addCell:stepCell];
149 | }
150 |
151 | MMTableViewSectionInfo *revokeMessageSection = [NSClassFromString(@"WCTableViewSectionManager") sectionInfoDefaut];
152 | [revokeMessageSection setHeaderView:[[UIView alloc] initWithFrame:CGRectMake(0,0,0,20)]];
153 |
154 | WCTableViewNormalCellManager *openAvoidRevokeMessageCell = [NSClassFromString(@"WCTableViewNormalCellManager") switchCellForSel:@selector(openAvoidRevokeMessageSwitchHandler:) target:self title:@"是否防好友撤回消息" on:_settingParam.isOpenAvoidRevokeMessage];
155 | [revokeMessageSection addCell:openAvoidRevokeMessageCell];
156 |
157 | WCTableViewNormalCellManager *remoteCellInfo = [objc_getClass("WCTableViewNormalCellManager") switchCellForSel:@selector(handleRemoteControl:) target:[WCRemoteControlManager sharedManager] title:@"远程控制" on:[WCRemoteControlManager sharedManager].isEnableRemoteControl];
158 | [revokeMessageSection addCell:remoteCellInfo];
159 |
160 | [_tableViewInfo clearAllSection];
161 |
162 | [_tableViewInfo addSection:redEnvelopesSection];
163 | [_tableViewInfo addSection:virtualLocationSection];
164 | [_tableViewInfo addSection:stepCountSection];
165 | [_tableViewInfo addSection:revokeMessageSection];
166 |
167 | [[_tableViewInfo getTableView] reloadData];
168 | }
169 |
170 | //点击保存
171 | - (void)clickSaveItem{
172 | WCPluginManager *manager = [WCPluginManager shared];
173 | manager.isOpenRedEnvelopesHelper = _settingParam.isOpenRedEnvelopesHelper;
174 | manager.isOpenSportHelper = _settingParam.isOpenSportHelper;
175 | manager.isOpenBackgroundMode = _settingParam.isOpenBackgroundMode;
176 | manager.isOpenRedEnvelopesAlert = _settingParam.isOpenRedEnvelopesAlert;
177 | manager.openRedEnvelopesDelaySecond = _settingParam.openRedEnvelopesDelaySecond;
178 | manager.isOpenVirtualLocation = _settingParam.isOpenVirtualLocation;
179 | manager.isOpenAutoReply = _settingParam.isOpenAutoReply;
180 | manager.isOpenAutoLeaveMessage = _settingParam.isOpenAutoLeaveMessage;
181 | manager.autoReplyText = _settingParam.autoReplyText;
182 | manager.autoLeaveMessageText = _settingParam.autoLeaveMessageText;
183 | manager.isOpenKeywordFilter = _settingParam.isOpenKeywordFilter;
184 | manager.keywordFilterText = _settingParam.keywordFilterText;
185 | manager.isSnatchSelfRedEnvelopes = _settingParam.isSnatchSelfRedEnvelopes;
186 | manager.isOpenAvoidRevokeMessage = _settingParam.isOpenAvoidRevokeMessage;
187 | manager.sportStepCountMode = _settingParam.sportStepCountMode;
188 | manager.sportStepCountUpperLimit = _settingParam.sportStepCountUpperLimit;
189 | manager.sportStepCountLowerLimit = _settingParam.sportStepCountLowerLimit;
190 | manager.wantSportStepCount = _settingParam.wantSportStepCount;
191 | manager.filterRoomDic = _settingParam.filterRoomDic;
192 | [manager saveVirtualLocation:_settingParam.virtualLocation];
193 | [manager saveUserSetting]; // 保存用户设置
194 | }
195 |
196 | - (void)openRedEnvelopesSwitchHandler:(UISwitch *)openSwitch{
197 | _settingParam.isOpenRedEnvelopesHelper = openSwitch.on;
198 | }
199 |
200 | - (void)openBackgroundMode:(UISwitch *)backgroundMode{
201 | _settingParam.isOpenBackgroundMode = backgroundMode.on;
202 | }
203 |
204 | - (void)openRedEnvelopesAlertHandler:(UISwitch *)openSwitch{
205 | _settingParam.isOpenRedEnvelopesAlert = openSwitch.on;
206 | }
207 |
208 | - (void)openAutoReplySwitchHandler:(UISwitch *)openSwitch{
209 | _settingParam.isOpenAutoReply = openSwitch.on;
210 | }
211 |
212 | - (void)openAutoLeaveMessageSwitchHandler:(UISwitch *)openSwitch{
213 | _settingParam.isOpenAutoLeaveMessage = openSwitch.on;
214 | }
215 |
216 | - (void)openKeywordFilterSwitchHandler:(UISwitch *)openSwitch{
217 | _settingParam.isOpenKeywordFilter = openSwitch.on;
218 | }
219 |
220 | - (void)onTextFieldEditChanged:(UITextField *)textField{
221 | WCPluginSettingController *settingController = objc_getAssociatedObject(self, &kSettingControllerKey);
222 | WCTableViewNormalCellManager *cellInfo = (WCTableViewNormalCellManager *)self;
223 | NSString *cellType = [cellInfo getUserInfoValueForKey:@"cellType"];
224 | if([cellType isEqualToString:@"delayTimeCell"]){
225 | settingController.settingParam.openRedEnvelopesDelaySecond = [textField.text floatValue];
226 | } else if ([cellType isEqualToString:@"stepCell"]){
227 | settingController.settingParam.wantSportStepCount = [textField.text integerValue];
228 | } else if ([cellType isEqualToString:@"autoReplyTextCell"]){
229 | settingController.settingParam.autoReplyText = textField.text;
230 | } else if ([cellType isEqualToString:@"autoLeaveMessageTextCell"]){
231 | settingController.settingParam.autoLeaveMessageText = textField.text;
232 | } else if ([cellType isEqualToString:@"keywordFilterTextCell"]){
233 | settingController.settingParam.keywordFilterText = textField.text;
234 | } else if ([cellType isEqualToString:@"stepUpperLimitCell"]){
235 | settingController.settingParam.sportStepCountUpperLimit = [textField.text integerValue];
236 | } else if ([cellType isEqualToString:@"stepLowerLimitCell"]){
237 | settingController.settingParam.sportStepCountLowerLimit = [textField.text integerValue];
238 | }
239 | }
240 |
241 | - (void)openVirtualLocationSwitchHandler:(UISwitch *)openSwitch{
242 | _settingParam.isOpenVirtualLocation = openSwitch.on;
243 | }
244 |
245 | - (void)onVirtualLocationCellClicked{
246 | _pickLocationController = [[NSClassFromString(@"MMPickLocationViewController") alloc] initWithScene:0 OnlyUseUserLocation:NO];
247 | _pickLocationController.delegate = self;
248 | MMUINavigationController *navController = [[NSClassFromString(@"MMUINavigationController") alloc] initWithRootViewController:_pickLocationController];
249 | [self PresentModalViewController:navController animated:YES];
250 | }
251 |
252 | - (void)openStepCountSwitchHandler:(UISwitch *)openSwitch{
253 | _settingParam.isOpenSportHelper = openSwitch.on;
254 | }
255 |
256 | - (void)stepCountModeSwitchHandler:(UISwitch *)modeSwitch{
257 | _settingParam.sportStepCountMode = modeSwitch.on;
258 | [self reloadTableData]; //刷新页面
259 | }
260 |
261 | - (void)isSnatchSelfRedEnvelopesSwitchHandler:(UISwitch *)openSwitch{
262 | _settingParam.isSnatchSelfRedEnvelopes = openSwitch.on;
263 | }
264 |
265 | - (void)onfilterRoomCellClicked{
266 | LLFilterChatRoomController *chatRoomVC = [[NSClassFromString(@"LLFilterChatRoomController") alloc] init];
267 | MemberDataLogic *dataLogic = [[NSClassFromString(@"MemberDataLogic") alloc] initWithMemberList:[_contactsDataLogic getChatRoomContacts] admin:0x0];
268 | [chatRoomVC setMemberLogic:dataLogic];
269 | chatRoomVC.filterRoomDic = _settingParam.filterRoomDic;
270 | [self.navigationController PushViewController:chatRoomVC animated:YES];
271 | }
272 |
273 | - (void)openAvoidRevokeMessageSwitchHandler:(UISwitch *)openSwitch{
274 | _settingParam.isOpenAvoidRevokeMessage = openSwitch.on;
275 | }
276 |
277 | - (void)onGithubCellClicked{
278 | NSURL *myGithubURL = [NSURL URLWithString:@"https://github.com/kevll/WeChatRedEnvelopesHelper"];
279 | MMWebViewController *githubWebVC = [[NSClassFromString(@"MMWebViewController") alloc] initWithURL:myGithubURL presentModal:NO extraInfo:nil delegate:nil];
280 | [self.navigationController PushViewController:githubWebVC animated:YES];
281 | }
282 |
283 | - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{
284 | [self.view endEditing:YES];
285 | }
286 |
287 | - (void)onConfirmFilterChatRoom:(NSNotification *)notify{
288 | _settingParam.filterRoomDic = notify.object;
289 | [self reloadTableData]; //刷新页面
290 | }
291 |
292 | - (void)onPickLocationControllerConfirmClicked{
293 | [_pickLocationController DismissMyselfAnimated:YES];
294 | POIInfo *currentPOIInfo = [_pickLocationController getCurrentPOIInfo];
295 | _settingParam.virtualLocation = currentPOIInfo;
296 | [_pickLocationController reportOnDone];
297 | [self reloadTableData]; //刷新页面
298 | }
299 |
300 | #pragma mark - MMPickLocationViewControllerDelegate
301 |
302 | - (UIBarButtonItem *)onGetRightBarButton{
303 | return [NSClassFromString(@"MMUICommonUtil") getBarButtonWithTitle:@"确定" target:self action:@selector(onPickLocationControllerConfirmClicked) style:0];
304 | }
305 |
306 | - (void)onCancelSeletctedLocation{
307 | [_pickLocationController DismissMyselfAnimated:YES];
308 | [_pickLocationController reportOnDone];
309 | }
310 |
311 | #pragma mark - Life Cycle
312 |
313 | - (void)viewWillAppear:(BOOL)animated{
314 | [super viewWillAppear:animated];
315 | [self exchangeMethod];
316 | }
317 |
318 | - (void)viewWillDisappear:(BOOL)animated{
319 | [super viewWillDisappear:animated];
320 | [self clickSaveItem];
321 | [self exchangeMethod]; //reset
322 | }
323 |
324 | - (void)dealloc{
325 | [super dealloc];
326 | [[NSNotificationCenter defaultCenter] removeObserver:self];
327 | }
328 |
329 | - (BOOL)shouldAutorotate
330 | {
331 | return NO;
332 | }
333 |
334 | -(UIInterfaceOrientationMask)supportedInterfaceOrientations
335 | {
336 | return UIInterfaceOrientationMaskPortrait;
337 | }
338 |
339 | @end
340 |
--------------------------------------------------------------------------------
/WeChatPlugin/src/WCRemoteControlManager.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "WeChat.h"
3 |
4 | #define PluginPath @"/Library/Application Support/WeChatPlugin/"
5 |
6 | @interface WCRemoteControlModel : NSObject
7 |
8 | @property (nonatomic, assign) BOOL enable;
9 | @property (nonatomic, copy) NSString *function;
10 | @property (nonatomic, copy) NSString *command;
11 |
12 | - (instancetype)initWithDict:(NSDictionary *)dict;
13 | - (NSDictionary *)dictionary;
14 |
15 | @end
16 |
17 |
18 | @interface WCRemoteControlManager : NSObject
19 |
20 | @property (nonatomic, strong)NSArray *remoteCommands;
21 | @property (nonatomic, strong)NSArray *enableRemoteCommands;
22 | @property (nonatomic, assign)BOOL isEnableRemoteControl;
23 | + (instancetype)sharedManager;
24 |
25 | - (void)handleRemoteControl:(UISwitch *)sender;
26 | - (void)sendRemoteControlCommand:(UIButton*)sender;
27 | + (NSMutableArray * )filterMessageWrapArr:(NSMutableArray *)msgList;
28 | @end
29 |
--------------------------------------------------------------------------------
/WeChatPlugin/src/WCRemoteControlManager.m:
--------------------------------------------------------------------------------
1 | #import "WCRemoteControlManager.h"
2 | #import
3 |
4 | static NSString * const kRemoteControlEnableKey = @"kRemoteControlEnableKey";
5 |
6 |
7 | @implementation WCRemoteControlModel
8 |
9 | - (instancetype)initWithDict:(NSDictionary *)dict {
10 | self = [super init];
11 | if (self) {
12 | self.enable = [dict[@"enable"] boolValue];
13 | self.function = dict[@"function"];
14 | self.command = dict[@"command"];
15 | }
16 | return self;
17 | }
18 |
19 | - (NSDictionary *)dictionary {
20 | return @{@"enable": @(self.enable),
21 | @"function": self.function,
22 | @"command": self.command};
23 | }
24 |
25 | @end
26 |
27 | @implementation WCRemoteControlManager
28 |
29 | + (instancetype)sharedManager {
30 | static WCRemoteControlManager *manager = nil;
31 | static dispatch_once_t onceToken;
32 | dispatch_once(&onceToken, ^{
33 | manager = [[WCRemoteControlManager alloc] init];
34 | manager.isEnableRemoteControl = [[NSUserDefaults standardUserDefaults] boolForKey:kRemoteControlEnableKey];
35 | });
36 | return manager;
37 | }
38 |
39 | - (NSArray *)remoteCommands
40 | {
41 | if (!_remoteCommands) {
42 | _remoteCommands = ({
43 | NSString* remoteFilePath = [PluginPath stringByAppendingPathComponent:@"RemoteControlCommands.plist"];
44 | NSArray *originModels = [NSArray arrayWithContentsOfFile:remoteFilePath];
45 | NSMutableArray *newRemoteControlModels = [[NSMutableArray alloc] init];
46 | [originModels.firstObject enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
47 | WCRemoteControlModel *model = [[WCRemoteControlModel alloc] initWithDict:obj];
48 | [newRemoteControlModels addObject:model];
49 | }];
50 | newRemoteControlModels;
51 | });
52 | }
53 | return _remoteCommands;
54 | }
55 |
56 | - (NSArray *)enableRemoteCommands
57 | {
58 | if (!_enableRemoteCommands) {
59 | _enableRemoteCommands = ({
60 | NSMutableArray *enableCommands = [[NSMutableArray alloc] init];
61 | [self.remoteCommands enumerateObjectsUsingBlock:^(WCRemoteControlModel *obj, NSUInteger idx, BOOL * _Nonnull stop) {
62 | if ([obj isKindOfClass:[WCRemoteControlModel class]] && obj.enable) {
63 | [enableCommands addObject:obj];
64 | }
65 | }];
66 | enableCommands;
67 | });
68 | }
69 | return _isEnableRemoteControl?_enableRemoteCommands:nil;
70 | }
71 |
72 | - (void)sendRemoteControlCommand:(UIButton*)sender
73 | {
74 | NSInteger index = sender.tag;
75 | WCRemoteControlModel *model = [self.enableRemoteCommands objectAtIndex:index - 100];
76 | CMessageMgr *chatMgr = [[objc_getClass("MMServiceCenter") defaultCenter] getService:[objc_getClass("CMessageMgr") class]];
77 | [chatMgr sendMsg:model.command toContactUsrName:@"filehelper"];
78 | }
79 |
80 | + (NSMutableArray *)filterMessageWrapArr:(NSMutableArray *)msgList
81 | {
82 | NSMutableArray *msgListResult = [msgList mutableCopy];
83 | for (CMessageWrap* msgWrap in msgList) {
84 | if ([msgWrap.m_nsToUsr isEqualToString:@"filehelper"] && [msgWrap.m_nsContent hasPrefix:@"#remote."]) {
85 | [msgListResult removeObject:msgWrap];
86 | }
87 | }
88 | return msgListResult;
89 | }
90 |
91 | - (void)handleRemoteControl:(UISwitch *)sender
92 | {
93 | self.isEnableRemoteControl = sender.isOn;
94 | [[NSUserDefaults standardUserDefaults] setBool:_isEnableRemoteControl forKey:kRemoteControlEnableKey];
95 | [[NSUserDefaults standardUserDefaults] synchronize];
96 | }
97 |
98 | @end
99 |
--------------------------------------------------------------------------------
/WeChatPlugin/src/WeChat.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import
4 |
5 | @class CMessageWrap;
6 |
7 | #pragma mark - Util
8 |
9 | @interface WCBizUtil : NSObject
10 |
11 | + (id)dictionaryWithDecodedComponets:(id)arg1 separator:(id)arg2;
12 |
13 | @end
14 |
15 | @interface SKBuiltinBuffer_t : NSObject
16 |
17 | @property(retain, nonatomic) NSData *buffer; // @dynamic buffer;
18 |
19 | @end
20 |
21 | #pragma mark - Manager
22 |
23 | @interface MMNewSessionMgr : NSObject
24 | - (unsigned int)GenSendMsgTime;
25 | @end
26 |
27 | #pragma mark - Message
28 |
29 |
30 | @interface FriendAsistSessionMgr : NSObject
31 | - (id)GetLastMessage:(id)arg1 HelloUser:(id)arg2 OnlyTo:(BOOL)arg3;
32 | @end
33 |
34 | @interface AutoSetRemarkMgr : NSObject
35 | - (id)GetStrangerAttribute:(id)arg1 AttributeName:(int)arg2;
36 | @end
37 |
38 | @interface CMessageMgr : NSObject
39 |
40 | - (id)GetMsg:(id)arg1 n64SvrID:(long long)arg2;
41 | - (void)AsyncOnSpecialSession:(id)arg1 MsgList:(id)arg2;
42 | - (id)GetHelloUsers:(id)arg1 Limit:(unsigned int)arg2 OnlyUnread:(BOOL)arg3;
43 |
44 | - (void)DelMsg:(id)arg1 MsgList:(id)arg2 DelAll:(BOOL)arg3;
45 | - (void)AddMsg:(id)arg1 MsgWrap:(id)arg2;
46 | - (void)onRevokeMsg:(id)arg1;
47 | - (id)GetMsgByCreateTime:(id)arg1 FromID:(unsigned int)arg2 FromCreateTime:(unsigned int)arg3 Limit:(unsigned int)arg4 LeftCount:(unsigned int *)arg5 FromSequence:(unsigned int)arg6;
48 | - (void)AddLocalMsg:(id)arg1 MsgWrap:(id)arg2 fixTime:(BOOL)arg3 NewMsgArriveNotify:(BOOL)arg4;
49 | - (void)AsyncOnAddMsg:(id)arg1 MsgWrap:(id)arg2;
50 | - (void)MessageReturn:(unsigned int)arg1 MessageInfo:(id)arg2 Event:(unsigned int)arg3;
51 | - (void)UpdateMessage:(id)arg1 MsgWrap:(id)arg2;
52 | - (void)AddEmoticonMsg:(id)arg1 MsgWrap:(id)arg2;
53 |
54 | - (void)sendMsg:(NSString *)msg toContactUsrName:(NSString *)userName;
55 |
56 | @end
57 |
58 | @interface CGroupMgr : NSObject
59 | - (BOOL)SetChatRoomDesc:(id)arg1 Desc:(id)arg2 Flag:(unsigned int)arg3;
60 | - (BOOL)CreateGroup:(id)arg1 withMemberList:(id)arg2;
61 | - (BOOL)DeleteGroupMember:(id)arg1 withMemberList:(id)arg2 scene:(unsigned long long)arg3;
62 | @end
63 |
64 | @interface MMLanguageMgr: NSObject
65 |
66 | - (id)getStringForCurLanguage:(id)arg1 defaultTo:(id)arg2;
67 |
68 |
69 | @end
70 |
71 | #pragma mark - RedEnvelop
72 |
73 |
74 | @interface WCRedEnvelopesLogicMgr: NSObject
75 |
76 | - (void)OpenRedEnvelopesRequest:(id)params;
77 | - (void)ReceiverQueryRedEnvelopesRequest:(id)arg1;
78 | - (void)GetHongbaoBusinessRequest:(id)arg1 CMDID:(unsigned int)arg2 OutputType:(unsigned int)arg3;
79 | - (void)OnWCToHongbaoCommonResponse:(id)arg1 Request:(id)arg2;
80 |
81 | /** Added Methods */
82 | - (unsigned int)calculateDelaySeconds;
83 |
84 | @end
85 |
86 | @interface HongBaoRes : NSObject
87 |
88 | @property(retain, nonatomic) SKBuiltinBuffer_t *retText; // @dynamic retText;
89 | @property(nonatomic) int cgiCmdid; // @dynamic cgiCmdid;
90 |
91 | @end
92 |
93 | @interface HongBaoReq : NSObject
94 |
95 | @property(retain, nonatomic) SKBuiltinBuffer_t *reqText; // @dynamic reqText;
96 |
97 | @end
98 |
99 | #pragma mark - Contact
100 |
101 | @interface GroupMember : NSObject
102 | @property(copy, nonatomic) NSString *m_nsNickName;; // @synthesize m_nsNickName;
103 | @property(nonatomic) unsigned int m_uiMemberStatus; // @synthesize m_uiMemberStatus;
104 | @property(copy, nonatomic) NSString *m_nsMemberName; // @synthesize m_nsMemberName;
105 | @end
106 |
107 | #pragma mark - QRCode
108 |
109 | @interface ScanQRCodeLogicController: NSObject
110 |
111 | @property(nonatomic) unsigned int fromScene;
112 | - (id)initWithViewController:(id)arg1 CodeType:(int)arg2;
113 | - (void)tryScanOnePicture:(id)arg1;
114 | - (void)doScanQRCode:(id)arg1;
115 | - (void)showScanResult;
116 |
117 | @end
118 |
119 | @interface NewQRCodeScanner: NSObject
120 |
121 | - (id)initWithDelegate:(id)arg1 CodeType:(int)arg2;
122 | - (void)notifyResult:(id)arg1 type:(id)arg2 version:(int)arg3;
123 |
124 | @end
125 |
126 | #pragma mark - MMTableView
127 |
128 |
129 | @interface SettingUtil : NSObject
130 | + (id)getLocalUsrName:(unsigned int)arg1;
131 | @end
132 |
133 | @interface MMLoadingView : UIView
134 |
135 | @property(retain, nonatomic) UILabel *m_label; // @synthesize m_label;
136 | @property (assign, nonatomic) BOOL m_bIgnoringInteractionEventsWhenLoading; // @synthesize m_bIgnoringInteractionEventsWhenLoading;
137 |
138 | - (void)setFitFrame:(long long)arg1;
139 | - (void)startLoading;
140 | - (void)stopLoading;
141 | - (void)stopLoadingAndShowError:(id)arg1;
142 | - (void)stopLoadingAndShowOK:(id)arg1;
143 |
144 |
145 | @end
146 |
147 | @interface MMTextView : UITextView
148 | @property(retain, nonatomic) NSString *placeholder;
149 | @end
150 |
151 |
152 | @interface ContactSelectView : UIView
153 |
154 | @property(nonatomic) unsigned int m_uiGroupScene; // @synthesize m_uiGroupScene;
155 | @property(nonatomic) BOOL m_bMultiSelect; // @synthesize m_bMultiSelect;
156 | @property(retain, nonatomic) NSMutableDictionary *m_dicMultiSelect; // @synthesize m_dicMultiSelect;
157 |
158 | - (id)initWithFrame:(struct CGRect)arg1 delegate:(id)arg2;
159 | - (void)initData:(unsigned int)arg1;
160 | - (void)initView;
161 | - (void)addSelect:(id)arg1;
162 |
163 | @property(nonatomic) BOOL m_bShowHistoryGroup; // @synthesize m_bShowHistoryGroup;
164 | @property(nonatomic) BOOL m_bShowRadarCreateRoom; // @synthesize m_bShowRadarCreateRoom;
165 | @property(retain, nonatomic) NSDictionary *m_dicExistContact; // @synthesize m_dicExistContact;
166 | - (void)initSearchBar;
167 | - (void)makeGroupCell:(id)arg1 head:(id)arg2 title:(id)arg3;
168 |
169 | @end
170 |
171 | #pragma mark - Logic
172 |
173 | @interface SayHelloDataLogic : NSObject
174 | @property (nonatomic, strong) NSMutableArray *m_arrHellos;
175 | - (void)loadData:(unsigned int)arg1;
176 | + (id)getContactFrom:(id)arg1;
177 | - (id)getContactForIndex:(unsigned int)arg1;
178 | - (void)onFriendAssistAddMsg:(NSArray *)arg1;
179 | @end
180 |
181 | @interface CContactVerifyLogic : NSObject
182 | - (void)startWithVerifyContactWrap:(id)arg1
183 | opCode:(unsigned int)arg2
184 | parentView:(id)arg3
185 | fromChatRoom:(BOOL)arg4;
186 | @end
187 |
188 | @interface SKBuiltinString_t : NSObject
189 | // Remaining properties
190 | @property(copy, nonatomic) NSString *string; // @dynamic string;
191 | @end
192 |
193 | @interface CreateChatRoomResponse : NSObject
194 | @property(strong, nonatomic) SKBuiltinString_t *chatRoomName; // @dynamic chatRoomName;
195 | @end
196 |
197 |
198 |
199 | #pragma mark - UtilCategory
200 |
201 | @interface NSMutableDictionary (SafeInsert)
202 |
203 | - (void)safeSetObject:(id)arg1 forKey:(id)arg2;
204 |
205 | @end
206 |
207 | @interface NSDictionary (NSDictionary_SafeJSON)
208 |
209 | - (id)arrayForKey:(id)arg1;
210 | - (id)dictionaryForKey:(id)arg1;
211 | - (double)doubleForKey:(id)arg1;
212 | - (float)floatForKey:(id)arg1;
213 | - (long long)int64ForKey:(id)arg1;
214 | - (long long)integerForKey:(id)arg1;
215 | - (id)stringForKey:(id)arg1;
216 |
217 | @end
218 |
219 | @interface NSString (NSString_SBJSON)
220 |
221 | - (id)JSONArray;
222 | - (id)JSONDictionary;
223 | - (id)JSONValue;
224 |
225 | @end
226 |
227 |
228 | @protocol MultiSelectContactsViewControllerDelegate
229 | - (void)onMultiSelectContactReturn:(NSArray *)arg1;
230 |
231 | @optional
232 | - (int)getFTSCommonScene;
233 | - (void)onMultiSelectContactCancelForSns;
234 | - (void)onMultiSelectContactReturnForSns:(NSArray *)arg1;
235 | @end
236 |
237 | @interface MultiSelectContactsViewController : UIViewController
238 |
239 | @property(nonatomic) BOOL m_bKeepCurViewAfterSelect; // @synthesize m_bKeepCurViewAfterSelect=_m_bKeepCurViewAfterSelect;
240 | @property(nonatomic) unsigned int m_uiGroupScene; // @synthesize m_uiGroupScene;
241 | @property(nonatomic, weak) id m_delegate; // @synthesize m_delegate;
242 |
243 | @end
244 |
245 | @interface WCPayInfoItem: NSObject
246 | @property(nonatomic) unsigned int m_sceneId; // @synthesize m_sceneId;
247 | @property(nonatomic) unsigned int m_uiPaySubType; // @synthesize m_uiPaySubType;
248 | @property(retain, nonatomic) NSString *m_nsPayMsgID; // @synthesize m_nsPayMsgID;
249 | @property(retain, nonatomic) NSString *m_c2cNativeUrl;
250 | - (NSString *)m_nsPayMsgID;
251 | @end
252 |
253 | #pragma mark - Message
254 |
255 | @interface CMessageWrap : NSObject
256 |
257 | @property(nonatomic) unsigned int m_uiMessageType; // @synthesize m_uiMessageType;
258 | @property(retain, nonatomic) NSString *m_nsContent; // @synthesize m_nsContent;
259 | @property(nonatomic) long long m_n64MesSvrID; // @synthesize m_n64MesSvrID;
260 | @property(nonatomic) unsigned int m_uiMesLocalID; // @synthesize m_uiMesLocalID;
261 | @property(nonatomic) unsigned int m_uiCreateTime; // @synthesize m_uiCreateTime;
262 | @property(retain, nonatomic) NSString *m_nsFromUsr; // @synthesize m_nsFromUsr;
263 | @property(retain, nonatomic) NSString *m_nsToUsr; // @synthesize m_nsToUsr;
264 | @property(retain, nonatomic) WCPayInfoItem *m_oWCPayInfoItem; // @dynamic m_oWCPayInfoItem;
265 | @property(nonatomic) unsigned int m_uiAppMsgInnerType; // @dynamic m_uiAppMsgInnerType;
266 | @property (assign, nonatomic) NSUInteger m_uiStatus;
267 | @property (retain, nonatomic) NSString* m_nsRealChatUsr; ///< 群消息的发信人,具体是群里的哪个人
268 | @property (retain, nonatomic) NSString *m_nsDesc;
269 | @property (retain, nonatomic) NSString *m_nsAppExtInfo;
270 | @property (assign, nonatomic) NSUInteger m_uiAppDataSize;
271 | @property (retain, nonatomic) NSString *m_nsShareOpenUrl;
272 | @property (retain, nonatomic) NSString *m_nsShareOriginUrl;
273 | @property (retain, nonatomic) NSString *m_nsJsAppId;
274 | @property (retain, nonatomic) NSString *m_nsPrePublishId;
275 | @property (retain, nonatomic) NSString *m_nsAppID;
276 | @property (retain, nonatomic) NSString *m_nsAppName;
277 | @property (retain, nonatomic) NSString *m_nsThumbUrl;
278 | @property (retain, nonatomic) NSString *m_nsAppMediaUrl;
279 | @property (retain, nonatomic) NSData *m_dtThumbnail;
280 | @property (retain, nonatomic) NSString *m_nsTitle;
281 | @property (retain, nonatomic) NSString *m_nsMsgSource;
282 |
283 | @property (nonatomic, copy) NSString *m_nsLastDisplayContent;
284 | @property (nonatomic, copy) NSString *m_nsPushContent;
285 |
286 | @property(nonatomic) unsigned int m_uiGameType; // 游戏类型
287 | @property(nonatomic) unsigned int m_uiGameContent; // 游戏内容
288 |
289 | - (id)initWithMsgType:(long long)arg1;
290 | - (WCPayInfoItem *)m_oWCPayInfoItem;
291 | - (id)nativeUrl;
292 | - (NSString *)wishingString;
293 | - (BOOL)IsSendBySendMsg;
294 | + (BOOL)isSenderFromMsgWrap:(CMessageWrap *)msgWrap;
295 |
296 | @end
297 |
298 |
299 |
300 |
301 | @interface CBaseContact : NSObject
302 |
303 | @property(retain, nonatomic) NSString *m_nsAliasName; // @synthesize m_nsAliasName;
304 | @property(retain, nonatomic) NSString *m_nsUsrName; // @synthesize m_nsUsrName;
305 | @property(nonatomic) unsigned int m_uiSex; // @synthesize m_uiSex;
306 | @property(retain, nonatomic) NSString *m_nsHeadImgUrl; // @synthesize m_nsHeadImgUrl;
307 | @property (nonatomic, copy) NSString *m_nsOwner; // 拥有者
308 | @property (nonatomic, copy) NSString *m_nsMemberName;
309 | @property (nonatomic, copy) NSString *m_nsEncodeUserName; // 微信用户名转码
310 | @property (nonatomic, assign) int m_uiFriendScene; // 是否是自己的好友(非订阅号、自己)
311 | @property (nonatomic,assign) BOOL m_isPlugin; // 是否为微信插件
312 |
313 | - (BOOL)isChatroom;
314 | - (BOOL)isEqualToContact:(id)arg1;
315 | - (id)getContactDisplayName;
316 | - (id)getChatRoomMemberWithoutMyself:(id)arg1;
317 | @end
318 |
319 | @interface CContact: CBaseContact
320 |
321 | @property (nonatomic, copy) NSString *m_nsNickName; // 用户昵称
322 | @end
323 |
324 | @interface CContactMgr: NSObject
325 |
326 | - (id)getContactByName:(id)arg1;
327 | - (id)getAllContactUserName;
328 | - (id)getSelfContact;
329 | - (id)getContactForSearchByName:(id)arg1;
330 | - (BOOL)getContactsFromServer:(id)arg1;
331 | - (BOOL)isInContactList:(id)arg1;
332 | - (BOOL)addLocalContact:(id)arg1 listType:(unsigned int)arg2;
333 | - (id)getContactList:(unsigned int)arg1 contactType:(unsigned int)arg2;
334 |
335 | @end
336 |
337 | @interface MMSessionInfo : NSObject
338 |
339 | @property(retain, nonatomic) CMessageWrap *m_msgWrap; // @synthesize m_msgWrap;
340 | @property(retain, nonatomic) CContact *m_contact; // @synthesize m_contact;
341 |
342 | @end
343 |
344 | @interface UIViewController (ModalView)
345 |
346 | - (void)PresentModalViewController:(id)arg1 animated:(BOOL)arg2;
347 | - (void)DismissMyselfAnimated:(BOOL)arg1;
348 |
349 | @end
350 |
351 | @interface NewMainFrameViewController : UIViewController
352 | {
353 | UITableView *m_tableView;
354 | }
355 |
356 | - (void)tableView:(id)arg1 didSelectRowAtIndexPath:(id)arg2;
357 | - (void)openRedEnvelopes;
358 |
359 | @end
360 |
361 | @interface BaseMsgContentViewController : UIViewController
362 |
363 | {
364 | UITableView *m_tableView;
365 | }
366 | - (id)tableView:(id)arg1 cellForRowAtIndexPath:(id)arg2;
367 | - (long long)numberOfSectionsInTableView:(id)arg1;
368 | - (void)tapAppNodeView:(id)arg1;
369 | - (CContact *)getChatContact;
370 | - (void)AsyncSendMessage:(NSString *)message;
371 |
372 | - (id)GetContact;
373 |
374 | - (void)backToWebViewController;
375 |
376 | @end
377 |
378 | @interface MMUINavigationController : UINavigationController
379 |
380 | - (id)initWithRootViewController:(id)arg1;
381 |
382 | @end
383 |
384 | @interface UINavigationController (LogicController)
385 |
386 | - (void)PushViewController:(id)arg1 animated:(BOOL)arg2;
387 |
388 | @end
389 |
390 | @interface WCRedEnvelopesReceiveControlLogic : NSObject
391 |
392 | - (void)OnCommitWCRedEnvelopes:(NSString *)arg1;
393 |
394 | @end
395 |
396 | @interface WCRedEnvelopesReceiveHomeView : UIView
397 |
398 | - (void)OnOpenRedEnvelopes;
399 |
400 | @end
401 |
402 | @protocol WCRedEnvelopesRedEnvelopesDetailViewControllerDelegate
403 |
404 | - (void)OnCommitWCRedEnvelopes:(NSString *)arg1;
405 |
406 | @end
407 |
408 | @interface WCRedEnvelopesRedEnvelopesDetailViewController : UIViewController
409 |
410 | @end
411 |
412 | @interface MMTableView: UITableView
413 |
414 | - (void)setTableHeaderView:(UIView *)view;
415 |
416 | @end
417 |
418 | @interface MMUIViewController : UIViewController
419 |
420 | - (void)startLoadingBlocked;
421 | - (void)startLoadingNonBlock;
422 | - (void)startLoadingWithText:(NSString *)text;
423 | - (void)stopLoading;
424 | - (void)stopLoadingWithFailText:(NSString *)text;
425 | - (void)stopLoadingWithOKText:(NSString *)text;
426 |
427 | @end
428 |
429 | @interface MMWindowViewController : MMUIViewController
430 | @end
431 |
432 | @interface OnlineDeviceInfoViewController : MMWindowViewController
433 |
434 | - (id)makeControlButtonWithTitle:(id)arg1 image:(id)arg2 highlightedImage:(id)arg3 target:(id)arg4 action:(SEL)arg5;
435 | - (void)setupRemoteBtn;
436 |
437 | @end
438 |
439 | @interface NewSettingViewController: MMUIViewController
440 |
441 | - (void)reloadTableData;
442 | - (void)setting;
443 | - (void)simplifySetting;
444 | - (void)groupSetting;
445 |
446 | @end
447 |
448 | @interface CPushContact : CContact
449 | @property (nonatomic, copy) NSString *m_nsChatRoomUserName;
450 | @property (nonatomic, copy) NSString *m_nsDes;
451 | @property (nonatomic, copy) NSString *m_nsSource;
452 | @property (nonatomic, copy) NSString *m_nsSourceNickName;
453 | @property (nonatomic, copy) NSString *m_nsSourceUserName;
454 | @property (nonatomic, copy) NSString *m_nsTicket;
455 | - (BOOL)isMyContact;
456 | @end
457 |
458 | @interface CVerifyContactWrap : NSObject
459 | @property (nonatomic, copy) NSString *m_nsChatRoomUserName;
460 | @property (nonatomic, copy) NSString *m_nsOriginalUsrName;
461 | @property (nonatomic, copy) NSString *m_nsSourceNickName;
462 | @property (nonatomic, copy) NSString *m_nsSourceUserName;
463 | @property (nonatomic, copy) NSString *m_nsTicket;
464 | @property (nonatomic, copy) NSString *m_nsUsrName;
465 | @property (nonatomic, strong) CContact *m_oVerifyContact;
466 | @property (nonatomic, assign) unsigned int m_uiScene;
467 | @property (nonatomic, assign) unsigned int m_uiWCFlag;
468 | @end
469 | @protocol ContactSelectViewDelegate
470 |
471 | - (void)onSelectContact:(CContact *)arg1;
472 |
473 | @end
474 |
475 | @interface SayHelloViewController : UIViewController
476 | @property (nonatomic, strong) SayHelloDataLogic *m_DataLogic;
477 | - (void)OnSayHelloDataVerifyContactOK:(CPushContact *)arg1;
478 | @end
479 |
480 | @interface ContactInfoViewController : MMUIViewController
481 |
482 | @property(retain, nonatomic) CContact *m_contact; // @synthesize m_contact;
483 |
484 | @end
485 |
486 | @interface MMTableViewInfo : NSObject
487 |
488 | - (void)setDelegate:(id)delegate;
489 | - (id)initWithFrame:(CGRect)frame style:(UITableViewStyle)style;
490 | - (MMTableView *)getTableView;
491 | - (void)clearAllSection;
492 | - (void)addSection:(id)arg1;
493 | - (void)insertSection:(id)arg1 At:(unsigned int)arg2;
494 | - (id)getSectionAt:(int)arg1;
495 |
496 | @property(nonatomic,assign) id delegate;
497 |
498 | @end
499 |
500 | @interface MMTableViewSectionInfo : NSObject
501 |
502 | + (id)sectionInfoDefaut;
503 | - (void)addCell:(id)arg1;
504 | - (void)setHeaderView:(UIView *)headerView;
505 | - (void)setFHeaderHeight:(CGFloat)height;
506 | + (id)sectionInfoHeader:(id)arg1;
507 | + (id)sectionInfoHeader:(id)arg1 Footer:(id)arg2;
508 |
509 | - (void)removeCellAt:(unsigned long long)arg1;
510 | - (unsigned long long)getCellCount;
511 |
512 | @end
513 |
514 | @interface WCTableViewCellManager : NSObject
515 |
516 | + (id)switchCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 on:(BOOL)arg4;
517 | @property(retain, nonatomic) id userInfo; // @synthesize userInfo=_userInfo;
518 |
519 | @end
520 |
521 | @interface WCTableViewNormalCellManager : WCTableViewCellManager
522 | + (WCTableViewNormalCellManager *)urlInnerCellForTitle:(id)arg1 url:(id)arg2;
523 | + (WCTableViewNormalCellManager *)urlInnerBlueCellForTitle:(id)arg1 rightValue:(id)arg2 url:(id)arg3;
524 | + (double)getAutoSizingRightMargin:(id)arg1;
525 | + (WCTableViewNormalCellManager *)badgeCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 badge:(id)arg4 rightValue:(id)arg5 imageName:(id)arg6;
526 | + (WCTableViewNormalCellManager *)badgeCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 badge:(id)arg4 rightValue:(id)arg5;
527 | + (WCTableViewNormalCellManager *)badgeCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 badge:(id)arg4;
528 | + (WCTableViewNormalCellManager *)editorCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 tip:(id)arg4 focus:(BOOL)arg5 autoCorrect:(BOOL)arg6 text:(id)arg7;
529 | + (WCTableViewNormalCellManager *)normalCellForTitle:(id)arg1 rightValue:(id)arg2 imageName:(id)arg3;
530 | + (WCTableViewNormalCellManager *)normalCellForTitle:(id)arg1 rightValue:(id)arg2;
531 | + (WCTableViewNormalCellManager *)normalCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 accessoryType:(long long)arg4;
532 | + (WCTableViewNormalCellManager *)normalCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 detail:(id)arg4 imageName:(id)arg5 accessoryType:(long long)arg6;
533 | + (WCTableViewNormalCellManager *)normalCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 rightValue:(id)arg4 imageName:(id)arg5 accessoryType:(long long)arg6;
534 | + (WCTableViewNormalCellManager *)normalCellForSel:(SEL)arg1 target:(id)arg2 title:(id)arg3 rightValue:(id)arg4 accessoryType:(long long)arg5;
535 | + (WCTableViewNormalCellManager *)cellForMakeSel:(SEL)arg1 makeTarget:(id)arg2 height:(double)arg3 userInfo:(id)arg4;
536 | + (unsigned long long)accessoryType:(long long)arg1;
537 | - (void)switchDidChanged:(id)arg1;
538 | - (void)configureCell:(id)arg1 withRightConfig:(id)arg2;
539 | - (void)configureCell:(id)arg1 withLeftConfig:(id)arg2;
540 | - (double)cellSeparatorLeftInset;
541 | - (double)cellHeightFor:(id)arg1;
542 | - (void)configureCell:(id)arg1;
543 | - (id)init;
544 | - (void)makeEditorCell:(id)arg1;
545 | - (void)makeNormalCell:(id)arg1;
546 | - (void)makeNormalCell:(id)arg1 title:(id)arg2;
547 | - (void)actionUrlInnerCell;
548 | - (void)actionUrlCell;
549 | - (void)actionEditorCell:(id)arg1;
550 | - (id)getUserInfoValueForKey:(id)arg1;
551 | - (void)addUserInfoValue:(id)arg1 forKey:(id)arg2;
552 |
553 | @end
554 |
555 | @interface MMUICommonUtil : NSObject
556 |
557 | + (id)getBarButtonWithTitle:(id)arg1 target:(id)arg2 action:(SEL)arg3 style:(int)arg4;
558 | + (id)getBarButtonWithTitle:(id)arg1 target:(id)arg2 action:(SEL)arg3 style:(int)arg4 color:(id)arg6;
559 | + (id)getBarButtonWithImageName:(id)arg1 target:(id)arg2 action:(SEL)arg3 style:(int)arg4 accessibility:(id)arg5 useTemplateMode:(BOOL)arg6;
560 |
561 | @end
562 |
563 | @interface MMWebViewController : UIViewController
564 |
565 | - (id)initWithURL:(NSURL *)url presentModal:(BOOL)presentModal extraInfo:(id)extraInfo delegate:(id)delegate;
566 | - (id)initWithURL:(id)arg1 presentModal:(BOOL)arg2 extraInfo:(id)arg3;
567 | - (void)didReceiveNewMessage;
568 | - (void)backToMsgContentViewController;
569 |
570 | @end
571 |
572 | @interface WCRedEnvelopesControlData: NSObject
573 |
574 | @property(retain, nonatomic) CMessageWrap *m_oSelectedMessageWrap;
575 | - (void)setM_oSelectedMessageWrap:(CMessageWrap *)msgWrap;
576 |
577 | @end
578 |
579 | @interface MMServiceCenter : NSObject
580 |
581 | + (id)defaultCenter;
582 | - (id)getService:(Class)aClass;
583 |
584 | @end
585 |
586 | @interface WCRedEnvelopesControlMgr: NSObject
587 |
588 | - (void)startReceiveRedEnvelopesLogic:(UIViewController *)controller Data:(WCRedEnvelopesControlData *)data;
589 | - (unsigned int)startReceiveGreetingRedEnvelopesLogic:(id)arg1 Data:(id)arg2;
590 | - (unsigned int)startReceiveRedEnvelopesLogicByC2C:(id)arg1 Data:(id)arg2;
591 |
592 | @end
593 |
594 | @interface BaseMsgContentLogicController: NSObject
595 |
596 | - (id)initWithLocalID:(unsigned int)arg1 CreateTime:(unsigned int)arg2 ContentViewDisshowStatus:(int)arg3;
597 | - (BaseMsgContentViewController *)getViewController;
598 | - (void)setM_contact:(CContact *)contact;
599 | - (void)setM_dicExtraInfo:(id)info;
600 | - (void)onWillEnterRoom;
601 | - (id)getMsgContentViewController;
602 |
603 | @end
604 |
605 | @interface MemberDataLogic: NSObject
606 |
607 | - (id)initWithMemberList:(id)arg1 admin:(id)arg2;
608 | - (CContact *)getItemInSection:(unsigned long long)arg1 atRow:(unsigned long long)arg2;
609 | - (unsigned long long)getSectionItemCount:(unsigned long long)arg1;
610 | - (unsigned long long)getSectionCount;
611 | - (unsigned long long)getTotalCount;
612 |
613 | @end
614 |
615 | @protocol ContactsDataLogicDelegate
616 | - (BOOL)onFilterContactCandidate:(CContact *)arg1;
617 | - (void)onContactsDataChange;
618 |
619 | @optional
620 | - (void)onContactAsynSearchSectionResultChanged:(NSArray *)arg1 sectionTitles:(NSDictionary *)arg2 sectionResults:(NSDictionary *)arg3;
621 | - (void)onContactsDataNeedChange;
622 | @end
623 |
624 | @interface ContactsDataLogic: NSObject
625 |
626 | @property(nonatomic) unsigned int m_uiScene; // @synthesize m_uiScene;
627 |
628 | - (id)initWithScene:(unsigned int)arg1 delegate:(id)arg2 sort:(BOOL)arg3 extendChatRoom:(BOOL)arg4;
629 | - (id)getChatRoomContacts;
630 | - (id)getKeysArray;
631 | - (BOOL)reloadContacts;
632 | - (BOOL)hasHistoryGroupContacts;
633 | - (id)getContactsArrayWith:(id)arg1;
634 | - (id)initWithScene:(unsigned int)arg1 delegate:(id)arg2 sort:(BOOL)arg3;
635 |
636 | @end
637 |
638 | @interface MemberListViewController: UIViewController
639 |
640 | @end
641 |
642 | @interface ChatRoomListViewController: MemberListViewController
643 |
644 | - (void)setMemberLogic:(MemberDataLogic *)logic;
645 |
646 | @end
647 |
648 | @interface LLFilterChatRoomController: ChatRoomListViewController
649 |
650 | @property (nonatomic, strong) NSMutableDictionary *filterRoomDic; //过滤群组字典
651 | @property (nonatomic, copy) void (^onConfirmSelectFilterRoom)(NSMutableDictionary *filterRoomDic);
652 |
653 | - (void)setNavigationBar;
654 | - (void)commonInit;
655 | - (void)clickConfirmItem;
656 | @end
657 |
658 | @interface CAppViewControllerManager: NSObject
659 |
660 | + (UITabBarController *)getTabBarController;
661 | + (UINavigationController *)getCurrentNavigationController;
662 |
663 | @end
664 |
665 | @interface POIInfo : NSObject
666 |
667 | @property(retain, nonatomic) NSString *infoUrl; // @synthesize infoUrl=_infoUrl;
668 | @property(retain, nonatomic) NSString *poiName; // @synthesize poiName=_poiName;
669 | @property(retain, nonatomic) NSString *address; // @synthesize address=_address;
670 | @property(retain, nonatomic) NSString *bid; // @synthesize bid=_bid;
671 | @property(nonatomic) double scale; // @synthesize scale=_scale;
672 | @property(nonatomic) struct CLLocationCoordinate2D coordinate; // @synthesize coordinate=_coordinate;
673 |
674 | @end
675 |
676 | @interface QMapView : UIView
677 |
678 | @property(nonatomic) struct CLLocationCoordinate2D centerCoordinate;
679 |
680 | @end
681 |
682 | @protocol MMPickLocationViewControllerDelegate
683 |
684 | @optional
685 | - (UIBarButtonItem *)onGetRightBarButton;
686 | - (void)onCancelSeletctedLocation;
687 | @end
688 |
689 | @interface MMPickLocationViewController : UIViewController
690 |
691 | @property (nonatomic, weak) id delegate; // @synthesize delegate=_delegate;
692 |
693 | - (id)initWithScene:(unsigned int)arg1 OnlyUseUserLocation:(BOOL)arg2;
694 | - (id)getCurrentPOIInfo;
695 | - (void)reportOnDone;
696 |
697 | @end
698 | @interface SettingBaseViewController : MMUIViewController
699 |
700 | @end
701 | @interface SettingDiscoverEntranceViewController : SettingBaseViewController
702 |
703 | @end
704 |
705 |
--------------------------------------------------------------------------------