├── Examples
├── SwiftPackageExample
│ ├── .gitignore
│ ├── README.md
│ ├── Tests
│ │ ├── LinuxMain.swift
│ │ └── SwiftPackageExampleTests
│ │ │ ├── XCTestManifests.swift
│ │ │ └── SwiftPackageExampleTests.swift
│ ├── Sources
│ │ └── SwiftPackageExample
│ │ │ └── main.swift
│ └── Package.swift
├── iOSExample
│ ├── iOSExample
│ │ ├── Assets.xcassets
│ │ │ ├── Contents.json
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── ViewController.swift
│ │ ├── Info.plist
│ │ ├── Base.lproj
│ │ │ ├── Main.storyboard
│ │ │ └── LaunchScreen.storyboard
│ │ └── AppDelegate.swift
│ ├── iOSExample.xcodeproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── project.pbxproj
│ ├── README.md
│ ├── Package.swift
│ ├── Dependencies
│ │ └── NetworkConnectivity
│ │ │ ├── NetworkConnectivity.h
│ │ │ └── Info.plist
│ └── iOSExampleTests
│ │ ├── Info.plist
│ │ └── iOSExampleTests.swift
└── macOSExample
│ ├── macOSExample
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── macOSExample.entitlements
│ ├── AppDelegate.swift
│ ├── ViewController.swift
│ ├── Info.plist
│ └── Base.lproj
│ │ └── Main.storyboard
│ ├── macOSExample.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── project.pbxproj
│ ├── README.md
│ ├── Package.swift
│ ├── Dependencies
│ └── NetworkConnectivity
│ │ ├── NetworkConnectivity.h
│ │ └── Info.plist
│ └── macOSExampleTests
│ ├── Info.plist
│ └── macOSExampleTests.swift
├── Tests
├── LinuxMain.swift
└── NetworkConnectivityTests
│ ├── XCTestManifests.swift
│ └── NetworkConnectivityTests.swift
├── .gitignore
├── Package.swift
├── README.md
└── Sources
└── NetworkConnectivity
└── NetworkConnectivity.swift
/Examples/SwiftPackageExample/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | /.build
3 | /Packages
4 | /*.xcodeproj
5 |
--------------------------------------------------------------------------------
/Examples/SwiftPackageExample/README.md:
--------------------------------------------------------------------------------
1 | # SwiftPackageExample
2 |
3 | Swift Package example on how to import and use Network Connectivity.
4 |
--------------------------------------------------------------------------------
/Examples/iOSExample/iOSExample/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Examples/macOSExample/macOSExample/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Tests/LinuxMain.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 |
3 | import NetworkConnectivityTests
4 |
5 | var tests = [XCTestCaseEntry]()
6 | tests += NetworkConnectivityTests.allTests()
7 | XCTMain(tests)
--------------------------------------------------------------------------------
/Examples/SwiftPackageExample/Tests/LinuxMain.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 |
3 | import SwiftPackageExampleTests
4 |
5 | var tests = [XCTestCaseEntry]()
6 | tests += SwiftPackageExampleTests.allTests()
7 | XCTMain(tests)
--------------------------------------------------------------------------------
/Tests/NetworkConnectivityTests/XCTestManifests.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 |
3 | #if !os(macOS)
4 | public func allTests() -> [XCTestCaseEntry] {
5 | return [
6 | testCase(NetworkConnectivityTests.allTests),
7 | ]
8 | }
9 | #endif
--------------------------------------------------------------------------------
/Examples/iOSExample/iOSExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Examples/SwiftPackageExample/Tests/SwiftPackageExampleTests/XCTestManifests.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 |
3 | #if !os(macOS)
4 | public func allTests() -> [XCTestCaseEntry] {
5 | return [
6 | testCase(SwiftPackageExampleTests.allTests),
7 | ]
8 | }
9 | #endif
--------------------------------------------------------------------------------
/Examples/macOSExample/macOSExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Tests/NetworkConnectivityTests/NetworkConnectivityTests.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | @testable import NetworkConnectivity
3 |
4 | final class NetworkConnectivityTests: XCTestCase {
5 | func testExample() {
6 |
7 | }
8 |
9 | static var allTests = [
10 | ("testExample", testExample),
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Examples/iOSExample/iOSExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Examples/macOSExample/macOSExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Examples/iOSExample/README.md:
--------------------------------------------------------------------------------
1 | # iOS Example for Network Connectivity
2 | Minimalistic iOS project example to use the NetworkConnectivity package.
3 | To make sure the NetworkConnectivity package is fetched into the iOSExample directory, run the following command in this directory:
4 |
5 | ```bash
6 | $ swift package fetch
7 | ```
8 |
9 | Next, open the .xcodeproj file, build and run the project.
--------------------------------------------------------------------------------
/Examples/macOSExample/README.md:
--------------------------------------------------------------------------------
1 | # macOS Example for Network Connectivity
2 | Minimalistic macOS project example to use the NetworkConnectivity package.
3 | To make sure the NetworkConnectivity package is fetched into the macOSExample directory, run the following command in this directory:
4 |
5 | ```bash
6 | $ swift package fetch
7 | ```
8 |
9 | Next, open the .xcodeproj file, build and run the project.
--------------------------------------------------------------------------------
/Examples/macOSExample/macOSExample/macOSExample.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.files.user-selected.read-only
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | /.build
3 | /Packages
4 | /*.xcodeproj
5 |
6 | ## User settings
7 | xcuserdata/
8 |
9 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
10 | *.xcscmblueprint
11 | *.xccheckout
12 |
13 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
14 | build/
15 | DerivedData/
16 | *.moved-aside
17 | *.pbxuser
18 | !default.pbxuser
19 | *.mode1v3
20 | !default.mode1v3
21 | *.mode2v3
22 | !default.mode2v3
23 | *.perspectivev3
24 | !default.perspectivev3
--------------------------------------------------------------------------------
/Examples/iOSExample/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:4.2
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "iOSExample",
8 | products: [
9 | .executable(name: "iOSExample", targets: ["iOSExample"]),
10 | ],
11 | dependencies: [
12 | .package(url: "../../../NetworkConnectivity", from: "1.0.0"),
13 | ],
14 | targets: [
15 | .target(
16 | name: "iOSExample",
17 | dependencies: ["NetworkConnectivity"]),
18 | ]
19 | )
--------------------------------------------------------------------------------
/Examples/macOSExample/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:4.2
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "macOSExample",
8 | products: [
9 | .executable(name: "macOSExample", targets: ["macOSExample"]),
10 | ],
11 | dependencies: [
12 | .package(url: "../../../NetworkConnectivity", from: "1.0.0"),
13 | ],
14 | targets: [
15 | .target(
16 | name: "macOSExample",
17 | dependencies: ["NetworkConnectivity"]),
18 | ]
19 | )
--------------------------------------------------------------------------------
/Examples/SwiftPackageExample/Sources/SwiftPackageExample/main.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import NetworkConnectivity
3 |
4 |
5 | public class connectivity {
6 |
7 | public init() {
8 | let _ = NetworkConnectivity.shared.setup(with: "agnosticdev.com")
9 | sleep(10) // Provides time for connection setup to occur
10 | print("Exiting...")
11 | }
12 |
13 | }
14 |
15 | extension connectivity: NetworkConnectivityDelegate {
16 |
17 | public func networkStatusChanged(online: Bool, connectivityStatus: String) {
18 | print("Online: \(online) - connectivityStatus: \(connectivityStatus)")
19 | }
20 |
21 | }
22 |
23 |
24 | let conn = connectivity()
25 |
26 |
--------------------------------------------------------------------------------
/Examples/macOSExample/macOSExample/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // macOSExample
4 | //
5 | // Created by Matt Eaton on 2/12/19.
6 | // Copyright © 2019 Matt Eaton. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 |
11 | @NSApplicationMain
12 | class AppDelegate: NSObject, NSApplicationDelegate {
13 |
14 |
15 |
16 | func applicationDidFinishLaunching(_ aNotification: Notification) {
17 | // Insert code here to initialize your application
18 | }
19 |
20 | func applicationWillTerminate(_ aNotification: Notification) {
21 | // Insert code here to tear down your application
22 | }
23 |
24 |
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/Examples/iOSExample/Dependencies/NetworkConnectivity/NetworkConnectivity.h:
--------------------------------------------------------------------------------
1 | //
2 | // NetworkConnectivity.h
3 | // NetworkConnectivity
4 | //
5 | // Created by Matt Eaton on 2/26/19.
6 | // Copyright © 2019 Matt Eaton. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for NetworkConnectivity.
12 | FOUNDATION_EXPORT double NetworkConnectivityVersionNumber;
13 |
14 | //! Project version string for NetworkConnectivity.
15 | FOUNDATION_EXPORT const unsigned char NetworkConnectivityVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Examples/macOSExample/Dependencies/NetworkConnectivity/NetworkConnectivity.h:
--------------------------------------------------------------------------------
1 | //
2 | // NetworkConnectivity.h
3 | // NetworkConnectivity
4 | //
5 | // Created by Matt Eaton on 2/28/19.
6 | // Copyright © 2019 Matt Eaton. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for NetworkConnectivity.
12 | FOUNDATION_EXPORT double NetworkConnectivityVersionNumber;
13 |
14 | //! Project version string for NetworkConnectivity.
15 | FOUNDATION_EXPORT const unsigned char NetworkConnectivityVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Examples/iOSExample/iOSExampleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Examples/macOSExample/macOSExampleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Examples/iOSExample/Dependencies/NetworkConnectivity/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Examples/iOSExample/iOSExample/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // iOSExample
4 | //
5 | // Created by Matt Eaton on 2/12/19.
6 | // Copyright © 2019 Matt Eaton. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import NetworkConnectivity
11 |
12 | class ViewController: UIViewController {
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | // Setup the connectivity status URL here.
18 | let _ = NetworkConnectivity.shared.setup(with: "agnosticdev.com")
19 | }
20 |
21 |
22 | }
23 |
24 | extension ViewController: NetworkConnectivityDelegate {
25 |
26 | public func networkStatusChanged(online: Bool, connectivityStatus: String) {
27 | if online {
28 | // handle online status
29 | } else {
30 | // handle offline status
31 | }
32 | print("Online: \(online) connectivityStatus: \(connectivityStatus)")
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Examples/SwiftPackageExample/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:4.2
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "SwiftPackageExample",
8 | dependencies: [
9 | // Dependencies declare other packages that this package depends on.
10 | .package(url: "../../../NetworkConnectivity", from: "0.0.2"),
11 | ],
12 | targets: [
13 | // Targets are the basic building blocks of a package. A target can define a module or a test suite.
14 | // Targets can depend on other targets in this package, and on products in packages which this package depends on.
15 | .target(
16 | name: "SwiftPackageExample",
17 | dependencies: ["NetworkConnectivity"]),
18 | .testTarget(
19 | name: "SwiftPackageExampleTests",
20 | dependencies: ["SwiftPackageExample"]),
21 | ]
22 | )
23 |
--------------------------------------------------------------------------------
/Examples/macOSExample/Dependencies/NetworkConnectivity/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | NSHumanReadableCopyright
22 | Copyright © 2019 Matt Eaton. All rights reserved.
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Examples/iOSExample/iOSExampleTests/iOSExampleTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // iOSExampleTests.swift
3 | // iOSExampleTests
4 | //
5 | // Created by Matt Eaton on 2/12/19.
6 | // Copyright © 2019 Matt Eaton. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import iOSExample
11 |
12 | class iOSExampleTests: XCTestCase {
13 |
14 | override func setUp() {
15 | // Put setup code here. This method is called before the invocation of each test method in the class.
16 | }
17 |
18 | override func tearDown() {
19 | // Put teardown code here. This method is called after the invocation of each test method in the class.
20 | }
21 |
22 | func testExample() {
23 | // This is an example of a functional test case.
24 | // Use XCTAssert and related functions to verify your tests produce the correct results.
25 | }
26 |
27 | func testPerformanceExample() {
28 | // This is an example of a performance test case.
29 | self.measure {
30 | // Put the code you want to measure the time of here.
31 | }
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/Examples/macOSExample/macOSExampleTests/macOSExampleTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // macOSExampleTests.swift
3 | // macOSExampleTests
4 | //
5 | // Created by Matt Eaton on 2/12/19.
6 | // Copyright © 2019 Matt Eaton. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import macOSExample
11 |
12 | class macOSExampleTests: XCTestCase {
13 |
14 | override func setUp() {
15 | // Put setup code here. This method is called before the invocation of each test method in the class.
16 | }
17 |
18 | override func tearDown() {
19 | // Put teardown code here. This method is called after the invocation of each test method in the class.
20 | }
21 |
22 | func testExample() {
23 | // This is an example of a functional test case.
24 | // Use XCTAssert and related functions to verify your tests produce the correct results.
25 | }
26 |
27 | func testPerformanceExample() {
28 | // This is an example of a performance test case.
29 | self.measure {
30 | // Put the code you want to measure the time of here.
31 | }
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/Examples/macOSExample/macOSExample/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // macOSExample
4 | //
5 | // Created by Matt Eaton on 2/12/19.
6 | // Copyright © 2019 Matt Eaton. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 | import NetworkConnectivity
11 |
12 | class ViewController: NSViewController {
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | // Setup the connectivity status URL here.
18 | let _ = NetworkConnectivity.shared.setup(with: "agnosticdev.com")
19 | }
20 |
21 | override var representedObject: Any? {
22 | didSet {
23 | // Update the view, if already loaded.
24 | }
25 | }
26 |
27 |
28 | }
29 |
30 |
31 | extension ViewController: NetworkConnectivityDelegate {
32 |
33 | public func networkStatusChanged(online: Bool, connectivityStatus: String) {
34 | if online {
35 | // handle online status
36 | } else {
37 | // handle offline status
38 | }
39 | print("Online: \(online) connectivityStatus: \(connectivityStatus)")
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:4.2
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "NetworkConnectivity",
8 | products: [
9 | // Products define the executables and libraries produced by a package, and make them visible to other packages.
10 | .library(
11 | name: "NetworkConnectivity",
12 | targets: ["NetworkConnectivity"]),
13 | ],
14 | dependencies: [
15 | // Dependencies declare other packages that this package depends on.
16 | // .package(url: /* package url */, from: "1.0.0"),
17 | ],
18 | targets: [
19 | // Targets are the basic building blocks of a package. A target can define a module or a test suite.
20 | // Targets can depend on other targets in this package, and on products in packages which this package depends on.
21 | .target(
22 | name: "NetworkConnectivity",
23 | dependencies: []),
24 | .testTarget(
25 | name: "NetworkConnectivityTests",
26 | dependencies: ["NetworkConnectivity"]),
27 | ]
28 | )
29 |
--------------------------------------------------------------------------------
/Examples/macOSExample/macOSExample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | Copyright © 2019 Matt Eaton. All rights reserved.
27 | NSMainStoryboardFile
28 | Main
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Examples/macOSExample/macOSExample/Assets.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 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # NetworkConnectivity
2 |
3 | Swift Package designed as an alternative to detecting network connectivity when traditional methods do not work. For example, Apple recommends that to properly check connectivity your application should send a network request and the request should let your application know the connectivity state of the device. If device is offline the request should fail immediately and you can provide the user with proper feedback. If the device is online the request will go out and you can also inform your user that the application is waiting for updated data.
4 |
5 | In most cases this approach works great. There are some rare conditions that still exist that require your application to still check for the connectivity state of the device. For these rare cases the NetworkConnectivity package was built. NetworkConnectivity examines the state of a TCP connection and provides updates to a delegate method so your application can act accordingly.
6 |
7 |
8 | ```swift
9 | class BaseViewController: ViewController {
10 | func viewDidLoad() {
11 | let _ = NetworkConnectivity.shared.setup(with: "agnosticdev.com")
12 | }
13 | }
14 |
15 | extension BaseViewController: NetworkConnectivityDelegate {
16 |
17 | public func networkStatusChanged(online: Bool, connectivityStatus: String) {
18 | if online {
19 | // handle online status
20 | } else {
21 | // handle offline status
22 | }
23 | }
24 | }
25 | ```
26 |
--------------------------------------------------------------------------------
/Examples/SwiftPackageExample/Tests/SwiftPackageExampleTests/SwiftPackageExampleTests.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | import class Foundation.Bundle
3 |
4 | final class SwiftPackageExampleTests: XCTestCase {
5 | func testExample() throws {
6 | // This is an example of a functional test case.
7 | // Use XCTAssert and related functions to verify your tests produce the correct
8 | // results.
9 |
10 | // Some of the APIs that we use below are available in macOS 10.13 and above.
11 | guard #available(macOS 10.13, *) else {
12 | return
13 | }
14 |
15 | let fooBinary = productsDirectory.appendingPathComponent("SwiftPackageExample")
16 |
17 | let process = Process()
18 | process.executableURL = fooBinary
19 |
20 | let pipe = Pipe()
21 | process.standardOutput = pipe
22 |
23 | try process.run()
24 | process.waitUntilExit()
25 |
26 | let data = pipe.fileHandleForReading.readDataToEndOfFile()
27 | let output = String(data: data, encoding: .utf8)
28 |
29 | XCTAssertEqual(output, "Hello, world!\n")
30 | }
31 |
32 | /// Returns path to the built products directory.
33 | var productsDirectory: URL {
34 | #if os(macOS)
35 | for bundle in Bundle.allBundles where bundle.bundlePath.hasSuffix(".xctest") {
36 | return bundle.bundleURL.deletingLastPathComponent()
37 | }
38 | fatalError("couldn't find the products directory")
39 | #else
40 | return Bundle.main.bundleURL
41 | #endif
42 | }
43 |
44 | static var allTests = [
45 | ("testExample", testExample),
46 | ]
47 | }
48 |
--------------------------------------------------------------------------------
/Examples/iOSExample/iOSExample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Examples/iOSExample/iOSExample/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Examples/iOSExample/iOSExample/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Examples/iOSExample/iOSExample/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/Examples/iOSExample/iOSExample/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // iOSExample
4 | //
5 | // Created by Matt Eaton on 2/12/19.
6 | // Copyright © 2019 Matt Eaton. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/Sources/NetworkConnectivity/NetworkConnectivity.swift:
--------------------------------------------------------------------------------
1 | import os
2 | import Network
3 |
4 | //
5 | //
6 | // class BaseViewController: ViewController {
7 | // func viewDidLoad() {
8 | // let _ = NetworkConnectivity.shared.setup(with "agnosticdev.com")
9 | // }
10 | // }
11 | //
12 | // extension BaseViewController: NetworkConnectivityDelegate {
13 | //
14 | // public func networkStatusChanged(online: Bool, connectivityStatus: String) {
15 | // if online {
16 | // // handle online status
17 | // } else {
18 | // // handle offline status
19 | // }
20 | // }
21 | // }
22 | //
23 | //
24 |
25 |
26 | //
27 | // MARK: - NetworkConnectivityDelegate Protocol
28 | //
29 | public protocol NetworkConnectivityDelegate: class {
30 |
31 | func networkStatusChanged(online: Bool, connectivityStatus: String)
32 |
33 | }
34 |
35 | //
36 | // MARK: - NetworkConnectivity
37 | //
38 | /// Class identifer for `NetworkConnectivity`.
39 | public class NetworkConnectivity {
40 |
41 | //
42 | // MARK: - Static Constants
43 | //
44 | public static let shared = NetworkConnectivity()
45 |
46 | //
47 | // MARK: - Variables And Properties
48 | //
49 | private var online: Bool = false
50 | private var host: String = ""
51 | private var tcpStreamAlive: Bool = false
52 |
53 | //
54 | // MARK: - Variables And Properties
55 | //
56 | public weak var networkStatusDelegate: NetworkConnectivityDelegate?
57 |
58 | //
59 | // MARK: - Public Methods
60 | //
61 |
62 | public func setup(with hostURL: String) {
63 |
64 | if self.tcpStreamAlive {
65 | print("TCP Stream is already setup.")
66 | }
67 |
68 | self.host = hostURL
69 |
70 | guard hostURL.count > 0, self.validateHost(hostURL: hostURL) else {
71 | print("Error, invalid host.")
72 | return
73 | }
74 |
75 | if #available(iOS 12.0, OSX 10.14, *) {
76 | setupNWConnection()
77 | } else {
78 | print("Network framework only available for iOS 12 or macOS 10.14 or later.")
79 | }
80 | }
81 |
82 | //
83 | // MARK: - Private Methods
84 | //
85 |
86 | private func validateHost(hostURL: String) -> Bool {
87 | // TODO: Implement
88 | return true
89 | }
90 |
91 | @available(iOS 12.0, OSX 10.14, *)
92 | private func setupNWConnection() {
93 | print("Setting up nwConnection")
94 |
95 | let hostEndpoint = NWEndpoint.Host.init(self.host)
96 | let nwConnection = NWConnection(host: hostEndpoint, port: 80, using: .tcp)
97 | nwConnection.stateUpdateHandler = self.stateDidChange(to:)
98 | self.setupReceive(on: nwConnection)
99 | nwConnection.start(queue: DispatchQueue.global())
100 |
101 | }
102 |
103 | @available(iOS 12.0, OSX 10.14, *)
104 | private func stateDidChange(to state: NWConnection.State) {
105 | switch state {
106 | case .setup:
107 | self.notifyDelegateOnChange(newStatusFlag: false, connectivityStatus: "setup")
108 | self.tcpStreamAlive = true
109 | break
110 | case .waiting:
111 | self.notifyDelegateOnChange(newStatusFlag: false, connectivityStatus: "waiting")
112 | self.tcpStreamAlive = true
113 | break
114 | case .ready:
115 | self.notifyDelegateOnChange(newStatusFlag: true, connectivityStatus: "ready")
116 | self.tcpStreamAlive = true
117 | break
118 | case .failed(let error):
119 | let errorMessage = "Error: \(error.localizedDescription)"
120 | self.notifyDelegateOnChange(newStatusFlag: false, connectivityStatus: errorMessage)
121 | self.tcpStreamAlive = false
122 | case .cancelled:
123 | self.notifyDelegateOnChange(newStatusFlag: false, connectivityStatus: "cancelled")
124 | self.tcpStreamAlive = false
125 | self.setupNWConnection()
126 | break
127 | case .preparing:
128 | self.notifyDelegateOnChange(newStatusFlag: false, connectivityStatus: "preparing")
129 | self.tcpStreamAlive = true
130 | }
131 | }
132 |
133 | @available(iOS 12.0, OSX 10.14, *)
134 | private func setupReceive(on connection: NWConnection) {
135 | connection.receive(minimumIncompleteLength: 1, maximumLength: 65536) { (data, contentContext, isComplete, error) in
136 | // Read data off the stream
137 | if let data = data, !data.isEmpty {
138 | print("did receive \(data.count) bytes")
139 | }
140 |
141 | if isComplete {
142 | print("setupReceive: isComplete handle end of stream")
143 | connection.cancel()
144 | self.tcpStreamAlive = false
145 | self.setupNWConnection()
146 |
147 | } else if let error = error {
148 | print("setupReceive: error \(error.localizedDescription)")
149 | // TODO: Make sure that if the connection needs to be re-established here, it is.
150 | } else {
151 | self.setupReceive(on: connection)
152 | }
153 | }
154 | }
155 |
156 | @available(iOS 12.0, OSX 10.14, *)
157 | private func sendEndOfStream(connection: NWConnection) {
158 | connection.send(content: nil, contentContext: .defaultStream, isComplete: true, completion: .contentProcessed({ error in
159 | print("sendEndOfStream")
160 | if let error = error {
161 | //self.connectionDidFail(error: error)
162 | print("sendEndOfStream: error \(error.localizedDescription)")
163 | }
164 | }))
165 | }
166 |
167 | private func notifyDelegateOnChange(newStatusFlag: Bool, connectivityStatus: String) {
168 | if newStatusFlag != self.online {
169 | print("newStatusFlag: \(newStatusFlag) - connectivityStatus: \(connectivityStatus)")
170 | self.networkStatusDelegate?.networkStatusChanged(online: newStatusFlag, connectivityStatus: connectivityStatus)
171 | self.online = newStatusFlag
172 | } else {
173 | print("connectivityStatus: \(connectivityStatus)")
174 | }
175 | }
176 |
177 | }
--------------------------------------------------------------------------------
/Examples/macOSExample/macOSExample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 301305532212FBB9003582F7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 301305522212FBB9003582F7 /* AppDelegate.swift */; };
11 | 301305552212FBB9003582F7 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 301305542212FBB9003582F7 /* ViewController.swift */; };
12 | 301305572212FBBB003582F7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 301305562212FBBB003582F7 /* Assets.xcassets */; };
13 | 3013055A2212FBBB003582F7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 301305582212FBBB003582F7 /* Main.storyboard */; };
14 | 301305662212FBBB003582F7 /* macOSExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 301305652212FBBB003582F7 /* macOSExampleTests.swift */; };
15 | 30429F8E2228BF33003CE076 /* NetworkConnectivity.h in Headers */ = {isa = PBXBuildFile; fileRef = 30429F8C2228BF33003CE076 /* NetworkConnectivity.h */; settings = {ATTRIBUTES = (Public, ); }; };
16 | 30429F912228BF33003CE076 /* NetworkConnectivity.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30429F8A2228BF32003CE076 /* NetworkConnectivity.framework */; };
17 | 30429F922228BF33003CE076 /* NetworkConnectivity.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 30429F8A2228BF32003CE076 /* NetworkConnectivity.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18 | 30429F982228BF6C003CE076 /* NetworkConnectivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30429F972228BF6B003CE076 /* NetworkConnectivity.swift */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXContainerItemProxy section */
22 | 301305622212FBBB003582F7 /* PBXContainerItemProxy */ = {
23 | isa = PBXContainerItemProxy;
24 | containerPortal = 301305472212FBB9003582F7 /* Project object */;
25 | proxyType = 1;
26 | remoteGlobalIDString = 3013054E2212FBB9003582F7;
27 | remoteInfo = macOSExample;
28 | };
29 | 30429F8F2228BF33003CE076 /* PBXContainerItemProxy */ = {
30 | isa = PBXContainerItemProxy;
31 | containerPortal = 301305472212FBB9003582F7 /* Project object */;
32 | proxyType = 1;
33 | remoteGlobalIDString = 30429F892228BF32003CE076;
34 | remoteInfo = NetworkConnectivity;
35 | };
36 | /* End PBXContainerItemProxy section */
37 |
38 | /* Begin PBXCopyFilesBuildPhase section */
39 | 30429F962228BF33003CE076 /* Embed Frameworks */ = {
40 | isa = PBXCopyFilesBuildPhase;
41 | buildActionMask = 2147483647;
42 | dstPath = "";
43 | dstSubfolderSpec = 10;
44 | files = (
45 | 30429F922228BF33003CE076 /* NetworkConnectivity.framework in Embed Frameworks */,
46 | );
47 | name = "Embed Frameworks";
48 | runOnlyForDeploymentPostprocessing = 0;
49 | };
50 | /* End PBXCopyFilesBuildPhase section */
51 |
52 | /* Begin PBXFileReference section */
53 | 3013054F2212FBB9003582F7 /* macOSExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = macOSExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
54 | 301305522212FBB9003582F7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
55 | 301305542212FBB9003582F7 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
56 | 301305562212FBBB003582F7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
57 | 301305592212FBBB003582F7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
58 | 3013055B2212FBBB003582F7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
59 | 3013055C2212FBBB003582F7 /* macOSExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOSExample.entitlements; sourceTree = ""; };
60 | 301305612212FBBB003582F7 /* macOSExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = macOSExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
61 | 301305652212FBBB003582F7 /* macOSExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = macOSExampleTests.swift; sourceTree = ""; };
62 | 301305672212FBBB003582F7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
63 | 30429F8A2228BF32003CE076 /* NetworkConnectivity.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = NetworkConnectivity.framework; sourceTree = BUILT_PRODUCTS_DIR; };
64 | 30429F8C2228BF33003CE076 /* NetworkConnectivity.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetworkConnectivity.h; sourceTree = ""; };
65 | 30429F8D2228BF33003CE076 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
66 | 30429F972228BF6B003CE076 /* NetworkConnectivity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NetworkConnectivity.swift; path = ../../../../Sources/NetworkConnectivity/NetworkConnectivity.swift; sourceTree = ""; };
67 | /* End PBXFileReference section */
68 |
69 | /* Begin PBXFrameworksBuildPhase section */
70 | 3013054C2212FBB9003582F7 /* Frameworks */ = {
71 | isa = PBXFrameworksBuildPhase;
72 | buildActionMask = 2147483647;
73 | files = (
74 | 30429F912228BF33003CE076 /* NetworkConnectivity.framework in Frameworks */,
75 | );
76 | runOnlyForDeploymentPostprocessing = 0;
77 | };
78 | 3013055E2212FBBB003582F7 /* Frameworks */ = {
79 | isa = PBXFrameworksBuildPhase;
80 | buildActionMask = 2147483647;
81 | files = (
82 | );
83 | runOnlyForDeploymentPostprocessing = 0;
84 | };
85 | 30429F872228BF32003CE076 /* Frameworks */ = {
86 | isa = PBXFrameworksBuildPhase;
87 | buildActionMask = 2147483647;
88 | files = (
89 | );
90 | runOnlyForDeploymentPostprocessing = 0;
91 | };
92 | /* End PBXFrameworksBuildPhase section */
93 |
94 | /* Begin PBXGroup section */
95 | 301305462212FBB9003582F7 = {
96 | isa = PBXGroup;
97 | children = (
98 | 301305512212FBB9003582F7 /* macOSExample */,
99 | 30429F642228BE08003CE076 /* Dependencies */,
100 | 301305642212FBBB003582F7 /* macOSExampleTests */,
101 | 301305502212FBB9003582F7 /* Products */,
102 | );
103 | sourceTree = "";
104 | };
105 | 301305502212FBB9003582F7 /* Products */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 3013054F2212FBB9003582F7 /* macOSExample.app */,
109 | 301305612212FBBB003582F7 /* macOSExampleTests.xctest */,
110 | 30429F8A2228BF32003CE076 /* NetworkConnectivity.framework */,
111 | );
112 | name = Products;
113 | sourceTree = "";
114 | };
115 | 301305512212FBB9003582F7 /* macOSExample */ = {
116 | isa = PBXGroup;
117 | children = (
118 | 301305522212FBB9003582F7 /* AppDelegate.swift */,
119 | 301305542212FBB9003582F7 /* ViewController.swift */,
120 | 301305562212FBBB003582F7 /* Assets.xcassets */,
121 | 301305582212FBBB003582F7 /* Main.storyboard */,
122 | 3013055B2212FBBB003582F7 /* Info.plist */,
123 | 3013055C2212FBBB003582F7 /* macOSExample.entitlements */,
124 | );
125 | path = macOSExample;
126 | sourceTree = "";
127 | };
128 | 301305642212FBBB003582F7 /* macOSExampleTests */ = {
129 | isa = PBXGroup;
130 | children = (
131 | 301305652212FBBB003582F7 /* macOSExampleTests.swift */,
132 | 301305672212FBBB003582F7 /* Info.plist */,
133 | );
134 | path = macOSExampleTests;
135 | sourceTree = "";
136 | };
137 | 30429F642228BE08003CE076 /* Dependencies */ = {
138 | isa = PBXGroup;
139 | children = (
140 | 30429F8B2228BF33003CE076 /* NetworkConnectivity */,
141 | );
142 | path = Dependencies;
143 | sourceTree = "";
144 | };
145 | 30429F8B2228BF33003CE076 /* NetworkConnectivity */ = {
146 | isa = PBXGroup;
147 | children = (
148 | 30429F8C2228BF33003CE076 /* NetworkConnectivity.h */,
149 | 30429F972228BF6B003CE076 /* NetworkConnectivity.swift */,
150 | 30429F8D2228BF33003CE076 /* Info.plist */,
151 | );
152 | path = NetworkConnectivity;
153 | sourceTree = "";
154 | };
155 | /* End PBXGroup section */
156 |
157 | /* Begin PBXHeadersBuildPhase section */
158 | 30429F852228BF32003CE076 /* Headers */ = {
159 | isa = PBXHeadersBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 30429F8E2228BF33003CE076 /* NetworkConnectivity.h in Headers */,
163 | );
164 | runOnlyForDeploymentPostprocessing = 0;
165 | };
166 | /* End PBXHeadersBuildPhase section */
167 |
168 | /* Begin PBXNativeTarget section */
169 | 3013054E2212FBB9003582F7 /* macOSExample */ = {
170 | isa = PBXNativeTarget;
171 | buildConfigurationList = 3013056A2212FBBB003582F7 /* Build configuration list for PBXNativeTarget "macOSExample" */;
172 | buildPhases = (
173 | 3013054B2212FBB9003582F7 /* Sources */,
174 | 3013054C2212FBB9003582F7 /* Frameworks */,
175 | 3013054D2212FBB9003582F7 /* Resources */,
176 | 30429F962228BF33003CE076 /* Embed Frameworks */,
177 | );
178 | buildRules = (
179 | );
180 | dependencies = (
181 | 30429F902228BF33003CE076 /* PBXTargetDependency */,
182 | );
183 | name = macOSExample;
184 | productName = macOSExample;
185 | productReference = 3013054F2212FBB9003582F7 /* macOSExample.app */;
186 | productType = "com.apple.product-type.application";
187 | };
188 | 301305602212FBBB003582F7 /* macOSExampleTests */ = {
189 | isa = PBXNativeTarget;
190 | buildConfigurationList = 3013056D2212FBBB003582F7 /* Build configuration list for PBXNativeTarget "macOSExampleTests" */;
191 | buildPhases = (
192 | 3013055D2212FBBB003582F7 /* Sources */,
193 | 3013055E2212FBBB003582F7 /* Frameworks */,
194 | 3013055F2212FBBB003582F7 /* Resources */,
195 | );
196 | buildRules = (
197 | );
198 | dependencies = (
199 | 301305632212FBBB003582F7 /* PBXTargetDependency */,
200 | );
201 | name = macOSExampleTests;
202 | productName = macOSExampleTests;
203 | productReference = 301305612212FBBB003582F7 /* macOSExampleTests.xctest */;
204 | productType = "com.apple.product-type.bundle.unit-test";
205 | };
206 | 30429F892228BF32003CE076 /* NetworkConnectivity */ = {
207 | isa = PBXNativeTarget;
208 | buildConfigurationList = 30429F932228BF33003CE076 /* Build configuration list for PBXNativeTarget "NetworkConnectivity" */;
209 | buildPhases = (
210 | 30429F852228BF32003CE076 /* Headers */,
211 | 30429F862228BF32003CE076 /* Sources */,
212 | 30429F872228BF32003CE076 /* Frameworks */,
213 | 30429F882228BF32003CE076 /* Resources */,
214 | );
215 | buildRules = (
216 | );
217 | dependencies = (
218 | );
219 | name = NetworkConnectivity;
220 | productName = NetworkConnectivity;
221 | productReference = 30429F8A2228BF32003CE076 /* NetworkConnectivity.framework */;
222 | productType = "com.apple.product-type.framework";
223 | };
224 | /* End PBXNativeTarget section */
225 |
226 | /* Begin PBXProject section */
227 | 301305472212FBB9003582F7 /* Project object */ = {
228 | isa = PBXProject;
229 | attributes = {
230 | LastSwiftUpdateCheck = 1010;
231 | LastUpgradeCheck = 1010;
232 | ORGANIZATIONNAME = "Matt Eaton";
233 | TargetAttributes = {
234 | 3013054E2212FBB9003582F7 = {
235 | CreatedOnToolsVersion = 10.1;
236 | };
237 | 301305602212FBBB003582F7 = {
238 | CreatedOnToolsVersion = 10.1;
239 | TestTargetID = 3013054E2212FBB9003582F7;
240 | };
241 | 30429F892228BF32003CE076 = {
242 | CreatedOnToolsVersion = 10.1;
243 | };
244 | };
245 | };
246 | buildConfigurationList = 3013054A2212FBB9003582F7 /* Build configuration list for PBXProject "macOSExample" */;
247 | compatibilityVersion = "Xcode 9.3";
248 | developmentRegion = en;
249 | hasScannedForEncodings = 0;
250 | knownRegions = (
251 | en,
252 | Base,
253 | );
254 | mainGroup = 301305462212FBB9003582F7;
255 | productRefGroup = 301305502212FBB9003582F7 /* Products */;
256 | projectDirPath = "";
257 | projectRoot = "";
258 | targets = (
259 | 3013054E2212FBB9003582F7 /* macOSExample */,
260 | 301305602212FBBB003582F7 /* macOSExampleTests */,
261 | 30429F892228BF32003CE076 /* NetworkConnectivity */,
262 | );
263 | };
264 | /* End PBXProject section */
265 |
266 | /* Begin PBXResourcesBuildPhase section */
267 | 3013054D2212FBB9003582F7 /* Resources */ = {
268 | isa = PBXResourcesBuildPhase;
269 | buildActionMask = 2147483647;
270 | files = (
271 | 301305572212FBBB003582F7 /* Assets.xcassets in Resources */,
272 | 3013055A2212FBBB003582F7 /* Main.storyboard in Resources */,
273 | );
274 | runOnlyForDeploymentPostprocessing = 0;
275 | };
276 | 3013055F2212FBBB003582F7 /* Resources */ = {
277 | isa = PBXResourcesBuildPhase;
278 | buildActionMask = 2147483647;
279 | files = (
280 | );
281 | runOnlyForDeploymentPostprocessing = 0;
282 | };
283 | 30429F882228BF32003CE076 /* Resources */ = {
284 | isa = PBXResourcesBuildPhase;
285 | buildActionMask = 2147483647;
286 | files = (
287 | );
288 | runOnlyForDeploymentPostprocessing = 0;
289 | };
290 | /* End PBXResourcesBuildPhase section */
291 |
292 | /* Begin PBXSourcesBuildPhase section */
293 | 3013054B2212FBB9003582F7 /* Sources */ = {
294 | isa = PBXSourcesBuildPhase;
295 | buildActionMask = 2147483647;
296 | files = (
297 | 301305552212FBB9003582F7 /* ViewController.swift in Sources */,
298 | 30429F982228BF6C003CE076 /* NetworkConnectivity.swift in Sources */,
299 | 301305532212FBB9003582F7 /* AppDelegate.swift in Sources */,
300 | );
301 | runOnlyForDeploymentPostprocessing = 0;
302 | };
303 | 3013055D2212FBBB003582F7 /* Sources */ = {
304 | isa = PBXSourcesBuildPhase;
305 | buildActionMask = 2147483647;
306 | files = (
307 | 301305662212FBBB003582F7 /* macOSExampleTests.swift in Sources */,
308 | );
309 | runOnlyForDeploymentPostprocessing = 0;
310 | };
311 | 30429F862228BF32003CE076 /* Sources */ = {
312 | isa = PBXSourcesBuildPhase;
313 | buildActionMask = 2147483647;
314 | files = (
315 | );
316 | runOnlyForDeploymentPostprocessing = 0;
317 | };
318 | /* End PBXSourcesBuildPhase section */
319 |
320 | /* Begin PBXTargetDependency section */
321 | 301305632212FBBB003582F7 /* PBXTargetDependency */ = {
322 | isa = PBXTargetDependency;
323 | target = 3013054E2212FBB9003582F7 /* macOSExample */;
324 | targetProxy = 301305622212FBBB003582F7 /* PBXContainerItemProxy */;
325 | };
326 | 30429F902228BF33003CE076 /* PBXTargetDependency */ = {
327 | isa = PBXTargetDependency;
328 | target = 30429F892228BF32003CE076 /* NetworkConnectivity */;
329 | targetProxy = 30429F8F2228BF33003CE076 /* PBXContainerItemProxy */;
330 | };
331 | /* End PBXTargetDependency section */
332 |
333 | /* Begin PBXVariantGroup section */
334 | 301305582212FBBB003582F7 /* Main.storyboard */ = {
335 | isa = PBXVariantGroup;
336 | children = (
337 | 301305592212FBBB003582F7 /* Base */,
338 | );
339 | name = Main.storyboard;
340 | sourceTree = "";
341 | };
342 | /* End PBXVariantGroup section */
343 |
344 | /* Begin XCBuildConfiguration section */
345 | 301305682212FBBB003582F7 /* Debug */ = {
346 | isa = XCBuildConfiguration;
347 | buildSettings = {
348 | ALWAYS_SEARCH_USER_PATHS = NO;
349 | CLANG_ANALYZER_NONNULL = YES;
350 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
351 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
352 | CLANG_CXX_LIBRARY = "libc++";
353 | CLANG_ENABLE_MODULES = YES;
354 | CLANG_ENABLE_OBJC_ARC = YES;
355 | CLANG_ENABLE_OBJC_WEAK = YES;
356 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
357 | CLANG_WARN_BOOL_CONVERSION = YES;
358 | CLANG_WARN_COMMA = YES;
359 | CLANG_WARN_CONSTANT_CONVERSION = YES;
360 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
361 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
362 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
363 | CLANG_WARN_EMPTY_BODY = YES;
364 | CLANG_WARN_ENUM_CONVERSION = YES;
365 | CLANG_WARN_INFINITE_RECURSION = YES;
366 | CLANG_WARN_INT_CONVERSION = YES;
367 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
368 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
369 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
370 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
371 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
372 | CLANG_WARN_STRICT_PROTOTYPES = YES;
373 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
374 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
375 | CLANG_WARN_UNREACHABLE_CODE = YES;
376 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
377 | CODE_SIGN_IDENTITY = "Mac Developer";
378 | COPY_PHASE_STRIP = NO;
379 | DEBUG_INFORMATION_FORMAT = dwarf;
380 | ENABLE_STRICT_OBJC_MSGSEND = YES;
381 | ENABLE_TESTABILITY = YES;
382 | GCC_C_LANGUAGE_STANDARD = gnu11;
383 | GCC_DYNAMIC_NO_PIC = NO;
384 | GCC_NO_COMMON_BLOCKS = YES;
385 | GCC_OPTIMIZATION_LEVEL = 0;
386 | GCC_PREPROCESSOR_DEFINITIONS = (
387 | "DEBUG=1",
388 | "$(inherited)",
389 | );
390 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
391 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
392 | GCC_WARN_UNDECLARED_SELECTOR = YES;
393 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
394 | GCC_WARN_UNUSED_FUNCTION = YES;
395 | GCC_WARN_UNUSED_VARIABLE = YES;
396 | MACOSX_DEPLOYMENT_TARGET = 10.14;
397 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
398 | MTL_FAST_MATH = YES;
399 | ONLY_ACTIVE_ARCH = YES;
400 | SDKROOT = macosx;
401 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
402 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
403 | };
404 | name = Debug;
405 | };
406 | 301305692212FBBB003582F7 /* Release */ = {
407 | isa = XCBuildConfiguration;
408 | buildSettings = {
409 | ALWAYS_SEARCH_USER_PATHS = NO;
410 | CLANG_ANALYZER_NONNULL = YES;
411 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
412 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
413 | CLANG_CXX_LIBRARY = "libc++";
414 | CLANG_ENABLE_MODULES = YES;
415 | CLANG_ENABLE_OBJC_ARC = YES;
416 | CLANG_ENABLE_OBJC_WEAK = YES;
417 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
418 | CLANG_WARN_BOOL_CONVERSION = YES;
419 | CLANG_WARN_COMMA = YES;
420 | CLANG_WARN_CONSTANT_CONVERSION = YES;
421 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
422 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
423 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
424 | CLANG_WARN_EMPTY_BODY = YES;
425 | CLANG_WARN_ENUM_CONVERSION = YES;
426 | CLANG_WARN_INFINITE_RECURSION = YES;
427 | CLANG_WARN_INT_CONVERSION = YES;
428 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
429 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
430 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
431 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
432 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
433 | CLANG_WARN_STRICT_PROTOTYPES = YES;
434 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
435 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
436 | CLANG_WARN_UNREACHABLE_CODE = YES;
437 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
438 | CODE_SIGN_IDENTITY = "Mac Developer";
439 | COPY_PHASE_STRIP = NO;
440 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
441 | ENABLE_NS_ASSERTIONS = NO;
442 | ENABLE_STRICT_OBJC_MSGSEND = YES;
443 | GCC_C_LANGUAGE_STANDARD = gnu11;
444 | GCC_NO_COMMON_BLOCKS = YES;
445 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
446 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
447 | GCC_WARN_UNDECLARED_SELECTOR = YES;
448 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
449 | GCC_WARN_UNUSED_FUNCTION = YES;
450 | GCC_WARN_UNUSED_VARIABLE = YES;
451 | MACOSX_DEPLOYMENT_TARGET = 10.14;
452 | MTL_ENABLE_DEBUG_INFO = NO;
453 | MTL_FAST_MATH = YES;
454 | SDKROOT = macosx;
455 | SWIFT_COMPILATION_MODE = wholemodule;
456 | SWIFT_OPTIMIZATION_LEVEL = "-O";
457 | };
458 | name = Release;
459 | };
460 | 3013056B2212FBBB003582F7 /* Debug */ = {
461 | isa = XCBuildConfiguration;
462 | buildSettings = {
463 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
464 | CODE_SIGN_ENTITLEMENTS = macOSExample/macOSExample.entitlements;
465 | CODE_SIGN_STYLE = Automatic;
466 | COMBINE_HIDPI_IMAGES = YES;
467 | DEVELOPMENT_TEAM = T7FGJ7JWEU;
468 | INFOPLIST_FILE = macOSExample/Info.plist;
469 | LD_RUNPATH_SEARCH_PATHS = (
470 | "$(inherited)",
471 | "@executable_path/../Frameworks",
472 | );
473 | PRODUCT_BUNDLE_IDENTIFIER = com.agnosticdev.macOSExample;
474 | PRODUCT_NAME = "$(TARGET_NAME)";
475 | SWIFT_VERSION = 4.2;
476 | };
477 | name = Debug;
478 | };
479 | 3013056C2212FBBB003582F7 /* Release */ = {
480 | isa = XCBuildConfiguration;
481 | buildSettings = {
482 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
483 | CODE_SIGN_ENTITLEMENTS = macOSExample/macOSExample.entitlements;
484 | CODE_SIGN_STYLE = Automatic;
485 | COMBINE_HIDPI_IMAGES = YES;
486 | DEVELOPMENT_TEAM = T7FGJ7JWEU;
487 | INFOPLIST_FILE = macOSExample/Info.plist;
488 | LD_RUNPATH_SEARCH_PATHS = (
489 | "$(inherited)",
490 | "@executable_path/../Frameworks",
491 | );
492 | PRODUCT_BUNDLE_IDENTIFIER = com.agnosticdev.macOSExample;
493 | PRODUCT_NAME = "$(TARGET_NAME)";
494 | SWIFT_VERSION = 4.2;
495 | };
496 | name = Release;
497 | };
498 | 3013056E2212FBBB003582F7 /* Debug */ = {
499 | isa = XCBuildConfiguration;
500 | buildSettings = {
501 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
502 | BUNDLE_LOADER = "$(TEST_HOST)";
503 | CODE_SIGN_STYLE = Automatic;
504 | COMBINE_HIDPI_IMAGES = YES;
505 | DEVELOPMENT_TEAM = T7FGJ7JWEU;
506 | INFOPLIST_FILE = macOSExampleTests/Info.plist;
507 | LD_RUNPATH_SEARCH_PATHS = (
508 | "$(inherited)",
509 | "@executable_path/../Frameworks",
510 | "@loader_path/../Frameworks",
511 | );
512 | PRODUCT_BUNDLE_IDENTIFIER = com.agnosticdev.macOSExampleTests;
513 | PRODUCT_NAME = "$(TARGET_NAME)";
514 | SWIFT_VERSION = 4.2;
515 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/macOSExample.app/Contents/MacOS/macOSExample";
516 | };
517 | name = Debug;
518 | };
519 | 3013056F2212FBBB003582F7 /* Release */ = {
520 | isa = XCBuildConfiguration;
521 | buildSettings = {
522 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
523 | BUNDLE_LOADER = "$(TEST_HOST)";
524 | CODE_SIGN_STYLE = Automatic;
525 | COMBINE_HIDPI_IMAGES = YES;
526 | DEVELOPMENT_TEAM = T7FGJ7JWEU;
527 | INFOPLIST_FILE = macOSExampleTests/Info.plist;
528 | LD_RUNPATH_SEARCH_PATHS = (
529 | "$(inherited)",
530 | "@executable_path/../Frameworks",
531 | "@loader_path/../Frameworks",
532 | );
533 | PRODUCT_BUNDLE_IDENTIFIER = com.agnosticdev.macOSExampleTests;
534 | PRODUCT_NAME = "$(TARGET_NAME)";
535 | SWIFT_VERSION = 4.2;
536 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/macOSExample.app/Contents/MacOS/macOSExample";
537 | };
538 | name = Release;
539 | };
540 | 30429F942228BF33003CE076 /* Debug */ = {
541 | isa = XCBuildConfiguration;
542 | buildSettings = {
543 | CODE_SIGN_IDENTITY = "";
544 | CODE_SIGN_STYLE = Automatic;
545 | COMBINE_HIDPI_IMAGES = YES;
546 | CURRENT_PROJECT_VERSION = 1;
547 | DEFINES_MODULE = YES;
548 | DEVELOPMENT_TEAM = T7FGJ7JWEU;
549 | DYLIB_COMPATIBILITY_VERSION = 1;
550 | DYLIB_CURRENT_VERSION = 1;
551 | DYLIB_INSTALL_NAME_BASE = "@rpath";
552 | FRAMEWORK_VERSION = A;
553 | INFOPLIST_FILE = "$(SRCROOT)/macOSExample/Info.plist";
554 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
555 | LD_RUNPATH_SEARCH_PATHS = (
556 | "$(inherited)",
557 | "@executable_path/../Frameworks",
558 | "@loader_path/Frameworks",
559 | );
560 | PRODUCT_BUNDLE_IDENTIFIER = comCommandLine.NetworkConnectivity;
561 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
562 | SKIP_INSTALL = YES;
563 | SWIFT_VERSION = 4.2;
564 | VERSIONING_SYSTEM = "apple-generic";
565 | VERSION_INFO_PREFIX = "";
566 | };
567 | name = Debug;
568 | };
569 | 30429F952228BF33003CE076 /* Release */ = {
570 | isa = XCBuildConfiguration;
571 | buildSettings = {
572 | CODE_SIGN_IDENTITY = "";
573 | CODE_SIGN_STYLE = Automatic;
574 | COMBINE_HIDPI_IMAGES = YES;
575 | CURRENT_PROJECT_VERSION = 1;
576 | DEFINES_MODULE = YES;
577 | DEVELOPMENT_TEAM = T7FGJ7JWEU;
578 | DYLIB_COMPATIBILITY_VERSION = 1;
579 | DYLIB_CURRENT_VERSION = 1;
580 | DYLIB_INSTALL_NAME_BASE = "@rpath";
581 | FRAMEWORK_VERSION = A;
582 | INFOPLIST_FILE = "$(SRCROOT)/macOSExample/Info.plist";
583 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
584 | LD_RUNPATH_SEARCH_PATHS = (
585 | "$(inherited)",
586 | "@executable_path/../Frameworks",
587 | "@loader_path/Frameworks",
588 | );
589 | PRODUCT_BUNDLE_IDENTIFIER = comCommandLine.NetworkConnectivity;
590 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
591 | SKIP_INSTALL = YES;
592 | SWIFT_VERSION = 4.2;
593 | VERSIONING_SYSTEM = "apple-generic";
594 | VERSION_INFO_PREFIX = "";
595 | };
596 | name = Release;
597 | };
598 | /* End XCBuildConfiguration section */
599 |
600 | /* Begin XCConfigurationList section */
601 | 3013054A2212FBB9003582F7 /* Build configuration list for PBXProject "macOSExample" */ = {
602 | isa = XCConfigurationList;
603 | buildConfigurations = (
604 | 301305682212FBBB003582F7 /* Debug */,
605 | 301305692212FBBB003582F7 /* Release */,
606 | );
607 | defaultConfigurationIsVisible = 0;
608 | defaultConfigurationName = Release;
609 | };
610 | 3013056A2212FBBB003582F7 /* Build configuration list for PBXNativeTarget "macOSExample" */ = {
611 | isa = XCConfigurationList;
612 | buildConfigurations = (
613 | 3013056B2212FBBB003582F7 /* Debug */,
614 | 3013056C2212FBBB003582F7 /* Release */,
615 | );
616 | defaultConfigurationIsVisible = 0;
617 | defaultConfigurationName = Release;
618 | };
619 | 3013056D2212FBBB003582F7 /* Build configuration list for PBXNativeTarget "macOSExampleTests" */ = {
620 | isa = XCConfigurationList;
621 | buildConfigurations = (
622 | 3013056E2212FBBB003582F7 /* Debug */,
623 | 3013056F2212FBBB003582F7 /* Release */,
624 | );
625 | defaultConfigurationIsVisible = 0;
626 | defaultConfigurationName = Release;
627 | };
628 | 30429F932228BF33003CE076 /* Build configuration list for PBXNativeTarget "NetworkConnectivity" */ = {
629 | isa = XCConfigurationList;
630 | buildConfigurations = (
631 | 30429F942228BF33003CE076 /* Debug */,
632 | 30429F952228BF33003CE076 /* Release */,
633 | );
634 | defaultConfigurationIsVisible = 0;
635 | defaultConfigurationName = Release;
636 | };
637 | /* End XCConfigurationList section */
638 | };
639 | rootObject = 301305472212FBB9003582F7 /* Project object */;
640 | }
641 |
--------------------------------------------------------------------------------
/Examples/iOSExample/iOSExample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 3013057D2212FC0D003582F7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3013057C2212FC0D003582F7 /* AppDelegate.swift */; };
11 | 3013057F2212FC0D003582F7 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3013057E2212FC0D003582F7 /* ViewController.swift */; };
12 | 301305822212FC0D003582F7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 301305802212FC0D003582F7 /* Main.storyboard */; };
13 | 301305842212FC0D003582F7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 301305832212FC0D003582F7 /* Assets.xcassets */; };
14 | 301305872212FC0D003582F7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 301305852212FC0D003582F7 /* LaunchScreen.storyboard */; };
15 | 301305922212FC0E003582F7 /* iOSExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 301305912212FC0E003582F7 /* iOSExampleTests.swift */; };
16 | 30429F37222624F1003CE076 /* NetworkConnectivity.h in Headers */ = {isa = PBXBuildFile; fileRef = 30429F35222624F1003CE076 /* NetworkConnectivity.h */; settings = {ATTRIBUTES = (Public, ); }; };
17 | 30429F3A222624F1003CE076 /* NetworkConnectivity.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 30429F33222624F0003CE076 /* NetworkConnectivity.framework */; };
18 | 30429F3B222624F1003CE076 /* NetworkConnectivity.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 30429F33222624F0003CE076 /* NetworkConnectivity.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
19 | 30429F42222625E8003CE076 /* NetworkConnectivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30429F41222625E8003CE076 /* NetworkConnectivity.swift */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXContainerItemProxy section */
23 | 3013058E2212FC0E003582F7 /* PBXContainerItemProxy */ = {
24 | isa = PBXContainerItemProxy;
25 | containerPortal = 301305712212FC0D003582F7 /* Project object */;
26 | proxyType = 1;
27 | remoteGlobalIDString = 301305782212FC0D003582F7;
28 | remoteInfo = iOSExample;
29 | };
30 | 30429F38222624F1003CE076 /* PBXContainerItemProxy */ = {
31 | isa = PBXContainerItemProxy;
32 | containerPortal = 301305712212FC0D003582F7 /* Project object */;
33 | proxyType = 1;
34 | remoteGlobalIDString = 30429F32222624F0003CE076;
35 | remoteInfo = NetworkConnectivity;
36 | };
37 | /* End PBXContainerItemProxy section */
38 |
39 | /* Begin PBXCopyFilesBuildPhase section */
40 | 30429F3F222624F1003CE076 /* Embed Frameworks */ = {
41 | isa = PBXCopyFilesBuildPhase;
42 | buildActionMask = 2147483647;
43 | dstPath = "";
44 | dstSubfolderSpec = 10;
45 | files = (
46 | 30429F3B222624F1003CE076 /* NetworkConnectivity.framework in Embed Frameworks */,
47 | );
48 | name = "Embed Frameworks";
49 | runOnlyForDeploymentPostprocessing = 0;
50 | };
51 | /* End PBXCopyFilesBuildPhase section */
52 |
53 | /* Begin PBXFileReference section */
54 | 301305792212FC0D003582F7 /* iOSExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOSExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
55 | 3013057C2212FC0D003582F7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
56 | 3013057E2212FC0D003582F7 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
57 | 301305812212FC0D003582F7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
58 | 301305832212FC0D003582F7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
59 | 301305862212FC0D003582F7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
60 | 301305882212FC0D003582F7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
61 | 3013058D2212FC0E003582F7 /* iOSExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iOSExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
62 | 301305912212FC0E003582F7 /* iOSExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iOSExampleTests.swift; sourceTree = ""; };
63 | 301305932212FC0E003582F7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
64 | 30429F33222624F0003CE076 /* NetworkConnectivity.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = NetworkConnectivity.framework; sourceTree = BUILT_PRODUCTS_DIR; };
65 | 30429F35222624F1003CE076 /* NetworkConnectivity.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetworkConnectivity.h; sourceTree = ""; };
66 | 30429F36222624F1003CE076 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
67 | 30429F41222625E8003CE076 /* NetworkConnectivity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NetworkConnectivity.swift; path = ../../../../Sources/NetworkConnectivity/NetworkConnectivity.swift; sourceTree = ""; };
68 | /* End PBXFileReference section */
69 |
70 | /* Begin PBXFrameworksBuildPhase section */
71 | 301305762212FC0D003582F7 /* Frameworks */ = {
72 | isa = PBXFrameworksBuildPhase;
73 | buildActionMask = 2147483647;
74 | files = (
75 | 30429F3A222624F1003CE076 /* NetworkConnectivity.framework in Frameworks */,
76 | );
77 | runOnlyForDeploymentPostprocessing = 0;
78 | };
79 | 3013058A2212FC0E003582F7 /* Frameworks */ = {
80 | isa = PBXFrameworksBuildPhase;
81 | buildActionMask = 2147483647;
82 | files = (
83 | );
84 | runOnlyForDeploymentPostprocessing = 0;
85 | };
86 | 30429F30222624F0003CE076 /* Frameworks */ = {
87 | isa = PBXFrameworksBuildPhase;
88 | buildActionMask = 2147483647;
89 | files = (
90 | );
91 | runOnlyForDeploymentPostprocessing = 0;
92 | };
93 | /* End PBXFrameworksBuildPhase section */
94 |
95 | /* Begin PBXGroup section */
96 | 301305702212FC0D003582F7 = {
97 | isa = PBXGroup;
98 | children = (
99 | 3013057B2212FC0D003582F7 /* iOSExample */,
100 | 30429F4022262505003CE076 /* Dependencies */,
101 | 301305902212FC0E003582F7 /* iOSExampleTests */,
102 | 3013057A2212FC0D003582F7 /* Products */,
103 | );
104 | sourceTree = "";
105 | };
106 | 3013057A2212FC0D003582F7 /* Products */ = {
107 | isa = PBXGroup;
108 | children = (
109 | 301305792212FC0D003582F7 /* iOSExample.app */,
110 | 3013058D2212FC0E003582F7 /* iOSExampleTests.xctest */,
111 | 30429F33222624F0003CE076 /* NetworkConnectivity.framework */,
112 | );
113 | name = Products;
114 | sourceTree = "";
115 | };
116 | 3013057B2212FC0D003582F7 /* iOSExample */ = {
117 | isa = PBXGroup;
118 | children = (
119 | 3013057C2212FC0D003582F7 /* AppDelegate.swift */,
120 | 3013057E2212FC0D003582F7 /* ViewController.swift */,
121 | 301305802212FC0D003582F7 /* Main.storyboard */,
122 | 301305832212FC0D003582F7 /* Assets.xcassets */,
123 | 301305852212FC0D003582F7 /* LaunchScreen.storyboard */,
124 | 301305882212FC0D003582F7 /* Info.plist */,
125 | );
126 | path = iOSExample;
127 | sourceTree = "";
128 | };
129 | 301305902212FC0E003582F7 /* iOSExampleTests */ = {
130 | isa = PBXGroup;
131 | children = (
132 | 301305912212FC0E003582F7 /* iOSExampleTests.swift */,
133 | 301305932212FC0E003582F7 /* Info.plist */,
134 | );
135 | path = iOSExampleTests;
136 | sourceTree = "";
137 | };
138 | 30429F34222624F1003CE076 /* NetworkConnectivity */ = {
139 | isa = PBXGroup;
140 | children = (
141 | 30429F35222624F1003CE076 /* NetworkConnectivity.h */,
142 | 30429F41222625E8003CE076 /* NetworkConnectivity.swift */,
143 | 30429F36222624F1003CE076 /* Info.plist */,
144 | );
145 | path = NetworkConnectivity;
146 | sourceTree = "";
147 | };
148 | 30429F4022262505003CE076 /* Dependencies */ = {
149 | isa = PBXGroup;
150 | children = (
151 | 30429F34222624F1003CE076 /* NetworkConnectivity */,
152 | );
153 | path = Dependencies;
154 | sourceTree = "";
155 | };
156 | /* End PBXGroup section */
157 |
158 | /* Begin PBXHeadersBuildPhase section */
159 | 30429F2E222624F0003CE076 /* Headers */ = {
160 | isa = PBXHeadersBuildPhase;
161 | buildActionMask = 2147483647;
162 | files = (
163 | 30429F37222624F1003CE076 /* NetworkConnectivity.h in Headers */,
164 | );
165 | runOnlyForDeploymentPostprocessing = 0;
166 | };
167 | /* End PBXHeadersBuildPhase section */
168 |
169 | /* Begin PBXNativeTarget section */
170 | 301305782212FC0D003582F7 /* iOSExample */ = {
171 | isa = PBXNativeTarget;
172 | buildConfigurationList = 301305962212FC0E003582F7 /* Build configuration list for PBXNativeTarget "iOSExample" */;
173 | buildPhases = (
174 | 301305752212FC0D003582F7 /* Sources */,
175 | 301305762212FC0D003582F7 /* Frameworks */,
176 | 301305772212FC0D003582F7 /* Resources */,
177 | 30429F3F222624F1003CE076 /* Embed Frameworks */,
178 | );
179 | buildRules = (
180 | );
181 | dependencies = (
182 | 30429F39222624F1003CE076 /* PBXTargetDependency */,
183 | );
184 | name = iOSExample;
185 | productName = iOSExample;
186 | productReference = 301305792212FC0D003582F7 /* iOSExample.app */;
187 | productType = "com.apple.product-type.application";
188 | };
189 | 3013058C2212FC0E003582F7 /* iOSExampleTests */ = {
190 | isa = PBXNativeTarget;
191 | buildConfigurationList = 301305992212FC0E003582F7 /* Build configuration list for PBXNativeTarget "iOSExampleTests" */;
192 | buildPhases = (
193 | 301305892212FC0E003582F7 /* Sources */,
194 | 3013058A2212FC0E003582F7 /* Frameworks */,
195 | 3013058B2212FC0E003582F7 /* Resources */,
196 | );
197 | buildRules = (
198 | );
199 | dependencies = (
200 | 3013058F2212FC0E003582F7 /* PBXTargetDependency */,
201 | );
202 | name = iOSExampleTests;
203 | productName = iOSExampleTests;
204 | productReference = 3013058D2212FC0E003582F7 /* iOSExampleTests.xctest */;
205 | productType = "com.apple.product-type.bundle.unit-test";
206 | };
207 | 30429F32222624F0003CE076 /* NetworkConnectivity */ = {
208 | isa = PBXNativeTarget;
209 | buildConfigurationList = 30429F3E222624F1003CE076 /* Build configuration list for PBXNativeTarget "NetworkConnectivity" */;
210 | buildPhases = (
211 | 30429F2E222624F0003CE076 /* Headers */,
212 | 30429F2F222624F0003CE076 /* Sources */,
213 | 30429F30222624F0003CE076 /* Frameworks */,
214 | 30429F31222624F0003CE076 /* Resources */,
215 | );
216 | buildRules = (
217 | );
218 | dependencies = (
219 | );
220 | name = NetworkConnectivity;
221 | productName = NetworkConnectivity;
222 | productReference = 30429F33222624F0003CE076 /* NetworkConnectivity.framework */;
223 | productType = "com.apple.product-type.framework";
224 | };
225 | /* End PBXNativeTarget section */
226 |
227 | /* Begin PBXProject section */
228 | 301305712212FC0D003582F7 /* Project object */ = {
229 | isa = PBXProject;
230 | attributes = {
231 | LastSwiftUpdateCheck = 1010;
232 | LastUpgradeCheck = 1010;
233 | ORGANIZATIONNAME = "Matt Eaton";
234 | TargetAttributes = {
235 | 301305782212FC0D003582F7 = {
236 | CreatedOnToolsVersion = 10.1;
237 | };
238 | 3013058C2212FC0E003582F7 = {
239 | CreatedOnToolsVersion = 10.1;
240 | TestTargetID = 301305782212FC0D003582F7;
241 | };
242 | 30429F32222624F0003CE076 = {
243 | CreatedOnToolsVersion = 10.1;
244 | };
245 | };
246 | };
247 | buildConfigurationList = 301305742212FC0D003582F7 /* Build configuration list for PBXProject "iOSExample" */;
248 | compatibilityVersion = "Xcode 9.3";
249 | developmentRegion = en;
250 | hasScannedForEncodings = 0;
251 | knownRegions = (
252 | en,
253 | Base,
254 | );
255 | mainGroup = 301305702212FC0D003582F7;
256 | productRefGroup = 3013057A2212FC0D003582F7 /* Products */;
257 | projectDirPath = "";
258 | projectRoot = "";
259 | targets = (
260 | 301305782212FC0D003582F7 /* iOSExample */,
261 | 3013058C2212FC0E003582F7 /* iOSExampleTests */,
262 | 30429F32222624F0003CE076 /* NetworkConnectivity */,
263 | );
264 | };
265 | /* End PBXProject section */
266 |
267 | /* Begin PBXResourcesBuildPhase section */
268 | 301305772212FC0D003582F7 /* Resources */ = {
269 | isa = PBXResourcesBuildPhase;
270 | buildActionMask = 2147483647;
271 | files = (
272 | 301305872212FC0D003582F7 /* LaunchScreen.storyboard in Resources */,
273 | 301305842212FC0D003582F7 /* Assets.xcassets in Resources */,
274 | 301305822212FC0D003582F7 /* Main.storyboard in Resources */,
275 | );
276 | runOnlyForDeploymentPostprocessing = 0;
277 | };
278 | 3013058B2212FC0E003582F7 /* Resources */ = {
279 | isa = PBXResourcesBuildPhase;
280 | buildActionMask = 2147483647;
281 | files = (
282 | );
283 | runOnlyForDeploymentPostprocessing = 0;
284 | };
285 | 30429F31222624F0003CE076 /* Resources */ = {
286 | isa = PBXResourcesBuildPhase;
287 | buildActionMask = 2147483647;
288 | files = (
289 | );
290 | runOnlyForDeploymentPostprocessing = 0;
291 | };
292 | /* End PBXResourcesBuildPhase section */
293 |
294 | /* Begin PBXSourcesBuildPhase section */
295 | 301305752212FC0D003582F7 /* Sources */ = {
296 | isa = PBXSourcesBuildPhase;
297 | buildActionMask = 2147483647;
298 | files = (
299 | 3013057F2212FC0D003582F7 /* ViewController.swift in Sources */,
300 | 30429F42222625E8003CE076 /* NetworkConnectivity.swift in Sources */,
301 | 3013057D2212FC0D003582F7 /* AppDelegate.swift in Sources */,
302 | );
303 | runOnlyForDeploymentPostprocessing = 0;
304 | };
305 | 301305892212FC0E003582F7 /* Sources */ = {
306 | isa = PBXSourcesBuildPhase;
307 | buildActionMask = 2147483647;
308 | files = (
309 | 301305922212FC0E003582F7 /* iOSExampleTests.swift in Sources */,
310 | );
311 | runOnlyForDeploymentPostprocessing = 0;
312 | };
313 | 30429F2F222624F0003CE076 /* Sources */ = {
314 | isa = PBXSourcesBuildPhase;
315 | buildActionMask = 2147483647;
316 | files = (
317 | );
318 | runOnlyForDeploymentPostprocessing = 0;
319 | };
320 | /* End PBXSourcesBuildPhase section */
321 |
322 | /* Begin PBXTargetDependency section */
323 | 3013058F2212FC0E003582F7 /* PBXTargetDependency */ = {
324 | isa = PBXTargetDependency;
325 | target = 301305782212FC0D003582F7 /* iOSExample */;
326 | targetProxy = 3013058E2212FC0E003582F7 /* PBXContainerItemProxy */;
327 | };
328 | 30429F39222624F1003CE076 /* PBXTargetDependency */ = {
329 | isa = PBXTargetDependency;
330 | target = 30429F32222624F0003CE076 /* NetworkConnectivity */;
331 | targetProxy = 30429F38222624F1003CE076 /* PBXContainerItemProxy */;
332 | };
333 | /* End PBXTargetDependency section */
334 |
335 | /* Begin PBXVariantGroup section */
336 | 301305802212FC0D003582F7 /* Main.storyboard */ = {
337 | isa = PBXVariantGroup;
338 | children = (
339 | 301305812212FC0D003582F7 /* Base */,
340 | );
341 | name = Main.storyboard;
342 | sourceTree = "";
343 | };
344 | 301305852212FC0D003582F7 /* LaunchScreen.storyboard */ = {
345 | isa = PBXVariantGroup;
346 | children = (
347 | 301305862212FC0D003582F7 /* Base */,
348 | );
349 | name = LaunchScreen.storyboard;
350 | sourceTree = "";
351 | };
352 | /* End PBXVariantGroup section */
353 |
354 | /* Begin XCBuildConfiguration section */
355 | 301305942212FC0E003582F7 /* Debug */ = {
356 | isa = XCBuildConfiguration;
357 | buildSettings = {
358 | ALWAYS_SEARCH_USER_PATHS = NO;
359 | CLANG_ANALYZER_NONNULL = YES;
360 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
361 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
362 | CLANG_CXX_LIBRARY = "libc++";
363 | CLANG_ENABLE_MODULES = YES;
364 | CLANG_ENABLE_OBJC_ARC = YES;
365 | CLANG_ENABLE_OBJC_WEAK = YES;
366 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
367 | CLANG_WARN_BOOL_CONVERSION = YES;
368 | CLANG_WARN_COMMA = YES;
369 | CLANG_WARN_CONSTANT_CONVERSION = YES;
370 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
372 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
373 | CLANG_WARN_EMPTY_BODY = YES;
374 | CLANG_WARN_ENUM_CONVERSION = YES;
375 | CLANG_WARN_INFINITE_RECURSION = YES;
376 | CLANG_WARN_INT_CONVERSION = YES;
377 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
378 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
379 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
380 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
381 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
382 | CLANG_WARN_STRICT_PROTOTYPES = YES;
383 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
384 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
385 | CLANG_WARN_UNREACHABLE_CODE = YES;
386 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
387 | CODE_SIGN_IDENTITY = "iPhone Developer";
388 | COPY_PHASE_STRIP = NO;
389 | DEBUG_INFORMATION_FORMAT = dwarf;
390 | ENABLE_STRICT_OBJC_MSGSEND = YES;
391 | ENABLE_TESTABILITY = YES;
392 | GCC_C_LANGUAGE_STANDARD = gnu11;
393 | GCC_DYNAMIC_NO_PIC = NO;
394 | GCC_NO_COMMON_BLOCKS = YES;
395 | GCC_OPTIMIZATION_LEVEL = 0;
396 | GCC_PREPROCESSOR_DEFINITIONS = (
397 | "DEBUG=1",
398 | "$(inherited)",
399 | );
400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
402 | GCC_WARN_UNDECLARED_SELECTOR = YES;
403 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
404 | GCC_WARN_UNUSED_FUNCTION = YES;
405 | GCC_WARN_UNUSED_VARIABLE = YES;
406 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
407 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
408 | MTL_FAST_MATH = YES;
409 | ONLY_ACTIVE_ARCH = YES;
410 | SDKROOT = iphoneos;
411 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
412 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
413 | };
414 | name = Debug;
415 | };
416 | 301305952212FC0E003582F7 /* Release */ = {
417 | isa = XCBuildConfiguration;
418 | buildSettings = {
419 | ALWAYS_SEARCH_USER_PATHS = NO;
420 | CLANG_ANALYZER_NONNULL = YES;
421 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
422 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
423 | CLANG_CXX_LIBRARY = "libc++";
424 | CLANG_ENABLE_MODULES = YES;
425 | CLANG_ENABLE_OBJC_ARC = YES;
426 | CLANG_ENABLE_OBJC_WEAK = YES;
427 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
428 | CLANG_WARN_BOOL_CONVERSION = YES;
429 | CLANG_WARN_COMMA = YES;
430 | CLANG_WARN_CONSTANT_CONVERSION = YES;
431 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
432 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
433 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
434 | CLANG_WARN_EMPTY_BODY = YES;
435 | CLANG_WARN_ENUM_CONVERSION = YES;
436 | CLANG_WARN_INFINITE_RECURSION = YES;
437 | CLANG_WARN_INT_CONVERSION = YES;
438 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
439 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
440 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
441 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
442 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
443 | CLANG_WARN_STRICT_PROTOTYPES = YES;
444 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
445 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
446 | CLANG_WARN_UNREACHABLE_CODE = YES;
447 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
448 | CODE_SIGN_IDENTITY = "iPhone Developer";
449 | COPY_PHASE_STRIP = NO;
450 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
451 | ENABLE_NS_ASSERTIONS = NO;
452 | ENABLE_STRICT_OBJC_MSGSEND = YES;
453 | GCC_C_LANGUAGE_STANDARD = gnu11;
454 | GCC_NO_COMMON_BLOCKS = YES;
455 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
456 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
457 | GCC_WARN_UNDECLARED_SELECTOR = YES;
458 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
459 | GCC_WARN_UNUSED_FUNCTION = YES;
460 | GCC_WARN_UNUSED_VARIABLE = YES;
461 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
462 | MTL_ENABLE_DEBUG_INFO = NO;
463 | MTL_FAST_MATH = YES;
464 | SDKROOT = iphoneos;
465 | SWIFT_COMPILATION_MODE = wholemodule;
466 | SWIFT_OPTIMIZATION_LEVEL = "-O";
467 | VALIDATE_PRODUCT = YES;
468 | };
469 | name = Release;
470 | };
471 | 301305972212FC0E003582F7 /* Debug */ = {
472 | isa = XCBuildConfiguration;
473 | buildSettings = {
474 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
475 | CODE_SIGN_STYLE = Automatic;
476 | DEVELOPMENT_TEAM = T7FGJ7JWEU;
477 | INFOPLIST_FILE = iOSExample/Info.plist;
478 | LD_RUNPATH_SEARCH_PATHS = (
479 | "$(inherited)",
480 | "@executable_path/Frameworks",
481 | );
482 | PRODUCT_BUNDLE_IDENTIFIER = com.agnosticdev.iOSExample;
483 | PRODUCT_NAME = "$(TARGET_NAME)";
484 | SWIFT_VERSION = 4.2;
485 | TARGETED_DEVICE_FAMILY = "1,2";
486 | };
487 | name = Debug;
488 | };
489 | 301305982212FC0E003582F7 /* Release */ = {
490 | isa = XCBuildConfiguration;
491 | buildSettings = {
492 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
493 | CODE_SIGN_STYLE = Automatic;
494 | DEVELOPMENT_TEAM = T7FGJ7JWEU;
495 | INFOPLIST_FILE = iOSExample/Info.plist;
496 | LD_RUNPATH_SEARCH_PATHS = (
497 | "$(inherited)",
498 | "@executable_path/Frameworks",
499 | );
500 | PRODUCT_BUNDLE_IDENTIFIER = com.agnosticdev.iOSExample;
501 | PRODUCT_NAME = "$(TARGET_NAME)";
502 | SWIFT_VERSION = 4.2;
503 | TARGETED_DEVICE_FAMILY = "1,2";
504 | };
505 | name = Release;
506 | };
507 | 3013059A2212FC0E003582F7 /* Debug */ = {
508 | isa = XCBuildConfiguration;
509 | buildSettings = {
510 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
511 | BUNDLE_LOADER = "$(TEST_HOST)";
512 | CODE_SIGN_STYLE = Automatic;
513 | DEVELOPMENT_TEAM = T7FGJ7JWEU;
514 | INFOPLIST_FILE = iOSExampleTests/Info.plist;
515 | LD_RUNPATH_SEARCH_PATHS = (
516 | "$(inherited)",
517 | "@executable_path/Frameworks",
518 | "@loader_path/Frameworks",
519 | );
520 | PRODUCT_BUNDLE_IDENTIFIER = com.agnosticdev.iOSExampleTests;
521 | PRODUCT_NAME = "$(TARGET_NAME)";
522 | SWIFT_VERSION = 4.2;
523 | TARGETED_DEVICE_FAMILY = "1,2";
524 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOSExample.app/iOSExample";
525 | };
526 | name = Debug;
527 | };
528 | 3013059B2212FC0E003582F7 /* Release */ = {
529 | isa = XCBuildConfiguration;
530 | buildSettings = {
531 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
532 | BUNDLE_LOADER = "$(TEST_HOST)";
533 | CODE_SIGN_STYLE = Automatic;
534 | DEVELOPMENT_TEAM = T7FGJ7JWEU;
535 | INFOPLIST_FILE = iOSExampleTests/Info.plist;
536 | LD_RUNPATH_SEARCH_PATHS = (
537 | "$(inherited)",
538 | "@executable_path/Frameworks",
539 | "@loader_path/Frameworks",
540 | );
541 | PRODUCT_BUNDLE_IDENTIFIER = com.agnosticdev.iOSExampleTests;
542 | PRODUCT_NAME = "$(TARGET_NAME)";
543 | SWIFT_VERSION = 4.2;
544 | TARGETED_DEVICE_FAMILY = "1,2";
545 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOSExample.app/iOSExample";
546 | };
547 | name = Release;
548 | };
549 | 30429F3C222624F1003CE076 /* Debug */ = {
550 | isa = XCBuildConfiguration;
551 | buildSettings = {
552 | CODE_SIGN_IDENTITY = "";
553 | CODE_SIGN_STYLE = Automatic;
554 | CURRENT_PROJECT_VERSION = 1;
555 | DEFINES_MODULE = YES;
556 | DEVELOPMENT_TEAM = T7FGJ7JWEU;
557 | DYLIB_COMPATIBILITY_VERSION = 1;
558 | DYLIB_CURRENT_VERSION = 1;
559 | DYLIB_INSTALL_NAME_BASE = "@rpath";
560 | INFOPLIST_FILE = "$(SRCROOT)/iOSExample/Info.plist";
561 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
562 | LD_RUNPATH_SEARCH_PATHS = (
563 | "$(inherited)",
564 | "@executable_path/Frameworks",
565 | "@loader_path/Frameworks",
566 | );
567 | PRODUCT_BUNDLE_IDENTIFIER = comCommandLine.NetworkConnectivity;
568 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
569 | SKIP_INSTALL = YES;
570 | SWIFT_VERSION = 4.2;
571 | TARGETED_DEVICE_FAMILY = "1,2";
572 | VERSIONING_SYSTEM = "apple-generic";
573 | VERSION_INFO_PREFIX = "";
574 | };
575 | name = Debug;
576 | };
577 | 30429F3D222624F1003CE076 /* Release */ = {
578 | isa = XCBuildConfiguration;
579 | buildSettings = {
580 | CODE_SIGN_IDENTITY = "";
581 | CODE_SIGN_STYLE = Automatic;
582 | CURRENT_PROJECT_VERSION = 1;
583 | DEFINES_MODULE = YES;
584 | DEVELOPMENT_TEAM = T7FGJ7JWEU;
585 | DYLIB_COMPATIBILITY_VERSION = 1;
586 | DYLIB_CURRENT_VERSION = 1;
587 | DYLIB_INSTALL_NAME_BASE = "@rpath";
588 | INFOPLIST_FILE = "$(SRCROOT)/iOSExample/Info.plist";
589 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
590 | LD_RUNPATH_SEARCH_PATHS = (
591 | "$(inherited)",
592 | "@executable_path/Frameworks",
593 | "@loader_path/Frameworks",
594 | );
595 | PRODUCT_BUNDLE_IDENTIFIER = comCommandLine.NetworkConnectivity;
596 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
597 | SKIP_INSTALL = YES;
598 | SWIFT_VERSION = 4.2;
599 | TARGETED_DEVICE_FAMILY = "1,2";
600 | VERSIONING_SYSTEM = "apple-generic";
601 | VERSION_INFO_PREFIX = "";
602 | };
603 | name = Release;
604 | };
605 | /* End XCBuildConfiguration section */
606 |
607 | /* Begin XCConfigurationList section */
608 | 301305742212FC0D003582F7 /* Build configuration list for PBXProject "iOSExample" */ = {
609 | isa = XCConfigurationList;
610 | buildConfigurations = (
611 | 301305942212FC0E003582F7 /* Debug */,
612 | 301305952212FC0E003582F7 /* Release */,
613 | );
614 | defaultConfigurationIsVisible = 0;
615 | defaultConfigurationName = Release;
616 | };
617 | 301305962212FC0E003582F7 /* Build configuration list for PBXNativeTarget "iOSExample" */ = {
618 | isa = XCConfigurationList;
619 | buildConfigurations = (
620 | 301305972212FC0E003582F7 /* Debug */,
621 | 301305982212FC0E003582F7 /* Release */,
622 | );
623 | defaultConfigurationIsVisible = 0;
624 | defaultConfigurationName = Release;
625 | };
626 | 301305992212FC0E003582F7 /* Build configuration list for PBXNativeTarget "iOSExampleTests" */ = {
627 | isa = XCConfigurationList;
628 | buildConfigurations = (
629 | 3013059A2212FC0E003582F7 /* Debug */,
630 | 3013059B2212FC0E003582F7 /* Release */,
631 | );
632 | defaultConfigurationIsVisible = 0;
633 | defaultConfigurationName = Release;
634 | };
635 | 30429F3E222624F1003CE076 /* Build configuration list for PBXNativeTarget "NetworkConnectivity" */ = {
636 | isa = XCConfigurationList;
637 | buildConfigurations = (
638 | 30429F3C222624F1003CE076 /* Debug */,
639 | 30429F3D222624F1003CE076 /* Release */,
640 | );
641 | defaultConfigurationIsVisible = 0;
642 | defaultConfigurationName = Release;
643 | };
644 | /* End XCConfigurationList section */
645 | };
646 | rootObject = 301305712212FC0D003582F7 /* Project object */;
647 | }
648 |
--------------------------------------------------------------------------------
/Examples/macOSExample/macOSExample/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
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 |
700 |
701 |
702 |
703 |
704 |
705 |
706 |
707 |
708 |
709 |
710 |
711 |
712 |
713 |
714 |
715 |
716 |
717 |
718 |
719 |
720 |
721 |
722 |
723 |
724 |
725 |
726 |
727 |
728 |
729 |
730 |
731 |
732 |
733 |
734 |
--------------------------------------------------------------------------------