mirror of
https://github.com/Finb/Bark.git
synced 2025-12-08 21:36:01 +00:00
添加 自动复制推送内容 的示例
This commit is contained in:
parent
4ae5086ef0
commit
0ad860c979
@ -279,7 +279,6 @@
|
|||||||
0661A53C204FDA4100965E4E /* Frameworks */,
|
0661A53C204FDA4100965E4E /* Frameworks */,
|
||||||
0661A53D204FDA4100965E4E /* Resources */,
|
0661A53D204FDA4100965E4E /* Resources */,
|
||||||
CFBB713B64655C7E71F4587A /* [CP] Embed Pods Frameworks */,
|
CFBB713B64655C7E71F4587A /* [CP] Embed Pods Frameworks */,
|
||||||
BDEDA44DC34CE9C81E76AECC /* [CP] Copy Pods Resources */,
|
|
||||||
0632CE2E20EC9098003FDF46 /* Embed App Extensions */,
|
0632CE2E20EC9098003FDF46 /* Embed App Extensions */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
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";
|
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;
|
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 */ = {
|
CFBB713B64655C7E71F4587A /* [CP] Embed Pods Frameworks */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
|
|||||||
@ -43,3 +43,6 @@ InvalidURL = "Invalid URL!";
|
|||||||
urlParameter = "Clicking on the notification will jump \nto this URL in the parameter";
|
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";
|
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";
|
||||||
|
|||||||
@ -43,3 +43,6 @@ InvalidURL = "输入的URL好像不对劲!";
|
|||||||
urlParameter = "携带url参数时,点击推送会跳转到这个URL";
|
urlParameter = "携带url参数时,点击推送会跳转到这个URL";
|
||||||
|
|
||||||
copyParameter = "下拉推送、锁屏界面左滑查看推送时,可以选择复制推送内容\n携带copy参数时,将只复制copy参数的值";
|
copyParameter = "下拉推送、锁屏界面左滑查看推送时,可以选择复制推送内容\n携带copy参数时,将只复制copy参数的值";
|
||||||
|
|
||||||
|
automaticallyCopyTitle = "自动复制推送内容";
|
||||||
|
automaticallyCopy = "收到推送时,自动复制推送内容。\n携带copy参数时,将只复制copy参数的值";
|
||||||
|
|||||||
@ -48,7 +48,12 @@ class HomeViewController: BaseViewController {
|
|||||||
notice: NSLocalizedString("copyParameter"),
|
notice: NSLocalizedString("copyParameter"),
|
||||||
queryParameter: "copy=test",
|
queryParameter: "copy=test",
|
||||||
image: UIImage(named: "copyTest")
|
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 rowheight:[CGFloat] = {
|
||||||
let screenWidth = UIScreen.main.bounds.width
|
let screenWidth = UIScreen.main.bounds.width
|
||||||
if screenWidth <= 320 {
|
if screenWidth <= 320 {
|
||||||
return [170,170,170,320]
|
return [170,170,170,320,170]
|
||||||
}
|
}
|
||||||
if screenWidth <= 375 {
|
if screenWidth <= 375 {
|
||||||
return [205,205,205,380]
|
return [205,205,205,380,205]
|
||||||
}
|
}
|
||||||
if screenWidth <= 414 {
|
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]
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class NotificationService: UNNotificationServiceExtension {
|
|||||||
|
|
||||||
if let bestAttemptContent = bestAttemptContent {
|
if let bestAttemptContent = bestAttemptContent {
|
||||||
let userInfo = bestAttemptContent.userInfo
|
let userInfo = bestAttemptContent.userInfo
|
||||||
if userInfo["AutomaticallyCopy"] as? Bool == true{
|
if userInfo["automaticallyCopy"] as? Bool == true{
|
||||||
if let copy = userInfo["copy"] as? String {
|
if let copy = userInfo["copy"] as? String {
|
||||||
UIPasteboard.general.string = copy
|
UIPasteboard.general.string = copy
|
||||||
}
|
}
|
||||||
|
|||||||
18
Podfile.lock
18
Podfile.lock
@ -36,6 +36,22 @@ DEPENDENCIES:
|
|||||||
- SVProgressHUD
|
- SVProgressHUD
|
||||||
- SwiftyJSON
|
- SwiftyJSON
|
||||||
|
|
||||||
|
SPEC REPOS:
|
||||||
|
https://github.com/cocoapods/specs.git:
|
||||||
|
- Alamofire
|
||||||
|
- DeviceKit
|
||||||
|
- FDFullscreenPopGesture
|
||||||
|
- KVOController
|
||||||
|
- Material
|
||||||
|
- Motion
|
||||||
|
- Moya
|
||||||
|
- ObjectMapper
|
||||||
|
- Result
|
||||||
|
- RxSwift
|
||||||
|
- SnapKit
|
||||||
|
- SVProgressHUD
|
||||||
|
- SwiftyJSON
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
DefaultsKit:
|
DefaultsKit:
|
||||||
:git: https://github.com/nmdias/DefaultsKit
|
:git: https://github.com/nmdias/DefaultsKit
|
||||||
@ -63,4 +79,4 @@ SPEC CHECKSUMS:
|
|||||||
|
|
||||||
PODFILE CHECKSUM: 9fe640283f4a4f35eff4a390df2c42a64be57c18
|
PODFILE CHECKSUM: 9fe640283f4a4f35eff4a390df2c42a64be57c18
|
||||||
|
|
||||||
COCOAPODS: 1.4.0
|
COCOAPODS: 1.5.3
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user