mirror of
https://github.com/Finb/Bark.git
synced 2025-12-08 21:36:01 +00:00
Swift 5
This commit is contained in:
parent
8ae3b29bd5
commit
a5ea350b2e
@ -33,9 +33,12 @@
|
||||
0661A54A204FDA4100965E4E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0661A549204FDA4100965E4E /* Assets.xcassets */; };
|
||||
0661A54D204FDA4100965E4E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0661A54B204FDA4100965E4E /* LaunchScreen.storyboard */; };
|
||||
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, ); }; };
|
||||
06CF784C21C7A51200A052D7 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06CF784B21C7A51200A052D7 /* NotificationService.swift */; };
|
||||
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 */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@ -100,12 +103,17 @@
|
||||
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; };
|
||||
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; };
|
||||
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>"; };
|
||||
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; };
|
||||
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>"; };
|
||||
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; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@ -124,6 +132,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
6AF9CC9B5F6CD2BF86509897 /* libPods-Bark.a in Frameworks */,
|
||||
06B1158D247BA6D5006D91FB /* CloudKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -131,6 +140,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
ACC117FABC6F8E44060B8D80 /* libPods-NotificationServiceExtension.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -169,6 +179,7 @@
|
||||
0637FA7920E092B300E80174 /* Observable+Extension.swift */,
|
||||
0637FA7B20E0930E00E80174 /* BarkApi.swift */,
|
||||
0637FA7D20E0969800E80174 /* Client.swift */,
|
||||
06B1158E247BB1FB006D91FB /* Message.swift */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@ -235,6 +246,8 @@
|
||||
children = (
|
||||
87D1222A4C6E7283974A44C6 /* Pods-Bark.debug.xcconfig */,
|
||||
1CC985CE300A858FF65E166A /* Pods-Bark.release.xcconfig */,
|
||||
08AEA046D1FD0D7950208796 /* Pods-NotificationServiceExtension.debug.xcconfig */,
|
||||
68049930BAF79AFBD8B109B8 /* Pods-NotificationServiceExtension.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
@ -242,10 +255,12 @@
|
||||
99BD309BDB7F62B5DC0CECE1 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
06B1158C247BA6D5006D91FB /* CloudKit.framework */,
|
||||
0683487020510FB20024B6DA /* UserNotifications.framework */,
|
||||
0683487220510FB20024B6DA /* UserNotificationsUI.framework */,
|
||||
14F0F73EC45A35FC2482F967 /* Pods_NotificationContentExtension.framework */,
|
||||
E4EA0C04469BF7B418FF3CB7 /* libPods-Bark.a */,
|
||||
A24A28EB12CA35B953807C99 /* libPods-NotificationServiceExtension.a */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
@ -296,6 +311,7 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 06CF784A21C7A50300A052D7 /* Build configuration list for PBXNativeTarget "NotificationServiceExtension" */;
|
||||
buildPhases = (
|
||||
800B82E19475CD3E4B36E49D /* [CP] Check Pods Manifest.lock */,
|
||||
06CF783C21C7A50300A052D7 /* Sources */,
|
||||
06CF783D21C7A50300A052D7 /* Frameworks */,
|
||||
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";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
A65832AEF7CA9C472EABAB15 /* [CP] Copy Pods Resources */ = {
|
||||
800B82E19475CD3E4B36E49D /* [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-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 = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Bark/Pods-Bark-resources.sh",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/Material/com.cosmicmind.material.icons.bundle",
|
||||
@ -422,8 +458,6 @@
|
||||
"${PODS_ROOT}/SVProgressHUD/SVProgressHUD/SVProgressHUD.bundle",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/com.cosmicmind.material.icons.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/com.cosmicmind.material.fonts.bundle",
|
||||
@ -452,6 +486,7 @@
|
||||
0603706920E1F89500F4CA05 /* PreviewCardCell.swift in Sources */,
|
||||
0637FA8C20E0D7A700E80174 /* BaseViewController.swift in Sources */,
|
||||
0603706D20E23EC000F4CA05 /* BarkSFSafariViewController.swift in Sources */,
|
||||
06B1158F247BB1FB006D91FB /* Message.swift in Sources */,
|
||||
0637FA7820E0926D00E80174 /* BarkTargetType.swift in Sources */,
|
||||
0637FA7E20E0969800E80174 /* Client.swift in Sources */,
|
||||
0661A545204FDA4100965E4E /* HomeViewController.swift in Sources */,
|
||||
@ -532,7 +567,7 @@
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark.NotificationContentExtension;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
};
|
||||
name = Debug;
|
||||
@ -549,7 +584,7 @@
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark.NotificationContentExtension;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
};
|
||||
name = Release;
|
||||
@ -681,7 +716,7 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
};
|
||||
name = Debug;
|
||||
@ -700,13 +735,14 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
06CF784821C7A50300A052D7 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 08AEA046D1FD0D7950208796 /* Pods-NotificationServiceExtension.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
@ -719,13 +755,14 @@
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark.NotificationServiceExtension;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
06CF784921C7A50300A052D7 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 68049930BAF79AFBD8B109B8 /* Pods-NotificationServiceExtension.release.xcconfig */;
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
@ -737,7 +774,7 @@
|
||||
PRODUCT_BUNDLE_IDENTIFIER = me.fin.bark.NotificationServiceExtension;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
|
||||
@ -9,13 +9,16 @@
|
||||
import UIKit
|
||||
import Material
|
||||
import UserNotifications
|
||||
import RealmSwift
|
||||
import IceCream
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
var window: UIWindow?
|
||||
var syncEngine: SyncEngine?
|
||||
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
internal func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
|
||||
self.window = UIWindow(frame: UIScreen.main.bounds)
|
||||
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 haven’t 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
|
||||
}
|
||||
|
||||
|
||||
@ -4,5 +4,13 @@
|
||||
<dict>
|
||||
<key>aps-environment</key>
|
||||
<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>
|
||||
</plist>
|
||||
|
||||
@ -27,6 +27,11 @@
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>fetch</string>
|
||||
<string>remote-notification</string>
|
||||
</array>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
|
||||
@ -28,7 +28,7 @@ class BarkNavigationController: NavigationController{
|
||||
|
||||
}
|
||||
|
||||
override var childViewControllerForStatusBarStyle: UIViewController?{
|
||||
override var childForStatusBarStyle: UIViewController?{
|
||||
get {
|
||||
return self.topViewController
|
||||
}
|
||||
@ -36,7 +36,7 @@ class BarkNavigationController: NavigationController{
|
||||
}
|
||||
|
||||
class BarkSnackbarController: SnackbarController {
|
||||
override var childViewControllerForStatusBarStyle: UIViewController?{
|
||||
override var childForStatusBarStyle: UIViewController?{
|
||||
return self.rootViewController
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,7 +9,6 @@
|
||||
import UIKit
|
||||
import Moya
|
||||
import RxSwift
|
||||
import Result
|
||||
|
||||
//保存全局Providers
|
||||
fileprivate var retainProviders:[String: Any] = [:]
|
||||
@ -120,7 +119,7 @@ fileprivate class LogPlugin: PluginType{
|
||||
}
|
||||
func didReceive(_ result: Result<Response, MoyaError>, target: TargetType) {
|
||||
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("\n")
|
||||
|
||||
23
Model/Message.swift
Normal file
23
Model/Message.swift
Normal 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 {}
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
import UserNotifications
|
||||
|
||||
import RealmSwift
|
||||
class NotificationService: UNNotificationServiceExtension {
|
||||
|
||||
var contentHandler: ((UNNotificationContent) -> Void)?
|
||||
|
||||
8
Podfile
8
Podfile
@ -1,4 +1,4 @@
|
||||
platform:ios,'9.0'
|
||||
platform:ios,'10.0'
|
||||
inhibit_all_warnings!
|
||||
use_modular_headers!
|
||||
|
||||
@ -13,8 +13,14 @@ def pods
|
||||
pod 'SwiftyJSON'
|
||||
pod 'DeviceKit'
|
||||
pod 'DefaultsKit', :git => 'https://github.com/nmdias/DefaultsKit'
|
||||
pod 'IceCream'
|
||||
end
|
||||
|
||||
target 'Bark' do
|
||||
pods
|
||||
end
|
||||
|
||||
|
||||
target 'NotificationServiceExtension' do
|
||||
pod 'IceCream'
|
||||
end
|
||||
|
||||
82
Podfile.lock
82
Podfile.lock
@ -1,33 +1,39 @@
|
||||
PODS:
|
||||
- Alamofire (4.7.2)
|
||||
- DefaultsKit (0.0.9)
|
||||
- DeviceKit (1.7.0)
|
||||
- Alamofire (5.2.0)
|
||||
- DefaultsKit (0.2.0)
|
||||
- DeviceKit (3.2.0)
|
||||
- FDFullscreenPopGesture (1.1)
|
||||
- IceCream (1.13.1):
|
||||
- RealmSwift
|
||||
- KVOController (1.2.0)
|
||||
- Material (2.15.0):
|
||||
- Material/Core (= 2.15.0)
|
||||
- Material/Core (2.15.0):
|
||||
- Motion (~> 1.3.0)
|
||||
- Motion (1.3.5):
|
||||
- Motion/Core (= 1.3.5)
|
||||
- Motion/Core (1.3.5)
|
||||
- Moya/Core (11.0.2):
|
||||
- Alamofire (~> 4.1)
|
||||
- Result (~> 3.0)
|
||||
- Moya/RxSwift (11.0.2):
|
||||
- Material (3.1.8):
|
||||
- Material/Core (= 3.1.8)
|
||||
- Material/Core (3.1.8):
|
||||
- Motion (~> 3.1.1)
|
||||
- Motion (3.1.3):
|
||||
- Motion/Core (= 3.1.3)
|
||||
- Motion/Core (3.1.3)
|
||||
- Moya/Core (14.0.0):
|
||||
- Alamofire (~> 5.0)
|
||||
- Moya/RxSwift (14.0.0):
|
||||
- Moya/Core
|
||||
- RxSwift (~> 4.0)
|
||||
- ObjectMapper (3.3.0)
|
||||
- Result (3.2.4)
|
||||
- RxSwift (4.2.0)
|
||||
- SnapKit (4.0.0)
|
||||
- RxSwift (~> 5.0)
|
||||
- ObjectMapper (4.2.0)
|
||||
- Realm (5.0.0):
|
||||
- Realm/Headers (= 5.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)
|
||||
- SwiftyJSON (4.1.0)
|
||||
- SwiftyJSON (5.0.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- DefaultsKit (from `https://github.com/nmdias/DefaultsKit`)
|
||||
- DeviceKit
|
||||
- FDFullscreenPopGesture
|
||||
- IceCream
|
||||
- KVOController
|
||||
- Material
|
||||
- Moya/RxSwift
|
||||
@ -37,16 +43,18 @@ DEPENDENCIES:
|
||||
- SwiftyJSON
|
||||
|
||||
SPEC REPOS:
|
||||
https://github.com/cocoapods/specs.git:
|
||||
trunk:
|
||||
- Alamofire
|
||||
- DeviceKit
|
||||
- FDFullscreenPopGesture
|
||||
- IceCream
|
||||
- KVOController
|
||||
- Material
|
||||
- Motion
|
||||
- Moya
|
||||
- ObjectMapper
|
||||
- Result
|
||||
- Realm
|
||||
- RealmSwift
|
||||
- RxSwift
|
||||
- SnapKit
|
||||
- SVProgressHUD
|
||||
@ -58,25 +66,27 @@ EXTERNAL SOURCES:
|
||||
|
||||
CHECKOUT OPTIONS:
|
||||
DefaultsKit:
|
||||
:commit: d0ec9bf0e0aa1b44759122c2faf76eb46e1f847f
|
||||
:commit: 8078b01a5bd19d4c8f7465ba36e1639c420607a9
|
||||
:git: https://github.com/nmdias/DefaultsKit
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: e4fa87002c137ba2d8d634d2c51fabcda0d5c223
|
||||
DefaultsKit: e47d11c54a53c66f9e5c65a1992dead90bc7144f
|
||||
DeviceKit: 6a5bdeb103c03757bb94aef1ccb01e08bc8ef4ee
|
||||
Alamofire: c1ca147559e730bfb2182c8c7aafbdd90a867987
|
||||
DefaultsKit: 6c767941b2c3fe34c4d70e300e6c3b80c94964dd
|
||||
DeviceKit: d081659419cce07c0b5239dbc9fb39ed7413c7fe
|
||||
FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0
|
||||
IceCream: 0447d87b55df85651dd60b15712cef64dbe1cb54
|
||||
KVOController: d72ace34afea42468329623b3379ab3cd1d286b6
|
||||
Material: 00e32bb5e61b3f749044897b2d93acd8bf33faa4
|
||||
Motion: 9f74d115d7f72bb5380a8e3cde2f8a1fc898ac36
|
||||
Moya: a725035953bc1c0eb1be505ab903984501d82440
|
||||
ObjectMapper: b612bf8c8e99c4dc0bb6013a51f7c27966ed5da9
|
||||
Result: d2d07204ce72856f1fd9130bbe42c35a7b0fea10
|
||||
RxSwift: 99e10317ddfcc7fbe01356aafd118fde4a0be104
|
||||
SnapKit: a42d492c16e80209130a3379f73596c3454b7694
|
||||
Material: a2a3f400a3b549d53ef89e56c58c4535b29db387
|
||||
Motion: cf1e060e489f6661126374d5c60dbd2ed991605c
|
||||
Moya: 5b45dacb75adb009f97fde91c204c1e565d31916
|
||||
ObjectMapper: 1eb41f610210777375fa806bf161dc39fb832b81
|
||||
Realm: 76066d333de26f97e9caedaa85ee3ff4a62ca265
|
||||
RealmSwift: c1bdff09b422569dc6881410d9ccf712bcdb79b0
|
||||
RxSwift: 81470a2074fa8780320ea5fe4102807cb7118178
|
||||
SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
|
||||
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
|
||||
SwiftyJSON: c29297daf073d2aa016295d5809cdd68045c39b3
|
||||
SwiftyJSON: 36413e04c44ee145039d332b4f4e2d3e8d6c4db7
|
||||
|
||||
PODFILE CHECKSUM: 1b2615370f6547626d5249effba27e4cadcea226
|
||||
PODFILE CHECKSUM: 993d19d838d6d55da4b65c5a2e5e68bce37c8097
|
||||
|
||||
COCOAPODS: 1.6.1
|
||||
COCOAPODS: 1.8.4
|
||||
|
||||
@ -54,7 +54,7 @@ class PreviewCardCell: UITableViewCell {
|
||||
return label
|
||||
}()
|
||||
|
||||
init(style: UITableViewCellStyle, reuseIdentifier: String?, model:PreviewModel) {
|
||||
init(style: UITableViewCell.CellStyle, reuseIdentifier: String?, model:PreviewModel) {
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
self.selectionStyle = .none
|
||||
self.backgroundColor = Color.grey.lighten3
|
||||
@ -83,7 +83,7 @@ class PreviewCardCell: UITableViewCell {
|
||||
card.bottomBarEdgeInsetsPreset = .wideRectangle2
|
||||
|
||||
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)
|
||||
copyButton.addTarget(self, action: #selector(copyURL), for: .touchUpInside)
|
||||
@ -126,26 +126,26 @@ class PreviewCardCell: UITableViewCell {
|
||||
|
||||
let attrStr = NSMutableAttributedString(string: "")
|
||||
attrStr.append(NSAttributedString(string: serverUrl.absoluteString, attributes: [
|
||||
NSAttributedStringKey.foregroundColor: Color.grey.darken4,
|
||||
NSAttributedStringKey.font : RobotoFont.regular(with: fontSize)
|
||||
NSAttributedString.Key.foregroundColor: Color.grey.darken4,
|
||||
NSAttributedString.Key.font : RobotoFont.regular(with: fontSize)
|
||||
]))
|
||||
|
||||
attrStr.append(NSAttributedString(string: "/\(Client.shared.key ?? "Your Key")", attributes: [
|
||||
NSAttributedStringKey.foregroundColor: Color.grey.darken3,
|
||||
NSAttributedStringKey.font : RobotoFont.regular(with: fontSize)
|
||||
NSAttributedString.Key.foregroundColor: Color.grey.darken3,
|
||||
NSAttributedString.Key.font : RobotoFont.regular(with: fontSize)
|
||||
]))
|
||||
|
||||
if let title = model.title {
|
||||
attrStr.append(NSAttributedString(string: "/\(title)", attributes: [
|
||||
NSAttributedStringKey.foregroundColor: Color.grey.darken1,
|
||||
NSAttributedStringKey.font : RobotoFont.regular(with: fontSize)
|
||||
NSAttributedString.Key.foregroundColor: Color.grey.darken1,
|
||||
NSAttributedString.Key.font : RobotoFont.regular(with: fontSize)
|
||||
]))
|
||||
self.toolbar.title = title
|
||||
}
|
||||
if let body = model.body {
|
||||
attrStr.append(NSAttributedString(string: "/\(body)", attributes: [
|
||||
NSAttributedStringKey.foregroundColor: Color.grey.base,
|
||||
NSAttributedStringKey.font : RobotoFont.regular(with: fontSize)
|
||||
NSAttributedString.Key.foregroundColor: Color.grey.base,
|
||||
NSAttributedString.Key.font : RobotoFont.regular(with: fontSize)
|
||||
]))
|
||||
if model.title == nil {
|
||||
self.toolbar.title = body
|
||||
@ -156,8 +156,8 @@ class PreviewCardCell: UITableViewCell {
|
||||
}
|
||||
if let queryParameter = model.queryParameter {
|
||||
attrStr.append(NSAttributedString(string: "?\(queryParameter)", attributes: [
|
||||
NSAttributedStringKey.foregroundColor: Color.grey.lighten1,
|
||||
NSAttributedStringKey.font : RobotoFont.regular(with: fontSize)
|
||||
NSAttributedString.Key.foregroundColor: Color.grey.lighten1,
|
||||
NSAttributedString.Key.font : RobotoFont.regular(with: fontSize)
|
||||
]))
|
||||
}
|
||||
self.contentLabel.attributedText = attrStr
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user