This commit is contained in:
Fin 2020-05-25 16:32:42 +08:00
parent 8ae3b29bd5
commit a5ea350b2e
11 changed files with 181 additions and 65 deletions

View File

@ -33,9 +33,12 @@
0661A54A204FDA4100965E4E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0661A549204FDA4100965E4E /* Assets.xcassets */; }; 0661A54A204FDA4100965E4E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0661A549204FDA4100965E4E /* Assets.xcassets */; };
0661A54D204FDA4100965E4E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0661A54B204FDA4100965E4E /* LaunchScreen.storyboard */; }; 0661A54D204FDA4100965E4E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0661A54B204FDA4100965E4E /* LaunchScreen.storyboard */; };
06802E5320ECC40C00767047 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0661A549204FDA4100965E4E /* Assets.xcassets */; }; 06802E5320ECC40C00767047 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0661A549204FDA4100965E4E /* Assets.xcassets */; };
06B1158D247BA6D5006D91FB /* CloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 06B1158C247BA6D5006D91FB /* CloudKit.framework */; };
06B1158F247BB1FB006D91FB /* Message.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06B1158E247BB1FB006D91FB /* Message.swift */; };
06CF784721C7A50300A052D7 /* NotificationServiceExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 06CF784021C7A50300A052D7 /* NotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 06CF784721C7A50300A052D7 /* NotificationServiceExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 06CF784021C7A50300A052D7 /* NotificationServiceExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
06CF784C21C7A51200A052D7 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06CF784B21C7A51200A052D7 /* NotificationService.swift */; }; 06CF784C21C7A51200A052D7 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06CF784B21C7A51200A052D7 /* NotificationService.swift */; };
6AF9CC9B5F6CD2BF86509897 /* libPods-Bark.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4EA0C04469BF7B418FF3CB7 /* libPods-Bark.a */; }; 6AF9CC9B5F6CD2BF86509897 /* libPods-Bark.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4EA0C04469BF7B418FF3CB7 /* libPods-Bark.a */; };
ACC117FABC6F8E44060B8D80 /* libPods-NotificationServiceExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A24A28EB12CA35B953807C99 /* libPods-NotificationServiceExtension.a */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */ /* Begin PBXContainerItemProxy section */
@ -100,12 +103,17 @@
0683486A2050F1310024B6DA /* Bark.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Bark.entitlements; sourceTree = "<group>"; }; 0683486A2050F1310024B6DA /* Bark.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Bark.entitlements; sourceTree = "<group>"; };
0683487020510FB20024B6DA /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; }; 0683487020510FB20024B6DA /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; };
0683487220510FB20024B6DA /* UserNotificationsUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotificationsUI.framework; path = System/Library/Frameworks/UserNotificationsUI.framework; sourceTree = SDKROOT; }; 0683487220510FB20024B6DA /* UserNotificationsUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotificationsUI.framework; path = System/Library/Frameworks/UserNotificationsUI.framework; sourceTree = SDKROOT; };
06B1158C247BA6D5006D91FB /* CloudKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CloudKit.framework; path = System/Library/Frameworks/CloudKit.framework; sourceTree = SDKROOT; };
06B1158E247BB1FB006D91FB /* Message.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Message.swift; sourceTree = "<group>"; };
06CF784021C7A50300A052D7 /* NotificationServiceExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = NotificationServiceExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 06CF784021C7A50300A052D7 /* NotificationServiceExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = NotificationServiceExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
06CF784421C7A50300A052D7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 06CF784421C7A50300A052D7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
06CF784B21C7A51200A052D7 /* NotificationService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = "<group>"; }; 06CF784B21C7A51200A052D7 /* NotificationService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = "<group>"; };
08AEA046D1FD0D7950208796 /* Pods-NotificationServiceExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationServiceExtension.debug.xcconfig"; path = "Pods/Target Support Files/Pods-NotificationServiceExtension/Pods-NotificationServiceExtension.debug.xcconfig"; sourceTree = "<group>"; };
14F0F73EC45A35FC2482F967 /* Pods_NotificationContentExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NotificationContentExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 14F0F73EC45A35FC2482F967 /* Pods_NotificationContentExtension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NotificationContentExtension.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1CC985CE300A858FF65E166A /* Pods-Bark.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Bark.release.xcconfig"; path = "Pods/Target Support Files/Pods-Bark/Pods-Bark.release.xcconfig"; sourceTree = "<group>"; }; 1CC985CE300A858FF65E166A /* Pods-Bark.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Bark.release.xcconfig"; path = "Pods/Target Support Files/Pods-Bark/Pods-Bark.release.xcconfig"; sourceTree = "<group>"; };
68049930BAF79AFBD8B109B8 /* Pods-NotificationServiceExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationServiceExtension.release.xcconfig"; path = "Pods/Target Support Files/Pods-NotificationServiceExtension/Pods-NotificationServiceExtension.release.xcconfig"; sourceTree = "<group>"; };
87D1222A4C6E7283974A44C6 /* Pods-Bark.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Bark.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Bark/Pods-Bark.debug.xcconfig"; sourceTree = "<group>"; }; 87D1222A4C6E7283974A44C6 /* Pods-Bark.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Bark.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Bark/Pods-Bark.debug.xcconfig"; sourceTree = "<group>"; };
A24A28EB12CA35B953807C99 /* libPods-NotificationServiceExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NotificationServiceExtension.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E4EA0C04469BF7B418FF3CB7 /* libPods-Bark.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Bark.a"; sourceTree = BUILT_PRODUCTS_DIR; }; E4EA0C04469BF7B418FF3CB7 /* libPods-Bark.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Bark.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */ /* End PBXFileReference section */
@ -124,6 +132,7 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
6AF9CC9B5F6CD2BF86509897 /* libPods-Bark.a in Frameworks */, 6AF9CC9B5F6CD2BF86509897 /* libPods-Bark.a in Frameworks */,
06B1158D247BA6D5006D91FB /* CloudKit.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -131,6 +140,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
ACC117FABC6F8E44060B8D80 /* libPods-NotificationServiceExtension.a in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
@ -169,6 +179,7 @@
0637FA7920E092B300E80174 /* Observable+Extension.swift */, 0637FA7920E092B300E80174 /* Observable+Extension.swift */,
0637FA7B20E0930E00E80174 /* BarkApi.swift */, 0637FA7B20E0930E00E80174 /* BarkApi.swift */,
0637FA7D20E0969800E80174 /* Client.swift */, 0637FA7D20E0969800E80174 /* Client.swift */,
06B1158E247BB1FB006D91FB /* Message.swift */,
); );
path = Model; path = Model;
sourceTree = "<group>"; sourceTree = "<group>";
@ -235,6 +246,8 @@
children = ( children = (
87D1222A4C6E7283974A44C6 /* Pods-Bark.debug.xcconfig */, 87D1222A4C6E7283974A44C6 /* Pods-Bark.debug.xcconfig */,
1CC985CE300A858FF65E166A /* Pods-Bark.release.xcconfig */, 1CC985CE300A858FF65E166A /* Pods-Bark.release.xcconfig */,
08AEA046D1FD0D7950208796 /* Pods-NotificationServiceExtension.debug.xcconfig */,
68049930BAF79AFBD8B109B8 /* Pods-NotificationServiceExtension.release.xcconfig */,
); );
name = Pods; name = Pods;
sourceTree = "<group>"; sourceTree = "<group>";
@ -242,10 +255,12 @@
99BD309BDB7F62B5DC0CECE1 /* Frameworks */ = { 99BD309BDB7F62B5DC0CECE1 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
06B1158C247BA6D5006D91FB /* CloudKit.framework */,
0683487020510FB20024B6DA /* UserNotifications.framework */, 0683487020510FB20024B6DA /* UserNotifications.framework */,
0683487220510FB20024B6DA /* UserNotificationsUI.framework */, 0683487220510FB20024B6DA /* UserNotificationsUI.framework */,
14F0F73EC45A35FC2482F967 /* Pods_NotificationContentExtension.framework */, 14F0F73EC45A35FC2482F967 /* Pods_NotificationContentExtension.framework */,
E4EA0C04469BF7B418FF3CB7 /* libPods-Bark.a */, E4EA0C04469BF7B418FF3CB7 /* libPods-Bark.a */,
A24A28EB12CA35B953807C99 /* libPods-NotificationServiceExtension.a */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
@ -296,6 +311,7 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 06CF784A21C7A50300A052D7 /* Build configuration list for PBXNativeTarget "NotificationServiceExtension" */; buildConfigurationList = 06CF784A21C7A50300A052D7 /* Build configuration list for PBXNativeTarget "NotificationServiceExtension" */;
buildPhases = ( buildPhases = (
800B82E19475CD3E4B36E49D /* [CP] Check Pods Manifest.lock */,
06CF783C21C7A50300A052D7 /* Sources */, 06CF783C21C7A50300A052D7 /* Sources */,
06CF783D21C7A50300A052D7 /* Frameworks */, 06CF783D21C7A50300A052D7 /* Frameworks */,
06CF783E21C7A50300A052D7 /* Resources */, 06CF783E21C7A50300A052D7 /* Resources */,
@ -408,13 +424,33 @@
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;
}; };
A65832AEF7CA9C472EABAB15 /* [CP] Copy Pods Resources */ = { 800B82E19475CD3E4B36E49D /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = ( inputFileListPaths = (
); );
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-NotificationServiceExtension-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;
};
A65832AEF7CA9C472EABAB15 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = ( inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Bark/Pods-Bark-resources.sh", "${PODS_ROOT}/Target Support Files/Pods-Bark/Pods-Bark-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/Material/com.cosmicmind.material.icons.bundle", "${PODS_CONFIGURATION_BUILD_DIR}/Material/com.cosmicmind.material.icons.bundle",
@ -422,8 +458,6 @@
"${PODS_ROOT}/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle", "${PODS_ROOT}/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle",
); );
name = "[CP] Copy Pods Resources"; name = "[CP] Copy Pods Resources";
outputFileListPaths = (
);
outputPaths = ( outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/com.cosmicmind.material.icons.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/com.cosmicmind.material.icons.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/com.cosmicmind.material.fonts.bundle", "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/com.cosmicmind.material.fonts.bundle",
@ -452,6 +486,7 @@
0603706920E1F89500F4CA05 /* PreviewCardCell.swift in Sources */, 0603706920E1F89500F4CA05 /* PreviewCardCell.swift in Sources */,
0637FA8C20E0D7A700E80174 /* BaseViewController.swift in Sources */, 0637FA8C20E0D7A700E80174 /* BaseViewController.swift in Sources */,
0603706D20E23EC000F4CA05 /* BarkSFSafariViewController.swift in Sources */, 0603706D20E23EC000F4CA05 /* BarkSFSafariViewController.swift in Sources */,
06B1158F247BB1FB006D91FB /* Message.swift in Sources */,
0637FA7820E0926D00E80174 /* BarkTargetType.swift in Sources */, 0637FA7820E0926D00E80174 /* BarkTargetType.swift in Sources */,
0637FA7E20E0969800E80174 /* Client.swift in Sources */, 0637FA7E20E0969800E80174 /* Client.swift in Sources */,
0661A545204FDA4100965E4E /* HomeViewController.swift in Sources */, 0661A545204FDA4100965E4E /* HomeViewController.swift in Sources */,
@ -532,7 +567,7 @@
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark.NotificationContentExtension; PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark.NotificationContentExtension;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0; SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1; TARGETED_DEVICE_FAMILY = 1;
}; };
name = Debug; name = Debug;
@ -549,7 +584,7 @@
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark.NotificationContentExtension; PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark.NotificationContentExtension;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0; SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1; TARGETED_DEVICE_FAMILY = 1;
}; };
name = Release; name = Release;
@ -681,7 +716,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark; PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0; SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1; TARGETED_DEVICE_FAMILY = 1;
}; };
name = Debug; name = Debug;
@ -700,13 +735,14 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark; PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0; SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1; TARGETED_DEVICE_FAMILY = 1;
}; };
name = Release; name = Release;
}; };
06CF784821C7A50300A052D7 /* Debug */ = { 06CF784821C7A50300A052D7 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 08AEA046D1FD0D7950208796 /* Pods-NotificationServiceExtension.debug.xcconfig */;
buildSettings = { buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES; CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
@ -719,13 +755,14 @@
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark.NotificationServiceExtension; PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark.NotificationServiceExtension;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2; SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
}; };
name = Debug; name = Debug;
}; };
06CF784921C7A50300A052D7 /* Release */ = { 06CF784921C7A50300A052D7 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 68049930BAF79AFBD8B109B8 /* Pods-NotificationServiceExtension.release.xcconfig */;
buildSettings = { buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES; CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
@ -737,7 +774,7 @@
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark.NotificationServiceExtension; PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark.NotificationServiceExtension;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2; SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
}; };
name = Release; name = Release;

View File

@ -9,13 +9,16 @@
import UIKit import UIKit
import Material import Material
import UserNotifications import UserNotifications
import RealmSwift
import IceCream
@UIApplicationMain @UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate { class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow? var window: UIWindow?
var syncEngine: SyncEngine?
internal func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
self.window = UIWindow(frame: UIScreen.main.bounds) self.window = UIWindow(frame: UIScreen.main.bounds)
self.window?.backgroundColor = Color.grey.lighten5 self.window?.backgroundColor = Color.grey.lighten5
@ -35,6 +38,31 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
} }
} }
} }
let config = Realm.Configuration(
// Set the new schema version. This must be greater than the previously used
// version (if you've never set a schema version before, the version is 0).
schemaVersion: 12,
// Set the block which will be called automatically when opening a Realm with
// a schema version lower than the one set above
migrationBlock: { migration, 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
}
})
// Tell Realm to use this new configuration object for the default Realm
Realm.Configuration.defaultConfiguration = config
//iCloud
syncEngine = SyncEngine(objects: [
SyncObject<Message>()
], databaseScope: .private)
return true return true
} }

View File

@ -4,5 +4,13 @@
<dict> <dict>
<key>aps-environment</key> <key>aps-environment</key>
<string>development</string> <string>development</string>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.me.fin.barkContainer</string>
</array>
<key>com.apple.developer.icloud-services</key>
<array>
<string>CloudKit</string>
</array>
</dict> </dict>
</plist> </plist>

View File

@ -27,6 +27,11 @@
<key>NSAllowsArbitraryLoads</key> <key>NSAllowsArbitraryLoads</key>
<true/> <true/>
</dict> </dict>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key> <key>UILaunchStoryboardName</key>
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key> <key>UIRequiredDeviceCapabilities</key>

View File

@ -28,7 +28,7 @@ class BarkNavigationController: NavigationController{
} }
override var childViewControllerForStatusBarStyle: UIViewController?{ override var childForStatusBarStyle: UIViewController?{
get { get {
return self.topViewController return self.topViewController
} }
@ -36,7 +36,7 @@ class BarkNavigationController: NavigationController{
} }
class BarkSnackbarController: SnackbarController { class BarkSnackbarController: SnackbarController {
override var childViewControllerForStatusBarStyle: UIViewController?{ override var childForStatusBarStyle: UIViewController?{
return self.rootViewController return self.rootViewController
} }
} }

View File

@ -9,7 +9,6 @@
import UIKit import UIKit
import Moya import Moya
import RxSwift import RxSwift
import Result
//Providers //Providers
fileprivate var retainProviders:[String: Any] = [:] fileprivate var retainProviders:[String: Any] = [:]
@ -120,7 +119,7 @@ fileprivate class LogPlugin: PluginType{
} }
func didReceive(_ result: Result<Response, MoyaError>, target: TargetType) { func didReceive(_ result: Result<Response, MoyaError>, target: TargetType) {
print("\n-------------------\n请求结束: \(target.path)") print("\n-------------------\n请求结束: \(target.path)")
if let data = result.value?.data, let resutl = String(data: data, encoding: String.Encoding.utf8) { if let data = try? result.get().data, let resutl = String(data: data, encoding: String.Encoding.utf8) {
print("请求结果: \(resutl)") print("请求结果: \(resutl)")
} }
print("\n") print("\n")

23
Model/Message.swift Normal file
View File

@ -0,0 +1,23 @@
//
// Message.swift
// Bark
//
// Created by huangfeng on 2020/5/25.
// Copyright © 2020 Fin. All rights reserved.
//
import UIKit
import RealmSwift
import IceCream
class Message: Object {
@objc dynamic var id = NSUUID().uuidString
@objc dynamic var title:String?
@objc dynamic var body:String?
@objc dynamic var createDate:Date?
// true IceCream
@objc dynamic var isDeleted = false
}
extension Message: CKRecordConvertible {}
extension Message: CKRecordRecoverable {}

View File

@ -8,7 +8,7 @@
import UIKit import UIKit
import UserNotifications import UserNotifications
import RealmSwift
class NotificationService: UNNotificationServiceExtension { class NotificationService: UNNotificationServiceExtension {
var contentHandler: ((UNNotificationContent) -> Void)? var contentHandler: ((UNNotificationContent) -> Void)?

View File

@ -1,4 +1,4 @@
platform:ios,'9.0' platform:ios,'10.0'
inhibit_all_warnings! inhibit_all_warnings!
use_modular_headers! use_modular_headers!
@ -13,8 +13,14 @@ def pods
pod 'SwiftyJSON' pod 'SwiftyJSON'
pod 'DeviceKit' pod 'DeviceKit'
pod 'DefaultsKit', :git => 'https://github.com/nmdias/DefaultsKit' pod 'DefaultsKit', :git => 'https://github.com/nmdias/DefaultsKit'
pod 'IceCream'
end end
target 'Bark' do target 'Bark' do
pods pods
end end
target 'NotificationServiceExtension' do
pod 'IceCream'
end

View File

@ -1,33 +1,39 @@
PODS: PODS:
- Alamofire (4.7.2) - Alamofire (5.2.0)
- DefaultsKit (0.0.9) - DefaultsKit (0.2.0)
- DeviceKit (1.7.0) - DeviceKit (3.2.0)
- FDFullscreenPopGesture (1.1) - FDFullscreenPopGesture (1.1)
- IceCream (1.13.1):
- RealmSwift
- KVOController (1.2.0) - KVOController (1.2.0)
- Material (2.15.0): - Material (3.1.8):
- Material/Core (= 2.15.0) - Material/Core (= 3.1.8)
- Material/Core (2.15.0): - Material/Core (3.1.8):
- Motion (~> 1.3.0) - Motion (~> 3.1.1)
- Motion (1.3.5): - Motion (3.1.3):
- Motion/Core (= 1.3.5) - Motion/Core (= 3.1.3)
- Motion/Core (1.3.5) - Motion/Core (3.1.3)
- Moya/Core (11.0.2): - Moya/Core (14.0.0):
- Alamofire (~> 4.1) - Alamofire (~> 5.0)
- Result (~> 3.0) - Moya/RxSwift (14.0.0):
- Moya/RxSwift (11.0.2):
- Moya/Core - Moya/Core
- RxSwift (~> 4.0) - RxSwift (~> 5.0)
- ObjectMapper (3.3.0) - ObjectMapper (4.2.0)
- Result (3.2.4) - Realm (5.0.0):
- RxSwift (4.2.0) - Realm/Headers (= 5.0.0)
- SnapKit (4.0.0) - Realm/Headers (5.0.0)
- RealmSwift (5.0.0):
- Realm (= 5.0.0)
- RxSwift (5.1.1)
- SnapKit (5.0.1)
- SVProgressHUD (2.2.5) - SVProgressHUD (2.2.5)
- SwiftyJSON (4.1.0) - SwiftyJSON (5.0.0)
DEPENDENCIES: DEPENDENCIES:
- DefaultsKit (from `https://github.com/nmdias/DefaultsKit`) - DefaultsKit (from `https://github.com/nmdias/DefaultsKit`)
- DeviceKit - DeviceKit
- FDFullscreenPopGesture - FDFullscreenPopGesture
- IceCream
- KVOController - KVOController
- Material - Material
- Moya/RxSwift - Moya/RxSwift
@ -37,16 +43,18 @@ DEPENDENCIES:
- SwiftyJSON - SwiftyJSON
SPEC REPOS: SPEC REPOS:
https://github.com/cocoapods/specs.git: trunk:
- Alamofire - Alamofire
- DeviceKit - DeviceKit
- FDFullscreenPopGesture - FDFullscreenPopGesture
- IceCream
- KVOController - KVOController
- Material - Material
- Motion - Motion
- Moya - Moya
- ObjectMapper - ObjectMapper
- Result - Realm
- RealmSwift
- RxSwift - RxSwift
- SnapKit - SnapKit
- SVProgressHUD - SVProgressHUD
@ -58,25 +66,27 @@ EXTERNAL SOURCES:
CHECKOUT OPTIONS: CHECKOUT OPTIONS:
DefaultsKit: DefaultsKit:
:commit: d0ec9bf0e0aa1b44759122c2faf76eb46e1f847f :commit: 8078b01a5bd19d4c8f7465ba36e1639c420607a9
:git: https://github.com/nmdias/DefaultsKit :git: https://github.com/nmdias/DefaultsKit
SPEC CHECKSUMS: SPEC CHECKSUMS:
Alamofire: e4fa87002c137ba2d8d634d2c51fabcda0d5c223 Alamofire: c1ca147559e730bfb2182c8c7aafbdd90a867987
DefaultsKit: e47d11c54a53c66f9e5c65a1992dead90bc7144f DefaultsKit: 6c767941b2c3fe34c4d70e300e6c3b80c94964dd
DeviceKit: 6a5bdeb103c03757bb94aef1ccb01e08bc8ef4ee DeviceKit: d081659419cce07c0b5239dbc9fb39ed7413c7fe
FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0 FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0
IceCream: 0447d87b55df85651dd60b15712cef64dbe1cb54
KVOController: d72ace34afea42468329623b3379ab3cd1d286b6 KVOController: d72ace34afea42468329623b3379ab3cd1d286b6
Material: 00e32bb5e61b3f749044897b2d93acd8bf33faa4 Material: a2a3f400a3b549d53ef89e56c58c4535b29db387
Motion: 9f74d115d7f72bb5380a8e3cde2f8a1fc898ac36 Motion: cf1e060e489f6661126374d5c60dbd2ed991605c
Moya: a725035953bc1c0eb1be505ab903984501d82440 Moya: 5b45dacb75adb009f97fde91c204c1e565d31916
ObjectMapper: b612bf8c8e99c4dc0bb6013a51f7c27966ed5da9 ObjectMapper: 1eb41f610210777375fa806bf161dc39fb832b81
Result: d2d07204ce72856f1fd9130bbe42c35a7b0fea10 Realm: 76066d333de26f97e9caedaa85ee3ff4a62ca265
RxSwift: 99e10317ddfcc7fbe01356aafd118fde4a0be104 RealmSwift: c1bdff09b422569dc6881410d9ccf712bcdb79b0
SnapKit: a42d492c16e80209130a3379f73596c3454b7694 RxSwift: 81470a2074fa8780320ea5fe4102807cb7118178
SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6 SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
SwiftyJSON: c29297daf073d2aa016295d5809cdd68045c39b3 SwiftyJSON: 36413e04c44ee145039d332b4f4e2d3e8d6c4db7
PODFILE CHECKSUM: 1b2615370f6547626d5249effba27e4cadcea226 PODFILE CHECKSUM: 993d19d838d6d55da4b65c5a2e5e68bce37c8097
COCOAPODS: 1.6.1 COCOAPODS: 1.8.4

View File

@ -54,7 +54,7 @@ class PreviewCardCell: UITableViewCell {
return label return label
}() }()
init(style: UITableViewCellStyle, reuseIdentifier: String?, model:PreviewModel) { init(style: UITableViewCell.CellStyle, reuseIdentifier: String?, model:PreviewModel) {
super.init(style: style, reuseIdentifier: reuseIdentifier) super.init(style: style, reuseIdentifier: reuseIdentifier)
self.selectionStyle = .none self.selectionStyle = .none
self.backgroundColor = Color.grey.lighten3 self.backgroundColor = Color.grey.lighten3
@ -83,7 +83,7 @@ class PreviewCardCell: UITableViewCell {
card.bottomBarEdgeInsetsPreset = .wideRectangle2 card.bottomBarEdgeInsetsPreset = .wideRectangle2
self.bind(model: model) self.bind(model: model)
self.contentView.layout(card).horizontally(left: 10, right: 10).center() self.contentView.layout(card).leftRight(left: 10, right: 10).center()
previewButton.addTarget(self, action: #selector(preview), for: .touchUpInside) previewButton.addTarget(self, action: #selector(preview), for: .touchUpInside)
copyButton.addTarget(self, action: #selector(copyURL), for: .touchUpInside) copyButton.addTarget(self, action: #selector(copyURL), for: .touchUpInside)
@ -126,26 +126,26 @@ class PreviewCardCell: UITableViewCell {
let attrStr = NSMutableAttributedString(string: "") let attrStr = NSMutableAttributedString(string: "")
attrStr.append(NSAttributedString(string: serverUrl.absoluteString, attributes: [ attrStr.append(NSAttributedString(string: serverUrl.absoluteString, attributes: [
NSAttributedStringKey.foregroundColor: Color.grey.darken4, NSAttributedString.Key.foregroundColor: Color.grey.darken4,
NSAttributedStringKey.font : RobotoFont.regular(with: fontSize) NSAttributedString.Key.font : RobotoFont.regular(with: fontSize)
])) ]))
attrStr.append(NSAttributedString(string: "/\(Client.shared.key ?? "Your Key")", attributes: [ attrStr.append(NSAttributedString(string: "/\(Client.shared.key ?? "Your Key")", attributes: [
NSAttributedStringKey.foregroundColor: Color.grey.darken3, NSAttributedString.Key.foregroundColor: Color.grey.darken3,
NSAttributedStringKey.font : RobotoFont.regular(with: fontSize) NSAttributedString.Key.font : RobotoFont.regular(with: fontSize)
])) ]))
if let title = model.title { if let title = model.title {
attrStr.append(NSAttributedString(string: "/\(title)", attributes: [ attrStr.append(NSAttributedString(string: "/\(title)", attributes: [
NSAttributedStringKey.foregroundColor: Color.grey.darken1, NSAttributedString.Key.foregroundColor: Color.grey.darken1,
NSAttributedStringKey.font : RobotoFont.regular(with: fontSize) NSAttributedString.Key.font : RobotoFont.regular(with: fontSize)
])) ]))
self.toolbar.title = title self.toolbar.title = title
} }
if let body = model.body { if let body = model.body {
attrStr.append(NSAttributedString(string: "/\(body)", attributes: [ attrStr.append(NSAttributedString(string: "/\(body)", attributes: [
NSAttributedStringKey.foregroundColor: Color.grey.base, NSAttributedString.Key.foregroundColor: Color.grey.base,
NSAttributedStringKey.font : RobotoFont.regular(with: fontSize) NSAttributedString.Key.font : RobotoFont.regular(with: fontSize)
])) ]))
if model.title == nil { if model.title == nil {
self.toolbar.title = body self.toolbar.title = body
@ -156,8 +156,8 @@ class PreviewCardCell: UITableViewCell {
} }
if let queryParameter = model.queryParameter { if let queryParameter = model.queryParameter {
attrStr.append(NSAttributedString(string: "?\(queryParameter)", attributes: [ attrStr.append(NSAttributedString(string: "?\(queryParameter)", attributes: [
NSAttributedStringKey.foregroundColor: Color.grey.lighten1, NSAttributedString.Key.foregroundColor: Color.grey.lighten1,
NSAttributedStringKey.font : RobotoFont.regular(with: fontSize) NSAttributedString.Key.font : RobotoFont.regular(with: fontSize)
])) ]))
} }
self.contentLabel.attributedText = attrStr self.contentLabel.attributedText = attrStr