diff --git a/Bark.xcodeproj/project.pbxproj b/Bark.xcodeproj/project.pbxproj index 2855a44..19df7b3 100644 --- a/Bark.xcodeproj/project.pbxproj +++ b/Bark.xcodeproj/project.pbxproj @@ -279,7 +279,6 @@ 0661A53C204FDA4100965E4E /* Frameworks */, 0661A53D204FDA4100965E4E /* Resources */, CFBB713B64655C7E71F4587A /* [CP] Embed Pods Frameworks */, - BDEDA44DC34CE9C81E76AECC /* [CP] Copy Pods Resources */, 0632CE2E20EC9098003FDF46 /* Embed App Extensions */, ); buildRules = ( @@ -409,21 +408,6 @@ 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; }; - BDEDA44DC34CE9C81E76AECC /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Bark/Pods-Bark-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; CFBB713B64655C7E71F4587A /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/Bark/en.lproj/Localizable.strings b/Bark/en.lproj/Localizable.strings index 80ebf4f..6564d80 100644 --- a/Bark/en.lproj/Localizable.strings +++ b/Bark/en.lproj/Localizable.strings @@ -43,3 +43,6 @@ InvalidURL = "Invalid URL!"; urlParameter = "Clicking on the notification will jump \nto this URL in the parameter"; copyParameter = "If the URL has a copy parameter then the value of the copy \nparameter will be copied"; + +automaticallyCopyTitle = "Automatically copy push content"; +automaticallyCopy = "Automatically copy push content \nwhen a push is received"; diff --git a/Bark/zh-Hans.lproj/Localizable.strings b/Bark/zh-Hans.lproj/Localizable.strings index 88730fa..ef3efa4 100644 --- a/Bark/zh-Hans.lproj/Localizable.strings +++ b/Bark/zh-Hans.lproj/Localizable.strings @@ -43,3 +43,6 @@ InvalidURL = "输入的URL好像不对劲!"; urlParameter = "携带url参数时,点击推送会跳转到这个URL"; copyParameter = "下拉推送、锁屏界面左滑查看推送时,可以选择复制推送内容\n携带copy参数时,将只复制copy参数的值"; + +automaticallyCopyTitle = "自动复制推送内容"; +automaticallyCopy = "收到推送时,自动复制推送内容。\n携带copy参数时,将只复制copy参数的值"; diff --git a/Controller/HomeViewController.swift b/Controller/HomeViewController.swift index 7e3edc6..115fdd0 100644 --- a/Controller/HomeViewController.swift +++ b/Controller/HomeViewController.swift @@ -48,7 +48,12 @@ class HomeViewController: BaseViewController { notice: NSLocalizedString("copyParameter"), queryParameter: "copy=test", image: UIImage(named: "copyTest") - ) + ), + PreviewModel( + body: NSLocalizedString("automaticallyCopyTitle"), + notice: NSLocalizedString("automaticallyCopy"), + queryParameter: "automaticallyCopy=1©=optional" + ) ] }() @@ -113,15 +118,15 @@ class HomeViewController: BaseViewController { let rowheight:[CGFloat] = { let screenWidth = UIScreen.main.bounds.width if screenWidth <= 320 { - return [170,170,170,320] + return [170,170,170,320,170] } if screenWidth <= 375 { - return [205,205,205,380] + return [205,205,205,380,205] } if screenWidth <= 414 { - return [195,195,195,390] + return [195,195,195,390,195] } - return [205,205,205,380] + return [205,205,205,380,205] }() } diff --git a/NotificationServiceExtension/NotificationService.swift b/NotificationServiceExtension/NotificationService.swift index 0871dcf..335fc9b 100644 --- a/NotificationServiceExtension/NotificationService.swift +++ b/NotificationServiceExtension/NotificationService.swift @@ -20,7 +20,7 @@ class NotificationService: UNNotificationServiceExtension { if let bestAttemptContent = bestAttemptContent { let userInfo = bestAttemptContent.userInfo - if userInfo["AutomaticallyCopy"] as? Bool == true{ + if userInfo["automaticallyCopy"] as? Bool == true{ if let copy = userInfo["copy"] as? String { UIPasteboard.general.string = copy } diff --git a/Podfile.lock b/Podfile.lock index 6fa4f8d..9541be0 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -36,6 +36,22 @@ DEPENDENCIES: - SVProgressHUD - SwiftyJSON +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - Alamofire + - DeviceKit + - FDFullscreenPopGesture + - KVOController + - Material + - Motion + - Moya + - ObjectMapper + - Result + - RxSwift + - SnapKit + - SVProgressHUD + - SwiftyJSON + EXTERNAL SOURCES: DefaultsKit: :git: https://github.com/nmdias/DefaultsKit @@ -63,4 +79,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 9fe640283f4a4f35eff4a390df2c42a64be57c18 -COCOAPODS: 1.4.0 +COCOAPODS: 1.5.3