Skip to content

Commit 7f9e45b

Browse files
authored
Merge pull request #21 from sieren/update-ios-12
Update ios 12
2 parents 0ce962e + bee73fe commit 7f9e45b

File tree

10 files changed

+103
-55
lines changed

10 files changed

+103
-55
lines changed

midimittr.xcodeproj/project.pbxproj

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

99
/* Begin PBXBuildFile section */
@@ -281,7 +281,7 @@
281281
TargetAttributes = {
282282
694947DB19DD7A4E00A6E65C = {
283283
CreatedOnToolsVersion = 6.0.1;
284-
LastSwiftMigration = 0920;
284+
LastSwiftMigration = 1500;
285285
SystemCapabilities = {
286286
com.apple.BackgroundModes = {
287287
enabled = 1;
@@ -292,10 +292,9 @@
292292
};
293293
buildConfigurationList = 694947D719DD7A4E00A6E65C /* Build configuration list for PBXProject "midimittr" */;
294294
compatibilityVersion = "Xcode 3.2";
295-
developmentRegion = English;
295+
developmentRegion = en;
296296
hasScannedForEncodings = 0;
297297
knownRegions = (
298-
English,
299298
en,
300299
Base,
301300
);
@@ -513,7 +512,7 @@
513512
GCC_PRECOMPILE_PREFIX_HEADER = YES;
514513
GCC_WARN_UNDECLARED_SELECTOR = NO;
515514
INFOPLIST_FILE = "$(SRCROOT)/midimittr/Info.plist";
516-
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
515+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
517516
LD_RUNPATH_SEARCH_PATHS = (
518517
"$(inherited)",
519518
"@executable_path/Frameworks",
@@ -525,7 +524,7 @@
525524
PROVISIONING_PROFILE = "";
526525
SWIFT_OBJC_BRIDGING_HEADER = "midimittr/midimittr-Bridging-Header.h";
527526
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
528-
SWIFT_VERSION = 4.0;
527+
SWIFT_VERSION = 5.0;
529528
};
530529
name = Debug;
531530
};
@@ -552,7 +551,7 @@
552551
GCC_PRECOMPILE_PREFIX_HEADER = YES;
553552
GCC_WARN_UNDECLARED_SELECTOR = NO;
554553
INFOPLIST_FILE = "$(SRCROOT)/midimittr/Info.plist";
555-
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
554+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
556555
LD_RUNPATH_SEARCH_PATHS = (
557556
"$(inherited)",
558557
"@executable_path/Frameworks",
@@ -563,7 +562,7 @@
563562
PRODUCT_NAME = "$(TARGET_NAME)";
564563
PROVISIONING_PROFILE = "";
565564
SWIFT_OBJC_BRIDGING_HEADER = "midimittr/midimittr-Bridging-Header.h";
566-
SWIFT_VERSION = 4.0;
565+
SWIFT_VERSION = 5.0;
567566
};
568567
name = Release;
569568
};

midimittr.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 29 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

midimittr.xcodeproj/xcuserdata/sierenmusic.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,53 @@
133133
landmarkType = "7">
134134
</BreakpointContent>
135135
</BreakpointProxy>
136+
<BreakpointProxy
137+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
138+
<BreakpointContent
139+
uuid = "630EBA4E-FFAD-4990-BD36-114517D24E93"
140+
shouldBeEnabled = "Yes"
141+
ignoreCount = "0"
142+
continueAfterRunningActions = "No"
143+
filePath = "midimittr/BLEAdvertViewController.swift"
144+
startingColumnNumber = "9223372036854775807"
145+
endingColumnNumber = "9223372036854775807"
146+
startingLineNumber = "16"
147+
endingLineNumber = "16"
148+
landmarkName = "viewWillAppear(_:)"
149+
landmarkType = "7">
150+
</BreakpointContent>
151+
</BreakpointProxy>
152+
<BreakpointProxy
153+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
154+
<BreakpointContent
155+
uuid = "522A1A3E-CB4F-4508-A975-07236FB7E6A6"
156+
shouldBeEnabled = "Yes"
157+
ignoreCount = "0"
158+
continueAfterRunningActions = "No"
159+
filePath = "midimittr/BLEAdvertViewController.swift"
160+
startingColumnNumber = "9223372036854775807"
161+
endingColumnNumber = "9223372036854775807"
162+
startingLineNumber = "17"
163+
endingLineNumber = "17"
164+
landmarkName = "viewWillAppear(_:)"
165+
landmarkType = "7">
166+
</BreakpointContent>
167+
</BreakpointProxy>
168+
<BreakpointProxy
169+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
170+
<BreakpointContent
171+
uuid = "4E05D13A-8146-4DE2-A773-8F07AA78B710"
172+
shouldBeEnabled = "Yes"
173+
ignoreCount = "0"
174+
continueAfterRunningActions = "No"
175+
filePath = "midimittr/BLEAdvertViewController.swift"
176+
startingColumnNumber = "9223372036854775807"
177+
endingColumnNumber = "9223372036854775807"
178+
startingLineNumber = "10"
179+
endingLineNumber = "10"
180+
landmarkName = "viewWillAppear(_:)"
181+
landmarkType = "7">
182+
</BreakpointContent>
183+
</BreakpointProxy>
136184
</Breakpoints>
137185
</Bucket>

midimittr/AppDelegate.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import UIKit
44
import NotificationBannerSwift
5+
import CoreAudioKit
56

67
@UIApplicationMain
78
class AppDelegate: UIResponder, UIApplicationDelegate, PeerTalkConnectionProtocol {
@@ -12,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, PeerTalkConnectionProtoco
1213
let appDefaults = [String: AnyObject]()
1314

1415
func application(_ application: UIApplication,
15-
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
16+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1617
registerSettingsBundle()
1718
appContext.peerTalkBridge.connectionViewDelegate = self
1819
//swiftlint:disable:next force_cast
@@ -31,6 +32,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, PeerTalkConnectionProtoco
3132
let root = self.window?.rootViewController as! NavController
3233
//swiftlint:disable:next force_cast
3334
let tabController = root.viewControllers[0] as! TabController
35+
tabController.viewControllers![1] = CABTMIDILocalPeripheralViewController()
3436
switch shortcutItem.type {
3537
case "com.matt.midimittr.advertise":
3638
tabController.selectedIndex = 1

midimittr/BLEAdvertViewController.swift

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@
33
import UIKit
44
import CoreAudioKit
55

6-
class BLEAdvertViewController: UIViewController {
6+
class BLEAdvertViewController: CABTMIDILocalPeripheralViewController {
77

8-
private var bleVC = CABTMIDILocalPeripheralViewController()
9-
10-
override func viewDidLoad() {
11-
super.viewDidLoad()
12-
bleVC.view.frame = self.view.frame
13-
view.addSubview(bleVC.view)
14-
}
158

169
override func viewWillAppear(_ animated: Bool) {
1710
super.viewWillAppear(animated)
11+
// for subView in view.subviews {
12+
// subView.removeFromSuperview()
13+
// }
14+
// var bleVC = CABTMIDILocalPeripheralViewController()
15+
// bleVC.view.frame = self.view.frame
16+
// view.addSubview(bleVC.view)
1817
self.navigationController!.navigationBar.topItem?.title = "Bluetooth Advertising"
1918
}
2019
}

midimittr/Base.lproj/MainNew.storyboard

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="i92-3K-T0V">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="i92-3K-T0V">
33
<device id="retina4_7" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
77
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
88
</dependencies>
99
<scenes>
@@ -136,7 +136,7 @@
136136
<!--Advertising-->
137137
<scene sceneID="Q3q-2Y-tpF">
138138
<objects>
139-
<viewController title="Advertising" id="MGW-dE-Ylo" customClass="BLEAdvertViewController" customModule="midimittr" customModuleProvider="target" sceneMemberID="viewController">
139+
<viewController title="Advertising" id="MGW-dE-Ylo" customClass="CABTMIDILocalPeripheralViewController" sceneMemberID="viewController">
140140
<layoutGuides>
141141
<viewControllerLayoutGuide type="top" id="RUh-Km-0aY"/>
142142
<viewControllerLayoutGuide type="bottom" id="brl-cJ-ULG"/>

midimittr/NavController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ class NavController: UINavigationController {
1313
//swiftlint:disable:next force_cast
1414
let tabController = self.viewControllers[0] as! TabController
1515
tabController.appContext = appContext
16-
let attributeThin = [ NSAttributedStringKey.font: UIFont.systemFont(ofSize: 18, weight: .light) ]
17-
let attributeBold = [ NSAttributedStringKey.font: UIFont.systemFont(ofSize: 18, weight: .bold) ]
16+
let attributeThin = [ NSAttributedString.Key.font: UIFont.systemFont(ofSize: 18, weight: .light) ]
17+
let attributeBold = [ NSAttributedString.Key.font: UIFont.systemFont(ofSize: 18, weight: .bold) ]
1818
let midiStr = NSMutableAttributedString(string: "midi", attributes: attributeThin)
1919
let mittrStr = NSAttributedString(string: "mittr", attributes: attributeBold)
2020
midiStr.append(mittrStr)

midimittr/NavControllerExtensions.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ extension UINavigationController {
1717
if #available(iOS 12.0, *) {
1818
let userInterfaceStyle = traitCollection.userInterfaceStyle
1919
if userInterfaceStyle == .dark {
20+
self.view.backgroundColor = UIColor.DarkColors.backgroundColor
2021
self.navigationBar.tintColor = UIColor.DarkColors.tintColor
2122
self.self.navigationBar.backgroundColor = UIColor.DarkColors.backgroundColor
2223
}
2324
if userInterfaceStyle == .light {
25+
self.view.backgroundColor = UIColor.LightColors.backgroundColor
2426
self.navigationBar.tintColor = UIColor.LightColors.tintColor
2527
self.self.navigationBar.backgroundColor = UIColor.LightColors.backgroundColor
2628
}

midimittr/TabController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ class TabController: UITabBarController {
3131
}
3232

3333
@objc func openSettings() {
34-
UIApplication.shared.openURL(URL(string: UIApplicationOpenSettingsURLString)!)
34+
UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!, options: [:], completionHandler: nil)
3535
}
3636

3737
@objc func openWebPage() {
3838
let url = URL(string: "http://www.s-r-n.de/midimittr")!
3939
let alert = UIAlertController(title: "midiMittr Website",
4040
message: "Open midiMittr Website?", preferredStyle: .alert)
4141
alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: { (_) in
42-
UIApplication.shared.openURL(url)
42+
UIApplication.shared.open(url, options: [:], completionHandler: nil)
4343
}))
4444
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
4545
present(alert, animated: false, completion: nil)

0 commit comments

Comments
 (0)