├── screen.png
├── BLE_Mac_Scanner.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── RetinaYod.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── BLE_Mac_Scanner.xccheckout
├── xcuserdata
│ ├── GrownYoda.xcuserdatad
│ │ └── xcschemes
│ │ │ ├── xcschememanagement.plist
│ │ │ └── MacAppIntro.xcscheme
│ └── RetinaYod.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── BLE_Mac_Scanner.xcscheme
└── project.pbxproj
├── README.md
├── MacAppIntro
├── AppDelegate.swift
├── Images.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── ViewController.swift
└── Base.lproj
│ └── Main.storyboard
└── MacAppIntroTests
├── Info.plist
└── MacAppIntroTests.swift
/screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yurygitman/BLE-Mac-Scanner/HEAD/screen.png
--------------------------------------------------------------------------------
/BLE_Mac_Scanner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/BLE_Mac_Scanner.xcodeproj/project.xcworkspace/xcuserdata/RetinaYod.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yurygitman/BLE-Mac-Scanner/HEAD/BLE_Mac_Scanner.xcodeproj/project.xcworkspace/xcuserdata/RetinaYod.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # BLE-Mac-Scanner
2 | + Scan and Print Advertising Data of BLE Devices Near Your Mac.
3 | + Written in Swift.
4 | + CBCentralManagerDelegate, CBPeripheralDelegate, and NSTableViewDataSource are used.
5 |
6 | # Screen Shot
7 | 
8 |
9 | # Code Runs On:
10 | + iOS 8.3+
11 | + OSX 10.10+
12 | + xCode 6.3+
13 |
14 |
--------------------------------------------------------------------------------
/MacAppIntro/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // MacAppIntro
4 | //
5 | // Created by GrownYoda on 4/6/15.
6 | // Copyright (c) 2015 yuryg. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 |
11 | @NSApplicationMain
12 | class AppDelegate: NSObject, NSApplicationDelegate {
13 |
14 |
15 |
16 | func applicationDidFinishLaunching(aNotification: NSNotification) {
17 | // Insert code here to initialize your application
18 | }
19 |
20 | func applicationWillTerminate(aNotification: NSNotification) {
21 | // Insert code here to tear down your application
22 | }
23 |
24 |
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/BLE_Mac_Scanner.xcodeproj/xcuserdata/GrownYoda.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MacAppIntro.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 6CCE7F781AD2D4800071AD85
16 |
17 | primary
18 |
19 |
20 | 6CCE7F8A1AD2D4800071AD85
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/BLE_Mac_Scanner.xcodeproj/xcuserdata/RetinaYod.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | BLE_Mac_Scanner.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 6CCE7F781AD2D4800071AD85
16 |
17 | primary
18 |
19 |
20 | 6CCE7F8A1AD2D4800071AD85
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/MacAppIntroTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | yuryg.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/MacAppIntroTests/MacAppIntroTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MacAppIntroTests.swift
3 | // MacAppIntroTests
4 | //
5 | // Created by GrownYoda on 4/6/15.
6 | // Copyright (c) 2015 yuryg. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 | import XCTest
11 |
12 | class MacAppIntroTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/MacAppIntro/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "size" : "16x16",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "size" : "16x16",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "size" : "32x32",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "size" : "32x32",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "size" : "128x128",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "size" : "128x128",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "size" : "256x256",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "size" : "256x256",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "size" : "512x512",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "size" : "512x512",
51 | "scale" : "2x"
52 | }
53 | ],
54 | "info" : {
55 | "version" : 1,
56 | "author" : "xcode"
57 | }
58 | }
--------------------------------------------------------------------------------
/MacAppIntro/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | yuryg.$(PRODUCT_NAME:rfc1034identifier)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | $(MACOSX_DEPLOYMENT_TARGET)
27 | NSHumanReadableCopyright
28 | Copyright © 2015 yuryg. All rights reserved.
29 | NSMainStoryboardFile
30 | Main
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/BLE_Mac_Scanner.xcodeproj/project.xcworkspace/xcshareddata/BLE_Mac_Scanner.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 141BA753-C1A8-4722-8DDD-8D754448A3D3
9 | IDESourceControlProjectName
10 | BLE_Mac_Scanner
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | BC8F6BFCA0579E559E99030CE37DD7D59A0444C8
14 | https://github.com/samuraipapa/BLE-Mac-Scanner.git
15 |
16 | IDESourceControlProjectPath
17 | BLE_Mac_Scanner.xcodeproj
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | BC8F6BFCA0579E559E99030CE37DD7D59A0444C8
21 | ../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/samuraipapa/BLE-Mac-Scanner.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | BC8F6BFCA0579E559E99030CE37DD7D59A0444C8
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | BC8F6BFCA0579E559E99030CE37DD7D59A0444C8
36 | IDESourceControlWCCName
37 | MacAppIntro
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/BLE_Mac_Scanner.xcodeproj/xcuserdata/RetinaYod.xcuserdatad/xcschemes/BLE_Mac_Scanner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
64 |
66 |
72 |
73 |
74 |
75 |
76 |
77 |
83 |
85 |
91 |
92 |
93 |
94 |
96 |
97 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/BLE_Mac_Scanner.xcodeproj/xcuserdata/GrownYoda.xcuserdatad/xcschemes/MacAppIntro.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
75 |
77 |
83 |
84 |
85 |
86 |
87 |
88 |
94 |
96 |
102 |
103 |
104 |
105 |
107 |
108 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/MacAppIntro/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // MacAppIntro
4 | //
5 | // Created by GrownYoda on 4/6/15.
6 | // Copyright (c) 2015 yuryg. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 | import CoreBluetooth
11 |
12 | class ViewController: NSViewController, CBCentralManagerDelegate, CBPeripheralDelegate, NSTableViewDataSource {
13 |
14 |
15 | //
16 | var starterArray:[AnyObject] = NSLocale.preferredLanguages()
17 |
18 | //
19 | var myArray = ["One","Two","Three","Four"]
20 |
21 | // BLE Stuff
22 | var myCentralManager = CBCentralManager()
23 | var peripheralArray = [CBPeripheral]() // create now empty array.
24 |
25 | var fullPeripheralArray = [("UUIDString","RSSI", "Name", "Services1")]
26 |
27 | var myPeripheralDictionary:[String:(String, String, String, String)] = ["UUIDString":("UUIDString","RSSI", "Name","Services1")]
28 |
29 | var cleanAndSortedArray = [("UUIDString","RSSI", "Name","Services1")]
30 |
31 |
32 |
33 | // UI Stuff
34 | @IBOutlet weak var inputText: NSTextField!
35 | @IBOutlet weak var outputText: NSTextField!
36 | @IBOutlet weak var labelStatus: NSTextField!
37 | @IBOutlet weak var tableView: NSTableView!
38 |
39 |
40 | @IBAction func scanButtonCell(sender: NSButtonCell) {
41 |
42 | print("sender.state" + String(sender.state) + "\r")
43 |
44 | if sender.state == 1{
45 | updateStatusLabel("Scannning")
46 | myCentralManager.scanForPeripheralsWithServices(nil, options: nil ) // call to scan for services
47 |
48 |
49 | } else {
50 | updateStatusLabel("Not Scanning")
51 | myCentralManager.stopScan()
52 | }
53 |
54 |
55 | }
56 |
57 | @IBAction func refreshButton(sender: NSButtonCell) {
58 |
59 |
60 |
61 | if sender.state == 1{
62 | updateStatusLabel("Scannning")
63 | myCentralManager.scanForPeripheralsWithServices(nil, options: nil ) // call to scan for services
64 |
65 |
66 | } else {
67 | updateStatusLabel("Not Scanning")
68 | myCentralManager.stopScan()
69 |
70 | fullPeripheralArray = [("","","","")]
71 | cleanAndSortedArray = [("","","","")]
72 | tableView.reloadData()
73 |
74 |
75 |
76 |
77 | }
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | }
86 |
87 |
88 | override func viewDidLoad() {
89 | super.viewDidLoad()
90 |
91 | // Do any additional setup after loading the view.
92 | }
93 |
94 | override var representedObject: AnyObject? {
95 | didSet {
96 | // Update the view, if already loaded.
97 | }
98 | }
99 |
100 |
101 | // NSTableView
102 |
103 | func numberOfRowsInTableView(tableView: NSTableView) -> Int {
104 | return cleanAndSortedArray.count
105 | }
106 |
107 |
108 |
109 | func tableView(tableView: NSTableView, objectValueForTableColumn tableColumn: NSTableColumn?, row: Int) -> AnyObject? {
110 |
111 | if tableColumn?.identifier == "first" {
112 | let myString = cleanAndSortedArray[row].0
113 | return myString
114 | }
115 | if tableColumn?.identifier == "second"{
116 | let myString = "\(cleanAndSortedArray[row].1)"
117 | return myString
118 | }
119 |
120 | if tableColumn?.identifier == "third"{
121 | let myString = "\(cleanAndSortedArray[row].2)"
122 | return myString
123 |
124 | }
125 |
126 | if tableColumn?.identifier == "forth"{
127 | let myString = "\(cleanAndSortedArray[row].3)"
128 | return myString
129 |
130 | }
131 |
132 |
133 | else{
134 | let myString = "\(cleanAndSortedArray[row].3)"
135 | return myString
136 | }
137 | }
138 |
139 | //
140 | // if tableColumn == 0 {
141 | // return myArray[row]
142 | // } else {
143 | // let reverseArray = myArray.reverse()
144 | // return reverseArray[row]
145 | // }
146 | // }
147 |
148 |
149 | //MARK CoreBluetooth Stuff
150 |
151 |
152 |
153 | // Put CentralManager in the main queue
154 | required init?(coder aDecoder: NSCoder) {
155 | super.init(coder: aDecoder)
156 | myCentralManager = CBCentralManager(delegate: self, queue: dispatch_get_main_queue())
157 |
158 | }
159 |
160 |
161 |
162 |
163 |
164 | func centralManagerDidUpdateState(central: CBCentralManager) {
165 |
166 | print("centralManagerDidUpdateState")
167 |
168 | /*
169 | typedef enum {
170 | CBCentralManagerStateUnknown = 0,
171 | CBCentralManagerStateResetting ,
172 | CBCentralManagerStateUnsupported ,
173 | CBCentralManagerStateUnauthorized ,
174 | CBCentralManagerStatePoweredOff ,
175 | CBCentralManagerStatePoweredOn ,
176 | } CBCentralManagerState;
177 | */
178 | switch central.state{
179 | case .PoweredOn:
180 | updateStatusLabel("poweredOn")
181 |
182 |
183 | case .PoweredOff:
184 | updateStatusLabel("Central State PoweredOFF")
185 |
186 | case .Resetting:
187 | updateStatusLabel("Central State Resetting")
188 |
189 | case .Unauthorized:
190 | updateStatusLabel("Central State Unauthorized")
191 |
192 | case .Unknown:
193 | updateStatusLabel("Central State Unknown")
194 |
195 | case .Unsupported:
196 | updateStatusLabel("Central State Unsupported")
197 |
198 | default:
199 | updateStatusLabel("Central State None Of The Above")
200 |
201 | }
202 | }
203 |
204 | func updateStatusLabel(passedString: String ){
205 | labelStatus.stringValue = passedString
206 | }
207 |
208 |
209 | func updateOutputText(passedString: String ){
210 | outputText.stringValue = passedString + "\r" + outputText.stringValue
211 | }
212 |
213 |
214 | func centralManager(central: CBCentralManager, didDiscoverPeripheral peripheral: CBPeripheral, advertisementData: [String : AnyObject], RSSI: NSNumber) {
215 |
216 | // Refresh Entry or Make an New Entry into Dictionary
217 | let myUUIDString = peripheral.identifier.UUIDString
218 | let myRSSIString = String(RSSI.intValue)
219 | let myNameString = peripheral.name
220 | var myAdvertisedServices = peripheral.services
221 |
222 | // var myServices1 = peripheral.services
223 | // var serviceString = " service string "
224 |
225 | var myArray = advertisementData
226 | let advertString = "\(advertisementData)"
227 |
228 |
229 |
230 | // serviceString = "service: \(myArray)"
231 | // println(serviceString)
232 | // updateOutputText("service:" + serviceString)
233 |
234 |
235 | updateOutputText("\r")
236 | updateOutputText("UUID: " + myUUIDString)
237 | updateOutputText("RSSI: " + myRSSIString)
238 | updateOutputText("Name: \(myNameString)")
239 | updateOutputText("advertString: " + advertString)
240 |
241 |
242 |
243 | let myTuple = (myUUIDString, myRSSIString, "\(myNameString)", advertString )
244 | myPeripheralDictionary[myTuple.0] = myTuple
245 |
246 | // Clean Array
247 | fullPeripheralArray.removeAll(keepCapacity: false)
248 |
249 | // Tranfer Dictionary to Array
250 | for eachItem in myPeripheralDictionary{
251 | fullPeripheralArray.append(eachItem.1)
252 | }
253 |
254 | // Sort Array by RSSI
255 | //from http://www.andrewcbancroft.com/2014/08/16/sort-yourself-out-sorting-an-array-in-swift/
256 | cleanAndSortedArray = fullPeripheralArray.sort({
257 | (str1: (String,String,String,String) , str2: (String,String,String,String) ) -> Bool in
258 | return Int(str1.1) > Int(str2.1)
259 | })
260 |
261 |
262 |
263 |
264 |
265 |
266 | tableView.reloadData()
267 |
268 | }
269 |
270 |
271 |
272 |
273 | }
274 |
275 |
--------------------------------------------------------------------------------
/BLE_Mac_Scanner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 6CCE7F7F1AD2D4800071AD85 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CCE7F7E1AD2D4800071AD85 /* AppDelegate.swift */; };
11 | 6CCE7F811AD2D4800071AD85 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CCE7F801AD2D4800071AD85 /* ViewController.swift */; };
12 | 6CCE7F831AD2D4800071AD85 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6CCE7F821AD2D4800071AD85 /* Images.xcassets */; };
13 | 6CCE7F861AD2D4800071AD85 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6CCE7F841AD2D4800071AD85 /* Main.storyboard */; };
14 | 6CCE7F921AD2D4800071AD85 /* MacAppIntroTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CCE7F911AD2D4800071AD85 /* MacAppIntroTests.swift */; };
15 | /* End PBXBuildFile section */
16 |
17 | /* Begin PBXContainerItemProxy section */
18 | 6CCE7F8C1AD2D4800071AD85 /* PBXContainerItemProxy */ = {
19 | isa = PBXContainerItemProxy;
20 | containerPortal = 6CCE7F711AD2D4800071AD85 /* Project object */;
21 | proxyType = 1;
22 | remoteGlobalIDString = 6CCE7F781AD2D4800071AD85;
23 | remoteInfo = MacAppIntro;
24 | };
25 | /* End PBXContainerItemProxy section */
26 |
27 | /* Begin PBXFileReference section */
28 | 6CCE7F791AD2D4800071AD85 /* BLE_Mac_Scanner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BLE_Mac_Scanner.app; sourceTree = BUILT_PRODUCTS_DIR; };
29 | 6CCE7F7D1AD2D4800071AD85 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
30 | 6CCE7F7E1AD2D4800071AD85 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
31 | 6CCE7F801AD2D4800071AD85 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
32 | 6CCE7F821AD2D4800071AD85 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
33 | 6CCE7F851AD2D4800071AD85 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
34 | 6CCE7F8B1AD2D4800071AD85 /* BLE_Mac_ScannerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BLE_Mac_ScannerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
35 | 6CCE7F901AD2D4800071AD85 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
36 | 6CCE7F911AD2D4800071AD85 /* MacAppIntroTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MacAppIntroTests.swift; sourceTree = ""; };
37 | /* End PBXFileReference section */
38 |
39 | /* Begin PBXFrameworksBuildPhase section */
40 | 6CCE7F761AD2D4800071AD85 /* Frameworks */ = {
41 | isa = PBXFrameworksBuildPhase;
42 | buildActionMask = 2147483647;
43 | files = (
44 | );
45 | runOnlyForDeploymentPostprocessing = 0;
46 | };
47 | 6CCE7F881AD2D4800071AD85 /* Frameworks */ = {
48 | isa = PBXFrameworksBuildPhase;
49 | buildActionMask = 2147483647;
50 | files = (
51 | );
52 | runOnlyForDeploymentPostprocessing = 0;
53 | };
54 | /* End PBXFrameworksBuildPhase section */
55 |
56 | /* Begin PBXGroup section */
57 | 6CCE7F701AD2D4800071AD85 = {
58 | isa = PBXGroup;
59 | children = (
60 | 6CCE7F7B1AD2D4800071AD85 /* MacAppIntro */,
61 | 6CCE7F8E1AD2D4800071AD85 /* MacAppIntroTests */,
62 | 6CCE7F7A1AD2D4800071AD85 /* Products */,
63 | );
64 | sourceTree = "";
65 | };
66 | 6CCE7F7A1AD2D4800071AD85 /* Products */ = {
67 | isa = PBXGroup;
68 | children = (
69 | 6CCE7F791AD2D4800071AD85 /* BLE_Mac_Scanner.app */,
70 | 6CCE7F8B1AD2D4800071AD85 /* BLE_Mac_ScannerTests.xctest */,
71 | );
72 | name = Products;
73 | sourceTree = "";
74 | };
75 | 6CCE7F7B1AD2D4800071AD85 /* MacAppIntro */ = {
76 | isa = PBXGroup;
77 | children = (
78 | 6CCE7F7E1AD2D4800071AD85 /* AppDelegate.swift */,
79 | 6CCE7F801AD2D4800071AD85 /* ViewController.swift */,
80 | 6CCE7F821AD2D4800071AD85 /* Images.xcassets */,
81 | 6CCE7F841AD2D4800071AD85 /* Main.storyboard */,
82 | 6CCE7F7C1AD2D4800071AD85 /* Supporting Files */,
83 | );
84 | path = MacAppIntro;
85 | sourceTree = "";
86 | };
87 | 6CCE7F7C1AD2D4800071AD85 /* Supporting Files */ = {
88 | isa = PBXGroup;
89 | children = (
90 | 6CCE7F7D1AD2D4800071AD85 /* Info.plist */,
91 | );
92 | name = "Supporting Files";
93 | sourceTree = "";
94 | };
95 | 6CCE7F8E1AD2D4800071AD85 /* MacAppIntroTests */ = {
96 | isa = PBXGroup;
97 | children = (
98 | 6CCE7F911AD2D4800071AD85 /* MacAppIntroTests.swift */,
99 | 6CCE7F8F1AD2D4800071AD85 /* Supporting Files */,
100 | );
101 | path = MacAppIntroTests;
102 | sourceTree = "";
103 | };
104 | 6CCE7F8F1AD2D4800071AD85 /* Supporting Files */ = {
105 | isa = PBXGroup;
106 | children = (
107 | 6CCE7F901AD2D4800071AD85 /* Info.plist */,
108 | );
109 | name = "Supporting Files";
110 | sourceTree = "";
111 | };
112 | /* End PBXGroup section */
113 |
114 | /* Begin PBXNativeTarget section */
115 | 6CCE7F781AD2D4800071AD85 /* BLE_Mac_Scanner */ = {
116 | isa = PBXNativeTarget;
117 | buildConfigurationList = 6CCE7F951AD2D4800071AD85 /* Build configuration list for PBXNativeTarget "BLE_Mac_Scanner" */;
118 | buildPhases = (
119 | 6CCE7F751AD2D4800071AD85 /* Sources */,
120 | 6CCE7F761AD2D4800071AD85 /* Frameworks */,
121 | 6CCE7F771AD2D4800071AD85 /* Resources */,
122 | );
123 | buildRules = (
124 | );
125 | dependencies = (
126 | );
127 | name = BLE_Mac_Scanner;
128 | productName = MacAppIntro;
129 | productReference = 6CCE7F791AD2D4800071AD85 /* BLE_Mac_Scanner.app */;
130 | productType = "com.apple.product-type.application";
131 | };
132 | 6CCE7F8A1AD2D4800071AD85 /* BLE_Mac_ScannerTests */ = {
133 | isa = PBXNativeTarget;
134 | buildConfigurationList = 6CCE7F981AD2D4800071AD85 /* Build configuration list for PBXNativeTarget "BLE_Mac_ScannerTests" */;
135 | buildPhases = (
136 | 6CCE7F871AD2D4800071AD85 /* Sources */,
137 | 6CCE7F881AD2D4800071AD85 /* Frameworks */,
138 | 6CCE7F891AD2D4800071AD85 /* Resources */,
139 | );
140 | buildRules = (
141 | );
142 | dependencies = (
143 | 6CCE7F8D1AD2D4800071AD85 /* PBXTargetDependency */,
144 | );
145 | name = BLE_Mac_ScannerTests;
146 | productName = MacAppIntroTests;
147 | productReference = 6CCE7F8B1AD2D4800071AD85 /* BLE_Mac_ScannerTests.xctest */;
148 | productType = "com.apple.product-type.bundle.unit-test";
149 | };
150 | /* End PBXNativeTarget section */
151 |
152 | /* Begin PBXProject section */
153 | 6CCE7F711AD2D4800071AD85 /* Project object */ = {
154 | isa = PBXProject;
155 | attributes = {
156 | LastSwiftMigration = 0730;
157 | LastSwiftUpdateCheck = 0730;
158 | LastUpgradeCheck = 0620;
159 | ORGANIZATIONNAME = yuryg;
160 | TargetAttributes = {
161 | 6CCE7F781AD2D4800071AD85 = {
162 | CreatedOnToolsVersion = 6.2;
163 | };
164 | 6CCE7F8A1AD2D4800071AD85 = {
165 | CreatedOnToolsVersion = 6.2;
166 | TestTargetID = 6CCE7F781AD2D4800071AD85;
167 | };
168 | };
169 | };
170 | buildConfigurationList = 6CCE7F741AD2D4800071AD85 /* Build configuration list for PBXProject "BLE_Mac_Scanner" */;
171 | compatibilityVersion = "Xcode 3.2";
172 | developmentRegion = English;
173 | hasScannedForEncodings = 0;
174 | knownRegions = (
175 | en,
176 | Base,
177 | );
178 | mainGroup = 6CCE7F701AD2D4800071AD85;
179 | productRefGroup = 6CCE7F7A1AD2D4800071AD85 /* Products */;
180 | projectDirPath = "";
181 | projectRoot = "";
182 | targets = (
183 | 6CCE7F781AD2D4800071AD85 /* BLE_Mac_Scanner */,
184 | 6CCE7F8A1AD2D4800071AD85 /* BLE_Mac_ScannerTests */,
185 | );
186 | };
187 | /* End PBXProject section */
188 |
189 | /* Begin PBXResourcesBuildPhase section */
190 | 6CCE7F771AD2D4800071AD85 /* Resources */ = {
191 | isa = PBXResourcesBuildPhase;
192 | buildActionMask = 2147483647;
193 | files = (
194 | 6CCE7F831AD2D4800071AD85 /* Images.xcassets in Resources */,
195 | 6CCE7F861AD2D4800071AD85 /* Main.storyboard in Resources */,
196 | );
197 | runOnlyForDeploymentPostprocessing = 0;
198 | };
199 | 6CCE7F891AD2D4800071AD85 /* Resources */ = {
200 | isa = PBXResourcesBuildPhase;
201 | buildActionMask = 2147483647;
202 | files = (
203 | );
204 | runOnlyForDeploymentPostprocessing = 0;
205 | };
206 | /* End PBXResourcesBuildPhase section */
207 |
208 | /* Begin PBXSourcesBuildPhase section */
209 | 6CCE7F751AD2D4800071AD85 /* Sources */ = {
210 | isa = PBXSourcesBuildPhase;
211 | buildActionMask = 2147483647;
212 | files = (
213 | 6CCE7F811AD2D4800071AD85 /* ViewController.swift in Sources */,
214 | 6CCE7F7F1AD2D4800071AD85 /* AppDelegate.swift in Sources */,
215 | );
216 | runOnlyForDeploymentPostprocessing = 0;
217 | };
218 | 6CCE7F871AD2D4800071AD85 /* Sources */ = {
219 | isa = PBXSourcesBuildPhase;
220 | buildActionMask = 2147483647;
221 | files = (
222 | 6CCE7F921AD2D4800071AD85 /* MacAppIntroTests.swift in Sources */,
223 | );
224 | runOnlyForDeploymentPostprocessing = 0;
225 | };
226 | /* End PBXSourcesBuildPhase section */
227 |
228 | /* Begin PBXTargetDependency section */
229 | 6CCE7F8D1AD2D4800071AD85 /* PBXTargetDependency */ = {
230 | isa = PBXTargetDependency;
231 | target = 6CCE7F781AD2D4800071AD85 /* BLE_Mac_Scanner */;
232 | targetProxy = 6CCE7F8C1AD2D4800071AD85 /* PBXContainerItemProxy */;
233 | };
234 | /* End PBXTargetDependency section */
235 |
236 | /* Begin PBXVariantGroup section */
237 | 6CCE7F841AD2D4800071AD85 /* Main.storyboard */ = {
238 | isa = PBXVariantGroup;
239 | children = (
240 | 6CCE7F851AD2D4800071AD85 /* Base */,
241 | );
242 | name = Main.storyboard;
243 | sourceTree = "";
244 | };
245 | /* End PBXVariantGroup section */
246 |
247 | /* Begin XCBuildConfiguration section */
248 | 6CCE7F931AD2D4800071AD85 /* Debug */ = {
249 | isa = XCBuildConfiguration;
250 | buildSettings = {
251 | ALWAYS_SEARCH_USER_PATHS = NO;
252 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
253 | CLANG_CXX_LIBRARY = "libc++";
254 | CLANG_ENABLE_MODULES = YES;
255 | CLANG_ENABLE_OBJC_ARC = YES;
256 | CLANG_WARN_BOOL_CONVERSION = YES;
257 | CLANG_WARN_CONSTANT_CONVERSION = YES;
258 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
259 | CLANG_WARN_EMPTY_BODY = YES;
260 | CLANG_WARN_ENUM_CONVERSION = YES;
261 | CLANG_WARN_INT_CONVERSION = YES;
262 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
263 | CLANG_WARN_UNREACHABLE_CODE = YES;
264 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
265 | CODE_SIGN_IDENTITY = "-";
266 | COPY_PHASE_STRIP = NO;
267 | ENABLE_STRICT_OBJC_MSGSEND = YES;
268 | GCC_C_LANGUAGE_STANDARD = gnu99;
269 | GCC_DYNAMIC_NO_PIC = NO;
270 | GCC_OPTIMIZATION_LEVEL = 0;
271 | GCC_PREPROCESSOR_DEFINITIONS = (
272 | "DEBUG=1",
273 | "$(inherited)",
274 | );
275 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
276 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
277 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
278 | GCC_WARN_UNDECLARED_SELECTOR = YES;
279 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
280 | GCC_WARN_UNUSED_FUNCTION = YES;
281 | GCC_WARN_UNUSED_VARIABLE = YES;
282 | MACOSX_DEPLOYMENT_TARGET = 10.10;
283 | MTL_ENABLE_DEBUG_INFO = YES;
284 | ONLY_ACTIVE_ARCH = YES;
285 | SDKROOT = macosx;
286 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
287 | };
288 | name = Debug;
289 | };
290 | 6CCE7F941AD2D4800071AD85 /* Release */ = {
291 | isa = XCBuildConfiguration;
292 | buildSettings = {
293 | ALWAYS_SEARCH_USER_PATHS = NO;
294 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
295 | CLANG_CXX_LIBRARY = "libc++";
296 | CLANG_ENABLE_MODULES = YES;
297 | CLANG_ENABLE_OBJC_ARC = YES;
298 | CLANG_WARN_BOOL_CONVERSION = YES;
299 | CLANG_WARN_CONSTANT_CONVERSION = YES;
300 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
301 | CLANG_WARN_EMPTY_BODY = YES;
302 | CLANG_WARN_ENUM_CONVERSION = YES;
303 | CLANG_WARN_INT_CONVERSION = YES;
304 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
305 | CLANG_WARN_UNREACHABLE_CODE = YES;
306 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
307 | CODE_SIGN_IDENTITY = "-";
308 | COPY_PHASE_STRIP = NO;
309 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
310 | ENABLE_NS_ASSERTIONS = NO;
311 | ENABLE_STRICT_OBJC_MSGSEND = YES;
312 | GCC_C_LANGUAGE_STANDARD = gnu99;
313 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
314 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
315 | GCC_WARN_UNDECLARED_SELECTOR = YES;
316 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
317 | GCC_WARN_UNUSED_FUNCTION = YES;
318 | GCC_WARN_UNUSED_VARIABLE = YES;
319 | MACOSX_DEPLOYMENT_TARGET = 10.10;
320 | MTL_ENABLE_DEBUG_INFO = NO;
321 | SDKROOT = macosx;
322 | };
323 | name = Release;
324 | };
325 | 6CCE7F961AD2D4800071AD85 /* Debug */ = {
326 | isa = XCBuildConfiguration;
327 | buildSettings = {
328 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
329 | COMBINE_HIDPI_IMAGES = YES;
330 | INFOPLIST_FILE = MacAppIntro/Info.plist;
331 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
332 | PRODUCT_NAME = BLE_Mac_Scanner;
333 | };
334 | name = Debug;
335 | };
336 | 6CCE7F971AD2D4800071AD85 /* Release */ = {
337 | isa = XCBuildConfiguration;
338 | buildSettings = {
339 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
340 | COMBINE_HIDPI_IMAGES = YES;
341 | INFOPLIST_FILE = MacAppIntro/Info.plist;
342 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
343 | PRODUCT_NAME = BLE_Mac_Scanner;
344 | };
345 | name = Release;
346 | };
347 | 6CCE7F991AD2D4800071AD85 /* Debug */ = {
348 | isa = XCBuildConfiguration;
349 | buildSettings = {
350 | BUNDLE_LOADER = "$(TEST_HOST)";
351 | COMBINE_HIDPI_IMAGES = YES;
352 | FRAMEWORK_SEARCH_PATHS = (
353 | "$(DEVELOPER_FRAMEWORKS_DIR)",
354 | "$(inherited)",
355 | );
356 | GCC_PREPROCESSOR_DEFINITIONS = (
357 | "DEBUG=1",
358 | "$(inherited)",
359 | );
360 | INFOPLIST_FILE = MacAppIntroTests/Info.plist;
361 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
362 | PRODUCT_NAME = BLE_Mac_ScannerTests;
363 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BLE_Mac_Scanner.app/Contents/MacOS/BLE_Mac_Scanner";
364 | };
365 | name = Debug;
366 | };
367 | 6CCE7F9A1AD2D4800071AD85 /* Release */ = {
368 | isa = XCBuildConfiguration;
369 | buildSettings = {
370 | BUNDLE_LOADER = "$(TEST_HOST)";
371 | COMBINE_HIDPI_IMAGES = YES;
372 | FRAMEWORK_SEARCH_PATHS = (
373 | "$(DEVELOPER_FRAMEWORKS_DIR)",
374 | "$(inherited)",
375 | );
376 | INFOPLIST_FILE = MacAppIntroTests/Info.plist;
377 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
378 | PRODUCT_NAME = BLE_Mac_ScannerTests;
379 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BLE_Mac_Scanner.app/Contents/MacOS/BLE_Mac_Scanner";
380 | };
381 | name = Release;
382 | };
383 | /* End XCBuildConfiguration section */
384 |
385 | /* Begin XCConfigurationList section */
386 | 6CCE7F741AD2D4800071AD85 /* Build configuration list for PBXProject "BLE_Mac_Scanner" */ = {
387 | isa = XCConfigurationList;
388 | buildConfigurations = (
389 | 6CCE7F931AD2D4800071AD85 /* Debug */,
390 | 6CCE7F941AD2D4800071AD85 /* Release */,
391 | );
392 | defaultConfigurationIsVisible = 0;
393 | defaultConfigurationName = Release;
394 | };
395 | 6CCE7F951AD2D4800071AD85 /* Build configuration list for PBXNativeTarget "BLE_Mac_Scanner" */ = {
396 | isa = XCConfigurationList;
397 | buildConfigurations = (
398 | 6CCE7F961AD2D4800071AD85 /* Debug */,
399 | 6CCE7F971AD2D4800071AD85 /* Release */,
400 | );
401 | defaultConfigurationIsVisible = 0;
402 | defaultConfigurationName = Release;
403 | };
404 | 6CCE7F981AD2D4800071AD85 /* Build configuration list for PBXNativeTarget "BLE_Mac_ScannerTests" */ = {
405 | isa = XCConfigurationList;
406 | buildConfigurations = (
407 | 6CCE7F991AD2D4800071AD85 /* Debug */,
408 | 6CCE7F9A1AD2D4800071AD85 /* Release */,
409 | );
410 | defaultConfigurationIsVisible = 0;
411 | defaultConfigurationName = Release;
412 | };
413 | /* End XCConfigurationList section */
414 | };
415 | rootObject = 6CCE7F711AD2D4800071AD85 /* Project object */;
416 | }
417 |
--------------------------------------------------------------------------------
/MacAppIntro/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
641 |
642 |
643 |
644 |
645 |
646 |
647 |
648 |
649 |
650 |
651 |
652 |
653 |
654 |
655 |
656 |
657 |
658 |
659 |
660 |
661 |
662 |
663 |
664 |
665 |
666 |
667 |
668 |
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
682 |
683 |
684 |
685 |
686 |
687 |
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
699 |
712 |
725 |
726 |
727 |
728 |
729 |
730 |
731 |
732 |
733 |
734 |
735 |
736 |
737 |
738 |
739 |
740 |
741 |
742 |
743 |
744 |
745 |
746 |
747 |
748 |
749 |
750 |
751 |
752 |
753 |
754 |
755 |
756 |
757 |
758 |
759 |
760 |
761 |
762 |
763 |
764 |
765 |
766 |
767 |
768 |
769 |
770 |
771 |
772 |
773 |
774 |
775 |
776 |
777 |
778 |
779 |
780 |
781 |
782 |
783 |
784 |
785 |
786 |
787 |
788 |
789 |
790 |
791 |
792 |
793 |
794 |
795 |
796 |
797 |
798 |
799 |
800 |
801 |
802 |
803 |
804 |
805 |
806 |
807 |
808 |
809 |
810 |
811 |
812 |
813 |
814 |
815 |
816 |
817 |
818 |
819 |
820 |
821 |
822 |
823 |
824 |
825 |
826 |
827 |
828 |
829 |
830 |
831 |
832 |
833 |
834 |
835 |
836 |
837 |
838 |
839 |
840 |
841 |
842 |
843 |
844 |
845 |
846 |
847 |
848 |
849 |
850 |
851 |
852 |
853 |
854 |
855 |
856 |
857 |
858 |
859 |
860 |
--------------------------------------------------------------------------------