Skip to content

Commit 49f63cc

Browse files
committed
iOS 13 适配
1 parent 96ebb20 commit 49f63cc

File tree

9 files changed

+26
-20
lines changed

9 files changed

+26
-20
lines changed

NIO1901.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 51;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -3647,8 +3647,8 @@
36473647
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
36483648
CLANG_ENABLE_MODULES = YES;
36493649
CODE_SIGN_ENTITLEMENTS = NIO1901/NIO1901.entitlements;
3650-
CODE_SIGN_IDENTITY = "iPhone Distribution";
3651-
CODE_SIGN_STYLE = Manual;
3650+
CODE_SIGN_IDENTITY = "Apple Development";
3651+
CODE_SIGN_STYLE = Automatic;
36523652
DEVELOPMENT_TEAM = 73QYWNHB5F;
36533653
FRAMEWORK_SEARCH_PATHS = (
36543654
"$(inherited)",
@@ -3663,7 +3663,7 @@
36633663
);
36643664
PRODUCT_BUNDLE_IDENTIFIER = Lojii.NIO1901;
36653665
PRODUCT_NAME = "$(TARGET_NAME)";
3666-
PROVISIONING_PROFILE_SPECIFIER = "NIO2019发布描述文件";
3666+
PROVISIONING_PROFILE_SPECIFIER = "";
36673667
SWIFT_ENABLE_BATCH_MODE = NO;
36683668
SWIFT_OBJC_BRIDGING_HEADER = "NIO1901/NIO1901-Bridging-Header.h";
36693669
SWIFT_VERSION = 5.0;
@@ -3726,11 +3726,11 @@
37263726
baseConfigurationReference = 7BA4F9D1F9BD7E1C68E596AC /* Pods-TunnelServices.debug.xcconfig */;
37273727
buildSettings = {
37283728
CLANG_ENABLE_MODULES = YES;
3729-
CODE_SIGN_IDENTITY = "";
3729+
CODE_SIGN_IDENTITY = "Apple Development";
37303730
CODE_SIGN_STYLE = Manual;
37313731
CURRENT_PROJECT_VERSION = 1;
37323732
DEFINES_MODULE = YES;
3733-
DEVELOPMENT_TEAM = "";
3733+
DEVELOPMENT_TEAM = 73QYWNHB5F;
37343734
DYLIB_COMPATIBILITY_VERSION = 1;
37353735
DYLIB_CURRENT_VERSION = 1;
37363736
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -3760,11 +3760,11 @@
37603760
baseConfigurationReference = 460FB976DF65AC5945AAF052 /* Pods-TunnelServices.release.xcconfig */;
37613761
buildSettings = {
37623762
CLANG_ENABLE_MODULES = YES;
3763-
CODE_SIGN_IDENTITY = "";
3763+
CODE_SIGN_IDENTITY = "Apple Development";
37643764
CODE_SIGN_STYLE = Manual;
37653765
CURRENT_PROJECT_VERSION = 1;
37663766
DEFINES_MODULE = YES;
3767-
DEVELOPMENT_TEAM = "";
3767+
DEVELOPMENT_TEAM = 73QYWNHB5F;
37683768
DYLIB_COMPATIBILITY_VERSION = 1;
37693769
DYLIB_CURRENT_VERSION = 1;
37703770
DYLIB_INSTALL_NAME_BASE = "@rpath";

NIO1901/AppDelegate.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import UIKit
1010
import AVFoundation
1111
import TunnelServices
1212
import YYWebImage
13-
import Bugly
13+
//import Bugly
1414

1515
@UIApplicationMain
1616
class AppDelegate: UIResponder, UIApplicationDelegate {
@@ -20,14 +20,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2020

2121
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
2222

23-
Bugly.start(withAppId: "0519d95ff6")
24-
Bugly.setUserValue("Main", forKey: "App")
23+
// Bugly.start(withAppId: "0519d95ff6")
24+
// Bugly.setUserValue("Main", forKey: "App")
2525

2626
ASConfigration.setDefaultDB(path: MitmService.getDBPath(), name: "Session")
2727
ASConfigration.logLevel = .error
2828
// Default Rule
2929
if UserDefaults.standard.string(forKey: "first") == nil {
30-
Bugly.setUserValue("true", forKey: "IsFirst")
30+
// Bugly.setUserValue("true", forKey: "IsFirst")
3131
let defaultRule = Rule.defaultRule()
3232
try? defaultRule.saveToDB()
3333
UserDefaults.standard.set("\(defaultRule.id ?? -1)", forKey: CurrentRuleId)

NIO1901/Lib/IDSegmentedControl/IDSegmentedControl.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class IDSegmentedView: UISegmentedControl {
1717
setBackgroundImage(selectedColorImage, for: .selected, barMetrics: .default)
1818

1919
let segAttributesNormal = [NSAttributedString.Key.foregroundColor: textColor, NSAttributedString.Key.font: textFont]
20-
let segAttributesSeleted = [NSAttributedString.Key.foregroundColor: UIColor.white,NSAttributedString.Key.font: textFont]
20+
let segAttributesSeleted = [NSAttributedString.Key.foregroundColor: UIColor.black,NSAttributedString.Key.font: textFont]
2121
// 文字在两种状态下的颜色
2222
setTitleTextAttributes(segAttributesNormal, for: UIControl.State.normal)
2323
setTitleTextAttributes((segAttributesSeleted), for: UIControl.State.selected)
@@ -46,3 +46,4 @@ fileprivate extension UIImage{
4646
// return img ?? UIImage()
4747
// }
4848
}
49+

NIO1901/Modules/Home/Controller/MainViewController.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ class MainViewController: BaseViewController {
186186
}
187187

188188
override func rightBtnClick() {
189-
checkPermissions()
190-
return
189+
// checkPermissions()
190+
// return
191191

192192
let vc = SettingViewController()
193193
vc.currentNet = netStr
@@ -288,6 +288,7 @@ class MainViewController: BaseViewController {
288288
@objc func showLog(){
289289
let directory = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: GROUPNAME)
290290
let fileBrowser = FileBrowser(initialPath: directory, allowEditing: true, showCancelButton: true)
291+
fileBrowser.modalPresentationStyle = .fullScreen
291292
present(fileBrowser, animated: true, completion: nil)
292293
}
293294
// MARK:VPN

NIO1901/Modules/RuleList/Controller/RuleListViewController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class RuleListViewController: BaseViewController,PopupContentViewController {
7777
PopViewController.show(titles: ["Create an empty configuration".localized,"Download the configuration from the URL".localized], viewController: self.parent ?? self) { (index) in
7878
if index == 0 {
7979
let vc = RuleDetailViewController(rule: nil)
80+
vc.modalPresentationStyle = .fullScreen
8081
if let homeVC = self.parent?.parent {
8182
homeVC.present(vc, animated: true, completion: nil)
8283
}
@@ -160,6 +161,7 @@ extension RuleListViewController:UITableViewDelegate,UITableViewDataSource {
160161
r?.configParse()
161162
if index == 0 {
162163
let vc = RuleDetailViewController(rule: r ?? Rule())
164+
vc.modalPresentationStyle = .fullScreen
163165
if let homeVC = self.parent?.parent {
164166
homeVC.present(vc, animated: true, completion: nil)
165167
}

NIO1901/Modules/RuleList/Controller/RuleOverViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ class RuleOverViewController: UIViewController {
101101
offY = textEditItem.frame.maxY
102102
textEditItem.contentDidClickHandle = {
103103
let container = RuleTextViewController(rule: self.rule)
104+
container.modalPresentationStyle = .fullScreen
104105
self.present(container, animated: true, completion: nil)
105106
}
106107
scrollView.addSubview(textEditItem)

NIO1901/Modules/Setting/SettingViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class SettingViewController: BaseViewController {
6363
mail.setToRecipients([CONNECTEMAIL])
6464
mail.setMessageBody(describe + info, isHTML: false)
6565
mail.setSubject(subject)
66+
mail.modalPresentationStyle = .fullScreen
6667
present(mail, animated: true)
6768
} else {
6869
let alertController = UIAlertController(title: "Send e-mail".localized, message: "Send email to".localized + CONNECTEMAIL, preferredStyle: .alert)

PacketTunnel/PacketTunnelProvider.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import NetworkExtension
1010
import TunnelServices
1111
//import AxLogger
1212
import Reachability
13-
import Bugly
13+
//import Bugly
1414

1515
class PacketTunnelProvider: NEPacketTunnelProvider {
1616

@@ -32,8 +32,8 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
3232
override func startTunnel(options: [String : NSObject]?, completionHandler: @escaping (Error?) -> Void) {
3333

3434
pendingStartCompletion = completionHandler
35-
Bugly.start(withAppId: "0519d95ff6")
36-
Bugly.setUserValue("NetworkExtension", forKey: "App")
35+
// Bugly.start(withAppId: "0519d95ff6")
36+
// Bugly.setUserValue("NetworkExtension", forKey: "App")
3737
// // 正常启动
3838
if StartInExtension {
3939
guard let server = MitmService.prepare() else {

Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ target 'NIO1901' do
1414
pod 'FileBrowser'
1515
pod 'CocoaAsyncSocket'
1616
pod 'ReachabilitySwift'
17-
pod 'Bugly'
17+
# pod 'Bugly'
1818
end
1919

2020
target 'PacketTunnel' do
2121
pod 'ReachabilitySwift'
22-
pod 'Bugly'
22+
# pod 'Bugly'
2323
end
2424

2525
target 'TunnelServices' do

0 commit comments

Comments
 (0)