Chore: upgrade to Swift5 for main project
This commit is contained in:
parent
509ba60ae6
commit
7c463e2b26
@ -1,5 +1,5 @@
|
||||
language: objective-c
|
||||
osx_image: xcode10.1
|
||||
osx_image: xcode10.2
|
||||
node_js: 10
|
||||
before_install:
|
||||
- openssl aes-256-cbc -K $encrypted_a43c9d4ca4d4_key -iv $encrypted_a43c9d4ca4d4_iv
|
||||
@ -18,9 +18,7 @@ install:
|
||||
- cd ClashX/Resources
|
||||
- git clone -b gh-pages https://github.com/Dreamacro/clash-dashboard.git dashboard
|
||||
- cd ..
|
||||
- brew update
|
||||
- brew upgrade go
|
||||
- go version
|
||||
- echo `go version`
|
||||
- go build -buildmode=c-archive
|
||||
- cd $TRAVIS_BUILD_DIR
|
||||
script:
|
||||
|
@ -466,7 +466,7 @@
|
||||
TargetAttributes = {
|
||||
495A44BB20D2660A00888A0A = {
|
||||
CreatedOnToolsVersion = 9.4.1;
|
||||
LastSwiftMigration = 1000;
|
||||
LastSwiftMigration = 1020;
|
||||
SystemCapabilities = {
|
||||
com.apple.Sandbox = {
|
||||
enabled = 1;
|
||||
@ -475,7 +475,7 @@
|
||||
};
|
||||
49CF3B1C20CD7463001EBF94 = {
|
||||
CreatedOnToolsVersion = 9.4;
|
||||
LastSwiftMigration = 1000;
|
||||
LastSwiftMigration = 1020;
|
||||
SystemCapabilities = {
|
||||
com.apple.HardenedRuntime = {
|
||||
enabled = 0;
|
||||
@ -736,8 +736,7 @@
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@ -760,8 +759,7 @@
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@ -909,8 +907,7 @@
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "ClashX/ClashX-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@ -942,8 +939,7 @@
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "ClashX/ClashX-Bridging-Header.h";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
@ -200,8 +200,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
}
|
||||
|
||||
func updateProxyList(withMenus menus:[NSMenuItem]) {
|
||||
let startIndex = self.statusMenu.items.index(of: self.separatorLineTop)!+1
|
||||
let endIndex = self.statusMenu.items.index(of: self.sepatatorLineEndProxySelect)!
|
||||
let startIndex = self.statusMenu.items.firstIndex(of: self.separatorLineTop)!+1
|
||||
let endIndex = self.statusMenu.items.firstIndex(of: self.sepatatorLineEndProxySelect)!
|
||||
var items = self.statusMenu.items
|
||||
|
||||
self.sepatatorLineEndProxySelect.isHidden = menus.count == 0
|
||||
|
@ -169,7 +169,7 @@ extension ApiRequest {
|
||||
.stream {(data) in
|
||||
retry = 0
|
||||
if let jsonData = try? JSONSerialization.jsonObject(with: data) as? [String:Int] {
|
||||
callback(jsonData?["up"] ?? 0, jsonData?["down"] ?? 0)
|
||||
callback(jsonData["up"] ?? 0, jsonData["down"] ?? 0)
|
||||
}
|
||||
}.response {[weak self] res in
|
||||
guard let err = res.error else {return}
|
||||
@ -199,8 +199,8 @@ extension ApiRequest {
|
||||
.stream {(data) in
|
||||
retry = 0
|
||||
if let jsonData = try? JSONSerialization.jsonObject(with: data) as? [String:String] {
|
||||
let type = jsonData!["type"] ?? "info"
|
||||
let payload = jsonData!["payload"] ?? ""
|
||||
let type = jsonData["type"] ?? "info"
|
||||
let payload = jsonData["payload"] ?? ""
|
||||
callback(type,payload)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user