Compare commits

...

12 Commits

Author SHA1 Message Date
Fin
d97abb5c33 Fix Podfile 2024-12-11 11:28:54 +08:00
Fin
0d79a98d68 Update project 2024-12-11 11:08:39 +08:00
Fin
f199e4cee2 更新第三方库 2024-12-11 11:04:16 +08:00
Fin
3de149c7d1 修复搜索符号 ' 会闪退的问题。
close: #264
2024-12-11 10:28:14 +08:00
Fin
4a2bf08e6e 修复加密推送角标 2024-12-11 09:20:34 +08:00
Fin
05d6ada326 提高加密推送参数的兼容性
close: #263
2024-12-11 09:16:16 +08:00
Fin
8a2a7fc2b4 允许使用GCM Mode
close: #262
2024-12-09 15:57:44 +08:00
Fin
585d0b8845 添加 cocoapods source 2024-12-09 09:44:26 +08:00
UUNEO
7b3ba2b9ac 增加下拉消息显示大图
格式化代码;删除多余的配置文件。

\t 替换成空格

去掉多余的\t
2024-12-08 19:02:59 +08:00
Fin
c7886b54c8 调整自动刷新事件间隔
close: #259
2024-12-06 16:21:55 +08:00
Fin
59655ca4b8 移除Message 的 isDeleted 字段 2024-12-06 14:52:21 +08:00
Fin
152c9842f4 修复可能的闪退 2024-12-06 14:15:47 +08:00
21 changed files with 319 additions and 108 deletions

View File

@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 48;
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
@ -59,7 +59,7 @@
0632CE2020EC9098003FDF46 /* UserNotificationsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0683487220510FB20024B6DA /* UserNotificationsUI.framework */; };
0632CE2320EC9098003FDF46 /* NotificationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0632CE2220EC9098003FDF46 /* NotificationViewController.swift */; };
0632CE2620EC9098003FDF46 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0632CE2420EC9098003FDF46 /* MainInterface.storyboard */; };
0632CE2A20EC9098003FDF46 /* NotificationContentExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 0632CE1E20EC9098003FDF46 /* NotificationContentExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
0632CE2A20EC9098003FDF46 /* NotificationContentExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 0632CE1E20EC9098003FDF46 /* NotificationContentExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
0633E80A256A091B00ED0680 /* MJRefresh+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0633E809256A091B00ED0680 /* MJRefresh+Rx.swift */; };
0635A8052CE47DFE0027E00F /* SettingSectionHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0635A8042CE47DFE0027E00F /* SettingSectionHeader.swift */; };
0635A8072CE4883A0027E00F /* DonateCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0635A8062CE4883A0027E00F /* DonateCell.swift */; };
@ -136,7 +136,7 @@
06C5952F248107F5006B98F3 /* iCloudStatusCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06C5952E248107F5006B98F3 /* iCloudStatusCell.swift */; };
06C5953124811392006B98F3 /* ArchiveSettingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06C5953024811392006B98F3 /* ArchiveSettingCell.swift */; };
06C595362481160F006B98F3 /* BKLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06C595352481160F006B98F3 /* BKLabel.swift */; };
06CF784721C7A50300A052D7 /* NotificationServiceExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 06CF784021C7A50300A052D7 /* NotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
06CF784721C7A50300A052D7 /* NotificationServiceExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 06CF784021C7A50300A052D7 /* NotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
06CF784C21C7A51200A052D7 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06CF784B21C7A51200A052D7 /* NotificationService.swift */; };
06D69E202C1159E200161A35 /* glass.caf in Resources */ = {isa = PBXBuildFile; fileRef = 06320500250B6DD3001561EC /* glass.caf */; };
06D69E212C1159E200161A35 /* sherwoodforest.caf in Resources */ = {isa = PBXBuildFile; fileRef = 063204F5250B6DD2001561EC /* sherwoodforest.caf */; };
@ -195,11 +195,13 @@
06F11E7727D9D5FB00F00298 /* QRScannerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06F11E7627D9D5FB00F00298 /* QRScannerViewController.swift */; };
06FB04042C53575400F3A213 /* SharedDefines.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06FB04032C53575400F3A213 /* SharedDefines.swift */; };
06FB04052C53575400F3A213 /* SharedDefines.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06FB04032C53575400F3A213 /* SharedDefines.swift */; };
19BE8EBF2D03514A009BF080 /* ImageDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06E944792C0704E500AC86AB /* ImageDownloader.swift */; };
1E73F99E2C282822002BF649 /* SectionViewController-iPad.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E73F99D2C282822002BF649 /* SectionViewController-iPad.swift */; };
1EFB545D2C314A6800B8E51B /* BarkSplitViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EFB545C2C314A6800B8E51B /* BarkSplitViewController.swift */; };
1EFB545F2C32514000B8E51B /* SectionViewModel-iPad.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EFB545E2C32514000B8E51B /* SectionViewModel-iPad.swift */; };
3428272069AFAFE2C683FEB0 /* libPods-Bark.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CCC722470308049D180876C7 /* libPods-Bark.a */; };
879AE4D4178855A9672009E4 /* libPods-NotificationServiceExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B7F8BDFAA047451561798F58 /* libPods-NotificationServiceExtension.a */; };
88757E3ACE0EA6A48577C958 /* libPods-NotificationContentExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6616B1ACAA7E422700D90C2B /* libPods-NotificationContentExtension.a */; };
B963F7D5BA7AC2571E71EF66 /* libPods-BarkTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 76381A752CCCD4DA6BB2A566 /* libPods-BarkTests.a */; };
/* End PBXBuildFile section */
@ -228,16 +230,16 @@
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
0632CE2E20EC9098003FDF46 /* Embed App Extensions */ = {
0632CE2E20EC9098003FDF46 /* Embed Foundation Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
0632CE2A20EC9098003FDF46 /* NotificationContentExtension.appex in Embed App Extensions */,
06CF784721C7A50300A052D7 /* NotificationServiceExtension.appex in Embed App Extensions */,
0632CE2A20EC9098003FDF46 /* NotificationContentExtension.appex in Embed Foundation Extensions */,
06CF784721C7A50300A052D7 /* NotificationServiceExtension.appex in Embed Foundation Extensions */,
);
name = "Embed App Extensions";
name = "Embed Foundation Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
@ -399,11 +401,14 @@
1E73F99D2C282822002BF649 /* SectionViewController-iPad.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SectionViewController-iPad.swift"; sourceTree = "<group>"; };
1EFB545C2C314A6800B8E51B /* BarkSplitViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BarkSplitViewController.swift; sourceTree = "<group>"; };
1EFB545E2C32514000B8E51B /* SectionViewModel-iPad.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SectionViewModel-iPad.swift"; sourceTree = "<group>"; };
4A9C3B74281C8607B364CED7 /* Pods-NotificationContentExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationContentExtension.release.xcconfig"; path = "Target Support Files/Pods-NotificationContentExtension/Pods-NotificationContentExtension.release.xcconfig"; sourceTree = "<group>"; };
519481D715B40109627E1B49 /* Pods-NotificationServiceExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationServiceExtension.release.xcconfig"; path = "Target Support Files/Pods-NotificationServiceExtension/Pods-NotificationServiceExtension.release.xcconfig"; sourceTree = "<group>"; };
6616B1ACAA7E422700D90C2B /* libPods-NotificationContentExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NotificationContentExtension.a"; sourceTree = BUILT_PRODUCTS_DIR; };
76381A752CCCD4DA6BB2A566 /* libPods-BarkTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BarkTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
A69B47DA6DB3B168D5770B45 /* Pods-Bark.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Bark.release.xcconfig"; path = "Target Support Files/Pods-Bark/Pods-Bark.release.xcconfig"; sourceTree = "<group>"; };
B7F8BDFAA047451561798F58 /* libPods-NotificationServiceExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NotificationServiceExtension.a"; sourceTree = BUILT_PRODUCTS_DIR; };
CCC722470308049D180876C7 /* libPods-Bark.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Bark.a"; sourceTree = BUILT_PRODUCTS_DIR; };
EF45D2197673129A8128ADB7 /* Pods-NotificationContentExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationContentExtension.debug.xcconfig"; path = "Target Support Files/Pods-NotificationContentExtension/Pods-NotificationContentExtension.debug.xcconfig"; sourceTree = "<group>"; };
F20815A821395CCA155806A4 /* Pods-NotificationServiceExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationServiceExtension.debug.xcconfig"; path = "Target Support Files/Pods-NotificationServiceExtension/Pods-NotificationServiceExtension.debug.xcconfig"; sourceTree = "<group>"; };
FB59D77AB30F7AD98BA72C3E /* Pods-BarkTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BarkTests.debug.xcconfig"; path = "Target Support Files/Pods-BarkTests/Pods-BarkTests.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -415,6 +420,7 @@
files = (
0632CE2020EC9098003FDF46 /* UserNotificationsUI.framework in Frameworks */,
0632CE1F20EC9098003FDF46 /* UserNotifications.framework in Frameworks */,
88757E3ACE0EA6A48577C958 /* libPods-NotificationContentExtension.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -710,6 +716,7 @@
CCC722470308049D180876C7 /* libPods-Bark.a */,
76381A752CCCD4DA6BB2A566 /* libPods-BarkTests.a */,
B7F8BDFAA047451561798F58 /* libPods-NotificationServiceExtension.a */,
6616B1ACAA7E422700D90C2B /* libPods-NotificationContentExtension.a */,
);
name = Frameworks;
sourceTree = "<group>";
@ -723,6 +730,8 @@
121D9B1ED4E8D26F345BC5C0 /* Pods-BarkTests.release.xcconfig */,
F20815A821395CCA155806A4 /* Pods-NotificationServiceExtension.debug.xcconfig */,
519481D715B40109627E1B49 /* Pods-NotificationServiceExtension.release.xcconfig */,
EF45D2197673129A8128ADB7 /* Pods-NotificationContentExtension.debug.xcconfig */,
4A9C3B74281C8607B364CED7 /* Pods-NotificationContentExtension.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
@ -734,9 +743,11 @@
isa = PBXNativeTarget;
buildConfigurationList = 0632CE2D20EC9098003FDF46 /* Build configuration list for PBXNativeTarget "NotificationContentExtension" */;
buildPhases = (
0B84A6EDEEC0D92E4E6CAFF1 /* [CP] Check Pods Manifest.lock */,
0632CE1A20EC9098003FDF46 /* Sources */,
0632CE1B20EC9098003FDF46 /* Frameworks */,
0632CE1C20EC9098003FDF46 /* Resources */,
16C0395E271EF88C500FD38B /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@ -755,7 +766,7 @@
0661A53B204FDA4100965E4E /* Sources */,
0661A53C204FDA4100965E4E /* Frameworks */,
0661A53D204FDA4100965E4E /* Resources */,
0632CE2E20EC9098003FDF46 /* Embed App Extensions */,
0632CE2E20EC9098003FDF46 /* Embed Foundation Extensions */,
330C2B4092D535691BE03E9D /* [CP] Copy Pods Resources */,
);
buildRules = (
@ -813,8 +824,9 @@
0661A537204FDA4100965E4E /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1300;
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1600;
ORGANIZATIONNAME = Fin;
TargetAttributes = {
0632CE1D20EC9098003FDF46 = {
@ -990,6 +1002,46 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
0B84A6EDEEC0D92E4E6CAFF1 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-NotificationContentExtension-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
16C0395E271EF88C500FD38B /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-NotificationContentExtension/Pods-NotificationContentExtension-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Kingfisher.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NotificationContentExtension/Pods-NotificationContentExtension-resources.sh\"\n";
showEnvVarsInLog = 0;
};
330C2B4092D535691BE03E9D /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -1001,7 +1053,11 @@
"${PODS_CONFIGURATION_BUILD_DIR}/CryptoSwift/CryptoSwift.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit/DeviceKit.bundle",
"${PODS_ROOT}/DropDown/DropDown/resources/DropDownCell.xib",
"${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardCore/IQKeyboardCore.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardNotification/IQKeyboardNotification.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardToolbar/IQKeyboardToolbar.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardToolbarManager/IQKeyboardToolbarManager.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/IQTextInputViewNotification/IQTextInputViewNotification.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.bundle",
"${PODS_ROOT}/MJRefresh/MJRefresh/MJRefresh.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.Privacy.bundle",
@ -1026,7 +1082,11 @@
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CryptoSwift.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/DeviceKit.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/DropDownCell.nib",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/IQKeyboardManagerSwift.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/IQKeyboardCore.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/IQKeyboardNotification.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/IQKeyboardToolbar.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/IQKeyboardToolbarManager.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/IQTextInputViewNotification.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Kingfisher.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MJRefresh.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MJRefresh.Privacy.bundle",
@ -1127,6 +1187,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
19BE8EBF2D03514A009BF080 /* ImageDownloader.swift in Sources */,
0687F2AA2CCB7FA500B2A52F /* UIFont+Extension.swift in Sources */,
0632CE2320EC9098003FDF46 /* NotificationViewController.swift in Sources */,
06BCAE572CDB19420092867A /* GroupMuteSettingManager.swift in Sources */,
@ -1307,6 +1368,7 @@
/* Begin XCBuildConfiguration section */
0632CE2B20EC9098003FDF46 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = EF45D2197673129A8128ADB7 /* Pods-NotificationContentExtension.debug.xcconfig */;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_ENTITLEMENTS = NotificationContentExtension/NotificationContentExtension.entitlements;
@ -1316,7 +1378,11 @@
DEVELOPMENT_TEAM = 5U8LBRXG3A;
INFOPLIST_FILE = NotificationContentExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark.NotificationContent;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -1329,6 +1395,7 @@
};
0632CE2C20EC9098003FDF46 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 4A9C3B74281C8607B364CED7 /* Pods-NotificationContentExtension.release.xcconfig */;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_ENTITLEMENTS = NotificationContentExtension/NotificationContentExtension.entitlements;
@ -1338,7 +1405,11 @@
DEVELOPMENT_TEAM = 5U8LBRXG3A;
INFOPLIST_FILE = NotificationContentExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark.NotificationContent;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -1375,6 +1446,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -1436,6 +1508,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -1458,8 +1531,9 @@
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = Release;
@ -1476,7 +1550,10 @@
DEVELOPMENT_TEAM = 5U8LBRXG3A;
INFOPLIST_FILE = Bark/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -1500,7 +1577,10 @@
DEVELOPMENT_TEAM = 5U8LBRXG3A;
INFOPLIST_FILE = Bark/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -1524,7 +1604,11 @@
DEVELOPMENT_TEAM = 5U8LBRXG3A;
INFOPLIST_FILE = NotificationServiceExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
@ -1549,7 +1633,11 @@
DEVELOPMENT_TEAM = 5U8LBRXG3A;
INFOPLIST_FILE = NotificationServiceExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark.NotificationServiceExtension;
@ -1573,7 +1661,11 @@
DEVELOPMENT_TEAM = 5U8LBRXG3A;
INFOPLIST_FILE = BarkTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = me.fin.BarkTests;
@ -1598,7 +1690,11 @@
DEVELOPMENT_TEAM = 5U8LBRXG3A;
INFOPLIST_FILE = BarkTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = me.fin.BarkTests;
PRODUCT_NAME = "$(TARGET_NAME)";

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "1600"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
@ -84,6 +84,7 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
askForAppToLaunch = "Yes"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "1600"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
@ -84,6 +84,7 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
askForAppToLaunch = "Yes"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">

View File

@ -8,6 +8,7 @@
import CrashReporter
import IQKeyboardManagerSwift
import IQKeyboardToolbarManager
import SwiftyStoreKit
import UIKit
import UserNotifications
@ -76,7 +77,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
// Realm()
setupRealm()
IQKeyboardManager.shared.enable = true
IQKeyboardManager.shared.isEnabled = true
IQKeyboardToolbarManager.shared.isEnabled = true
if #available(iOS 14, *), UIDevice.current.userInterfaceIdiom == .pad {
let splitViewController = BarkSplitViewController(style: .doubleColumn)
self.window?.rootViewController = BarkSnackbarController(rootViewController: splitViewController)

View File

@ -1403,6 +1403,29 @@
}
}
},
"gcmNotSupported" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "GCM mode does not support copying script example."
}
},
"tr" : {
"stringUnit" : {
"state" : "translated",
"value" : "GCM modu, script örneklerini kopyalamayı desteklemez."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "GCM Mode 不支持复制脚本示例。"
}
}
}
},
"group" : {
"extractionState" : "manual",
"localizations" : {

View File

@ -14,13 +14,24 @@ let kRealmDefaultConfiguration = {
let fileUrl = groupUrl?.appendingPathComponent("bark.realm")
let config = Realm.Configuration(
fileURL: fileUrl,
schemaVersion: 13,
migrationBlock: { _, oldSchemaVersion in
// We havent migrated anything yet, so oldSchemaVersion == 0
if oldSchemaVersion < 1 {
// Nothing to do!
// Realm will automatically detect new properties and removed properties
// And will update the schema on disk automatically
schemaVersion: 14,
migrationBlock: { migration, oldSchemaVersion in
switch oldSchemaVersion {
case 0...13:
migration.enumerateObjects(ofType: Message.className()) { oldObject, newObject in
guard let obj = oldObject else {
return
}
guard let isDeleted = obj["isDeleted"] as? Bool else {
return
}
// isDeleted
if isDeleted, let newObject {
migration.delete(newObject)
}
}
default:
break
}
}
)

View File

@ -26,7 +26,6 @@ class CryptoSettingController: BaseViewController<CryptoSettingViewModel> {
let textField = BorderTextField(title: "IV")
textField.font = UIFont.preferredFont(ofSize: 14)
textField.adjustsFontForContentSizeCategory = true
textField.placeholder = String(format: NSLocalizedString("enterIv"), 16) // todo: update iv length
return textField
}()
@ -50,7 +49,7 @@ class CryptoSettingController: BaseViewController<CryptoSettingViewModel> {
btn.applyGradient(
withColours: [
UIColor(r255: 36, g255: 51, b255: 236),
UIColor(r255: 70, g255: 44, b255: 233),
UIColor(r255: 70, g255: 44, b255: 233)
],
gradientOrientation: .horizontal
)
@ -174,7 +173,6 @@ class CryptoSettingController: BaseViewController<CryptoSettingViewModel> {
}
override func bindViewModel() {
func getFieldValues() -> CryptoSettingFields {
return CryptoSettingFields(
algorithm: self.algorithmFeild.currentValue!,
@ -216,6 +214,7 @@ class CryptoSettingController: BaseViewController<CryptoSettingViewModel> {
self?.keyTextField.text = fields.key
self?.ivTextField.text = fields.iv
}
self?.setIvLengthPlaceholder(mode: self?.modeFeild.currentValue)
}).disposed(by: rx.disposeBag)
output.modeListChanged
@ -229,6 +228,13 @@ class CryptoSettingController: BaseViewController<CryptoSettingViewModel> {
output.keyLengthChanged.drive(onNext: { [weak self] keyLength in
self?.keyTextField.placeholder = String(format: NSLocalizedString("enterKey"), keyLength)
}).disposed(by: rx.disposeBag)
self.modeFeild
.rx
.currentValueChanged
.subscribe(onNext: { [weak self] val in
self?.setIvLengthPlaceholder(mode: val)
}).disposed(by: rx.disposeBag)
output.showSnackbar.drive(onNext: { text in
HUDError(text)
@ -243,4 +249,15 @@ class CryptoSettingController: BaseViewController<CryptoSettingViewModel> {
HUDSuccess(NSLocalizedString("Copy"))
}).disposed(by: rx.disposeBag)
}
private func setIvLengthPlaceholder(mode: String?) {
guard let mode else {
return
}
if let length = ["CBC": 16, "GCM": 12][mode] {
self.ivTextField.placeholder = String(format: NSLocalizedString("enterIv"), length)
} else {
self.ivTextField.placeholder = ""
}
}
}

View File

@ -48,7 +48,6 @@ class CryptoSettingViewModel: ViewModel, ViewModelType {
}
func transform(input: Input) -> Output {
let showSnackbar = PublishRelay<String>()
let modeList = input
@ -63,7 +62,7 @@ class CryptoSettingViewModel: ViewModel, ViewModelType {
.compactMap { Algorithm(rawValue: $0.algorithm)?.keyLength },
input
.algorithmChanged
.compactMap { Algorithm(rawValue: $0)?.keyLength },
.compactMap { Algorithm(rawValue: $0)?.keyLength }
])
//
@ -72,8 +71,7 @@ class CryptoSettingViewModel: ViewModel, ViewModelType {
do {
_ = try AESCryptoModel(cryptoFields: fields)
return true
}
catch {
} catch {
showSnackbar.accept(error.rawString())
return false
}
@ -90,14 +88,17 @@ class CryptoSettingViewModel: ViewModel, ViewModelType {
//
self?.dependencies.settingFieldRelay.accept(fields)
return true
}
catch {
} catch {
showSnackbar.accept(error.rawString())
return false
}
}
let copy = Driver.combineLatest(copyScript, dependencies.deviceKey, dependencies.serverAddress)
.map { fields, deviceKey,serverAddress in
.compactMap { fields, deviceKey, serverAddress -> String? in
guard fields.mode != "GCM" else {
showSnackbar.accept(NSLocalizedString("gcmNotSupported"))
return nil
}
let key = fields.key ?? ""
let iv = fields.iv ?? ""
return
@ -129,14 +130,14 @@ class CryptoSettingViewModel: ViewModel, ViewModelType {
echo $ciphertext
# \(NSLocalizedString("ciphertextComment"))
curl --data-urlencode "ciphertext=$ciphertext"\( iv.count == 0 ? "" : " --data-urlencode \"iv=\(iv)\"") \(serverAddress)/$deviceKey
curl --data-urlencode "ciphertext=$ciphertext"\(iv.count == 0 ? "" : " --data-urlencode \"iv=\(iv)\"") \(serverAddress)/$deviceKey
"""
}
return Output(
initial: Driver.just((
algorithmList: [Algorithm.aes128, Algorithm.aes192, Algorithm.aes256],
modeList: ["CBC", "ECB", /* "GCM" */], // GCM
modeList: ["CBC", "ECB", "GCM"],
paddingList: ["pkcs7"],
initialFields: dependencies.settingFieldRelay.value
)),

View File

@ -83,13 +83,13 @@ class MessageListViewController: BaseViewController<MessageListViewModel> {
self?.scrollToTop()
}).disposed(by: self.rx.disposeBag)
// APP1
// APP5
var lastAutoRefreshdate = Date()
NotificationCenter.default.rx
.notification(UIApplication.willEnterForegroundNotification)
.filter { _ in
let now = Date()
if now.timeIntervalSince1970 - lastAutoRefreshdate.timeIntervalSince1970 > 60 * 60 {
if now.timeIntervalSince1970 - lastAutoRefreshdate.timeIntervalSince1970 > 60 * 5 {
lastAutoRefreshdate = now
return true
}
@ -216,10 +216,10 @@ class MessageListViewController: BaseViewController<MessageListViewModel> {
alertController.addAction(copyAction)
alertController.addAction(cancelAction)
if UIDevice.current.userInterfaceIdiom == .pad {
alertController.modalPresentationStyle = .popover
if let cell = self.tableView.cellForRow(at: indexPath) {
alertController.popoverPresentationController?.sourceView = self.tableView
alertController.popoverPresentationController?.sourceRect = cell.frame
alertController.modalPresentationStyle = .popover
}
}

View File

@ -37,13 +37,12 @@ class MessageListViewModel: ViewModel, ViewModelType {
private func getResults(filterGroups: [String?], searchText: String?) -> Results<Message>? {
if let realm = try? Realm() {
var results = realm.objects(Message.self)
.filter("isDeleted != true")
.sorted(byKeyPath: "createDate", ascending: false)
if filterGroups.count > 0 {
results = results.filter("group in %@", filterGroups)
}
if let text = searchText, text.count > 0 {
results = results.filter("title contains[c] '\(text)' or body contains[c] '\(text)'")
results = results.filter("title CONTAINS[c] %@ OR body CONTAINS[c] %@", text, text)
}
return results
}
@ -171,10 +170,9 @@ class MessageListViewModel: ViewModel, ViewModelType {
// message
input.itemDelete.drive(onNext: { [weak self] index in
if var section = messagesRelay.value.first {
if let realm = try? Realm() {
if let realm = try? Realm(), let message = self?.results?[index] {
try? realm.write {
let message = self?.results?[index]
message?.isDeleted = true
realm.delete(message)
}
}
section.messages.remove(at: index)
@ -203,17 +201,7 @@ class MessageListViewModel: ViewModel, ViewModelType {
return
}
// 使icecream
//
// try? realm.write {
// for msg in messages {
// msg.isDeleted = true
// }
// }
try? realm.write {
for msg in messages {
msg.isDeleted = true
}
realm.delete(messages)
}
}
@ -227,7 +215,6 @@ class MessageListViewModel: ViewModel, ViewModelType {
let groupFilter = input.groupTap.compactMap { () -> GroupFilterViewModel? in
if let realm = try? Realm() {
let groups = realm.objects(Message.self)
.filter("isDeleted != true")
.distinct(by: ["group"])
.value(forKeyPath: "group") as? [String?]

View File

@ -130,10 +130,10 @@ class MessageSettingsViewController: BaseViewController<MessageSettingsViewModel
alertController.addAction(UIAlertAction(title: NSLocalizedString("Cancel"), style: .cancel, handler: nil))
if UIDevice.current.userInterfaceIdiom == .pad {
alertController.modalPresentationStyle = .popover
if let cell = strongSelf.tableView.cellForRow(at: indexPath) {
alertController.popoverPresentationController?.sourceView = strongSelf.tableView
alertController.popoverPresentationController?.sourceRect = cell.frame
alertController.modalPresentationStyle = .popover
}
}
strongSelf.present(alertController, animated: true, completion: nil)

View File

@ -79,7 +79,6 @@ class MessageSettingsViewModel: ViewModel, ViewModelType {
.map { _ in
if let realm = try? Realm() {
return realm.objects(Message.self)
.filter("isDeleted != true")
.count
}
return 0
@ -204,7 +203,6 @@ class MessageSettingsViewModel: ViewModel, ViewModelType {
.compactMap { _ in
if let realm = try? Realm() {
let messages = realm.objects(Message.self)
.filter("isDeleted != true")
.sorted(byKeyPath: "createDate", ascending: false)
var arr = [[String: AnyObject]]()

View File

@ -171,10 +171,10 @@ class ServerListViewController: BaseViewController<ServerListViewModel> {
alertController.addAction(UIAlertAction(title: NSLocalizedString("Cancel"), style: .cancel, handler: nil))
if UIDevice.current.userInterfaceIdiom == .pad {
alertController.modalPresentationStyle = .popover
if let cell = self.tableView.cellForRow(at: indexPath) {
alertController.popoverPresentationController?.sourceView = self.tableView
alertController.popoverPresentationController?.sourceRect = cell.frame
alertController.modalPresentationStyle = .popover
}
}
self.navigationController?.present(alertController, animated: true, completion: nil)

View File

@ -17,9 +17,6 @@ class Message: Object {
@objc dynamic var group: String?
@objc dynamic var createDate: Date?
// true IceCream
@objc dynamic var isDeleted = false
override class func primaryKey() -> String? {
return "id"
}

View File

@ -41,8 +41,8 @@ class CiphertextProcessor: NotificationContentProcessor {
soundName = sound
bestAttemptContent.sound = UNNotificationSound(named: UNNotificationSoundName(rawValue: sound))
}
if let badge = map["badge"] as? Int {
bestAttemptContent.badge = badge as NSNumber
if let badge = map["badge"] as? String, let badgeValue = Int(badge) {
bestAttemptContent.badge = badgeValue as NSNumber
}
var aps: [String: Any] = ["alert": alert]
if let soundName {
@ -84,8 +84,17 @@ class CiphertextProcessor: NotificationContentProcessor {
var result: [AnyHashable: Any] = [:]
for (key, val) in map {
// key
result[key.lowercased()] = val
// key,
let key = key.lowercased()
// value
var val = val
//
if let num = val as? NSNumber {
val = num.stringValue
}
result[key] = val
}
return result
}

View File

@ -15,7 +15,8 @@ class IconProcessor: NotificationContentProcessor {
let userInfo = bestAttemptContent.userInfo
guard let imageUrl = userInfo["icon"] as? String,
let imageFileUrl = await ImageDownloader.downloadImage(imageUrl)
let imageFileUrl = await ImageDownloader.downloadImage(imageUrl),
let imageData = NSData(contentsOfFile: imageFileUrl)
else {
return bestAttemptContent
}
@ -23,7 +24,7 @@ class IconProcessor: NotificationContentProcessor {
var personNameComponents = PersonNameComponents()
personNameComponents.nickname = bestAttemptContent.title
let avatar = INImage(imageData: NSData(contentsOfFile: imageFileUrl)! as Data)
let avatar = INImage(imageData: imageData as Data)
let senderPerson = INPerson(
personHandle: INPersonHandle(value: "", type: .unknown),
nameComponents: personNameComponents,

14
Podfile
View File

@ -1,3 +1,5 @@
source 'https://github.com/CocoaPods/Specs.git'
platform:ios,'13.0'
inhibit_all_warnings!
use_modular_headers!
@ -13,11 +15,10 @@ def pods
pod 'ObjectMapper'
pod 'SwiftyJSON'
pod 'DeviceKit'
pod 'DefaultsKit', :git => 'https://github.com/nmdias/DefaultsKit'
# pod 'IceCream'
pod 'DefaultsKit'
pod 'RealmSwift'
pod 'CryptoSwift'
pod 'IQKeyboardManagerSwift'
pod 'IQKeyboardManagerSwift/IQKeyboardToolbarManager'
pod 'RxSwift'
pod 'RxCocoa'
@ -45,13 +46,17 @@ end
target 'NotificationServiceExtension' do
# pod 'IceCream'
pod 'RealmSwift'
pod 'Kingfisher'
pod 'CryptoSwift'
pod 'SwiftyJSON'
end
target 'NotificationContentExtension' do
pod 'Kingfisher'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
@ -60,6 +65,5 @@ post_install do |installer|
end
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
end
end
end

View File

@ -1,13 +1,33 @@
PODS:
- Alamofire (5.9.1)
- Alamofire (5.10.2)
- CryptoSwift (1.8.3)
- DefaultsKit (0.2.0)
- DefaultsKit (0.3.2)
- DeviceKit (5.5.0)
- Differentiator (5.0.0)
- DropDown (2.3.13)
- FDFullscreenPopGesture (1.1)
- IQKeyboardManagerSwift (7.1.1)
- Kingfisher (8.0.3)
- IQKeyboardCore (1.0.7)
- IQKeyboardManagerSwift/Core (8.0.0):
- IQKeyboardNotification
- IQTextInputViewNotification
- IQKeyboardManagerSwift/IQKeyboardToolbarManager (8.0.0):
- IQKeyboardManagerSwift/Core
- IQKeyboardToolbarManager
- IQKeyboardNotification (1.0.3)
- IQKeyboardToolbar (1.1.1):
- IQKeyboardCore
- IQKeyboardToolbar/Core (= 1.1.1)
- IQKeyboardToolbar/Core (1.1.1):
- IQKeyboardCore
- IQKeyboardToolbar/Placeholderable
- IQKeyboardToolbar/Placeholderable (1.1.1):
- IQKeyboardCore
- IQKeyboardToolbarManager (1.1.2):
- IQKeyboardToolbar
- IQTextInputViewNotification
- IQTextInputViewNotification (1.0.8):
- IQKeyboardCore
- Kingfisher (8.1.2)
- KVOController (1.2.0)
- Material (3.1.8):
- Material/Core (= 3.1.8)
@ -54,11 +74,11 @@ PODS:
DEPENDENCIES:
- CryptoSwift
- DefaultsKit (from `https://github.com/nmdias/DefaultsKit`)
- DefaultsKit
- DeviceKit
- DropDown
- FDFullscreenPopGesture
- IQKeyboardManagerSwift
- IQKeyboardManagerSwift/IQKeyboardToolbarManager
- Kingfisher
- KVOController
- Material
@ -79,14 +99,20 @@ DEPENDENCIES:
- SwiftyStoreKit
SPEC REPOS:
trunk:
https://github.com/CocoaPods/Specs.git:
- Alamofire
- CryptoSwift
- DefaultsKit
- DeviceKit
- Differentiator
- DropDown
- FDFullscreenPopGesture
- IQKeyboardCore
- IQKeyboardManagerSwift
- IQKeyboardNotification
- IQKeyboardToolbar
- IQKeyboardToolbarManager
- IQTextInputViewNotification
- Kingfisher
- KVOController
- Material
@ -109,29 +135,29 @@ SPEC REPOS:
- SwiftyStoreKit
EXTERNAL SOURCES:
DefaultsKit:
:git: https://github.com/nmdias/DefaultsKit
MercariQRScanner:
:git: https://github.com/Finb/QRScanner
CHECKOUT OPTIONS:
DefaultsKit:
:commit: c51ad1d66c4a84f26330399046b72c76cd39ddfd
:git: https://github.com/nmdias/DefaultsKit
MercariQRScanner:
:commit: 2b123c1b1492adc68f561a5f392727fdc3f31bb0
:git: https://github.com/Finb/QRScanner
SPEC CHECKSUMS:
Alamofire: f36a35757af4587d8e4f4bfa223ad10be2422b8c
Alamofire: 7193b3b92c74a07f85569e1a6c4f4237291e7496
CryptoSwift: 967f37cea5a3294d9cce358f78861652155be483
DefaultsKit: 6c767941b2c3fe34c4d70e300e6c3b80c94964dd
DefaultsKit: ff9b29089d6fc08651b81be2d2387bee6eb98b75
DeviceKit: d83e38ca196a4ebf0cc5f37d6f0316a24b794d5b
Differentiator: e8497ceab83c1b10ca233716d547b9af21b9344d
DropDown: 8a2116376c1981888557f72ec2ffc9a5e0e456ec
FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0
IQKeyboardManagerSwift: d7f3d3a562c237a0e7335e657cd598c452f57f1b
Kingfisher: bbf78af014cc845cf9a799363f627b5212784165
IQKeyboardCore: cb7f0a9a17dd32599569f2f478c1418dc28bcebb
IQKeyboardManagerSwift: 0c6fbbaa2e60739e48d7cf59f25661471a7a3a65
IQKeyboardNotification: d7382c4466c5a5adef92c7452ebf861b36050088
IQKeyboardToolbar: d4bdccfb78324aec2f3920659c77bb89acd33312
IQKeyboardToolbarManager: 6f4072ac620c2572d4af8c09f42a801f3e4909f7
IQTextInputViewNotification: f5e954d8881fd9808b744e49e024cc0d4bcfe572
Kingfisher: dc989619594e24713c83e5a98f89f08850e0c529
KVOController: d72ace34afea42468329623b3379ab3cd1d286b6
Material: a2a3f400a3b549d53ef89e56c58c4535b29db387
MercariQRScanner: cd024685242f78fe40879cca9734bb7bb2fceb93
@ -153,6 +179,6 @@ SPEC CHECKSUMS:
SwiftyJSON: f5b1bf1cd8dd53cd25887ac0eabcfd92301c6a5a
SwiftyStoreKit: 6b9c08810269f030586dac1fae8e75871a82e84a
PODFILE CHECKSUM: c61d77544f2f3b62338f3ccb60fa5e617632a6c0
PODFILE CHECKSUM: 5ff0ad6db7c674915eab257bcc3673bde7360e63
COCOAPODS: 1.16.2

View File

@ -19,7 +19,9 @@ enum MessageListCellDateStyle {
}
class MessageTableViewCellViewModel: ViewModel {
// 使crash
let message: Message
var identity: String
let title: BehaviorRelay<String>
let body: BehaviorRelay<String>
@ -30,7 +32,7 @@ class MessageTableViewCellViewModel: ViewModel {
init(message: Message) {
self.message = message
self.identity = message.id
self.title = BehaviorRelay<String>(value: message.title ?? "")
self.body = BehaviorRelay<String>(value: message.body ?? "")
self.url = BehaviorRelay<String>(value: message.url ?? "")
@ -76,10 +78,6 @@ extension MessageSection: AnimatableSectionModelType {
extension MessageTableViewCellViewModel: IdentifiableType {
typealias Identity = String
var identity: String {
return "\(self.message.id)"
}
override func isEqual(_ object: Any?) -> Bool {
if let obj = object as? MessageTableViewCellViewModel {
// cell12 ...

View File

@ -20,9 +20,17 @@ class NotificationViewController: UIViewController, UNNotificationContentExtensi
return label
}()
/// view
let imageView: UIImageView = {
let view = UIImageView()
view.contentMode = .scaleAspectFit
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
self.view.addSubview(self.noticeLabel)
self.view.addSubview(self.imageView)
self.preferredContentSize = CGSize(width: 0, height: 1)
}
@ -37,6 +45,9 @@ class NotificationViewController: UIViewController, UNNotificationContentExtensi
}
func didReceive(_ notification: UNNotification) {
///
self.ImageHandler(notification)
guard notification.request.content.userInfo["autocopy"] as? String == "1"
|| notification.request.content.userInfo["automaticallycopy"] as? String == "1"
else {
@ -59,7 +70,7 @@ class NotificationViewController: UIViewController, UNNotificationContentExtensi
completion(.dismiss)
}
}
///
func copyAction(_ response: UNNotificationResponse, completionHandler completion: @escaping (UNNotificationContentExtensionResponseOption) -> Void) {
let userInfo = response.notification.request.content.userInfo
@ -73,20 +84,48 @@ class NotificationViewController: UIViewController, UNNotificationContentExtensi
showTips(text: NSLocalizedString("Copy", comment: ""))
completion(.doNotDismiss)
}
///
func muteAction(_ response: UNNotificationResponse, completionHandler completion: @escaping (UNNotificationContentExtensionResponseOption) -> Void) {
let groupName = response.notification.request.content.threadIdentifier
//
GroupMuteSettingManager().settings[groupName] = Date() + 60 * 60
showTips(text: String(format: NSLocalizedString("groupMuted", comment: ""), groupName.isEmpty ? "default" : groupName))
completion(.doNotDismiss)
}
func showTips(text: String) {
self.preferredContentSize = CGSize(width: 0, height: 40)
/// imagelabel
self.preferredContentSize = CGSize(width: 0, height: self.imageView.frame.height + 40)
self.noticeLabel.text = text
self.noticeLabel.frame = CGRect(x: 0, y: 0, width: self.view.bounds.width, height: 40)
/// y
self.noticeLabel.frame = CGRect(x: 0, y: self.imageView.frame.height, width: self.view.bounds.width, height: 40)
}
}
extension NotificationViewController {
///
func ImageHandler(_ notification: UNNotification) {
Task {
guard let imageUrl = notification.request.content.userInfo["image"] as? String,
let imageFileUrl = await ImageDownloader.downloadImage(imageUrl),
let image = UIImage(contentsOfFile: imageFileUrl)
else {
self.imageView.frame = .zero
return
}
///
let viewWidth = view.bounds.size.width
let aspectRatio = image.size.width / image.size.height
let viewHeight = viewWidth / aspectRatio
let size = CGSize(width: viewWidth, height: viewHeight)
DispatchQueue.main.async {
self.preferredContentSize = size
self.imageView.image = image
self.imageView.frame = CGRect(x: 0, y: 0, width: size.width, height: size.height)
}
}
}
}