├── .gitignore
├── LICENSE
├── README.md
├── Remote WatchKit App
├── Base.lproj
│ └── Interface.storyboard
├── Images.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
└── Info.plist
├── Remote WatchKit Extension
├── Images.xcassets
│ └── README__ignoredByTemplate__
├── Info.plist
├── InterfaceController.swift
└── Remote WatchKit Extension.entitlements
├── Remote.xcodeproj
├── project.pbxproj
└── project.xcworkspace
│ └── contents.xcworkspacedata
├── Remote
├── AppDelegate.swift
├── Base.lproj
│ ├── LaunchScreen.xib
│ └── Main.storyboard
├── Images.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── Remote.entitlements
└── ViewController.swift
├── RemoteKit
├── Config.swift
├── Info.plist
└── RemoteKit.h
├── RemoteKitTests
├── Info.plist
└── RemoteKitTests.swift
├── RemoteTests
├── Info.plist
└── RemoteTests.swift
├── Wormhole.podspec
├── Wormhole
├── Info.plist
├── Wormhole.h
└── Wormhole.swift
├── WormholeTests
├── Info.plist
└── WormholeTests.swift
└── images
└── wormhole_banner.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | build/
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | *.xccheckout
14 | *.moved-aside
15 | DerivedData
16 | *.hmap
17 | *.ipa
18 | *.xcuserstate
19 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 nixzhu
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | 
3 |
4 | # Wormhole
5 |
6 | Wormhole is not just a Swift port of [MMWormhole](https://github.com/mutualmobile/MMWormhole) but with better API and use logic. You can remove any a listener from it separately.
7 |
8 | ## Example
9 |
10 | In WatchKit extension, passing a message:
11 |
12 | ```Swift
13 | import Wormhole
14 |
15 | let wormhole = Wormhole(appGroupIdentifier: "group.com.nixWork.Wormhole", messageDirectoryName: "Wormhole")
16 |
17 | wormhole.passMessage(NSNumber(bool: lightState), withIdentifier: "lightState")
18 | ```
19 |
20 | In App, make a listener and listen a message:
21 |
22 | ```Swift
23 | import Wormhole
24 |
25 | let wormhole = Wormhole(appGroupIdentifier: "group.com.nixWork.Wormhole", messageDirectoryName: "Wormhole")
26 |
27 | lazy var lightStateListener: Wormhole.Listener = {
28 | let action: Wormhole.Listener.Action = { [unowned self] message in
29 | if let lightState = message as? NSNumber {
30 | self.lightStateLabel.text = lightState.boolValue ? "Light On" : "Light Off"
31 | }
32 | }
33 |
34 | let listener = Wormhole.Listener(name: "lightStateLabel", action: action)
35 |
36 | return listener
37 | }()
38 |
39 | wormhole.bindListener(lightStateListener, forMessageWithIdentifier: "lightState")
40 | ```
41 |
42 | Now easy to remove a listener:
43 |
44 | ```Swift
45 | wormhole.removeListener(lightStateListener, forMessageWithIdentifier: "lightState")
46 | ```
47 | or
48 |
49 | ```Swift
50 | wormhole.removeListenerByName("lightStateLabel", forMessageWithIdentifier: "lightState")
51 | ```
52 |
53 | For more information, see the demo.
54 |
55 | 另有中文介绍:[再造虫洞:一次 Objective-C 到 Swift 的改写之旅](https://github.com/nixzhu/dev-blog/blob/master/2015-05-27-wormhole.md)
56 |
57 | ## Installation
58 |
59 | ### CocoaPods
60 |
61 | [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects.
62 |
63 | CocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command:
64 |
65 | ```bash
66 | $ [sudo] gem install cocoapods
67 | ```
68 |
69 | To integrate Wormhole into your Xcode project using CocoaPods, specify it in your `Podfile`:
70 |
71 | ```ruby
72 | source 'https://github.com/CocoaPods/Specs.git'
73 | platform :ios, '8.0'
74 | use_frameworks!
75 |
76 | pod 'Wormhole', '~> 1.0'
77 | ```
78 |
79 | Then, run the following command:
80 |
81 | ```bash
82 | $ pod install
83 | ```
84 |
85 | You should open the `{Project}.xcworkspace` instead of the `{Project}.xcodeproj` after you installed anything from CocoaPods.
86 |
87 | For more information about how to use CocoaPods, I suggest [this tutorial](http://www.raywenderlich.com/64546/introduction-to-cocoapods-2).
88 |
89 | ## Credits
90 |
91 | Thanks to [Lex Tang](https://github.com/lexrus) design the logo banner.
92 |
93 | ## License
94 |
95 | Wormhole is available under the MIT license. See the LICENSE file for more info.
--------------------------------------------------------------------------------
/Remote WatchKit App/Base.lproj/Interface.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 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Remote WatchKit App/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "24x24",
5 | "idiom" : "watch",
6 | "scale" : "2x",
7 | "role" : "notificationCenter",
8 | "subtype" : "38mm"
9 | },
10 | {
11 | "size" : "27.5x27.5",
12 | "idiom" : "watch",
13 | "scale" : "2x",
14 | "role" : "notificationCenter",
15 | "subtype" : "42mm"
16 | },
17 | {
18 | "size" : "29x29",
19 | "idiom" : "watch",
20 | "role" : "companionSettings",
21 | "scale" : "2x"
22 | },
23 | {
24 | "size" : "29x29",
25 | "idiom" : "watch",
26 | "role" : "companionSettings",
27 | "scale" : "3x"
28 | },
29 | {
30 | "size" : "40x40",
31 | "idiom" : "watch",
32 | "scale" : "2x",
33 | "role" : "appLauncher",
34 | "subtype" : "38mm"
35 | },
36 | {
37 | "size" : "44x44",
38 | "idiom" : "watch",
39 | "scale" : "2x",
40 | "role" : "longLook",
41 | "subtype" : "42mm"
42 | },
43 | {
44 | "size" : "86x86",
45 | "idiom" : "watch",
46 | "scale" : "2x",
47 | "role" : "quickLook",
48 | "subtype" : "38mm"
49 | },
50 | {
51 | "size" : "98x98",
52 | "idiom" : "watch",
53 | "scale" : "2x",
54 | "role" : "quickLook",
55 | "subtype" : "42mm"
56 | }
57 | ],
58 | "info" : {
59 | "version" : 1,
60 | "author" : "xcode"
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/Remote WatchKit App/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | Remote
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | com.nixWork.Remote.watchkitapp
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | UISupportedInterfaceOrientations
26 |
27 | UIInterfaceOrientationPortrait
28 | UIInterfaceOrientationPortraitUpsideDown
29 |
30 | WKCompanionAppBundleIdentifier
31 | com.nixWork.Remote
32 | WKWatchKitApp
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/Remote WatchKit Extension/Images.xcassets/README__ignoredByTemplate__:
--------------------------------------------------------------------------------
1 | Did you know that git does not support storing empty directories?
2 |
--------------------------------------------------------------------------------
/Remote WatchKit Extension/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | Remote WatchKit Extension
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | com.nixWork.Remote.watchkitextension
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | XPC!
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | NSExtension
26 |
27 | NSExtensionAttributes
28 |
29 | WKAppBundleIdentifier
30 | com.nixWork.Remote.watchkitapp
31 |
32 | NSExtensionPointIdentifier
33 | com.apple.watchkit
34 |
35 | RemoteInterfacePrincipalClass
36 | $(PRODUCT_MODULE_NAME).InterfaceController
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Remote WatchKit Extension/InterfaceController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // InterfaceController.swift
3 | // Remote WatchKit Extension
4 | //
5 | // Created by NIX on 15/5/20.
6 | // Copyright (c) 2015年 nixWork. All rights reserved.
7 | //
8 |
9 | import WatchKit
10 | import Wormhole
11 | import RemoteKit
12 |
13 | class InterfaceController: WKInterfaceController {
14 |
15 | @IBOutlet weak var lightStateSwitch: WKInterfaceSwitch!
16 | @IBOutlet weak var lightLevelSlider: WKInterfaceSlider!
17 |
18 | let wormhole = Wormhole(appGroupIdentifier: Config.Wormhole.appGroupIdentifier, messageDirectoryName: Config.Wormhole.messageDirectoryName)
19 |
20 | override func awakeWithContext(context: AnyObject?) {
21 | super.awakeWithContext(context)
22 | }
23 |
24 | override func willActivate() {
25 | super.willActivate()
26 |
27 | if let message = wormhole.messageWithIdentifier(Config.Wormhole.Message.lightState) {
28 | if let lightState = message as? NSNumber {
29 | lightStateSwitch.setOn(lightState.boolValue)
30 | self.lightState = lightState.boolValue
31 | }
32 | }
33 |
34 | if let message = wormhole.messageWithIdentifier(Config.Wormhole.Message.lightLevel) {
35 | if let lightLevel = message as? NSNumber {
36 | lightLevelSlider.setValue(lightLevel.floatValue)
37 | self.lightLevel = lightLevel.floatValue
38 | }
39 | }
40 | }
41 |
42 | override func didDeactivate() {
43 | super.didDeactivate()
44 | }
45 |
46 | typealias LightState = Bool
47 |
48 | var lightState: LightState = false {
49 | didSet {
50 | wormhole.passMessage(NSNumber(bool: lightState), withIdentifier: Config.Wormhole.Message.lightState)
51 | }
52 | }
53 |
54 | var lightLevel: Float = 2 {
55 | didSet {
56 | wormhole.passMessage(NSNumber(float: lightLevel), withIdentifier: Config.Wormhole.Message.lightLevel)
57 | }
58 | }
59 |
60 | @IBAction func switchLight(value: Bool) {
61 | lightState = !lightState
62 | }
63 |
64 | @IBAction func changeLightLevels(value: Float) {
65 | lightLevel = value
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/Remote WatchKit Extension/Remote WatchKit Extension.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.com.nixWork.Wormhole
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Remote.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 502047B71B0C971C002EBFC7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 502047B61B0C971C002EBFC7 /* AppDelegate.swift */; };
11 | 502047B91B0C971C002EBFC7 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 502047B81B0C971C002EBFC7 /* ViewController.swift */; };
12 | 502047BC1B0C971C002EBFC7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 502047BA1B0C971C002EBFC7 /* Main.storyboard */; };
13 | 502047BE1B0C971C002EBFC7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 502047BD1B0C971C002EBFC7 /* Images.xcassets */; };
14 | 502047C11B0C971C002EBFC7 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 502047BF1B0C971C002EBFC7 /* LaunchScreen.xib */; };
15 | 502047CD1B0C971C002EBFC7 /* RemoteTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 502047CC1B0C971C002EBFC7 /* RemoteTests.swift */; };
16 | 502047DF1B0C973C002EBFC7 /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 502047DE1B0C973C002EBFC7 /* InterfaceController.swift */; };
17 | 502047E11B0C973C002EBFC7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 502047E01B0C973C002EBFC7 /* Images.xcassets */; };
18 | 502047E51B0C973D002EBFC7 /* Remote WatchKit App.app in Resources */ = {isa = PBXBuildFile; fileRef = 502047E41B0C973D002EBFC7 /* Remote WatchKit App.app */; };
19 | 502047ED1B0C973D002EBFC7 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 502047EB1B0C973D002EBFC7 /* Interface.storyboard */; };
20 | 502047EF1B0C973E002EBFC7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 502047EE1B0C973E002EBFC7 /* Images.xcassets */; };
21 | 502047F21B0C973E002EBFC7 /* Remote WatchKit Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 502047DA1B0C973B002EBFC7 /* Remote WatchKit Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
22 | 502048061B0C97D0002EBFC7 /* Wormhole.h in Headers */ = {isa = PBXBuildFile; fileRef = 502048051B0C97D0002EBFC7 /* Wormhole.h */; settings = {ATTRIBUTES = (Public, ); }; };
23 | 5020480C1B0C97D0002EBFC7 /* Wormhole.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 502048011B0C97D0002EBFC7 /* Wormhole.framework */; };
24 | 502048151B0C97D0002EBFC7 /* WormholeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 502048141B0C97D0002EBFC7 /* WormholeTests.swift */; };
25 | 502048181B0C97D0002EBFC7 /* Wormhole.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 502048011B0C97D0002EBFC7 /* Wormhole.framework */; };
26 | 502048191B0C97D0002EBFC7 /* Wormhole.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 502048011B0C97D0002EBFC7 /* Wormhole.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
27 | 502048221B0C97F1002EBFC7 /* Wormhole.swift in Sources */ = {isa = PBXBuildFile; fileRef = 502048211B0C97F1002EBFC7 /* Wormhole.swift */; };
28 | 5054986D1B1574B40037E3BD /* RemoteKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 5054986C1B1574B40037E3BD /* RemoteKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
29 | 505498731B1574B40037E3BD /* RemoteKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 505498681B1574B30037E3BD /* RemoteKit.framework */; };
30 | 5054987C1B1574B40037E3BD /* RemoteKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5054987B1B1574B40037E3BD /* RemoteKitTests.swift */; };
31 | 5054987F1B1574B40037E3BD /* RemoteKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 505498681B1574B30037E3BD /* RemoteKit.framework */; };
32 | 505498801B1574B40037E3BD /* RemoteKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 505498681B1574B30037E3BD /* RemoteKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
33 | 505498881B15750C0037E3BD /* Config.swift in Sources */ = {isa = PBXBuildFile; fileRef = 505498871B15750C0037E3BD /* Config.swift */; };
34 | /* End PBXBuildFile section */
35 |
36 | /* Begin PBXContainerItemProxy section */
37 | 502047C71B0C971C002EBFC7 /* PBXContainerItemProxy */ = {
38 | isa = PBXContainerItemProxy;
39 | containerPortal = 502047A91B0C971B002EBFC7 /* Project object */;
40 | proxyType = 1;
41 | remoteGlobalIDString = 502047B01B0C971B002EBFC7;
42 | remoteInfo = Remote;
43 | };
44 | 502047E61B0C973D002EBFC7 /* PBXContainerItemProxy */ = {
45 | isa = PBXContainerItemProxy;
46 | containerPortal = 502047A91B0C971B002EBFC7 /* Project object */;
47 | proxyType = 1;
48 | remoteGlobalIDString = 502047E31B0C973D002EBFC7;
49 | remoteInfo = "Remote WatchKit App";
50 | };
51 | 502047F01B0C973E002EBFC7 /* PBXContainerItemProxy */ = {
52 | isa = PBXContainerItemProxy;
53 | containerPortal = 502047A91B0C971B002EBFC7 /* Project object */;
54 | proxyType = 1;
55 | remoteGlobalIDString = 502047D91B0C973B002EBFC7;
56 | remoteInfo = "Remote WatchKit Extension";
57 | };
58 | 5020480D1B0C97D0002EBFC7 /* PBXContainerItemProxy */ = {
59 | isa = PBXContainerItemProxy;
60 | containerPortal = 502047A91B0C971B002EBFC7 /* Project object */;
61 | proxyType = 1;
62 | remoteGlobalIDString = 502048001B0C97D0002EBFC7;
63 | remoteInfo = Wormhole;
64 | };
65 | 5020480F1B0C97D0002EBFC7 /* PBXContainerItemProxy */ = {
66 | isa = PBXContainerItemProxy;
67 | containerPortal = 502047A91B0C971B002EBFC7 /* Project object */;
68 | proxyType = 1;
69 | remoteGlobalIDString = 502047B01B0C971B002EBFC7;
70 | remoteInfo = Remote;
71 | };
72 | 502048161B0C97D0002EBFC7 /* PBXContainerItemProxy */ = {
73 | isa = PBXContainerItemProxy;
74 | containerPortal = 502047A91B0C971B002EBFC7 /* Project object */;
75 | proxyType = 1;
76 | remoteGlobalIDString = 502048001B0C97D0002EBFC7;
77 | remoteInfo = Wormhole;
78 | };
79 | 505498741B1574B40037E3BD /* PBXContainerItemProxy */ = {
80 | isa = PBXContainerItemProxy;
81 | containerPortal = 502047A91B0C971B002EBFC7 /* Project object */;
82 | proxyType = 1;
83 | remoteGlobalIDString = 505498671B1574B30037E3BD;
84 | remoteInfo = RemoteKit;
85 | };
86 | 505498761B1574B40037E3BD /* PBXContainerItemProxy */ = {
87 | isa = PBXContainerItemProxy;
88 | containerPortal = 502047A91B0C971B002EBFC7 /* Project object */;
89 | proxyType = 1;
90 | remoteGlobalIDString = 502047B01B0C971B002EBFC7;
91 | remoteInfo = Remote;
92 | };
93 | 5054987D1B1574B40037E3BD /* PBXContainerItemProxy */ = {
94 | isa = PBXContainerItemProxy;
95 | containerPortal = 502047A91B0C971B002EBFC7 /* Project object */;
96 | proxyType = 1;
97 | remoteGlobalIDString = 505498671B1574B30037E3BD;
98 | remoteInfo = RemoteKit;
99 | };
100 | /* End PBXContainerItemProxy section */
101 |
102 | /* Begin PBXCopyFilesBuildPhase section */
103 | 502047F91B0C973E002EBFC7 /* Embed App Extensions */ = {
104 | isa = PBXCopyFilesBuildPhase;
105 | buildActionMask = 2147483647;
106 | dstPath = "";
107 | dstSubfolderSpec = 13;
108 | files = (
109 | 502047F21B0C973E002EBFC7 /* Remote WatchKit Extension.appex in Embed App Extensions */,
110 | );
111 | name = "Embed App Extensions";
112 | runOnlyForDeploymentPostprocessing = 0;
113 | };
114 | 5020481D1B0C97D0002EBFC7 /* Embed Frameworks */ = {
115 | isa = PBXCopyFilesBuildPhase;
116 | buildActionMask = 2147483647;
117 | dstPath = "";
118 | dstSubfolderSpec = 10;
119 | files = (
120 | 502048191B0C97D0002EBFC7 /* Wormhole.framework in Embed Frameworks */,
121 | 505498801B1574B40037E3BD /* RemoteKit.framework in Embed Frameworks */,
122 | );
123 | name = "Embed Frameworks";
124 | runOnlyForDeploymentPostprocessing = 0;
125 | };
126 | /* End PBXCopyFilesBuildPhase section */
127 |
128 | /* Begin PBXFileReference section */
129 | 502047B11B0C971B002EBFC7 /* Remote.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Remote.app; sourceTree = BUILT_PRODUCTS_DIR; };
130 | 502047B51B0C971B002EBFC7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
131 | 502047B61B0C971C002EBFC7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
132 | 502047B81B0C971C002EBFC7 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
133 | 502047BB1B0C971C002EBFC7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
134 | 502047BD1B0C971C002EBFC7 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
135 | 502047C01B0C971C002EBFC7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
136 | 502047C61B0C971C002EBFC7 /* RemoteTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RemoteTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
137 | 502047CB1B0C971C002EBFC7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
138 | 502047CC1B0C971C002EBFC7 /* RemoteTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteTests.swift; sourceTree = ""; };
139 | 502047DA1B0C973B002EBFC7 /* Remote WatchKit Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Remote WatchKit Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
140 | 502047DD1B0C973C002EBFC7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
141 | 502047DE1B0C973C002EBFC7 /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = ""; };
142 | 502047E01B0C973C002EBFC7 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
143 | 502047E41B0C973D002EBFC7 /* Remote WatchKit App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Remote WatchKit App.app"; sourceTree = BUILT_PRODUCTS_DIR; };
144 | 502047EA1B0C973D002EBFC7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
145 | 502047EC1B0C973D002EBFC7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; };
146 | 502047EE1B0C973E002EBFC7 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
147 | 502047FA1B0C9767002EBFC7 /* Remote.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = Remote.entitlements; sourceTree = ""; };
148 | 502047FB1B0C9780002EBFC7 /* Remote WatchKit Extension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "Remote WatchKit Extension.entitlements"; sourceTree = ""; };
149 | 502048011B0C97D0002EBFC7 /* Wormhole.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Wormhole.framework; sourceTree = BUILT_PRODUCTS_DIR; };
150 | 502048041B0C97D0002EBFC7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
151 | 502048051B0C97D0002EBFC7 /* Wormhole.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Wormhole.h; sourceTree = ""; };
152 | 5020480B1B0C97D0002EBFC7 /* WormholeTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WormholeTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
153 | 502048131B0C97D0002EBFC7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
154 | 502048141B0C97D0002EBFC7 /* WormholeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WormholeTests.swift; sourceTree = ""; };
155 | 502048211B0C97F1002EBFC7 /* Wormhole.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Wormhole.swift; sourceTree = ""; };
156 | 505498681B1574B30037E3BD /* RemoteKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RemoteKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
157 | 5054986B1B1574B40037E3BD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
158 | 5054986C1B1574B40037E3BD /* RemoteKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteKit.h; sourceTree = ""; };
159 | 505498721B1574B40037E3BD /* RemoteKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RemoteKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
160 | 5054987A1B1574B40037E3BD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
161 | 5054987B1B1574B40037E3BD /* RemoteKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteKitTests.swift; sourceTree = ""; };
162 | 505498871B15750C0037E3BD /* Config.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Config.swift; sourceTree = ""; };
163 | /* End PBXFileReference section */
164 |
165 | /* Begin PBXFrameworksBuildPhase section */
166 | 502047AE1B0C971B002EBFC7 /* Frameworks */ = {
167 | isa = PBXFrameworksBuildPhase;
168 | buildActionMask = 2147483647;
169 | files = (
170 | 502048181B0C97D0002EBFC7 /* Wormhole.framework in Frameworks */,
171 | 5054987F1B1574B40037E3BD /* RemoteKit.framework in Frameworks */,
172 | );
173 | runOnlyForDeploymentPostprocessing = 0;
174 | };
175 | 502047C31B0C971C002EBFC7 /* Frameworks */ = {
176 | isa = PBXFrameworksBuildPhase;
177 | buildActionMask = 2147483647;
178 | files = (
179 | );
180 | runOnlyForDeploymentPostprocessing = 0;
181 | };
182 | 502047D71B0C973B002EBFC7 /* Frameworks */ = {
183 | isa = PBXFrameworksBuildPhase;
184 | buildActionMask = 2147483647;
185 | files = (
186 | );
187 | runOnlyForDeploymentPostprocessing = 0;
188 | };
189 | 502047FD1B0C97D0002EBFC7 /* Frameworks */ = {
190 | isa = PBXFrameworksBuildPhase;
191 | buildActionMask = 2147483647;
192 | files = (
193 | );
194 | runOnlyForDeploymentPostprocessing = 0;
195 | };
196 | 502048081B0C97D0002EBFC7 /* Frameworks */ = {
197 | isa = PBXFrameworksBuildPhase;
198 | buildActionMask = 2147483647;
199 | files = (
200 | 5020480C1B0C97D0002EBFC7 /* Wormhole.framework in Frameworks */,
201 | );
202 | runOnlyForDeploymentPostprocessing = 0;
203 | };
204 | 505498641B1574B30037E3BD /* Frameworks */ = {
205 | isa = PBXFrameworksBuildPhase;
206 | buildActionMask = 2147483647;
207 | files = (
208 | );
209 | runOnlyForDeploymentPostprocessing = 0;
210 | };
211 | 5054986F1B1574B40037E3BD /* Frameworks */ = {
212 | isa = PBXFrameworksBuildPhase;
213 | buildActionMask = 2147483647;
214 | files = (
215 | 505498731B1574B40037E3BD /* RemoteKit.framework in Frameworks */,
216 | );
217 | runOnlyForDeploymentPostprocessing = 0;
218 | };
219 | /* End PBXFrameworksBuildPhase section */
220 |
221 | /* Begin PBXGroup section */
222 | 502047A81B0C971B002EBFC7 = {
223 | isa = PBXGroup;
224 | children = (
225 | 502047B31B0C971B002EBFC7 /* Remote */,
226 | 502047C91B0C971C002EBFC7 /* RemoteTests */,
227 | 502047DB1B0C973B002EBFC7 /* Remote WatchKit Extension */,
228 | 502047E81B0C973D002EBFC7 /* Remote WatchKit App */,
229 | 502048021B0C97D0002EBFC7 /* Wormhole */,
230 | 502048111B0C97D0002EBFC7 /* WormholeTests */,
231 | 505498691B1574B30037E3BD /* RemoteKit */,
232 | 505498781B1574B40037E3BD /* RemoteKitTests */,
233 | 502047B21B0C971B002EBFC7 /* Products */,
234 | );
235 | sourceTree = "";
236 | };
237 | 502047B21B0C971B002EBFC7 /* Products */ = {
238 | isa = PBXGroup;
239 | children = (
240 | 502047B11B0C971B002EBFC7 /* Remote.app */,
241 | 502047C61B0C971C002EBFC7 /* RemoteTests.xctest */,
242 | 502047DA1B0C973B002EBFC7 /* Remote WatchKit Extension.appex */,
243 | 502047E41B0C973D002EBFC7 /* Remote WatchKit App.app */,
244 | 502048011B0C97D0002EBFC7 /* Wormhole.framework */,
245 | 5020480B1B0C97D0002EBFC7 /* WormholeTests.xctest */,
246 | 505498681B1574B30037E3BD /* RemoteKit.framework */,
247 | 505498721B1574B40037E3BD /* RemoteKitTests.xctest */,
248 | );
249 | name = Products;
250 | sourceTree = "";
251 | };
252 | 502047B31B0C971B002EBFC7 /* Remote */ = {
253 | isa = PBXGroup;
254 | children = (
255 | 502047FA1B0C9767002EBFC7 /* Remote.entitlements */,
256 | 502047B61B0C971C002EBFC7 /* AppDelegate.swift */,
257 | 502047B81B0C971C002EBFC7 /* ViewController.swift */,
258 | 502047BA1B0C971C002EBFC7 /* Main.storyboard */,
259 | 502047BD1B0C971C002EBFC7 /* Images.xcassets */,
260 | 502047BF1B0C971C002EBFC7 /* LaunchScreen.xib */,
261 | 502047B41B0C971B002EBFC7 /* Supporting Files */,
262 | );
263 | path = Remote;
264 | sourceTree = "";
265 | };
266 | 502047B41B0C971B002EBFC7 /* Supporting Files */ = {
267 | isa = PBXGroup;
268 | children = (
269 | 502047B51B0C971B002EBFC7 /* Info.plist */,
270 | );
271 | name = "Supporting Files";
272 | sourceTree = "";
273 | };
274 | 502047C91B0C971C002EBFC7 /* RemoteTests */ = {
275 | isa = PBXGroup;
276 | children = (
277 | 502047CC1B0C971C002EBFC7 /* RemoteTests.swift */,
278 | 502047CA1B0C971C002EBFC7 /* Supporting Files */,
279 | );
280 | path = RemoteTests;
281 | sourceTree = "";
282 | };
283 | 502047CA1B0C971C002EBFC7 /* Supporting Files */ = {
284 | isa = PBXGroup;
285 | children = (
286 | 502047CB1B0C971C002EBFC7 /* Info.plist */,
287 | );
288 | name = "Supporting Files";
289 | sourceTree = "";
290 | };
291 | 502047DB1B0C973B002EBFC7 /* Remote WatchKit Extension */ = {
292 | isa = PBXGroup;
293 | children = (
294 | 502047FB1B0C9780002EBFC7 /* Remote WatchKit Extension.entitlements */,
295 | 502047DE1B0C973C002EBFC7 /* InterfaceController.swift */,
296 | 502047E01B0C973C002EBFC7 /* Images.xcassets */,
297 | 502047DC1B0C973C002EBFC7 /* Supporting Files */,
298 | );
299 | path = "Remote WatchKit Extension";
300 | sourceTree = "";
301 | };
302 | 502047DC1B0C973C002EBFC7 /* Supporting Files */ = {
303 | isa = PBXGroup;
304 | children = (
305 | 502047DD1B0C973C002EBFC7 /* Info.plist */,
306 | );
307 | name = "Supporting Files";
308 | sourceTree = "";
309 | };
310 | 502047E81B0C973D002EBFC7 /* Remote WatchKit App */ = {
311 | isa = PBXGroup;
312 | children = (
313 | 502047EB1B0C973D002EBFC7 /* Interface.storyboard */,
314 | 502047EE1B0C973E002EBFC7 /* Images.xcassets */,
315 | 502047E91B0C973D002EBFC7 /* Supporting Files */,
316 | );
317 | path = "Remote WatchKit App";
318 | sourceTree = "";
319 | };
320 | 502047E91B0C973D002EBFC7 /* Supporting Files */ = {
321 | isa = PBXGroup;
322 | children = (
323 | 502047EA1B0C973D002EBFC7 /* Info.plist */,
324 | );
325 | name = "Supporting Files";
326 | sourceTree = "";
327 | };
328 | 502048021B0C97D0002EBFC7 /* Wormhole */ = {
329 | isa = PBXGroup;
330 | children = (
331 | 502048051B0C97D0002EBFC7 /* Wormhole.h */,
332 | 502048211B0C97F1002EBFC7 /* Wormhole.swift */,
333 | 502048031B0C97D0002EBFC7 /* Supporting Files */,
334 | );
335 | path = Wormhole;
336 | sourceTree = "";
337 | };
338 | 502048031B0C97D0002EBFC7 /* Supporting Files */ = {
339 | isa = PBXGroup;
340 | children = (
341 | 502048041B0C97D0002EBFC7 /* Info.plist */,
342 | );
343 | name = "Supporting Files";
344 | sourceTree = "";
345 | };
346 | 502048111B0C97D0002EBFC7 /* WormholeTests */ = {
347 | isa = PBXGroup;
348 | children = (
349 | 502048141B0C97D0002EBFC7 /* WormholeTests.swift */,
350 | 502048121B0C97D0002EBFC7 /* Supporting Files */,
351 | );
352 | path = WormholeTests;
353 | sourceTree = "";
354 | };
355 | 502048121B0C97D0002EBFC7 /* Supporting Files */ = {
356 | isa = PBXGroup;
357 | children = (
358 | 502048131B0C97D0002EBFC7 /* Info.plist */,
359 | );
360 | name = "Supporting Files";
361 | sourceTree = "";
362 | };
363 | 505498691B1574B30037E3BD /* RemoteKit */ = {
364 | isa = PBXGroup;
365 | children = (
366 | 5054986C1B1574B40037E3BD /* RemoteKit.h */,
367 | 505498871B15750C0037E3BD /* Config.swift */,
368 | 5054986A1B1574B40037E3BD /* Supporting Files */,
369 | );
370 | path = RemoteKit;
371 | sourceTree = "";
372 | };
373 | 5054986A1B1574B40037E3BD /* Supporting Files */ = {
374 | isa = PBXGroup;
375 | children = (
376 | 5054986B1B1574B40037E3BD /* Info.plist */,
377 | );
378 | name = "Supporting Files";
379 | sourceTree = "";
380 | };
381 | 505498781B1574B40037E3BD /* RemoteKitTests */ = {
382 | isa = PBXGroup;
383 | children = (
384 | 5054987B1B1574B40037E3BD /* RemoteKitTests.swift */,
385 | 505498791B1574B40037E3BD /* Supporting Files */,
386 | );
387 | path = RemoteKitTests;
388 | sourceTree = "";
389 | };
390 | 505498791B1574B40037E3BD /* Supporting Files */ = {
391 | isa = PBXGroup;
392 | children = (
393 | 5054987A1B1574B40037E3BD /* Info.plist */,
394 | );
395 | name = "Supporting Files";
396 | sourceTree = "";
397 | };
398 | /* End PBXGroup section */
399 |
400 | /* Begin PBXHeadersBuildPhase section */
401 | 502047FE1B0C97D0002EBFC7 /* Headers */ = {
402 | isa = PBXHeadersBuildPhase;
403 | buildActionMask = 2147483647;
404 | files = (
405 | 502048061B0C97D0002EBFC7 /* Wormhole.h in Headers */,
406 | );
407 | runOnlyForDeploymentPostprocessing = 0;
408 | };
409 | 505498651B1574B30037E3BD /* Headers */ = {
410 | isa = PBXHeadersBuildPhase;
411 | buildActionMask = 2147483647;
412 | files = (
413 | 5054986D1B1574B40037E3BD /* RemoteKit.h in Headers */,
414 | );
415 | runOnlyForDeploymentPostprocessing = 0;
416 | };
417 | /* End PBXHeadersBuildPhase section */
418 |
419 | /* Begin PBXNativeTarget section */
420 | 502047B01B0C971B002EBFC7 /* Remote */ = {
421 | isa = PBXNativeTarget;
422 | buildConfigurationList = 502047D01B0C971C002EBFC7 /* Build configuration list for PBXNativeTarget "Remote" */;
423 | buildPhases = (
424 | 502047AD1B0C971B002EBFC7 /* Sources */,
425 | 502047AE1B0C971B002EBFC7 /* Frameworks */,
426 | 502047AF1B0C971B002EBFC7 /* Resources */,
427 | 502047F91B0C973E002EBFC7 /* Embed App Extensions */,
428 | 5020481D1B0C97D0002EBFC7 /* Embed Frameworks */,
429 | );
430 | buildRules = (
431 | );
432 | dependencies = (
433 | 502047F11B0C973E002EBFC7 /* PBXTargetDependency */,
434 | 502048171B0C97D0002EBFC7 /* PBXTargetDependency */,
435 | 5054987E1B1574B40037E3BD /* PBXTargetDependency */,
436 | );
437 | name = Remote;
438 | productName = Remote;
439 | productReference = 502047B11B0C971B002EBFC7 /* Remote.app */;
440 | productType = "com.apple.product-type.application";
441 | };
442 | 502047C51B0C971C002EBFC7 /* RemoteTests */ = {
443 | isa = PBXNativeTarget;
444 | buildConfigurationList = 502047D31B0C971C002EBFC7 /* Build configuration list for PBXNativeTarget "RemoteTests" */;
445 | buildPhases = (
446 | 502047C21B0C971C002EBFC7 /* Sources */,
447 | 502047C31B0C971C002EBFC7 /* Frameworks */,
448 | 502047C41B0C971C002EBFC7 /* Resources */,
449 | );
450 | buildRules = (
451 | );
452 | dependencies = (
453 | 502047C81B0C971C002EBFC7 /* PBXTargetDependency */,
454 | );
455 | name = RemoteTests;
456 | productName = RemoteTests;
457 | productReference = 502047C61B0C971C002EBFC7 /* RemoteTests.xctest */;
458 | productType = "com.apple.product-type.bundle.unit-test";
459 | };
460 | 502047D91B0C973B002EBFC7 /* Remote WatchKit Extension */ = {
461 | isa = PBXNativeTarget;
462 | buildConfigurationList = 502047F61B0C973E002EBFC7 /* Build configuration list for PBXNativeTarget "Remote WatchKit Extension" */;
463 | buildPhases = (
464 | 502047D61B0C973B002EBFC7 /* Sources */,
465 | 502047D71B0C973B002EBFC7 /* Frameworks */,
466 | 502047D81B0C973B002EBFC7 /* Resources */,
467 | );
468 | buildRules = (
469 | );
470 | dependencies = (
471 | 502047E71B0C973D002EBFC7 /* PBXTargetDependency */,
472 | );
473 | name = "Remote WatchKit Extension";
474 | productName = "Remote WatchKit Extension";
475 | productReference = 502047DA1B0C973B002EBFC7 /* Remote WatchKit Extension.appex */;
476 | productType = "com.apple.product-type.watchkit-extension";
477 | };
478 | 502047E31B0C973D002EBFC7 /* Remote WatchKit App */ = {
479 | isa = PBXNativeTarget;
480 | buildConfigurationList = 502047F31B0C973E002EBFC7 /* Build configuration list for PBXNativeTarget "Remote WatchKit App" */;
481 | buildPhases = (
482 | 502047E21B0C973D002EBFC7 /* Resources */,
483 | );
484 | buildRules = (
485 | );
486 | dependencies = (
487 | );
488 | name = "Remote WatchKit App";
489 | productName = "Remote WatchKit App";
490 | productReference = 502047E41B0C973D002EBFC7 /* Remote WatchKit App.app */;
491 | productType = "com.apple.product-type.application.watchapp";
492 | };
493 | 502048001B0C97D0002EBFC7 /* Wormhole */ = {
494 | isa = PBXNativeTarget;
495 | buildConfigurationList = 5020481A1B0C97D0002EBFC7 /* Build configuration list for PBXNativeTarget "Wormhole" */;
496 | buildPhases = (
497 | 502047FC1B0C97D0002EBFC7 /* Sources */,
498 | 502047FD1B0C97D0002EBFC7 /* Frameworks */,
499 | 502047FE1B0C97D0002EBFC7 /* Headers */,
500 | 502047FF1B0C97D0002EBFC7 /* Resources */,
501 | );
502 | buildRules = (
503 | );
504 | dependencies = (
505 | );
506 | name = Wormhole;
507 | productName = Wormhole;
508 | productReference = 502048011B0C97D0002EBFC7 /* Wormhole.framework */;
509 | productType = "com.apple.product-type.framework";
510 | };
511 | 5020480A1B0C97D0002EBFC7 /* WormholeTests */ = {
512 | isa = PBXNativeTarget;
513 | buildConfigurationList = 5020481E1B0C97D0002EBFC7 /* Build configuration list for PBXNativeTarget "WormholeTests" */;
514 | buildPhases = (
515 | 502048071B0C97D0002EBFC7 /* Sources */,
516 | 502048081B0C97D0002EBFC7 /* Frameworks */,
517 | 502048091B0C97D0002EBFC7 /* Resources */,
518 | );
519 | buildRules = (
520 | );
521 | dependencies = (
522 | 5020480E1B0C97D0002EBFC7 /* PBXTargetDependency */,
523 | 502048101B0C97D0002EBFC7 /* PBXTargetDependency */,
524 | );
525 | name = WormholeTests;
526 | productName = WormholeTests;
527 | productReference = 5020480B1B0C97D0002EBFC7 /* WormholeTests.xctest */;
528 | productType = "com.apple.product-type.bundle.unit-test";
529 | };
530 | 505498671B1574B30037E3BD /* RemoteKit */ = {
531 | isa = PBXNativeTarget;
532 | buildConfigurationList = 505498851B1574B40037E3BD /* Build configuration list for PBXNativeTarget "RemoteKit" */;
533 | buildPhases = (
534 | 505498631B1574B30037E3BD /* Sources */,
535 | 505498641B1574B30037E3BD /* Frameworks */,
536 | 505498651B1574B30037E3BD /* Headers */,
537 | 505498661B1574B30037E3BD /* Resources */,
538 | );
539 | buildRules = (
540 | );
541 | dependencies = (
542 | );
543 | name = RemoteKit;
544 | productName = RemoteKit;
545 | productReference = 505498681B1574B30037E3BD /* RemoteKit.framework */;
546 | productType = "com.apple.product-type.framework";
547 | };
548 | 505498711B1574B40037E3BD /* RemoteKitTests */ = {
549 | isa = PBXNativeTarget;
550 | buildConfigurationList = 505498861B1574B40037E3BD /* Build configuration list for PBXNativeTarget "RemoteKitTests" */;
551 | buildPhases = (
552 | 5054986E1B1574B40037E3BD /* Sources */,
553 | 5054986F1B1574B40037E3BD /* Frameworks */,
554 | 505498701B1574B40037E3BD /* Resources */,
555 | );
556 | buildRules = (
557 | );
558 | dependencies = (
559 | 505498751B1574B40037E3BD /* PBXTargetDependency */,
560 | 505498771B1574B40037E3BD /* PBXTargetDependency */,
561 | );
562 | name = RemoteKitTests;
563 | productName = RemoteKitTests;
564 | productReference = 505498721B1574B40037E3BD /* RemoteKitTests.xctest */;
565 | productType = "com.apple.product-type.bundle.unit-test";
566 | };
567 | /* End PBXNativeTarget section */
568 |
569 | /* Begin PBXProject section */
570 | 502047A91B0C971B002EBFC7 /* Project object */ = {
571 | isa = PBXProject;
572 | attributes = {
573 | LastUpgradeCheck = 0630;
574 | ORGANIZATIONNAME = nixWork;
575 | TargetAttributes = {
576 | 502047B01B0C971B002EBFC7 = {
577 | CreatedOnToolsVersion = 6.3.2;
578 | DevelopmentTeam = 8D957V42M6;
579 | SystemCapabilities = {
580 | com.apple.ApplicationGroups.iOS = {
581 | enabled = 1;
582 | };
583 | };
584 | };
585 | 502047C51B0C971C002EBFC7 = {
586 | CreatedOnToolsVersion = 6.3.2;
587 | TestTargetID = 502047B01B0C971B002EBFC7;
588 | };
589 | 502047D91B0C973B002EBFC7 = {
590 | CreatedOnToolsVersion = 6.3.2;
591 | DevelopmentTeam = 8D957V42M6;
592 | SystemCapabilities = {
593 | com.apple.ApplicationGroups.iOS = {
594 | enabled = 1;
595 | };
596 | };
597 | };
598 | 502047E31B0C973D002EBFC7 = {
599 | CreatedOnToolsVersion = 6.3.2;
600 | };
601 | 502048001B0C97D0002EBFC7 = {
602 | CreatedOnToolsVersion = 6.3.2;
603 | DevelopmentTeam = 8D957V42M6;
604 | };
605 | 5020480A1B0C97D0002EBFC7 = {
606 | CreatedOnToolsVersion = 6.3.2;
607 | TestTargetID = 502047B01B0C971B002EBFC7;
608 | };
609 | 505498671B1574B30037E3BD = {
610 | CreatedOnToolsVersion = 6.3.2;
611 | DevelopmentTeam = 8D957V42M6;
612 | };
613 | 505498711B1574B40037E3BD = {
614 | CreatedOnToolsVersion = 6.3.2;
615 | TestTargetID = 502047B01B0C971B002EBFC7;
616 | };
617 | };
618 | };
619 | buildConfigurationList = 502047AC1B0C971B002EBFC7 /* Build configuration list for PBXProject "Remote" */;
620 | compatibilityVersion = "Xcode 3.2";
621 | developmentRegion = English;
622 | hasScannedForEncodings = 0;
623 | knownRegions = (
624 | en,
625 | Base,
626 | );
627 | mainGroup = 502047A81B0C971B002EBFC7;
628 | productRefGroup = 502047B21B0C971B002EBFC7 /* Products */;
629 | projectDirPath = "";
630 | projectRoot = "";
631 | targets = (
632 | 502047B01B0C971B002EBFC7 /* Remote */,
633 | 502047C51B0C971C002EBFC7 /* RemoteTests */,
634 | 502047D91B0C973B002EBFC7 /* Remote WatchKit Extension */,
635 | 502047E31B0C973D002EBFC7 /* Remote WatchKit App */,
636 | 502048001B0C97D0002EBFC7 /* Wormhole */,
637 | 5020480A1B0C97D0002EBFC7 /* WormholeTests */,
638 | 505498671B1574B30037E3BD /* RemoteKit */,
639 | 505498711B1574B40037E3BD /* RemoteKitTests */,
640 | );
641 | };
642 | /* End PBXProject section */
643 |
644 | /* Begin PBXResourcesBuildPhase section */
645 | 502047AF1B0C971B002EBFC7 /* Resources */ = {
646 | isa = PBXResourcesBuildPhase;
647 | buildActionMask = 2147483647;
648 | files = (
649 | 502047BC1B0C971C002EBFC7 /* Main.storyboard in Resources */,
650 | 502047C11B0C971C002EBFC7 /* LaunchScreen.xib in Resources */,
651 | 502047BE1B0C971C002EBFC7 /* Images.xcassets in Resources */,
652 | );
653 | runOnlyForDeploymentPostprocessing = 0;
654 | };
655 | 502047C41B0C971C002EBFC7 /* Resources */ = {
656 | isa = PBXResourcesBuildPhase;
657 | buildActionMask = 2147483647;
658 | files = (
659 | );
660 | runOnlyForDeploymentPostprocessing = 0;
661 | };
662 | 502047D81B0C973B002EBFC7 /* Resources */ = {
663 | isa = PBXResourcesBuildPhase;
664 | buildActionMask = 2147483647;
665 | files = (
666 | 502047E51B0C973D002EBFC7 /* Remote WatchKit App.app in Resources */,
667 | 502047E11B0C973C002EBFC7 /* Images.xcassets in Resources */,
668 | );
669 | runOnlyForDeploymentPostprocessing = 0;
670 | };
671 | 502047E21B0C973D002EBFC7 /* Resources */ = {
672 | isa = PBXResourcesBuildPhase;
673 | buildActionMask = 2147483647;
674 | files = (
675 | 502047ED1B0C973D002EBFC7 /* Interface.storyboard in Resources */,
676 | 502047EF1B0C973E002EBFC7 /* Images.xcassets in Resources */,
677 | );
678 | runOnlyForDeploymentPostprocessing = 0;
679 | };
680 | 502047FF1B0C97D0002EBFC7 /* Resources */ = {
681 | isa = PBXResourcesBuildPhase;
682 | buildActionMask = 2147483647;
683 | files = (
684 | );
685 | runOnlyForDeploymentPostprocessing = 0;
686 | };
687 | 502048091B0C97D0002EBFC7 /* Resources */ = {
688 | isa = PBXResourcesBuildPhase;
689 | buildActionMask = 2147483647;
690 | files = (
691 | );
692 | runOnlyForDeploymentPostprocessing = 0;
693 | };
694 | 505498661B1574B30037E3BD /* Resources */ = {
695 | isa = PBXResourcesBuildPhase;
696 | buildActionMask = 2147483647;
697 | files = (
698 | );
699 | runOnlyForDeploymentPostprocessing = 0;
700 | };
701 | 505498701B1574B40037E3BD /* Resources */ = {
702 | isa = PBXResourcesBuildPhase;
703 | buildActionMask = 2147483647;
704 | files = (
705 | );
706 | runOnlyForDeploymentPostprocessing = 0;
707 | };
708 | /* End PBXResourcesBuildPhase section */
709 |
710 | /* Begin PBXSourcesBuildPhase section */
711 | 502047AD1B0C971B002EBFC7 /* Sources */ = {
712 | isa = PBXSourcesBuildPhase;
713 | buildActionMask = 2147483647;
714 | files = (
715 | 502047B91B0C971C002EBFC7 /* ViewController.swift in Sources */,
716 | 502047B71B0C971C002EBFC7 /* AppDelegate.swift in Sources */,
717 | );
718 | runOnlyForDeploymentPostprocessing = 0;
719 | };
720 | 502047C21B0C971C002EBFC7 /* Sources */ = {
721 | isa = PBXSourcesBuildPhase;
722 | buildActionMask = 2147483647;
723 | files = (
724 | 502047CD1B0C971C002EBFC7 /* RemoteTests.swift in Sources */,
725 | );
726 | runOnlyForDeploymentPostprocessing = 0;
727 | };
728 | 502047D61B0C973B002EBFC7 /* Sources */ = {
729 | isa = PBXSourcesBuildPhase;
730 | buildActionMask = 2147483647;
731 | files = (
732 | 502047DF1B0C973C002EBFC7 /* InterfaceController.swift in Sources */,
733 | );
734 | runOnlyForDeploymentPostprocessing = 0;
735 | };
736 | 502047FC1B0C97D0002EBFC7 /* Sources */ = {
737 | isa = PBXSourcesBuildPhase;
738 | buildActionMask = 2147483647;
739 | files = (
740 | 502048221B0C97F1002EBFC7 /* Wormhole.swift in Sources */,
741 | );
742 | runOnlyForDeploymentPostprocessing = 0;
743 | };
744 | 502048071B0C97D0002EBFC7 /* Sources */ = {
745 | isa = PBXSourcesBuildPhase;
746 | buildActionMask = 2147483647;
747 | files = (
748 | 502048151B0C97D0002EBFC7 /* WormholeTests.swift in Sources */,
749 | );
750 | runOnlyForDeploymentPostprocessing = 0;
751 | };
752 | 505498631B1574B30037E3BD /* Sources */ = {
753 | isa = PBXSourcesBuildPhase;
754 | buildActionMask = 2147483647;
755 | files = (
756 | 505498881B15750C0037E3BD /* Config.swift in Sources */,
757 | );
758 | runOnlyForDeploymentPostprocessing = 0;
759 | };
760 | 5054986E1B1574B40037E3BD /* Sources */ = {
761 | isa = PBXSourcesBuildPhase;
762 | buildActionMask = 2147483647;
763 | files = (
764 | 5054987C1B1574B40037E3BD /* RemoteKitTests.swift in Sources */,
765 | );
766 | runOnlyForDeploymentPostprocessing = 0;
767 | };
768 | /* End PBXSourcesBuildPhase section */
769 |
770 | /* Begin PBXTargetDependency section */
771 | 502047C81B0C971C002EBFC7 /* PBXTargetDependency */ = {
772 | isa = PBXTargetDependency;
773 | target = 502047B01B0C971B002EBFC7 /* Remote */;
774 | targetProxy = 502047C71B0C971C002EBFC7 /* PBXContainerItemProxy */;
775 | };
776 | 502047E71B0C973D002EBFC7 /* PBXTargetDependency */ = {
777 | isa = PBXTargetDependency;
778 | target = 502047E31B0C973D002EBFC7 /* Remote WatchKit App */;
779 | targetProxy = 502047E61B0C973D002EBFC7 /* PBXContainerItemProxy */;
780 | };
781 | 502047F11B0C973E002EBFC7 /* PBXTargetDependency */ = {
782 | isa = PBXTargetDependency;
783 | target = 502047D91B0C973B002EBFC7 /* Remote WatchKit Extension */;
784 | targetProxy = 502047F01B0C973E002EBFC7 /* PBXContainerItemProxy */;
785 | };
786 | 5020480E1B0C97D0002EBFC7 /* PBXTargetDependency */ = {
787 | isa = PBXTargetDependency;
788 | target = 502048001B0C97D0002EBFC7 /* Wormhole */;
789 | targetProxy = 5020480D1B0C97D0002EBFC7 /* PBXContainerItemProxy */;
790 | };
791 | 502048101B0C97D0002EBFC7 /* PBXTargetDependency */ = {
792 | isa = PBXTargetDependency;
793 | target = 502047B01B0C971B002EBFC7 /* Remote */;
794 | targetProxy = 5020480F1B0C97D0002EBFC7 /* PBXContainerItemProxy */;
795 | };
796 | 502048171B0C97D0002EBFC7 /* PBXTargetDependency */ = {
797 | isa = PBXTargetDependency;
798 | target = 502048001B0C97D0002EBFC7 /* Wormhole */;
799 | targetProxy = 502048161B0C97D0002EBFC7 /* PBXContainerItemProxy */;
800 | };
801 | 505498751B1574B40037E3BD /* PBXTargetDependency */ = {
802 | isa = PBXTargetDependency;
803 | target = 505498671B1574B30037E3BD /* RemoteKit */;
804 | targetProxy = 505498741B1574B40037E3BD /* PBXContainerItemProxy */;
805 | };
806 | 505498771B1574B40037E3BD /* PBXTargetDependency */ = {
807 | isa = PBXTargetDependency;
808 | target = 502047B01B0C971B002EBFC7 /* Remote */;
809 | targetProxy = 505498761B1574B40037E3BD /* PBXContainerItemProxy */;
810 | };
811 | 5054987E1B1574B40037E3BD /* PBXTargetDependency */ = {
812 | isa = PBXTargetDependency;
813 | target = 505498671B1574B30037E3BD /* RemoteKit */;
814 | targetProxy = 5054987D1B1574B40037E3BD /* PBXContainerItemProxy */;
815 | };
816 | /* End PBXTargetDependency section */
817 |
818 | /* Begin PBXVariantGroup section */
819 | 502047BA1B0C971C002EBFC7 /* Main.storyboard */ = {
820 | isa = PBXVariantGroup;
821 | children = (
822 | 502047BB1B0C971C002EBFC7 /* Base */,
823 | );
824 | name = Main.storyboard;
825 | sourceTree = "";
826 | };
827 | 502047BF1B0C971C002EBFC7 /* LaunchScreen.xib */ = {
828 | isa = PBXVariantGroup;
829 | children = (
830 | 502047C01B0C971C002EBFC7 /* Base */,
831 | );
832 | name = LaunchScreen.xib;
833 | sourceTree = "";
834 | };
835 | 502047EB1B0C973D002EBFC7 /* Interface.storyboard */ = {
836 | isa = PBXVariantGroup;
837 | children = (
838 | 502047EC1B0C973D002EBFC7 /* Base */,
839 | );
840 | name = Interface.storyboard;
841 | sourceTree = "";
842 | };
843 | /* End PBXVariantGroup section */
844 |
845 | /* Begin XCBuildConfiguration section */
846 | 502047CE1B0C971C002EBFC7 /* Debug */ = {
847 | isa = XCBuildConfiguration;
848 | buildSettings = {
849 | ALWAYS_SEARCH_USER_PATHS = NO;
850 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
851 | CLANG_CXX_LIBRARY = "libc++";
852 | CLANG_ENABLE_MODULES = YES;
853 | CLANG_ENABLE_OBJC_ARC = YES;
854 | CLANG_WARN_BOOL_CONVERSION = YES;
855 | CLANG_WARN_CONSTANT_CONVERSION = YES;
856 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
857 | CLANG_WARN_EMPTY_BODY = YES;
858 | CLANG_WARN_ENUM_CONVERSION = YES;
859 | CLANG_WARN_INT_CONVERSION = YES;
860 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
861 | CLANG_WARN_UNREACHABLE_CODE = YES;
862 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
863 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
864 | COPY_PHASE_STRIP = NO;
865 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
866 | ENABLE_STRICT_OBJC_MSGSEND = YES;
867 | GCC_C_LANGUAGE_STANDARD = gnu99;
868 | GCC_DYNAMIC_NO_PIC = NO;
869 | GCC_NO_COMMON_BLOCKS = YES;
870 | GCC_OPTIMIZATION_LEVEL = 0;
871 | GCC_PREPROCESSOR_DEFINITIONS = (
872 | "DEBUG=1",
873 | "$(inherited)",
874 | );
875 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
876 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
877 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
878 | GCC_WARN_UNDECLARED_SELECTOR = YES;
879 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
880 | GCC_WARN_UNUSED_FUNCTION = YES;
881 | GCC_WARN_UNUSED_VARIABLE = YES;
882 | IPHONEOS_DEPLOYMENT_TARGET = 8.3;
883 | MTL_ENABLE_DEBUG_INFO = YES;
884 | ONLY_ACTIVE_ARCH = YES;
885 | SDKROOT = iphoneos;
886 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
887 | };
888 | name = Debug;
889 | };
890 | 502047CF1B0C971C002EBFC7 /* Release */ = {
891 | isa = XCBuildConfiguration;
892 | buildSettings = {
893 | ALWAYS_SEARCH_USER_PATHS = NO;
894 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
895 | CLANG_CXX_LIBRARY = "libc++";
896 | CLANG_ENABLE_MODULES = YES;
897 | CLANG_ENABLE_OBJC_ARC = YES;
898 | CLANG_WARN_BOOL_CONVERSION = YES;
899 | CLANG_WARN_CONSTANT_CONVERSION = YES;
900 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
901 | CLANG_WARN_EMPTY_BODY = YES;
902 | CLANG_WARN_ENUM_CONVERSION = YES;
903 | CLANG_WARN_INT_CONVERSION = YES;
904 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
905 | CLANG_WARN_UNREACHABLE_CODE = YES;
906 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
907 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
908 | COPY_PHASE_STRIP = NO;
909 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
910 | ENABLE_NS_ASSERTIONS = NO;
911 | ENABLE_STRICT_OBJC_MSGSEND = YES;
912 | GCC_C_LANGUAGE_STANDARD = gnu99;
913 | GCC_NO_COMMON_BLOCKS = YES;
914 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
915 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
916 | GCC_WARN_UNDECLARED_SELECTOR = YES;
917 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
918 | GCC_WARN_UNUSED_FUNCTION = YES;
919 | GCC_WARN_UNUSED_VARIABLE = YES;
920 | IPHONEOS_DEPLOYMENT_TARGET = 8.3;
921 | MTL_ENABLE_DEBUG_INFO = NO;
922 | SDKROOT = iphoneos;
923 | VALIDATE_PRODUCT = YES;
924 | };
925 | name = Release;
926 | };
927 | 502047D11B0C971C002EBFC7 /* Debug */ = {
928 | isa = XCBuildConfiguration;
929 | buildSettings = {
930 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
931 | CODE_SIGN_ENTITLEMENTS = Remote/Remote.entitlements;
932 | CODE_SIGN_IDENTITY = "iPhone Developer";
933 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
934 | INFOPLIST_FILE = Remote/Info.plist;
935 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
936 | PRODUCT_NAME = "$(TARGET_NAME)";
937 | PROVISIONING_PROFILE = "";
938 | };
939 | name = Debug;
940 | };
941 | 502047D21B0C971C002EBFC7 /* Release */ = {
942 | isa = XCBuildConfiguration;
943 | buildSettings = {
944 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
945 | CODE_SIGN_ENTITLEMENTS = Remote/Remote.entitlements;
946 | CODE_SIGN_IDENTITY = "iPhone Developer";
947 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
948 | INFOPLIST_FILE = Remote/Info.plist;
949 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
950 | PRODUCT_NAME = "$(TARGET_NAME)";
951 | PROVISIONING_PROFILE = "";
952 | };
953 | name = Release;
954 | };
955 | 502047D41B0C971C002EBFC7 /* Debug */ = {
956 | isa = XCBuildConfiguration;
957 | buildSettings = {
958 | BUNDLE_LOADER = "$(TEST_HOST)";
959 | FRAMEWORK_SEARCH_PATHS = (
960 | "$(SDKROOT)/Developer/Library/Frameworks",
961 | "$(inherited)",
962 | );
963 | GCC_PREPROCESSOR_DEFINITIONS = (
964 | "DEBUG=1",
965 | "$(inherited)",
966 | );
967 | INFOPLIST_FILE = RemoteTests/Info.plist;
968 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
969 | PRODUCT_NAME = "$(TARGET_NAME)";
970 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Remote.app/Remote";
971 | };
972 | name = Debug;
973 | };
974 | 502047D51B0C971C002EBFC7 /* Release */ = {
975 | isa = XCBuildConfiguration;
976 | buildSettings = {
977 | BUNDLE_LOADER = "$(TEST_HOST)";
978 | FRAMEWORK_SEARCH_PATHS = (
979 | "$(SDKROOT)/Developer/Library/Frameworks",
980 | "$(inherited)",
981 | );
982 | INFOPLIST_FILE = RemoteTests/Info.plist;
983 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
984 | PRODUCT_NAME = "$(TARGET_NAME)";
985 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Remote.app/Remote";
986 | };
987 | name = Release;
988 | };
989 | 502047F41B0C973E002EBFC7 /* Debug */ = {
990 | isa = XCBuildConfiguration;
991 | buildSettings = {
992 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
993 | GCC_PREPROCESSOR_DEFINITIONS = (
994 | "DEBUG=1",
995 | "$(inherited)",
996 | );
997 | IBSC_MODULE = Remote_WatchKit_Extension;
998 | INFOPLIST_FILE = "Remote WatchKit App/Info.plist";
999 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
1000 | PRODUCT_NAME = "$(TARGET_NAME)";
1001 | SKIP_INSTALL = YES;
1002 | TARGETED_DEVICE_FAMILY = 4;
1003 | "TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*]" = "1,4";
1004 | };
1005 | name = Debug;
1006 | };
1007 | 502047F51B0C973E002EBFC7 /* Release */ = {
1008 | isa = XCBuildConfiguration;
1009 | buildSettings = {
1010 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1011 | IBSC_MODULE = Remote_WatchKit_Extension;
1012 | INFOPLIST_FILE = "Remote WatchKit App/Info.plist";
1013 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
1014 | PRODUCT_NAME = "$(TARGET_NAME)";
1015 | SKIP_INSTALL = YES;
1016 | TARGETED_DEVICE_FAMILY = 4;
1017 | "TARGETED_DEVICE_FAMILY[sdk=iphonesimulator*]" = "1,4";
1018 | };
1019 | name = Release;
1020 | };
1021 | 502047F71B0C973E002EBFC7 /* Debug */ = {
1022 | isa = XCBuildConfiguration;
1023 | buildSettings = {
1024 | CODE_SIGN_ENTITLEMENTS = "Remote WatchKit Extension/Remote WatchKit Extension.entitlements";
1025 | CODE_SIGN_IDENTITY = "iPhone Developer";
1026 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1027 | GCC_PREPROCESSOR_DEFINITIONS = (
1028 | "DEBUG=1",
1029 | "$(inherited)",
1030 | );
1031 | INFOPLIST_FILE = "Remote WatchKit Extension/Info.plist";
1032 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
1033 | PRODUCT_NAME = "${TARGET_NAME}";
1034 | PROVISIONING_PROFILE = "";
1035 | SKIP_INSTALL = YES;
1036 | };
1037 | name = Debug;
1038 | };
1039 | 502047F81B0C973E002EBFC7 /* Release */ = {
1040 | isa = XCBuildConfiguration;
1041 | buildSettings = {
1042 | CODE_SIGN_ENTITLEMENTS = "Remote WatchKit Extension/Remote WatchKit Extension.entitlements";
1043 | CODE_SIGN_IDENTITY = "iPhone Developer";
1044 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1045 | INFOPLIST_FILE = "Remote WatchKit Extension/Info.plist";
1046 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
1047 | PRODUCT_NAME = "${TARGET_NAME}";
1048 | PROVISIONING_PROFILE = "";
1049 | SKIP_INSTALL = YES;
1050 | };
1051 | name = Release;
1052 | };
1053 | 5020481B1B0C97D0002EBFC7 /* Debug */ = {
1054 | isa = XCBuildConfiguration;
1055 | buildSettings = {
1056 | CLANG_ENABLE_MODULES = YES;
1057 | CODE_SIGN_IDENTITY = "iPhone Developer";
1058 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1059 | CURRENT_PROJECT_VERSION = 1;
1060 | DEFINES_MODULE = YES;
1061 | DYLIB_COMPATIBILITY_VERSION = 1;
1062 | DYLIB_CURRENT_VERSION = 1;
1063 | DYLIB_INSTALL_NAME_BASE = "@rpath";
1064 | GCC_PREPROCESSOR_DEFINITIONS = (
1065 | "DEBUG=1",
1066 | "$(inherited)",
1067 | );
1068 | INFOPLIST_FILE = Wormhole/Info.plist;
1069 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1070 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1071 | PRODUCT_NAME = "$(TARGET_NAME)";
1072 | SKIP_INSTALL = YES;
1073 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1074 | TARGETED_DEVICE_FAMILY = "1,2";
1075 | VERSIONING_SYSTEM = "apple-generic";
1076 | VERSION_INFO_PREFIX = "";
1077 | };
1078 | name = Debug;
1079 | };
1080 | 5020481C1B0C97D0002EBFC7 /* Release */ = {
1081 | isa = XCBuildConfiguration;
1082 | buildSettings = {
1083 | CLANG_ENABLE_MODULES = YES;
1084 | CODE_SIGN_IDENTITY = "iPhone Developer";
1085 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1086 | CURRENT_PROJECT_VERSION = 1;
1087 | DEFINES_MODULE = YES;
1088 | DYLIB_COMPATIBILITY_VERSION = 1;
1089 | DYLIB_CURRENT_VERSION = 1;
1090 | DYLIB_INSTALL_NAME_BASE = "@rpath";
1091 | INFOPLIST_FILE = Wormhole/Info.plist;
1092 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1093 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1094 | PRODUCT_NAME = "$(TARGET_NAME)";
1095 | SKIP_INSTALL = YES;
1096 | TARGETED_DEVICE_FAMILY = "1,2";
1097 | VERSIONING_SYSTEM = "apple-generic";
1098 | VERSION_INFO_PREFIX = "";
1099 | };
1100 | name = Release;
1101 | };
1102 | 5020481F1B0C97D0002EBFC7 /* Debug */ = {
1103 | isa = XCBuildConfiguration;
1104 | buildSettings = {
1105 | FRAMEWORK_SEARCH_PATHS = (
1106 | "$(SDKROOT)/Developer/Library/Frameworks",
1107 | "$(inherited)",
1108 | );
1109 | GCC_PREPROCESSOR_DEFINITIONS = (
1110 | "DEBUG=1",
1111 | "$(inherited)",
1112 | );
1113 | INFOPLIST_FILE = WormholeTests/Info.plist;
1114 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1115 | PRODUCT_NAME = "$(TARGET_NAME)";
1116 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Remote.app/Remote";
1117 | };
1118 | name = Debug;
1119 | };
1120 | 502048201B0C97D0002EBFC7 /* Release */ = {
1121 | isa = XCBuildConfiguration;
1122 | buildSettings = {
1123 | FRAMEWORK_SEARCH_PATHS = (
1124 | "$(SDKROOT)/Developer/Library/Frameworks",
1125 | "$(inherited)",
1126 | );
1127 | INFOPLIST_FILE = WormholeTests/Info.plist;
1128 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1129 | PRODUCT_NAME = "$(TARGET_NAME)";
1130 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Remote.app/Remote";
1131 | };
1132 | name = Release;
1133 | };
1134 | 505498811B1574B40037E3BD /* Debug */ = {
1135 | isa = XCBuildConfiguration;
1136 | buildSettings = {
1137 | CLANG_ENABLE_MODULES = YES;
1138 | CODE_SIGN_IDENTITY = "iPhone Developer";
1139 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1140 | CURRENT_PROJECT_VERSION = 1;
1141 | DEFINES_MODULE = YES;
1142 | DYLIB_COMPATIBILITY_VERSION = 1;
1143 | DYLIB_CURRENT_VERSION = 1;
1144 | DYLIB_INSTALL_NAME_BASE = "@rpath";
1145 | GCC_PREPROCESSOR_DEFINITIONS = (
1146 | "DEBUG=1",
1147 | "$(inherited)",
1148 | );
1149 | INFOPLIST_FILE = RemoteKit/Info.plist;
1150 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1151 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1152 | PRODUCT_NAME = "$(TARGET_NAME)";
1153 | SKIP_INSTALL = YES;
1154 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1155 | TARGETED_DEVICE_FAMILY = "1,2";
1156 | VERSIONING_SYSTEM = "apple-generic";
1157 | VERSION_INFO_PREFIX = "";
1158 | };
1159 | name = Debug;
1160 | };
1161 | 505498821B1574B40037E3BD /* Release */ = {
1162 | isa = XCBuildConfiguration;
1163 | buildSettings = {
1164 | CLANG_ENABLE_MODULES = YES;
1165 | CODE_SIGN_IDENTITY = "iPhone Developer";
1166 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1167 | CURRENT_PROJECT_VERSION = 1;
1168 | DEFINES_MODULE = YES;
1169 | DYLIB_COMPATIBILITY_VERSION = 1;
1170 | DYLIB_CURRENT_VERSION = 1;
1171 | DYLIB_INSTALL_NAME_BASE = "@rpath";
1172 | INFOPLIST_FILE = RemoteKit/Info.plist;
1173 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1174 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1175 | PRODUCT_NAME = "$(TARGET_NAME)";
1176 | SKIP_INSTALL = YES;
1177 | TARGETED_DEVICE_FAMILY = "1,2";
1178 | VERSIONING_SYSTEM = "apple-generic";
1179 | VERSION_INFO_PREFIX = "";
1180 | };
1181 | name = Release;
1182 | };
1183 | 505498831B1574B40037E3BD /* Debug */ = {
1184 | isa = XCBuildConfiguration;
1185 | buildSettings = {
1186 | FRAMEWORK_SEARCH_PATHS = (
1187 | "$(SDKROOT)/Developer/Library/Frameworks",
1188 | "$(inherited)",
1189 | );
1190 | GCC_PREPROCESSOR_DEFINITIONS = (
1191 | "DEBUG=1",
1192 | "$(inherited)",
1193 | );
1194 | INFOPLIST_FILE = RemoteKitTests/Info.plist;
1195 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1196 | PRODUCT_NAME = "$(TARGET_NAME)";
1197 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Remote.app/Remote";
1198 | };
1199 | name = Debug;
1200 | };
1201 | 505498841B1574B40037E3BD /* Release */ = {
1202 | isa = XCBuildConfiguration;
1203 | buildSettings = {
1204 | FRAMEWORK_SEARCH_PATHS = (
1205 | "$(SDKROOT)/Developer/Library/Frameworks",
1206 | "$(inherited)",
1207 | );
1208 | INFOPLIST_FILE = RemoteKitTests/Info.plist;
1209 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1210 | PRODUCT_NAME = "$(TARGET_NAME)";
1211 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Remote.app/Remote";
1212 | };
1213 | name = Release;
1214 | };
1215 | /* End XCBuildConfiguration section */
1216 |
1217 | /* Begin XCConfigurationList section */
1218 | 502047AC1B0C971B002EBFC7 /* Build configuration list for PBXProject "Remote" */ = {
1219 | isa = XCConfigurationList;
1220 | buildConfigurations = (
1221 | 502047CE1B0C971C002EBFC7 /* Debug */,
1222 | 502047CF1B0C971C002EBFC7 /* Release */,
1223 | );
1224 | defaultConfigurationIsVisible = 0;
1225 | defaultConfigurationName = Release;
1226 | };
1227 | 502047D01B0C971C002EBFC7 /* Build configuration list for PBXNativeTarget "Remote" */ = {
1228 | isa = XCConfigurationList;
1229 | buildConfigurations = (
1230 | 502047D11B0C971C002EBFC7 /* Debug */,
1231 | 502047D21B0C971C002EBFC7 /* Release */,
1232 | );
1233 | defaultConfigurationIsVisible = 0;
1234 | defaultConfigurationName = Release;
1235 | };
1236 | 502047D31B0C971C002EBFC7 /* Build configuration list for PBXNativeTarget "RemoteTests" */ = {
1237 | isa = XCConfigurationList;
1238 | buildConfigurations = (
1239 | 502047D41B0C971C002EBFC7 /* Debug */,
1240 | 502047D51B0C971C002EBFC7 /* Release */,
1241 | );
1242 | defaultConfigurationIsVisible = 0;
1243 | defaultConfigurationName = Release;
1244 | };
1245 | 502047F31B0C973E002EBFC7 /* Build configuration list for PBXNativeTarget "Remote WatchKit App" */ = {
1246 | isa = XCConfigurationList;
1247 | buildConfigurations = (
1248 | 502047F41B0C973E002EBFC7 /* Debug */,
1249 | 502047F51B0C973E002EBFC7 /* Release */,
1250 | );
1251 | defaultConfigurationIsVisible = 0;
1252 | defaultConfigurationName = Release;
1253 | };
1254 | 502047F61B0C973E002EBFC7 /* Build configuration list for PBXNativeTarget "Remote WatchKit Extension" */ = {
1255 | isa = XCConfigurationList;
1256 | buildConfigurations = (
1257 | 502047F71B0C973E002EBFC7 /* Debug */,
1258 | 502047F81B0C973E002EBFC7 /* Release */,
1259 | );
1260 | defaultConfigurationIsVisible = 0;
1261 | defaultConfigurationName = Release;
1262 | };
1263 | 5020481A1B0C97D0002EBFC7 /* Build configuration list for PBXNativeTarget "Wormhole" */ = {
1264 | isa = XCConfigurationList;
1265 | buildConfigurations = (
1266 | 5020481B1B0C97D0002EBFC7 /* Debug */,
1267 | 5020481C1B0C97D0002EBFC7 /* Release */,
1268 | );
1269 | defaultConfigurationIsVisible = 0;
1270 | defaultConfigurationName = Release;
1271 | };
1272 | 5020481E1B0C97D0002EBFC7 /* Build configuration list for PBXNativeTarget "WormholeTests" */ = {
1273 | isa = XCConfigurationList;
1274 | buildConfigurations = (
1275 | 5020481F1B0C97D0002EBFC7 /* Debug */,
1276 | 502048201B0C97D0002EBFC7 /* Release */,
1277 | );
1278 | defaultConfigurationIsVisible = 0;
1279 | defaultConfigurationName = Release;
1280 | };
1281 | 505498851B1574B40037E3BD /* Build configuration list for PBXNativeTarget "RemoteKit" */ = {
1282 | isa = XCConfigurationList;
1283 | buildConfigurations = (
1284 | 505498811B1574B40037E3BD /* Debug */,
1285 | 505498821B1574B40037E3BD /* Release */,
1286 | );
1287 | defaultConfigurationIsVisible = 0;
1288 | };
1289 | 505498861B1574B40037E3BD /* Build configuration list for PBXNativeTarget "RemoteKitTests" */ = {
1290 | isa = XCConfigurationList;
1291 | buildConfigurations = (
1292 | 505498831B1574B40037E3BD /* Debug */,
1293 | 505498841B1574B40037E3BD /* Release */,
1294 | );
1295 | defaultConfigurationIsVisible = 0;
1296 | };
1297 | /* End XCConfigurationList section */
1298 | };
1299 | rootObject = 502047A91B0C971B002EBFC7 /* Project object */;
1300 | }
1301 |
--------------------------------------------------------------------------------
/Remote.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Remote/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // Remote
4 | //
5 | // Created by NIX on 15/5/20.
6 | // Copyright (c) 2015年 nixWork. 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: [NSObject: AnyObject]?) -> 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 throttle down OpenGL ES frame rates. 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 inactive 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 |
--------------------------------------------------------------------------------
/Remote/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Remote/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
26 |
32 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/Remote/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/Remote/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.nixWork.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Remote/Remote.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.application-groups
6 |
7 | group.com.nixWork.Wormhole
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Remote/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Remote
4 | //
5 | // Created by NIX on 15/5/20.
6 | // Copyright (c) 2015年 nixWork. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import Wormhole
11 | import RemoteKit
12 |
13 | class ViewController: UIViewController {
14 |
15 | @IBOutlet weak var lightStateLabel: UILabel!
16 | @IBOutlet weak var lightStateLockButton: UIButton!
17 |
18 | @IBOutlet weak var lightLevelLabel: UILabel!
19 |
20 | let wormhole = Wormhole(appGroupIdentifier: Config.Wormhole.appGroupIdentifier, messageDirectoryName: Config.Wormhole.messageDirectoryName)
21 |
22 | var lightStateLocked = false {
23 | didSet {
24 |
25 | if lightStateLocked {
26 | lightStateLockButton.setTitle("Unlock", forState: .Normal)
27 |
28 | wormhole.removeListenerByName(Config.Wormhole.Listener.lightStateLabel, forMessageWithIdentifier: Config.Wormhole.Message.lightState)
29 |
30 | } else {
31 | lightStateLockButton.setTitle("Lock", forState: .Normal)
32 |
33 | wormhole.bindListener(lightStateListener, forMessageWithIdentifier: Config.Wormhole.Message.lightState)
34 | }
35 |
36 | }
37 | }
38 |
39 | lazy var lightStateListener: Wormhole.Listener = {
40 | let action: Wormhole.Listener.Action = { [unowned self] message in
41 | if let lightState = message as? NSNumber {
42 | self.lightStateLabel.text = lightState.boolValue ? "Light On" : "Light Off"
43 | }
44 | }
45 |
46 | let listener = Wormhole.Listener(name: Config.Wormhole.Listener.lightStateLabel, action: action)
47 |
48 | return listener
49 | }()
50 |
51 | lazy var lightLevelListener: Wormhole.Listener = {
52 | let action: Wormhole.Listener.Action = { [unowned self] message in
53 | if let lightLevel = message as? NSNumber {
54 | self.lightLevelLabel.text = "Level \(lightLevel.integerValue)"
55 | }
56 | }
57 |
58 | let listener = Wormhole.Listener(name: Config.Wormhole.Listener.lightLevelLabel, action: action)
59 |
60 | return listener
61 | }()
62 |
63 | override func viewDidLoad() {
64 | super.viewDidLoad()
65 |
66 | wormhole.bindListener(lightStateListener, forMessageWithIdentifier: Config.Wormhole.Message.lightState)
67 |
68 | wormhole.bindListener(lightLevelListener, forMessageWithIdentifier: Config.Wormhole.Message.lightLevel)
69 | }
70 |
71 | // MARK: Actions
72 |
73 | @IBAction func lockOrUnlockLightState(sender: UIButton) {
74 | lightStateLocked = !lightStateLocked
75 | }
76 |
77 | }
78 |
79 |
--------------------------------------------------------------------------------
/RemoteKit/Config.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Config.swift
3 | // Remote
4 | //
5 | // Created by NIX on 15/5/27.
6 | // Copyright (c) 2015年 nixWork. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public struct Config {
12 |
13 | public struct Wormhole {
14 | public static let appGroupIdentifier = "group.com.nixWork.Wormhole"
15 | public static let messageDirectoryName = "Wormhole"
16 |
17 | public struct Message {
18 | public static let lightState = "lightState"
19 | public static let lightLevel = "lightLevel"
20 | }
21 |
22 | public struct Listener {
23 | public static let lightStateLabel = "lightStateLabel"
24 | public static let lightLevelLabel = "lightLevelLabel"
25 | }
26 | }
27 |
28 | }
--------------------------------------------------------------------------------
/RemoteKit/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.nixWork.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/RemoteKit/RemoteKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // RemoteKit.h
3 | // RemoteKit
4 | //
5 | // Created by NIX on 15/5/27.
6 | // Copyright (c) 2015年 nixWork. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for RemoteKit.
12 | FOUNDATION_EXPORT double RemoteKitVersionNumber;
13 |
14 | //! Project version string for RemoteKit.
15 | FOUNDATION_EXPORT const unsigned char RemoteKitVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/RemoteKitTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.nixWork.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/RemoteKitTests/RemoteKitTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RemoteKitTests.swift
3 | // RemoteKitTests
4 | //
5 | // Created by NIX on 15/5/27.
6 | // Copyright (c) 2015年 nixWork. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class RemoteKitTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/RemoteTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.nixWork.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/RemoteTests/RemoteTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RemoteTests.swift
3 | // RemoteTests
4 | //
5 | // Created by NIX on 15/5/20.
6 | // Copyright (c) 2015年 nixWork. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class RemoteTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/Wormhole.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 |
3 | s.name = "Wormhole"
4 | s.version = "1.0"
5 | s.summary = "A more elegant way for message passing between iOS apps and extensions."
6 |
7 | s.description = <<-DESC
8 | Wormhole is not just a Swift port of MMWormhole but with better API and use logic.
9 | You can remove any a listener from it separately.
10 | DESC
11 |
12 | s.homepage = "https://github.com/nixzhu/Wormhole"
13 |
14 | s.license = { :type => "MIT", :file => "LICENSE" }
15 |
16 | s.authors = { "nixzhu" => "zhuhongxu@gmail.com" }
17 | s.social_media_url = "https://twitter.com/nixzhu"
18 |
19 | s.ios.deployment_target = "8.0"
20 | # s.osx.deployment_target = "10.7"
21 |
22 | s.source = { :git => "https://github.com/nixzhu/Wormhole.git", :tag => s.version }
23 | s.source_files = "Wormhole/*.swift"
24 | s.requires_arc = true
25 |
26 | end
--------------------------------------------------------------------------------
/Wormhole/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.nixWork.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Wormhole/Wormhole.h:
--------------------------------------------------------------------------------
1 | //
2 | // Wormhole.h
3 | // Wormhole
4 | //
5 | // Created by NIX on 15/5/20.
6 | // Copyright (c) 2015年 nixWork. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for Wormhole.
12 | FOUNDATION_EXPORT double WormholeVersionNumber;
13 |
14 | //! Project version string for Wormhole.
15 | FOUNDATION_EXPORT const unsigned char WormholeVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Wormhole/Wormhole.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Wormhole.swift
3 | // Remote
4 | //
5 | // Created by NIX on 15/5/20.
6 | // Copyright (c) 2015年 nixWork. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | func ==(lhs: Wormhole.MessageListener, rhs: Wormhole.MessageListener) -> Bool {
12 | return lhs.hashValue == rhs.hashValue
13 | }
14 |
15 | public class Wormhole: NSObject {
16 |
17 | let appGroupIdentifier: String
18 | let messageDirectoryName: String
19 |
20 | public init(appGroupIdentifier: String, messageDirectoryName: String) {
21 |
22 | self.appGroupIdentifier = appGroupIdentifier
23 |
24 | if messageDirectoryName.isEmpty {
25 | fatalError("ERROR: Wormhole need a message passing directory")
26 | }
27 |
28 | self.messageDirectoryName = messageDirectoryName
29 | }
30 |
31 | deinit {
32 | if let center = CFNotificationCenterGetDarwinNotifyCenter() {
33 | CFNotificationCenterRemoveEveryObserver(center, unsafeAddressOf(self))
34 | }
35 | }
36 |
37 | public typealias Message = NSCoding
38 |
39 | public func passMessage(message: Message?, withIdentifier identifier: String) {
40 |
41 | if identifier.isEmpty {
42 | fatalError("ERROR: Message need identifier")
43 | }
44 |
45 | if let message = message {
46 | var success = false
47 |
48 | if let filePath = filePathForIdentifier(identifier) {
49 | let data = NSKeyedArchiver.archivedDataWithRootObject(message)
50 | success = data.writeToFile(filePath, atomically: true)
51 | }
52 |
53 | if success {
54 | if let center = CFNotificationCenterGetDarwinNotifyCenter() {
55 | CFNotificationCenterPostNotification(center, identifier, nil, nil, 1)
56 | }
57 | }
58 |
59 | } else {
60 | if let center = CFNotificationCenterGetDarwinNotifyCenter() {
61 | CFNotificationCenterPostNotification(center, identifier, nil, nil, 1)
62 | }
63 | }
64 | }
65 |
66 | public struct Listener {
67 |
68 | public typealias Action = Message? -> Void
69 |
70 | let name: String
71 | let action: Action
72 |
73 | public init(name: String, action: Action) {
74 | self.name = name
75 | self.action = action
76 | }
77 | }
78 |
79 | struct MessageListener: Hashable {
80 |
81 | let messageIdentifier: String
82 | let listener: Listener
83 |
84 | var hashValue: Int {
85 | return (messageIdentifier + "" + listener.name).hashValue
86 | }
87 | }
88 |
89 | var messageListenerSet = Set()
90 |
91 | public func bindListener(listener: Listener, forMessageWithIdentifier identifier: String) {
92 |
93 | if let center = CFNotificationCenterGetDarwinNotifyCenter() {
94 |
95 | let messageListener = MessageListener(messageIdentifier: identifier, listener: listener)
96 | messageListenerSet.insert(messageListener)
97 |
98 | let block: @objc_block (CFNotificationCenter!, UnsafeMutablePointer, CFString!, UnsafePointer, CFDictionary!) -> Void = { _, _, _, _, _ in
99 |
100 | if self.messageListenerSet.contains(messageListener) {
101 | messageListener.listener.action(self.messageWithIdentifier(identifier))
102 | }
103 | }
104 |
105 | let imp: COpaquePointer = imp_implementationWithBlock(unsafeBitCast(block, AnyObject.self))
106 | let callBack: CFNotificationCallback = unsafeBitCast(imp, CFNotificationCallback.self)
107 |
108 | CFNotificationCenterAddObserver(center, unsafeAddressOf(self), callBack, identifier, nil, CFNotificationSuspensionBehavior.DeliverImmediately)
109 |
110 |
111 | // Try fire Listener's action for first time
112 |
113 | listener.action(messageWithIdentifier(identifier))
114 | }
115 | }
116 |
117 | public func removeListener(listener: Listener, forMessageWithIdentifier identifier: String) {
118 |
119 | let messageListener = MessageListener(messageIdentifier: identifier, listener: listener)
120 | messageListenerSet.remove(messageListener)
121 | }
122 |
123 | public func removeListenerByName(name: String, forMessageWithIdentifier identifier: String) {
124 |
125 | for messageListener in messageListenerSet {
126 | if messageListener.messageIdentifier == identifier && messageListener.listener.name == name {
127 | messageListenerSet.remove(messageListener)
128 |
129 | break
130 | }
131 | }
132 | }
133 |
134 | public func removeAllListenersForMessageWithIdentifier(identifier: String) {
135 |
136 | if let center = CFNotificationCenterGetDarwinNotifyCenter() {
137 | CFNotificationCenterRemoveObserver(center, unsafeAddressOf(self), identifier, nil)
138 |
139 | for listener in messageListenerSet {
140 | if listener.messageIdentifier == identifier {
141 | messageListenerSet.remove(listener)
142 | }
143 | }
144 | }
145 | }
146 |
147 | public func messageWithIdentifier(identifier: String) -> Message? {
148 |
149 | if let
150 | filePath = filePathForIdentifier(identifier),
151 | data = NSData(contentsOfFile: filePath),
152 | message = NSKeyedUnarchiver.unarchiveObjectWithData(data) as? Message {
153 | return message
154 | }
155 |
156 | return nil
157 | }
158 |
159 | public func destroyMessageWithIdentifier(identifier: String) {
160 |
161 | if let filePath = filePathForIdentifier(identifier) {
162 | let fileManager = NSFileManager.defaultManager()
163 | fileManager.removeItemAtPath(filePath, error: nil)
164 | }
165 | }
166 |
167 | public func destroyAllMessages() {
168 |
169 | if let directoryPath = messagePassingDirectoryPath() {
170 |
171 | let fileManager = NSFileManager.defaultManager()
172 |
173 | if let fileNames = fileManager.contentsOfDirectoryAtPath(directoryPath, error: nil) as? [String] {
174 |
175 | for fileName in fileNames {
176 | let filePath = directoryPath.stringByAppendingPathComponent(fileName)
177 | fileManager.removeItemAtPath(filePath, error: nil)
178 | }
179 | }
180 | }
181 | }
182 |
183 | // MARK: Helpers
184 |
185 | func filePathForIdentifier(identifier: String) -> String? {
186 |
187 | if identifier.isEmpty {
188 | return nil
189 | }
190 |
191 | if let directoryPath = messagePassingDirectoryPath() {
192 | let fileName = identifier + ".archive"
193 | let filePath = directoryPath.stringByAppendingPathComponent(fileName)
194 |
195 | return filePath
196 | }
197 |
198 | return nil
199 | }
200 |
201 | func messagePassingDirectoryPath() -> String? {
202 |
203 | let fileManager = NSFileManager.defaultManager()
204 |
205 | if let
206 | appGroupContainer = fileManager.containerURLForSecurityApplicationGroupIdentifier(self.appGroupIdentifier),
207 | appGroupContainerPath = appGroupContainer.path {
208 | let directoryPath = appGroupContainerPath.stringByAppendingPathComponent(messageDirectoryName)
209 |
210 | fileManager.createDirectoryAtPath(directoryPath, withIntermediateDirectories: true, attributes: nil, error: nil)
211 |
212 | return directoryPath
213 | }
214 |
215 | return nil
216 | }
217 |
218 | }
219 |
--------------------------------------------------------------------------------
/WormholeTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.nixWork.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/WormholeTests/WormholeTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // WormholeTests.swift
3 | // WormholeTests
4 | //
5 | // Created by NIX on 15/5/20.
6 | // Copyright (c) 2015年 nixWork. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import XCTest
11 |
12 | class WormholeTests: XCTestCase {
13 |
14 | override func setUp() {
15 | super.setUp()
16 | // Put setup code here. This method is called before the invocation of each test method in the class.
17 | }
18 |
19 | override func tearDown() {
20 | // Put teardown code here. This method is called after the invocation of each test method in the class.
21 | super.tearDown()
22 | }
23 |
24 | func testExample() {
25 | // This is an example of a functional test case.
26 | XCTAssert(true, "Pass")
27 | }
28 |
29 | func testPerformanceExample() {
30 | // This is an example of a performance test case.
31 | self.measureBlock() {
32 | // Put the code you want to measure the time of here.
33 | }
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/images/wormhole_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nixzhu/Wormhole/ac791fe26b6bf0f26b8dfa06004d3a53c45d39e3/images/wormhole_banner.png
--------------------------------------------------------------------------------