Merge branch 'pr/95' into develop
# Conflicts: # ShadowsocksX-NG.xcodeproj/project.pbxproj
This commit is contained in:
@ -7,6 +7,7 @@
|
|||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
|
08FCA0FF1E24BE1A0070984F /* example-gui-config.json in Resources */ = {isa = PBXBuildFile; fileRef = 08FCA0FE1E24BE1A0070984F /* example-gui-config.json */; };
|
||||||
258E511BA910B0521B24DAB8 /* Pods_ShadowsocksX_NG.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 283ED1A8E9B711AC65670031 /* Pods_ShadowsocksX_NG.framework */; };
|
258E511BA910B0521B24DAB8 /* Pods_ShadowsocksX_NG.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 283ED1A8E9B711AC65670031 /* Pods_ShadowsocksX_NG.framework */; };
|
||||||
9B07EFA71D048BBB0052D9DF /* ss-local in Resources */ = {isa = PBXBuildFile; fileRef = 9B07EFA61D048BBB0052D9DF /* ss-local */; };
|
9B07EFA71D048BBB0052D9DF /* ss-local in Resources */ = {isa = PBXBuildFile; fileRef = 9B07EFA61D048BBB0052D9DF /* ss-local */; };
|
||||||
9B07EFAC1D048E880052D9DF /* menu_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9B07EFA81D048E880052D9DF /* menu_icon@2x.png */; };
|
9B07EFAC1D048E880052D9DF /* menu_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9B07EFA81D048E880052D9DF /* menu_icon@2x.png */; };
|
||||||
@ -94,6 +95,7 @@
|
|||||||
/* End PBXCopyFilesBuildPhase section */
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
|
08FCA0FE1E24BE1A0070984F /* example-gui-config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "example-gui-config.json"; sourceTree = "<group>"; };
|
||||||
19083CFCED87354F006967FF /* Pods_ShadowsocksX_NGUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ShadowsocksX_NGUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
19083CFCED87354F006967FF /* Pods_ShadowsocksX_NGUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ShadowsocksX_NGUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
1E7783AEDB4A3BDDC9FF16AC /* libPods-proxy_conf_helper.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-proxy_conf_helper.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
1E7783AEDB4A3BDDC9FF16AC /* libPods-proxy_conf_helper.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-proxy_conf_helper.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
283ED1A8E9B711AC65670031 /* Pods_ShadowsocksX_NG.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ShadowsocksX_NG.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
283ED1A8E9B711AC65670031 /* Pods_ShadowsocksX_NG.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ShadowsocksX_NG.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
@ -229,6 +231,7 @@
|
|||||||
9B07EFB01D048E900052D9DF /* Support Files */ = {
|
9B07EFB01D048E900052D9DF /* Support Files */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
08FCA0FE1E24BE1A0070984F /* example-gui-config.json */,
|
||||||
C6D4298E1DA75988002A5711 /* install_privoxy.sh */,
|
C6D4298E1DA75988002A5711 /* install_privoxy.sh */,
|
||||||
C6D4298F1DA75988002A5711 /* privoxy */,
|
C6D4298F1DA75988002A5711 /* privoxy */,
|
||||||
C6D429901DA75988002A5711 /* reload_conf_privoxy.sh */,
|
C6D429901DA75988002A5711 /* reload_conf_privoxy.sh */,
|
||||||
@ -493,6 +496,7 @@
|
|||||||
C6D429951DA75988002A5711 /* reload_conf_privoxy.sh in Resources */,
|
C6D429951DA75988002A5711 /* reload_conf_privoxy.sh in Resources */,
|
||||||
9B0BFFEB1D0460A70040E62B /* Assets.xcassets in Resources */,
|
9B0BFFEB1D0460A70040E62B /* Assets.xcassets in Resources */,
|
||||||
9B2491B71D0ACC3E003BBECC /* AdvPreferencesWindowController.xib in Resources */,
|
9B2491B71D0ACC3E003BBECC /* AdvPreferencesWindowController.xib in Resources */,
|
||||||
|
08FCA0FF1E24BE1A0070984F /* example-gui-config.json in Resources */,
|
||||||
9B3FFF271D0898EB0019A709 /* gfwlist.txt in Resources */,
|
9B3FFF271D0898EB0019A709 /* gfwlist.txt in Resources */,
|
||||||
C6D429931DA75988002A5711 /* install_privoxy.sh in Resources */,
|
C6D429931DA75988002A5711 /* install_privoxy.sh in Resources */,
|
||||||
9BC70EDC1D2E3E3100EDA4CA /* Localizable.strings in Resources */,
|
9BC70EDC1D2E3E3100EDA4CA /* Localizable.strings in Resources */,
|
||||||
|
@ -99,8 +99,8 @@ class ServerProfileManager: NSObject {
|
|||||||
profile.remark = item["remarks"] as! String
|
profile.remark = item["remarks"] as! String
|
||||||
self.profiles.append(profile)
|
self.profiles.append(profile)
|
||||||
self.save()
|
self.save()
|
||||||
NotificationCenter.default.post(name: NSNotification.Name(rawValue: NOTIFY_SERVER_PROFILES_CHANGED), object: nil)
|
|
||||||
}
|
}
|
||||||
|
NotificationCenter.default.post(name: NSNotification.Name(rawValue: NOTIFY_SERVER_PROFILES_CHANGED), object: nil)
|
||||||
let configsCount = (jsonArr1.object(forKey: "configs") as! [[String: AnyObject]]).count
|
let configsCount = (jsonArr1.object(forKey: "configs") as! [[String: AnyObject]]).count
|
||||||
let notification = NSUserNotification()
|
let notification = NSUserNotification()
|
||||||
notification.title = "Import Server Profile succeed!".localized
|
notification.title = "Import Server Profile succeed!".localized
|
||||||
@ -123,7 +123,7 @@ class ServerProfileManager: NSObject {
|
|||||||
//读取example文件,删掉configs里面的配置,再用NSDictionary填充到configs里面
|
//读取example文件,删掉configs里面的配置,再用NSDictionary填充到configs里面
|
||||||
let fileManager = FileManager.default
|
let fileManager = FileManager.default
|
||||||
|
|
||||||
let filePath:String = Bundle.main.bundlePath + "/Contents/Resources/example-gui-config.json"
|
let filePath:String = Bundle.main.path(forResource: "example-gui-config", ofType: "json")!
|
||||||
let data = fileManager.contents(atPath: filePath)
|
let data = fileManager.contents(atPath: filePath)
|
||||||
let readString = NSString(data: data!, encoding: String.Encoding.utf8.rawValue)!
|
let readString = NSString(data: data!, encoding: String.Encoding.utf8.rawValue)!
|
||||||
let readStringData = readString.data(using: String.Encoding.utf8.rawValue)
|
let readStringData = readString.data(using: String.Encoding.utf8.rawValue)
|
||||||
@ -168,7 +168,7 @@ class ServerProfileManager: NSObject {
|
|||||||
|
|
||||||
class func showExampleConfigFile() {
|
class func showExampleConfigFile() {
|
||||||
//copy file to ~/Downloads folder
|
//copy file to ~/Downloads folder
|
||||||
let filePath:String = Bundle.main.bundlePath + "/Contents/Resources/example-gui-config.json"
|
let filePath:String = Bundle.main.path(forResource: "example-gui-config", ofType: "json")!
|
||||||
let fileMgr = FileManager.default
|
let fileMgr = FileManager.default
|
||||||
let dataPath = NSHomeDirectory() + "/Downloads"
|
let dataPath = NSHomeDirectory() + "/Downloads"
|
||||||
let destPath = dataPath + "/example-gui-config.json"
|
let destPath = dataPath + "/example-gui-config.json"
|
||||||
|
Reference in New Issue
Block a user