cocoapods-ykutility 0.0.18 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/configPodTemplate/example/CommonFiles/.gitkeep +0 -0
- data/configPodTemplate/example/CommonFiles/CommonFile.swift +9 -0
- data/configPodTemplate/example/NotificationContent/Base.lproj/MainInterface.storyboard +43 -0
- data/configPodTemplate/example/NotificationContent/Info.plist +40 -0
- data/configPodTemplate/example/NotificationContent/NotificationViewController.swift +25 -0
- data/configPodTemplate/example/NotificationService/Info.plist +38 -0
- data/configPodTemplate/example/NotificationService/NotificationService.swift +36 -0
- data/configPodTemplate/example/Podfile +53 -0
- data/configPodTemplate/example/READ.md +76 -0
- data/configPodTemplate/example/README_resource/appExtensionNameDiscussion.png +0 -0
- data/configPodTemplate/example/TargetMain/AppDelegate.swift +32 -0
- data/configPodTemplate/example/TargetMain/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
- data/configPodTemplate/example/TargetMain/Assets.xcassets/AppIcon.appiconset/Contents.json +13 -0
- data/configPodTemplate/example/TargetMain/Assets.xcassets/Contents.json +6 -0
- data/configPodTemplate/example/TargetMain/Base.lproj/LaunchScreen.storyboard +45 -0
- data/configPodTemplate/example/TargetMain/Info.plist +47 -0
- data/configPodTemplate/example/TargetMain/ViewController.swift +29 -0
- data/configPodTemplate/example/TargetMain/ViewController.xib +46 -0
- data/configPodTemplate/example/TargetMain/YKRPC_POD_NAMEEmptyOC.h +16 -0
- data/configPodTemplate/example/TargetMain/YKRPC_POD_NAMEEmptyOC.m +18 -0
- data/configPodTemplate/example/TargetMain/YKRPC_POD_NAME_Example-Bridging-Header.h +4 -0
- data/configPodTemplate/example/config/iOS-config/target-main/Shared.xcconfig +105 -0
- data/configPodTemplate/example/config/iOS-config/target-main/config-custom/Shared.xcconfig +2 -0
- data/configPodTemplate/example/config/iOS-config/target-main/config-custom/debug.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-config/target-main/config-custom/release.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-config/target-main/config-enterprise/Shared.xcconfig +1 -0
- data/configPodTemplate/example/config/iOS-config/target-main/config-enterprise/debug.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-config/target-main/config-enterprise/release.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-config/target-main-Q/Shared.xcconfig +105 -0
- data/configPodTemplate/example/config/iOS-config/target-main-Q/config-custom/Shared.xcconfig +2 -0
- data/configPodTemplate/example/config/iOS-config/target-main-Q/config-custom/debug.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-config/target-main-Q/config-custom/release.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-config/target-main-Q/config-enterprise/Shared.xcconfig +1 -0
- data/configPodTemplate/example/config/iOS-config/target-main-Q/config-enterprise/debug.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-config/target-main-Q/config-enterprise/release.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationContent/Shared.xcconfig +5 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationContent/config-custom/Shared.xcconfig +2 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationContent/config-custom/debug.xcconfig +129 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationContent/config-custom/release.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationContent/config-enterprise/Shared.xcconfig +2 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationContent/config-enterprise/debug.xcconfig +129 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationContent/config-enterprise/release.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationContent-Q/Shared.xcconfig +5 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationContent-Q/config-custom/Shared.xcconfig +2 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationContent-Q/config-custom/debug.xcconfig +129 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationContent-Q/config-custom/release.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationContent-Q/config-enterprise/Shared.xcconfig +2 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationContent-Q/config-enterprise/debug.xcconfig +129 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationContent-Q/config-enterprise/release.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationService/Shared.xcconfig +7 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationService/config-custom/Shared.xcconfig +2 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationService/config-custom/debug.xcconfig +129 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationService/config-custom/release.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationService/config-enterprise/Shared.xcconfig +3 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationService/config-enterprise/debug.xcconfig +129 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationService/config-enterprise/release.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationService-Q/Shared.xcconfig +7 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationService-Q/config-custom/Shared.xcconfig +2 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationService-Q/config-custom/debug.xcconfig +129 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationService-Q/config-custom/release.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationService-Q/config-enterprise/Shared.xcconfig +3 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationService-Q/config-enterprise/debug.xcconfig +129 -0
- data/configPodTemplate/example/config/iOS-config/target-notificationService-Q/config-enterprise/release.xcconfig +9 -0
- data/configPodTemplate/example/config/iOS-targets-Q.yml +137 -0
- data/configPodTemplate/example/config/iOS-targets.yml +135 -0
- data/configPodTemplate/example/config/project-config/Shared.xcconfig +470 -0
- data/configPodTemplate/example/config/project-config/config-custom/Shared.xcconfig +8 -0
- data/configPodTemplate/example/config/project-config/config-custom/debug.xcconfig +127 -0
- data/configPodTemplate/example/config/project-config/config-custom/release.xcconfig +60 -0
- data/configPodTemplate/example/config/project-config/config-enterprise/Shared.xcconfig +20 -0
- data/configPodTemplate/example/config/project-config/config-enterprise/debug.xcconfig +127 -0
- data/configPodTemplate/example/config/project-config/config-enterprise/release.xcconfig +59 -0
- data/configPodTemplate/example/project.yml +37 -0
- data/configPodTemplate/objc/LICENSE +19 -0
- data/configPodTemplate/objc/README.md +60 -0
- data/configPodTemplate/objc/YKRPC_POD_NAME/Assets/Images.xcassets/.gitkeep +0 -0
- data/configPodTemplate/objc/YKRPC_POD_NAME/Private/.gitkeep +0 -0
- data/configPodTemplate/objc/YKRPC_POD_NAME/Public/YKRPC_POD_NAME.h +16 -0
- data/configPodTemplate/objc/YKRPC_POD_NAME/Public/YKRPC_POD_NAME.m +12 -0
- data/configPodTemplate/objc/YKRPC_POD_NAME.podspec +62 -0
- data/configPodTemplate/register/objc/YKRPC_POD_NAME/Private/Register/YKRPC_POD_NAMERegisterRouter.h +16 -0
- data/configPodTemplate/register/objc/YKRPC_POD_NAME/Private/Register/YKRPC_POD_NAMERegisterRouter.m +27 -0
- data/configPodTemplate/register/objc/YKRPC_POD_NAME/Private/Register/YKRPC_POD_NAMERegisterService.h +15 -0
- data/configPodTemplate/register/objc/YKRPC_POD_NAME/Private/Register/YKRPC_POD_NAMERegisterService.m +27 -0
- data/configPodTemplate/register/swift/YKRPC_POD_NAME/Private/.gitkeep +0 -0
- data/configPodTemplate/register/swift/YKRPC_POD_NAME/Private/register/YKRPC_POD_NAMERegisterRouter.swift +19 -0
- data/configPodTemplate/register/swift/YKRPC_POD_NAME/Private/register/YKRPC_POD_NAMERegisterService.swift +20 -0
- data/configPodTemplate/swift/LICENSE +19 -0
- data/configPodTemplate/swift/README.md +60 -0
- data/configPodTemplate/swift/YKRPC_POD_NAME/Assets/Images.xcassets/.gitkeep +0 -0
- data/configPodTemplate/swift/YKRPC_POD_NAME/Private/.gitkeep +0 -0
- data/configPodTemplate/swift/YKRPC_POD_NAME/Public/YKRPC_POD_NAME.swift +6 -0
- data/configPodTemplate/swift/YKRPC_POD_NAME.podspec +61 -0
- data/lib/cocoapods-ykutility/command/Ykutility.rb +1 -0
- data/lib/cocoapods-ykutility/command/create/yk_create_pod_action.rb +7 -7
- data/lib/cocoapods-ykutility/command/create/yk_exchange_tool.rb +1 -0
- data/lib/cocoapods-ykutility/command/gen/yk_gen_create_action.rb +162 -0
- data/lib/cocoapods-ykutility/command/gen.rb +74 -0
- data/lib/cocoapods-ykutility/gem_version.rb +4 -1
- data/podTemplate/example/Podfile +1 -1
- data/podTemplate/example/YKRPC_POD_NAME_Example/AppDelegate.swift +1 -1
- data/podTemplate/example/YKRPC_POD_NAME_Example/Base.lproj/LaunchScreen.storyboard +1 -1
- data/podTemplate/example/YKRPC_POD_NAME_Example/Base.lproj/Main.storyboard +1 -1
- data/podTemplate/example/YKRPC_POD_NAME_Example/SceneDelegate.swift +1 -1
- data/podTemplate/example/YKRPC_POD_NAME_Example/ViewController.swift +1 -1
- data/podTemplate/example/YKRPC_POD_NAME_Example.xcodeproj/project.pbxproj +1 -1
- data/podTemplate/objc/LICENSE +1 -1
- data/podTemplate/objc/README.md +4 -4
- data/podTemplate/objc/YKRPC_POD_NAME/Public/YKRPC_POD_NAME.h +1 -1
- data/podTemplate/objc/YKRPC_POD_NAME/Public/YKRPC_POD_NAME.m +1 -1
- data/podTemplate/objc/YKRPC_POD_NAME.podspec +3 -3
- data/podTemplate/register/objc/YKRPC_POD_NAME/Private/Register/YKRPC_POD_NAMERegisterRouter.h +1 -1
- data/podTemplate/register/objc/YKRPC_POD_NAME/Private/Register/YKRPC_POD_NAMERegisterRouter.m +1 -1
- data/podTemplate/register/objc/YKRPC_POD_NAME/Private/Register/YKRPC_POD_NAMERegisterService.h +1 -1
- data/podTemplate/register/objc/YKRPC_POD_NAME/Private/Register/YKRPC_POD_NAMERegisterService.m +1 -1
- data/podTemplate/register/swift/YKRPC_POD_NAME/Private/register/YKRPC_POD_NAMERegisterRouter.swift +1 -1
- data/podTemplate/register/swift/YKRPC_POD_NAME/Private/register/YKRPC_POD_NAMERegisterService.swift +1 -1
- data/podTemplate/swift/README.md +4 -4
- data/podTemplate/swift/YKRPC_POD_NAME/Public/YKRPC_POD_NAME.swift +1 -1
- data/podTemplate/swift/YKRPC_POD_NAME.podspec +3 -3
- metadata +98 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7114b64d4acebb4f8a0aa2cb3bee8309514aaefc35827ab61e20945ab0b691a
|
4
|
+
data.tar.gz: cff7aa3b1ff8cc2a56f688d1d0eaab2560b0b74e0b71b4a9e960145e59d7f4a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f64216f715a19ee764fbfe7cbc032faeb28c5417c79d788e59056f6acccc6de1bff02e341a8aef01ccabe8eef68d16d54551a645b884bc5915b5de32b4a2b808
|
7
|
+
data.tar.gz: fb77de50dc78192b9f706da4d5212d714cc05b01291d12b61d1aaa9e17361e4235693cef9107753905a6848150d24def953da91de0bb7d4a0083765597978773
|
File without changes
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="M4Y-Lb-cyx">
|
3
|
+
<dependencies>
|
4
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
|
5
|
+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
6
|
+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
7
|
+
</dependencies>
|
8
|
+
<scenes>
|
9
|
+
<!--Notification View Controller-->
|
10
|
+
<scene sceneID="cwh-vc-ff4">
|
11
|
+
<objects>
|
12
|
+
<viewController id="M4Y-Lb-cyx" userLabel="Notification View Controller" customClass="NotificationViewController" customModuleProvider="target" sceneMemberID="viewController">
|
13
|
+
<view key="view" contentMode="scaleToFill" simulatedAppContext="notificationCenter" id="S3S-Oj-5AN">
|
14
|
+
<rect key="frame" x="0.0" y="0.0" width="320" height="37"/>
|
15
|
+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
16
|
+
<subviews>
|
17
|
+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="top" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Hello World" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="280" translatesAutoresizingMaskIntoConstraints="NO" id="GcN-lo-r42">
|
18
|
+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
19
|
+
<color key="textColor" xcode11CocoaTouchSystemColor="labelColor" cocoaTouchSystemColor="darkTextColor"/>
|
20
|
+
<nil key="highlightedColor"/>
|
21
|
+
</label>
|
22
|
+
</subviews>
|
23
|
+
<color key="backgroundColor" red="0.45882353186607361" green="0.74901962280273438" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
24
|
+
<constraints>
|
25
|
+
<constraint firstItem="2BE-c3-nQJ" firstAttribute="bottom" secondItem="GcN-lo-r42" secondAttribute="bottom" constant="8" symbolic="YES" id="0Q0-KW-PJ6"/>
|
26
|
+
<constraint firstItem="GcN-lo-r42" firstAttribute="leading" secondItem="2BE-c3-nQJ" secondAttribute="leading" constant="20" symbolic="YES" id="6Vq-gs-PHe"/>
|
27
|
+
<constraint firstItem="2BE-c3-nQJ" firstAttribute="trailing" secondItem="GcN-lo-r42" secondAttribute="trailing" constant="20" symbolic="YES" id="L8K-9R-egU"/>
|
28
|
+
<constraint firstItem="GcN-lo-r42" firstAttribute="top" secondItem="2BE-c3-nQJ" secondAttribute="top" constant="8" symbolic="YES" id="mYS-Cv-VNx"/>
|
29
|
+
</constraints>
|
30
|
+
<viewLayoutGuide key="safeArea" id="2BE-c3-nQJ"/>
|
31
|
+
</view>
|
32
|
+
<extendedEdge key="edgesForExtendedLayout"/>
|
33
|
+
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
34
|
+
<size key="freeformSize" width="320" height="37"/>
|
35
|
+
<connections>
|
36
|
+
<outlet property="label" destination="GcN-lo-r42" id="lpW-cU-7IG"/>
|
37
|
+
</connections>
|
38
|
+
</viewController>
|
39
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="vXp-U4-Rya" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
40
|
+
</objects>
|
41
|
+
</scene>
|
42
|
+
</scenes>
|
43
|
+
</document>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>CFBundlePackageType</key>
|
6
|
+
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
7
|
+
<key>CFBundleVersion</key>
|
8
|
+
<string>$(CURRENT_PROJECT_VERSION)</string>
|
9
|
+
<key>CFBundleExecutable</key>
|
10
|
+
<string>$(EXECUTABLE_NAME)</string>
|
11
|
+
<key>NSHumanReadableCopyright</key>
|
12
|
+
<string></string>
|
13
|
+
<key>CFBundleDevelopmentRegion</key>
|
14
|
+
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
15
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
16
|
+
<string>6.0</string>
|
17
|
+
<key>CFBundleDisplayName</key>
|
18
|
+
<string>$(PRODUCT_DISPLAY_NAME)</string>
|
19
|
+
<key>CFBundleName</key>
|
20
|
+
<string>$(PRODUCT_NAME)</string>
|
21
|
+
<key>CFBundleIdentifier</key>
|
22
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
23
|
+
<key>CFBundleShortVersionString</key>
|
24
|
+
<string>$(MARKETING_VERSION)</string>
|
25
|
+
<key>NSExtension</key>
|
26
|
+
<dict>
|
27
|
+
<key>NSExtensionAttributes</key>
|
28
|
+
<dict>
|
29
|
+
<key>UNNotificationExtensionCategory</key>
|
30
|
+
<string>myNotificationCategory</string>
|
31
|
+
<key>UNNotificationExtensionInitialContentSizeRatio</key>
|
32
|
+
<real>1</real>
|
33
|
+
</dict>
|
34
|
+
<key>NSExtensionMainStoryboard</key>
|
35
|
+
<string>MainInterface</string>
|
36
|
+
<key>NSExtensionPointIdentifier</key>
|
37
|
+
<string>com.apple.usernotifications.content-extension</string>
|
38
|
+
</dict>
|
39
|
+
</dict>
|
40
|
+
</plist>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
//
|
2
|
+
// NotificationViewController.swift
|
3
|
+
// NotificationContent
|
4
|
+
//
|
5
|
+
// Created by YKRPC_AUTHOR_NAME on YKRPC_CREATE_DATE.
|
6
|
+
//
|
7
|
+
|
8
|
+
import UIKit
|
9
|
+
import UserNotifications
|
10
|
+
import UserNotificationsUI
|
11
|
+
|
12
|
+
class NotificationViewController: UIViewController, UNNotificationContentExtension {
|
13
|
+
|
14
|
+
@IBOutlet var label: UILabel?
|
15
|
+
|
16
|
+
override func viewDidLoad() {
|
17
|
+
super.viewDidLoad()
|
18
|
+
// Do any required interface initialization here.
|
19
|
+
}
|
20
|
+
|
21
|
+
func didReceive(_ notification: UNNotification) {
|
22
|
+
self.label?.text = notification.request.content.body
|
23
|
+
}
|
24
|
+
|
25
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>CFBundleShortVersionString</key>
|
6
|
+
<string>$(MARKETING_VERSION)</string>
|
7
|
+
<key>NSHumanReadableCopyright</key>
|
8
|
+
<string>Copyright © 2023 CocoaPods. All rights reserved.</string>
|
9
|
+
<key>CFBundleDevelopmentRegion</key>
|
10
|
+
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
11
|
+
<key>CFBundlePackageType</key>
|
12
|
+
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
13
|
+
<key>CFBundleDisplayName</key>
|
14
|
+
<string>$(PRODUCT_DISPLAY_NAME)</string>
|
15
|
+
<key>NSAppTransportSecurity</key>
|
16
|
+
<dict>
|
17
|
+
<key>NSAllowsArbitraryLoads</key>
|
18
|
+
<true/>
|
19
|
+
</dict>
|
20
|
+
<key>CFBundleExecutable</key>
|
21
|
+
<string>$(EXECUTABLE_NAME)</string>
|
22
|
+
<key>CFBundleVersion</key>
|
23
|
+
<string>$(CURRENT_PROJECT_VERSION)</string>
|
24
|
+
<key>CFBundleName</key>
|
25
|
+
<string>$(PRODUCT_NAME)</string>
|
26
|
+
<key>CFBundleIdentifier</key>
|
27
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
28
|
+
<key>NSExtension</key>
|
29
|
+
<dict>
|
30
|
+
<key>NSExtensionPointIdentifier</key>
|
31
|
+
<string>com.apple.usernotifications.service</string>
|
32
|
+
<key>NSExtensionPrincipalClass</key>
|
33
|
+
<string>$(PRODUCT_MODULE_NAME).NotificationService</string>
|
34
|
+
</dict>
|
35
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
36
|
+
<string>6.0</string>
|
37
|
+
</dict>
|
38
|
+
</plist>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
//
|
2
|
+
// NotificationService.swift
|
3
|
+
//
|
4
|
+
// NotificationService
|
5
|
+
//
|
6
|
+
// Created by YKRPC_AUTHOR_NAME on YKRPC_CREATE_DATE.
|
7
|
+
//
|
8
|
+
|
9
|
+
import UserNotifications
|
10
|
+
|
11
|
+
class NotificationService: UNNotificationServiceExtension {
|
12
|
+
|
13
|
+
var contentHandler: ((UNNotificationContent) -> Void)?
|
14
|
+
var bestAttemptContent: UNMutableNotificationContent?
|
15
|
+
|
16
|
+
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
|
17
|
+
self.contentHandler = contentHandler
|
18
|
+
bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
|
19
|
+
|
20
|
+
if let bestAttemptContent = bestAttemptContent {
|
21
|
+
// Modify the notification content here...
|
22
|
+
bestAttemptContent.title = "\(bestAttemptContent.title) [modified]"
|
23
|
+
|
24
|
+
contentHandler(bestAttemptContent)
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
override func serviceExtensionTimeWillExpire() {
|
29
|
+
// Called just before the extension will be terminated by the system.
|
30
|
+
// Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used.
|
31
|
+
if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent {
|
32
|
+
contentHandler(bestAttemptContent)
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
#私有源
|
2
|
+
# source 'xxxxx'
|
3
|
+
|
4
|
+
#cocoapods源 最后声明, 可以解决私有源pod 与 公共源pod 重名的问题
|
5
|
+
source 'https://github.com/CocoaPods/Specs.git'
|
6
|
+
|
7
|
+
# Uncomment the next line to define a global platform for your project
|
8
|
+
platform :ios, '9.0'
|
9
|
+
|
10
|
+
inhibit_all_warnings!
|
11
|
+
|
12
|
+
use_frameworks! :linkage => :static # 使用 framework形势的静态库, 注释可变为.a 静态库
|
13
|
+
use_modular_headers! #此字段用于pod自动生成 swift module 伞文件
|
14
|
+
|
15
|
+
project 'YKRPC_POD_NAME_Example.xcodeproj'
|
16
|
+
target 'YKRPC_POD_NAME_Example' do
|
17
|
+
# Pods for YKRPC_POD_NAME_Example
|
18
|
+
pod 'YKRPC_POD_NAME', :path => '../'
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
target 'NotificationContent' do
|
23
|
+
# Pods for NotificationContent
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
target 'NotificationService' do
|
28
|
+
# Pods for NotificationService
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
# cocoapods pod install hook
|
33
|
+
post_install do |installer|
|
34
|
+
# 添加创建时候类前缀
|
35
|
+
installer.pods_project.root_object.attributes["CLASSPREFIX"] = "YKRPC_CLASS_PREFIX" # 添加 class prefix
|
36
|
+
# project编辑配置
|
37
|
+
installer.pods_project.build_configurations.each do |config|
|
38
|
+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
|
39
|
+
config.build_settings['CLANG_WARN_DOCUMENTATION_COMMENTS'] = 'NO'
|
40
|
+
end
|
41
|
+
|
42
|
+
# 单个target编辑配置
|
43
|
+
installer.pods_project.targets.each do |target|
|
44
|
+
target.build_configurations.each do |config|
|
45
|
+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0' #修改pod的最低版本
|
46
|
+
|
47
|
+
# 以下是xcode14 忽略 bundle 类型pod签名
|
48
|
+
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
|
49
|
+
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
|
50
|
+
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# YKRPC-POD-NAME
|
2
|
+
|
3
|
+
[![CI Status](https://img.shields.io/travis/author/YKRPC-POD-NAME.svg?style=flat)](https://travis-ci.org/author/YKRPC-POD-NAME )
|
4
|
+
[![Version](https://img.shields.io/cocoapods/v/YKRPC-POD-NAME.svg?style=flat)](https://cocoapods.org/pods/YKRPC-POD-NAME)
|
5
|
+
[![License](https://img.shields.io/cocoapods/l/YKRPC-POD-NAME.svg?style=flat)](https://github.com/author/YKRPC-POD-NAME/blob/701ff106db3caa805f9dab12df7749c03c889c47/LICENSE)
|
6
|
+
[![Platform](https://img.shields.io/cocoapods/p/YKRPC-POD-NAME.svg?style=flat)](https://cocoapods.org/pods/YKRPC-POD-NAME)
|
7
|
+
|
8
|
+
## 摘要
|
9
|
+
|
10
|
+
YKRPC-POD-NAME 组件主要用于:
|
11
|
+
|
12
|
+
- 1
|
13
|
+
- 2
|
14
|
+
|
15
|
+
## 集成
|
16
|
+
|
17
|
+
```shell
|
18
|
+
pod 'YKRPC-POD-NAME', '~> x.x.x'
|
19
|
+
```
|
20
|
+
|
21
|
+
## 调用
|
22
|
+
|
23
|
+
### 引用
|
24
|
+
|
25
|
+
- objc
|
26
|
+
|
27
|
+
```objc
|
28
|
+
#import <YKRPC-POD-NAME/YKRPC-POD-NAME-Swift.h>
|
29
|
+
```
|
30
|
+
|
31
|
+
- swift
|
32
|
+
|
33
|
+
```swift
|
34
|
+
import YKRPC-POD-NAME
|
35
|
+
```
|
36
|
+
|
37
|
+
### 调用接口
|
38
|
+
|
39
|
+
- objc
|
40
|
+
```objc
|
41
|
+
//objc 代码
|
42
|
+
```
|
43
|
+
|
44
|
+
- swift
|
45
|
+
|
46
|
+
```swift
|
47
|
+
//siwft 代码
|
48
|
+
```
|
49
|
+
|
50
|
+
## 警告⚠️
|
51
|
+
|
52
|
+
- 本工程依赖使用xcodegen + xcconfig来管理配置
|
53
|
+
- 本工程配置了多套config用于对应不一样的target, 这样才能适配于cocoapods 做的组件化开发
|
54
|
+
- target 配套对应的config,才能编译正确的包
|
55
|
+
- 由于xcode的问题,app extension不能定义不同的product name
|
56
|
+
|
57
|
+
原因如下:
|
58
|
+
- 工程默认会不勾选 copy only when installing
|
59
|
+
- build的时候,会执行 copy appextension动作
|
60
|
+
- 这里 .appex 的名字在各个config中必须统一,否则会在 copy app extension动作时候,报找不到file的错误。
|
61
|
+
|
62
|
+
如图:
|
63
|
+
![](README_resource/appExtensionNameDiscussion.png)
|
64
|
+
|
65
|
+
## 历史版本
|
66
|
+
|
67
|
+
- [1.0.0](http://github/author/YKRPC-POD-NAME/tag/1.0.0)
|
68
|
+
|
69
|
+
- 初始化版本
|
70
|
+
- 提供: xxx, xxx 功能
|
71
|
+
|
72
|
+
- [1.0.1](http://github/author/YKRPC-POD-NAME/tag/1.0.1)
|
73
|
+
|
74
|
+
- 修复
|
75
|
+
- 提供: xxx, xxx 功能
|
76
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
//
|
2
|
+
// AppDelegate.swift
|
3
|
+
// YKRPC_POD_NAME_Example
|
4
|
+
//
|
5
|
+
// Created by YKRPC_AUTHOR_NAME on YKRPC_CREATE_DATE.
|
6
|
+
//
|
7
|
+
|
8
|
+
import UIKit
|
9
|
+
|
10
|
+
@main
|
11
|
+
class AppDelegate: UIResponder, UIApplicationDelegate {
|
12
|
+
var window: UIWindow?
|
13
|
+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
14
|
+
let win = UIWindow.init(frame: UIScreen.main.bounds)
|
15
|
+
win.backgroundColor = UIColor.white
|
16
|
+
self.window = win
|
17
|
+
|
18
|
+
|
19
|
+
let tab = UITabBarController()
|
20
|
+
var arr: [UIViewController] = [UIViewController]()
|
21
|
+
do{
|
22
|
+
let nav = UINavigationController.init(rootViewController: ViewController())
|
23
|
+
arr.append(nav)
|
24
|
+
}
|
25
|
+
|
26
|
+
tab.viewControllers = arr
|
27
|
+
win.rootViewController = tab
|
28
|
+
win.makeKeyAndVisible()
|
29
|
+
return true
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
3
|
+
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
4
|
+
<dependencies>
|
5
|
+
<deployment identifier="iOS"/>
|
6
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
|
7
|
+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
8
|
+
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
9
|
+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
10
|
+
</dependencies>
|
11
|
+
<scenes>
|
12
|
+
<!--View Controller-->
|
13
|
+
<scene sceneID="EHf-IW-A2E">
|
14
|
+
<objects>
|
15
|
+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
16
|
+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
17
|
+
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
18
|
+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
19
|
+
<subviews>
|
20
|
+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="This Launch screen" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ube-mI-vCO">
|
21
|
+
<rect key="frame" x="122" y="415.66666666666669" width="149" height="21"/>
|
22
|
+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
23
|
+
<nil key="textColor"/>
|
24
|
+
<nil key="highlightedColor"/>
|
25
|
+
</label>
|
26
|
+
</subviews>
|
27
|
+
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
28
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
29
|
+
<constraints>
|
30
|
+
<constraint firstItem="ube-mI-vCO" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="HAN-bK-tQQ"/>
|
31
|
+
<constraint firstItem="ube-mI-vCO" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="rj2-U9-XRw"/>
|
32
|
+
</constraints>
|
33
|
+
</view>
|
34
|
+
</viewController>
|
35
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
36
|
+
</objects>
|
37
|
+
<point key="canvasLocation" x="53" y="375"/>
|
38
|
+
</scene>
|
39
|
+
</scenes>
|
40
|
+
<resources>
|
41
|
+
<systemColor name="systemBackgroundColor">
|
42
|
+
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
43
|
+
</systemColor>
|
44
|
+
</resources>
|
45
|
+
</document>
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>CFBundleDisplayName</key>
|
6
|
+
<string>$(PRODUCT_DISPLAY_NAME)</string>
|
7
|
+
<key>CFBundleDevelopmentRegion</key>
|
8
|
+
<string>zh</string>
|
9
|
+
<key>CFBundleExecutable</key>
|
10
|
+
<string>$(EXECUTABLE_NAME)</string>
|
11
|
+
<key>CFBundleIdentifier</key>
|
12
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
13
|
+
<key>CFBundleName</key>
|
14
|
+
<string>$(PRODUCT_NAME)</string>
|
15
|
+
<key>CFBundlePackageType</key>
|
16
|
+
<string>APPL</string>
|
17
|
+
<key>CFBundleShortVersionString</key>
|
18
|
+
<string>${MARKETING_VERSION}</string>
|
19
|
+
<key>CFBundleSignature</key>
|
20
|
+
<string>????</string>
|
21
|
+
<key>CFBundleVersion</key>
|
22
|
+
<string>${CURRENT_PROJECT_VERSION}</string>
|
23
|
+
<key>LSApplicationCategoryType</key>
|
24
|
+
<string></string>
|
25
|
+
<key>LSRequiresIPhoneOS</key>
|
26
|
+
<true/>
|
27
|
+
<key>NSAppTransportSecurity</key>
|
28
|
+
<dict>
|
29
|
+
<key>NSAllowsArbitraryLoads</key>
|
30
|
+
<true/>
|
31
|
+
</dict>
|
32
|
+
<key>UILaunchStoryboardName</key>
|
33
|
+
<string>LaunchScreen.storyboard</string>
|
34
|
+
<key>UIRequiredDeviceCapabilities</key>
|
35
|
+
<array>
|
36
|
+
<string>armv7</string>
|
37
|
+
</array>
|
38
|
+
<key>UISupportedInterfaceOrientations</key>
|
39
|
+
<array>
|
40
|
+
<string>UIInterfaceOrientationPortrait</string>
|
41
|
+
</array>
|
42
|
+
<key>UIUserInterfaceStyle</key>
|
43
|
+
<string>Light</string>
|
44
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
45
|
+
<string>6.0</string>
|
46
|
+
</dict>
|
47
|
+
</plist>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
//
|
2
|
+
// ViewController.swift
|
3
|
+
// YKRPC_POD_NAME_Example
|
4
|
+
//
|
5
|
+
// Created by YKRPC_AUTHOR_NAME on YKRPC_CREATE_DATE.
|
6
|
+
//
|
7
|
+
|
8
|
+
import UIKit
|
9
|
+
|
10
|
+
class ViewController: UIViewController {
|
11
|
+
|
12
|
+
override func viewDidLoad() {
|
13
|
+
super.viewDidLoad()
|
14
|
+
|
15
|
+
// Do any additional setup after loading the view.
|
16
|
+
}
|
17
|
+
|
18
|
+
|
19
|
+
/*
|
20
|
+
// MARK: - Navigation
|
21
|
+
|
22
|
+
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
23
|
+
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
24
|
+
// Get the new view controller using segue.destination.
|
25
|
+
// Pass the selected object to the new view controller.
|
26
|
+
}
|
27
|
+
*/
|
28
|
+
|
29
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22155" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
3
|
+
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
4
|
+
<dependencies>
|
5
|
+
<deployment identifier="iOS"/>
|
6
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22131"/>
|
7
|
+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
8
|
+
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
9
|
+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
10
|
+
</dependencies>
|
11
|
+
<objects>
|
12
|
+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ViewController" customModule="YKRPC_POD_NAME_Enterprise" customModuleProvider="target">
|
13
|
+
<connections>
|
14
|
+
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
15
|
+
</connections>
|
16
|
+
</placeholder>
|
17
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
18
|
+
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
19
|
+
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
20
|
+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
21
|
+
<subviews>
|
22
|
+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="l32-fV-SgD">
|
23
|
+
<rect key="frame" x="159" y="408.66666666666669" width="75" height="35"/>
|
24
|
+
<constraints>
|
25
|
+
<constraint firstAttribute="height" constant="35" id="Oi8-Qc-YmI"/>
|
26
|
+
<constraint firstAttribute="width" constant="75" id="Szu-jr-ctA"/>
|
27
|
+
</constraints>
|
28
|
+
<state key="normal" title="Button"/>
|
29
|
+
<buttonConfiguration key="configuration" style="plain" title="Button"/>
|
30
|
+
</button>
|
31
|
+
</subviews>
|
32
|
+
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
|
33
|
+
<color key="backgroundColor" systemColor="systemMintColor"/>
|
34
|
+
<constraints>
|
35
|
+
<constraint firstItem="l32-fV-SgD" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="5Sk-z1-1gf"/>
|
36
|
+
<constraint firstItem="l32-fV-SgD" firstAttribute="centerY" secondItem="i5M-Pr-FkT" secondAttribute="centerY" id="SWi-nS-lBd"/>
|
37
|
+
</constraints>
|
38
|
+
<point key="canvasLocation" x="115" y="-11"/>
|
39
|
+
</view>
|
40
|
+
</objects>
|
41
|
+
<resources>
|
42
|
+
<systemColor name="systemMintColor">
|
43
|
+
<color red="0.0" green="0.7803921568627451" blue="0.74509803921568629" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
44
|
+
</systemColor>
|
45
|
+
</resources>
|
46
|
+
</document>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
//
|
2
|
+
// YKRPC_POD_NAMEEmptyOC.h
|
3
|
+
// YKRPC_POD_NAME_Example
|
4
|
+
//
|
5
|
+
// Created by YKRPC_AUTHOR_NAME on YKRPC_CREATE_DATE.
|
6
|
+
//
|
7
|
+
|
8
|
+
#import <Foundation/Foundation.h>
|
9
|
+
|
10
|
+
NS_ASSUME_NONNULL_BEGIN
|
11
|
+
|
12
|
+
@interface YKRPC_POD_NAMEEmptyOC : NSObject
|
13
|
+
|
14
|
+
@end
|
15
|
+
|
16
|
+
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,18 @@
|
|
1
|
+
//
|
2
|
+
// YKRPC_POD_NAMEEmptyOC.m
|
3
|
+
// YKRPC_POD_NAME_Example
|
4
|
+
//
|
5
|
+
// Created by YKRPC_AUTHOR_NAME on YKRPC_CREATE_DATE.
|
6
|
+
//
|
7
|
+
|
8
|
+
#import "YKRPC_POD_NAMEEmptyOC.h"
|
9
|
+
|
10
|
+
@implementation YKRPC_POD_NAMEEmptyOC
|
11
|
+
+ (void)load {
|
12
|
+
#ifdef kENTERPRISE
|
13
|
+
NSLog(@"has kEnterprise:%d", kENTERPRISE);
|
14
|
+
#else
|
15
|
+
NSLog(@"no kEnterprise");
|
16
|
+
#endif
|
17
|
+
}
|
18
|
+
@end
|