├── .gitignore
├── README.md
├── TestApp
├── TestApp-Info.plist
├── TestApp-Prefix.pch
├── TestApp.entitlements
├── TestAppAppDelegate.h
├── TestAppAppDelegate.m
├── en.lproj
│ ├── Credits.rtf
│ ├── InfoPlist.strings
│ └── MainMenu.xib
├── main.m
└── multiply.json
├── TestService
├── TestService-Info.plist
├── TestService-Prefix.pch
├── TestService.entitlements
├── en.lproj
│ └── InfoPlist.strings
└── main.m
├── XPCKit.xcodeproj
└── project.pbxproj
├── XPCKit.xcworkspace
└── contents.xcworkspacedata
├── XPCKit
├── NSArray+XPCParse.h
├── NSArray+XPCParse.m
├── NSData+XPCParse.h
├── NSData+XPCParse.m
├── NSDate+XPCParse.h
├── NSDate+XPCParse.m
├── NSDictionary+XPCParse.h
├── NSDictionary+XPCParse.m
├── NSFileHandle+XPCParse.h
├── NSFileHandle+XPCParse.m
├── NSNumber+XPCParse.h
├── NSNumber+XPCParse.m
├── NSObject+XPCParse.h
├── NSObject+XPCParse.m
├── NSString+XPCParse.h
├── NSString+XPCParse.m
├── XPCConnection.h
├── XPCConnection.m
├── XPCExtensions.h
├── XPCKit-Info.plist
├── XPCKit-Prefix.pch
├── XPCKit.h
├── XPCService.h
├── XPCService.m
├── XPCTypes.h
├── XPCUUID.h
├── XPCUUID.m
└── en.lproj
│ └── InfoPlist.strings
└── XPCKitTests
├── XPCKitTests-Info.plist
├── XPCKitTests.h
├── XPCKitTests.m
└── en.lproj
└── InfoPlist.strings
/.gitignore:
--------------------------------------------------------------------------------
1 | xcuserdata
2 | build
3 | .DS_Store
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | XPCKit is a Cocoa library for wrapping the XPC C APIs in a handy object-oriented model. It is merely meant as an object-oriented wrapper for the C library, and does not attempt to layer any additional semantics on top. It contains code to run both "clients" (which create connections to services) and "services" (which receive connections), although you can mix and match to write raw C code or Objective-C code between different clients and services.
2 |
3 | Features
4 | ========
5 |
6 | - Simplified Objective-C API for interacting with XPC processes
7 | - Auto-boxing and auto-unboxing of objects from xpc_object_t objects to:
8 | - NSArray
9 | - NSDictionary
10 | - NSData
11 | - NSString
12 | - NSDate
13 | - NSNumber for bool, UInt64, Int64, and double types
14 | - NSFileHandle
15 | - UUIDs (via a custom XPCUUID class)
16 | - Block-based callbacks
17 | - Probably safe to use from multiple threads
18 |
19 | Wish List
20 | =========
21 |
22 | - Auto-boxing and auto-unboxing for
23 | - NSData, backed by shared memory (some code for this exists but it is not reliable, causes crashes, doesn't return consistent data, etc.)
24 | - IOSurfaceRef
25 | - XPCConnection
26 | - Compatibility mode for iOS/Snow Leopard
27 | - Both client and service code lives within the app
28 | - A mapping of service names to their classes would be added by the developer to the app's Info.plist
29 | - Objects would be passed through XPCConnection to an XPCService that is contained within the same process
30 | - No xpc_* types would be available
31 |
32 | Authors
33 | =======
34 |
35 | - [Steve Streza](https://twitter.com/SteveStreza)
36 |
37 | Sample Code
38 | ===========
39 |
40 | Given [this sample data](https://github.com/amazingsyco/XPCKit/blob/master/TestApp/multiply.json), converted to an NSDictionary, you can see how:
41 |
42 | - the [client](https://github.com/amazingsyco/XPCKit/blob/master/TestApp/TestAppAppDelegate.m) sends this command as a message, and
43 | - the [service](https://github.com/amazingsyco/XPCKit/blob/master/TestService/main.m) receives this command, processes it, and sends the response back
44 |
45 | Installation
46 | ============
47 |
48 | You can use XPCKit in the client, service, or both; you just have to include the code. You can include XPCKit in one of three ways:
49 |
50 | 1. Include the source files yourself (everything in XPCKit)
51 | 2. Make a dependency of XPCKit's framework
52 | 3. Make a dependency of XPCKit's static library (**note**: you will need to add linker flags `-all_load` and `-ObjC` to make this work properly)
53 |
54 | Setting up the Client
55 | ---------------------
56 |
57 | 1. In your app, add the XPCKit source files, library or framework
58 | 2. Set up an XPCConnection object with the name of your service
59 | 3. Send it a message
60 |
61 | Setting up the Service
62 | ----------------------
63 |
64 | 0. If you haven't already, create a new "XPC Service" target (located in Mac OS X > Framework & Library)
65 | 1. Add the XPCKit source files, library or framework
66 | 2. Link against the Foundation framework
67 | 3. Rename "main.c" to "main.m"
68 | 4. In your main function, call +[XPCService runServiceWithConnectionHandler:] to start listening for incoming connections.
69 | 5. In the connection handler, set an event handler on the XPCConnection to receive messages.
70 |
71 | License
72 | =======
73 |
74 | Copyright 2011 XPCKit
75 |
76 | Licensed under the Apache License, Version 2.0 (the "License");
77 | you may not use this file except in compliance with the License.
78 | You may obtain a copy of the License at
79 |
80 | http://www.apache.org/licenses/LICENSE-2.0
81 |
82 | Unless required by applicable law or agreed to in writing, software
83 | distributed under the License is distributed on an "AS IS" BASIS,
84 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
85 | See the License for the specific language governing permissions and
86 | limitations under the License.
87 |
--------------------------------------------------------------------------------
/TestApp/TestApp-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | com.mustacheware.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | ${MACOSX_DEPLOYMENT_TARGET}
27 | NSHumanReadableCopyright
28 | Copyright © 2011 Mustacheware. Licensed under the Apache 2.0 license.
29 | NSMainNibFile
30 | MainMenu
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/TestApp/TestApp-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'TestApp' target in the 'TestApp' project
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #endif
8 |
--------------------------------------------------------------------------------
/TestApp/TestApp.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/TestApp/TestAppAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // TestAppAppDelegate.h
3 | // TestApp
4 | //
5 | // Created by Steve Streza on 7/24/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 | #import
22 |
23 | @interface TestAppAppDelegate : NSObject {
24 | NSWindow *window;
25 | XPCConnection *mathConnection;
26 | XPCConnection *readConnection;
27 | }
28 |
29 | @property (assign) IBOutlet NSWindow *window;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/TestApp/TestAppAppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // TestAppAppDelegate.m
3 | // TestApp
4 | //
5 | // Created by Steve Streza on 7/24/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import "TestAppAppDelegate.h"
21 | #import
22 | #import
23 |
24 | @implementation TestAppAppDelegate
25 |
26 | @synthesize window;
27 |
28 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
29 | {
30 | // Insert code here to initialize your application
31 | mathConnection = [[XPCConnection alloc] initWithServiceName:@"com.mustacheware.TestService"];
32 | mathConnection.eventHandler = ^(NSDictionary *message, XPCConnection *inConnection){
33 | NSNumber *result = [message objectForKey:@"result"];
34 | NSData *data = [message objectForKey:@"data"];
35 | NSFileHandle *fileHandle = [message objectForKey:@"fileHandle"];
36 | NSDate *date = [message objectForKey:@"date"];
37 | if(result){
38 | NSLog(@"We got a calculation result! %@", result);
39 | }else if(data || fileHandle){
40 | NSData *newData = [fileHandle readDataToEndOfFile];
41 | NSLog(@"We got a file handle! Read %i bytes - %@", newData.length, fileHandle);
42 | }else if(date){
43 | NSLog(@"It is now %@", date);
44 | }
45 | };
46 |
47 | readConnection = [[XPCConnection alloc] initWithServiceName:@"com.mustacheware.TestService"];
48 | readConnection.eventHandler = ^(NSDictionary *message, XPCConnection *inConnection){
49 | NSData *data = [message objectForKey:@"data"];
50 | NSFileHandle *fileHandle = [message objectForKey:@"fileHandle"];
51 | if(data || fileHandle){
52 | NSData *newData = [fileHandle readDataToEndOfFile];
53 | if(newData){
54 | NSLog(@"We got maybe mapped data! %i bytes - Equal? %@", data.length, ([newData isEqualToData:data] ? @"YES" : @"NO"));
55 | }
56 | NSLog(@"We got a file handle! Read %i bytes - %@", newData.length, fileHandle);
57 | }
58 | };
59 |
60 |
61 | NSDictionary *multiplyData =
62 | [NSDictionary dictionaryWithObjectsAndKeys:
63 | @"multiply", @"operation",
64 | [NSArray arrayWithObjects:
65 | [NSNumber numberWithInt:7],
66 | [NSNumber numberWithInt:6],
67 | [NSNumber numberWithDouble: 1.67],
68 | nil], @"values",
69 | nil];
70 |
71 | NSDictionary *readData = [NSDictionary dictionaryWithObjectsAndKeys:
72 | @"read", @"operation",
73 | @"/Users/syco/Library/Safari/Bookmarks.plist", @"path",
74 | nil];
75 | NSData *loadedData = [[NSFileManager defaultManager] contentsAtPath:[readData objectForKey:@"path"]];
76 | NSFileHandle *loadedHandle = [NSFileHandle fileHandleForReadingAtPath:[readData objectForKey:@"path"]];
77 | NSLog(@"Sandbox is %@ at path %@, got %i bytes and a file handle %@",((loadedData.length == 0 && loadedHandle == nil) ? @"working" : @"NOT working"), [readData objectForKey:@"path"], loadedData.length, loadedHandle);
78 |
79 | [mathConnection sendMessage:multiplyData];
80 | [readConnection sendMessage:readData];
81 |
82 | [mathConnection sendMessage:[NSDictionary dictionaryWithObject:@"whatTimeIsIt" forKey:@"operation"]];
83 | }
84 |
85 | @end
86 |
--------------------------------------------------------------------------------
/TestApp/en.lproj/Credits.rtf:
--------------------------------------------------------------------------------
1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
2 | {\colortbl;\red255\green255\blue255;}
3 | \paperw9840\paperh8400
4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
5 |
6 | \f0\b\fs24 \cf0 Engineering:
7 | \b0 \
8 | Some people\
9 | \
10 |
11 | \b Human Interface Design:
12 | \b0 \
13 | Some other people\
14 | \
15 |
16 | \b Testing:
17 | \b0 \
18 | Hopefully not nobody\
19 | \
20 |
21 | \b Documentation:
22 | \b0 \
23 | Whoever\
24 | \
25 |
26 | \b With special thanks to:
27 | \b0 \
28 | Mom\
29 | }
30 |
--------------------------------------------------------------------------------
/TestApp/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/TestApp/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // TestApp
4 | //
5 | // Created by Steve Streza on 7/24/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 |
22 | int main(int argc, char *argv[])
23 | {
24 | return NSApplicationMain(argc, (const char **)argv);
25 | }
26 |
--------------------------------------------------------------------------------
/TestApp/multiply.json:
--------------------------------------------------------------------------------
1 | {
2 | "operation": "multiply",
3 | "values": [7, 1.5, 12.313123, 1.3192, 0.481429841983]
4 | }
--------------------------------------------------------------------------------
/TestService/TestService-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${EXECUTABLE_NAME}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | XPC!
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | NSHumanReadableCopyright
24 | Copyright © 2011 Steve Streza. Licensed under the Apache 2.0 license.
25 | XPCService
26 |
27 | ServiceType
28 | Application
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/TestService/TestService-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'TestService' target in the 'TestService' project
3 | //
4 |
5 |
--------------------------------------------------------------------------------
/TestService/TestService.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | get-task-allow
6 |
7 | com.apple.security.app-sandbox
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/TestService/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/TestService/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.c
3 | // TestService
4 | //
5 | // Created by Steve Streza on 7/24/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 | #import
22 | #import "XPCKit.h"
23 |
24 | int main(int argc, const char *argv[])
25 | {
26 | [XPCService runServiceWithConnectionHandler:^(XPCConnection *connection){
27 | [connection _sendLog:@"Multiply received a connection"];
28 | [connection setEventHandler:^(NSDictionary *message, XPCConnection *connection){
29 | [connection _sendLog:[NSString stringWithFormat:@"Multiply received a message! %@", message]];
30 | if([[message objectForKey:@"operation"] isEqual:@"multiply"]){
31 | NSArray *values = [message objectForKey:@"values"];
32 |
33 | // calculate the product
34 | double product = 1.0;
35 | for(NSUInteger index=0; index < values.count; index++){
36 | product = product * [(NSNumber *)[values objectAtIndex:index] doubleValue];
37 | }
38 |
39 | [connection sendMessage:[NSDictionary dictionaryWithObject:[NSNumber numberWithDouble:product] forKey:@"result"]];
40 | }
41 |
42 | if([[message objectForKey:@"operation"] isEqual:@"read"]){
43 | NSString *path = [message objectForKey:@"path"];
44 | NSData *data = [[NSFileManager defaultManager] contentsAtPath:path];
45 | NSFileHandle *fileHandle = [NSFileHandle fileHandleForReadingAtPath:path];
46 |
47 | // [connection _sendLog:[NSString stringWithFormat:@"data %i bytes handle %@",data.length, fileHandle]];
48 |
49 | [connection sendMessage:[NSDictionary dictionaryWithObjectsAndKeys:
50 | data, @"data",
51 | fileHandle, @"fileHandle",
52 | nil]];
53 | }
54 |
55 | if([[message objectForKey:@"operation"] isEqual:@"whatTimeIsIt"]){
56 | [connection sendMessage:[NSDictionary dictionaryWithObject:[NSDate date] forKey:@"date"]];
57 | }
58 | }];
59 | }];
60 |
61 |
62 |
63 | return 0;
64 | }
65 |
--------------------------------------------------------------------------------
/XPCKit.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1E5F84A813E10DB700234F31 /* XPCService.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5F84A613E10DB700234F31 /* XPCService.h */; settings = {ATTRIBUTES = (Public, ); }; };
11 | 1E5F84A913E10DB700234F31 /* XPCService.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5F84A613E10DB700234F31 /* XPCService.h */; settings = {ATTRIBUTES = (Public, ); }; };
12 | 1E5F84AA13E10DB700234F31 /* XPCService.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E5F84A713E10DB700234F31 /* XPCService.m */; };
13 | 1E5F84AB13E10DB700234F31 /* XPCService.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E5F84A713E10DB700234F31 /* XPCService.m */; };
14 | 1E835CB113DF748000338391 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEDD0B613DE79D200D5AEC3 /* Foundation.framework */; };
15 | 1E835CB313DF74BF00338391 /* XPCKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEDD0CF13DE9FAB00D5AEC3 /* XPCKit.framework */; };
16 | 1E835CB513DF74C900338391 /* XPCKit.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEDD0CF13DE9FAB00D5AEC3 /* XPCKit.framework */; };
17 | 1EB022A5141D9F3700BCC1FB /* NSDate+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EB022A3141D9F3700BCC1FB /* NSDate+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
18 | 1EB022A6141D9F3700BCC1FB /* NSDate+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EB022A3141D9F3700BCC1FB /* NSDate+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
19 | 1EB022A7141D9F3700BCC1FB /* NSDate+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EB022A4141D9F3700BCC1FB /* NSDate+XPCParse.m */; };
20 | 1EB022A8141D9F3700BCC1FB /* NSDate+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EB022A4141D9F3700BCC1FB /* NSDate+XPCParse.m */; };
21 | 1EEDD03E13DD485400D5AEC3 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEDD03D13DD485400D5AEC3 /* SenTestingKit.framework */; };
22 | 1EEDD04213DD485400D5AEC3 /* libXPCKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEDD02813DD485400D5AEC3 /* libXPCKit.a */; };
23 | 1EEDD04813DD485400D5AEC3 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1EEDD04613DD485400D5AEC3 /* InfoPlist.strings */; };
24 | 1EEDD04A13DD485400D5AEC3 /* XPCKitTests.h in Resources */ = {isa = PBXBuildFile; fileRef = 1EEDD04913DD485400D5AEC3 /* XPCKitTests.h */; };
25 | 1EEDD04C13DD485400D5AEC3 /* XPCKitTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD04B13DD485400D5AEC3 /* XPCKitTests.m */; };
26 | 1EEDD06113DD48BB00D5AEC3 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1EEDD05F13DD48BB00D5AEC3 /* InfoPlist.strings */; };
27 | 1EEDD06313DD48BB00D5AEC3 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD06213DD48BB00D5AEC3 /* main.m */; };
28 | 1EEDD06713DD48BB00D5AEC3 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 1EEDD06513DD48BB00D5AEC3 /* Credits.rtf */; };
29 | 1EEDD06A13DD48BB00D5AEC3 /* TestAppAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD06913DD48BB00D5AEC3 /* TestAppAppDelegate.m */; };
30 | 1EEDD06D13DD48BC00D5AEC3 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1EEDD06B13DD48BC00D5AEC3 /* MainMenu.xib */; };
31 | 1EEDD07B13DD48D800D5AEC3 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1EEDD07913DD48D800D5AEC3 /* InfoPlist.strings */; };
32 | 1EEDD07E13DD48D800D5AEC3 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD07D13DD48D800D5AEC3 /* main.m */; };
33 | 1EEDD08513DD498900D5AEC3 /* com.mustacheware.TestService.xpc in Copy Services */ = {isa = PBXBuildFile; fileRef = 1EEDD07513DD48D800D5AEC3 /* com.mustacheware.TestService.xpc */; };
34 | 1EEDD08813DD508C00D5AEC3 /* XPCConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD08613DD508C00D5AEC3 /* XPCConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
35 | 1EEDD08913DD508C00D5AEC3 /* XPCConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD08713DD508C00D5AEC3 /* XPCConnection.m */; };
36 | 1EEDD08C13DDC34800D5AEC3 /* NSDictionary+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD08A13DDC34800D5AEC3 /* NSDictionary+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
37 | 1EEDD08D13DDC34800D5AEC3 /* NSDictionary+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD08B13DDC34800D5AEC3 /* NSDictionary+XPCParse.m */; };
38 | 1EEDD08E13DDC34800D5AEC3 /* NSDictionary+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD08B13DDC34800D5AEC3 /* NSDictionary+XPCParse.m */; };
39 | 1EEDD09113DDC48800D5AEC3 /* NSNumber+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD08F13DDC48800D5AEC3 /* NSNumber+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
40 | 1EEDD09213DDC48800D5AEC3 /* NSNumber+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD09013DDC48800D5AEC3 /* NSNumber+XPCParse.m */; };
41 | 1EEDD09313DDC48800D5AEC3 /* NSNumber+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD09013DDC48800D5AEC3 /* NSNumber+XPCParse.m */; };
42 | 1EEDD09913DDC8A300D5AEC3 /* NSObject+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD09713DDC8A300D5AEC3 /* NSObject+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
43 | 1EEDD09A13DDC8A300D5AEC3 /* NSObject+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD09813DDC8A300D5AEC3 /* NSObject+XPCParse.m */; };
44 | 1EEDD09B13DDC8A300D5AEC3 /* NSObject+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD09813DDC8A300D5AEC3 /* NSObject+XPCParse.m */; };
45 | 1EEDD0A413DE65F800D5AEC3 /* NSData+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD0A213DE65F800D5AEC3 /* NSData+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
46 | 1EEDD0A513DE65F800D5AEC3 /* NSData+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD0A313DE65F800D5AEC3 /* NSData+XPCParse.m */; };
47 | 1EEDD0AC13DE669E00D5AEC3 /* NSString+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD0AA13DE669D00D5AEC3 /* NSString+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
48 | 1EEDD0AD13DE669E00D5AEC3 /* NSString+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD0AB13DE669D00D5AEC3 /* NSString+XPCParse.m */; };
49 | 1EEDD0AF13DE680500D5AEC3 /* XPCExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD0AE13DE680500D5AEC3 /* XPCExtensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
50 | 1EEDD0B213DE684300D5AEC3 /* NSArray+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD0B013DE684300D5AEC3 /* NSArray+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
51 | 1EEDD0B313DE684300D5AEC3 /* NSArray+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD0B113DE684300D5AEC3 /* NSArray+XPCParse.m */; };
52 | 1EEDD0B513DE6CA700D5AEC3 /* multiply.json in Resources */ = {isa = PBXBuildFile; fileRef = 1EEDD0B413DE6C5100D5AEC3 /* multiply.json */; };
53 | 1EEDD0B713DE79D200D5AEC3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEDD0B613DE79D200D5AEC3 /* Foundation.framework */; };
54 | 1EEDD0BA13DE7A1000D5AEC3 /* libXPCKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEDD02813DD485400D5AEC3 /* libXPCKit.a */; };
55 | 1EEDD0C513DE8D0F00D5AEC3 /* XPCTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD0C413DE8D0F00D5AEC3 /* XPCTypes.h */; settings = {ATTRIBUTES = (Public, ); }; };
56 | 1EEDD0D613DE9FAB00D5AEC3 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1EEDD0D413DE9FAB00D5AEC3 /* InfoPlist.strings */; };
57 | 1EEDD0DE13DEA04900D5AEC3 /* NSObject+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD09813DDC8A300D5AEC3 /* NSObject+XPCParse.m */; };
58 | 1EEDD0DF13DEA04900D5AEC3 /* NSDictionary+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD08B13DDC34800D5AEC3 /* NSDictionary+XPCParse.m */; };
59 | 1EEDD0E013DEA04900D5AEC3 /* NSArray+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD0B113DE684300D5AEC3 /* NSArray+XPCParse.m */; };
60 | 1EEDD0E113DEA04900D5AEC3 /* NSNumber+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD09013DDC48800D5AEC3 /* NSNumber+XPCParse.m */; };
61 | 1EEDD0E213DEA04900D5AEC3 /* NSData+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD0A313DE65F800D5AEC3 /* NSData+XPCParse.m */; };
62 | 1EEDD0E313DEA04900D5AEC3 /* NSString+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD0AB13DE669D00D5AEC3 /* NSString+XPCParse.m */; };
63 | 1EEDD0E413DEA04900D5AEC3 /* XPCConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD08713DD508C00D5AEC3 /* XPCConnection.m */; };
64 | 1EEDD0E913DEA07700D5AEC3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEDD0B613DE79D200D5AEC3 /* Foundation.framework */; };
65 | 1EEDD0EA13DEA08E00D5AEC3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEDD0B613DE79D200D5AEC3 /* Foundation.framework */; };
66 | 1EEDD0EC13DEA0A400D5AEC3 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEDD0EB13DEA0A400D5AEC3 /* Cocoa.framework */; };
67 | 1EEDD0EE13DEB02000D5AEC3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EEDD0ED13DEB01F00D5AEC3 /* Foundation.framework */; };
68 | 1EEDD0F113DEB97000D5AEC3 /* XPCUUID.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD0EF13DEB96F00D5AEC3 /* XPCUUID.h */; settings = {ATTRIBUTES = (Public, ); }; };
69 | 1EEDD0F213DEB97000D5AEC3 /* XPCUUID.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD0EF13DEB96F00D5AEC3 /* XPCUUID.h */; settings = {ATTRIBUTES = (Public, ); }; };
70 | 1EEDD0F313DEB97000D5AEC3 /* XPCUUID.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD0F013DEB97000D5AEC3 /* XPCUUID.m */; };
71 | 1EEDD0F413DEB97000D5AEC3 /* XPCUUID.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEDD0F013DEB97000D5AEC3 /* XPCUUID.m */; };
72 | 1EF4D9D4141C36AA007BEEC0 /* NSObject+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD09713DDC8A300D5AEC3 /* NSObject+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
73 | 1EF4D9D5141C36AA007BEEC0 /* NSDictionary+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD08A13DDC34800D5AEC3 /* NSDictionary+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
74 | 1EF4D9D6141C36AA007BEEC0 /* NSArray+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD0B013DE684300D5AEC3 /* NSArray+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
75 | 1EF4D9D7141C36AA007BEEC0 /* NSNumber+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD08F13DDC48800D5AEC3 /* NSNumber+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
76 | 1EF4D9D8141C36AA007BEEC0 /* NSData+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD0A213DE65F800D5AEC3 /* NSData+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
77 | 1EF4D9D9141C36AA007BEEC0 /* NSString+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD0AA13DE669D00D5AEC3 /* NSString+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
78 | 1EF4D9DA141C36AA007BEEC0 /* XPCKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD03413DD485400D5AEC3 /* XPCKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
79 | 1EF4D9DB141C36AA007BEEC0 /* XPCTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD0C413DE8D0F00D5AEC3 /* XPCTypes.h */; settings = {ATTRIBUTES = (Public, ); }; };
80 | 1EF4D9DC141C36AA007BEEC0 /* XPCExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD0AE13DE680500D5AEC3 /* XPCExtensions.h */; settings = {ATTRIBUTES = (Public, ); }; };
81 | 1EF4D9DD141C36AA007BEEC0 /* XPCConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EEDD08613DD508C00D5AEC3 /* XPCConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
82 | 1EF4D9E1141C38D0007BEEC0 /* NSFileHandle+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EF4D9DF141C38D0007BEEC0 /* NSFileHandle+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
83 | 1EF4D9E2141C38D0007BEEC0 /* NSFileHandle+XPCParse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EF4D9DF141C38D0007BEEC0 /* NSFileHandle+XPCParse.h */; settings = {ATTRIBUTES = (Public, ); }; };
84 | 1EF4D9E3141C38D0007BEEC0 /* NSFileHandle+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EF4D9E0141C38D0007BEEC0 /* NSFileHandle+XPCParse.m */; };
85 | 1EF4D9E4141C38D0007BEEC0 /* NSFileHandle+XPCParse.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EF4D9E0141C38D0007BEEC0 /* NSFileHandle+XPCParse.m */; };
86 | 1EF4D9E7141C3EEE007BEEC0 /* TestService.entitlements in Resources */ = {isa = PBXBuildFile; fileRef = 1EF4D9E6141C3EEE007BEEC0 /* TestService.entitlements */; };
87 | /* End PBXBuildFile section */
88 |
89 | /* Begin PBXContainerItemProxy section */
90 | 1EEDD04013DD485400D5AEC3 /* PBXContainerItemProxy */ = {
91 | isa = PBXContainerItemProxy;
92 | containerPortal = 1EEDD01F13DD485400D5AEC3 /* Project object */;
93 | proxyType = 1;
94 | remoteGlobalIDString = 1EEDD02713DD485400D5AEC3;
95 | remoteInfo = XPCKit;
96 | };
97 | 1EEDD08213DD497400D5AEC3 /* PBXContainerItemProxy */ = {
98 | isa = PBXContainerItemProxy;
99 | containerPortal = 1EEDD01F13DD485400D5AEC3 /* Project object */;
100 | proxyType = 1;
101 | remoteGlobalIDString = 1EEDD07413DD48D800D5AEC3;
102 | remoteInfo = TestService;
103 | };
104 | 1EEDD09413DDC6A300D5AEC3 /* PBXContainerItemProxy */ = {
105 | isa = PBXContainerItemProxy;
106 | containerPortal = 1EEDD01F13DD485400D5AEC3 /* Project object */;
107 | proxyType = 1;
108 | remoteGlobalIDString = 1EEDD02713DD485400D5AEC3;
109 | remoteInfo = XPCKit;
110 | };
111 | 1EEDD0B813DE7A0D00D5AEC3 /* PBXContainerItemProxy */ = {
112 | isa = PBXContainerItemProxy;
113 | containerPortal = 1EEDD01F13DD485400D5AEC3 /* Project object */;
114 | proxyType = 1;
115 | remoteGlobalIDString = 1EEDD02713DD485400D5AEC3;
116 | remoteInfo = XPCKit;
117 | };
118 | /* End PBXContainerItemProxy section */
119 |
120 | /* Begin PBXCopyFilesBuildPhase section */
121 | 1E835CB413DF74C300338391 /* Copy Frameworks */ = {
122 | isa = PBXCopyFilesBuildPhase;
123 | buildActionMask = 2147483647;
124 | dstPath = "";
125 | dstSubfolderSpec = 10;
126 | files = (
127 | 1E835CB513DF74C900338391 /* XPCKit.framework in Copy Frameworks */,
128 | );
129 | name = "Copy Frameworks";
130 | runOnlyForDeploymentPostprocessing = 0;
131 | };
132 | 1EEDD08413DD497A00D5AEC3 /* Copy Services */ = {
133 | isa = PBXCopyFilesBuildPhase;
134 | buildActionMask = 2147483647;
135 | dstPath = Contents/XPCServices;
136 | dstSubfolderSpec = 1;
137 | files = (
138 | 1EEDD08513DD498900D5AEC3 /* com.mustacheware.TestService.xpc in Copy Services */,
139 | );
140 | name = "Copy Services";
141 | runOnlyForDeploymentPostprocessing = 0;
142 | };
143 | /* End PBXCopyFilesBuildPhase section */
144 |
145 | /* Begin PBXFileReference section */
146 | 1E5F84A613E10DB700234F31 /* XPCService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPCService.h; sourceTree = ""; };
147 | 1E5F84A713E10DB700234F31 /* XPCService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPCService.m; sourceTree = ""; };
148 | 1EB022A3141D9F3700BCC1FB /* NSDate+XPCParse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+XPCParse.h"; sourceTree = ""; };
149 | 1EB022A4141D9F3700BCC1FB /* NSDate+XPCParse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+XPCParse.m"; sourceTree = ""; };
150 | 1EEDD02813DD485400D5AEC3 /* libXPCKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libXPCKit.a; sourceTree = BUILT_PRODUCTS_DIR; };
151 | 1EEDD03313DD485400D5AEC3 /* XPCKit-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "XPCKit-Prefix.pch"; sourceTree = ""; };
152 | 1EEDD03413DD485400D5AEC3 /* XPCKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCKit.h; sourceTree = ""; };
153 | 1EEDD03C13DD485400D5AEC3 /* XPCKitTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = XPCKitTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
154 | 1EEDD03D13DD485400D5AEC3 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
155 | 1EEDD04513DD485400D5AEC3 /* XPCKitTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "XPCKitTests-Info.plist"; sourceTree = ""; };
156 | 1EEDD04713DD485400D5AEC3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
157 | 1EEDD04913DD485400D5AEC3 /* XPCKitTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCKitTests.h; sourceTree = ""; };
158 | 1EEDD04B13DD485400D5AEC3 /* XPCKitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCKitTests.m; sourceTree = ""; };
159 | 1EEDD05913DD48BB00D5AEC3 /* TestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
160 | 1EEDD05E13DD48BB00D5AEC3 /* TestApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TestApp-Info.plist"; sourceTree = ""; };
161 | 1EEDD06013DD48BB00D5AEC3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
162 | 1EEDD06213DD48BB00D5AEC3 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = main.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
163 | 1EEDD06413DD48BB00D5AEC3 /* TestApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TestApp-Prefix.pch"; sourceTree = ""; };
164 | 1EEDD06613DD48BB00D5AEC3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; };
165 | 1EEDD06813DD48BB00D5AEC3 /* TestAppAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TestAppAppDelegate.h; sourceTree = ""; };
166 | 1EEDD06913DD48BB00D5AEC3 /* TestAppAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TestAppAppDelegate.m; sourceTree = ""; };
167 | 1EEDD06C13DD48BC00D5AEC3 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; };
168 | 1EEDD07513DD48D800D5AEC3 /* com.mustacheware.TestService.xpc */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = com.mustacheware.TestService.xpc; sourceTree = BUILT_PRODUCTS_DIR; };
169 | 1EEDD07813DD48D800D5AEC3 /* TestService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TestService-Info.plist"; sourceTree = ""; };
170 | 1EEDD07A13DD48D800D5AEC3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
171 | 1EEDD07C13DD48D800D5AEC3 /* TestService-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TestService-Prefix.pch"; sourceTree = ""; };
172 | 1EEDD07D13DD48D800D5AEC3 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = main.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
173 | 1EEDD08613DD508C00D5AEC3 /* XPCConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPCConnection.h; sourceTree = ""; };
174 | 1EEDD08713DD508C00D5AEC3 /* XPCConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPCConnection.m; sourceTree = ""; };
175 | 1EEDD08A13DDC34800D5AEC3 /* NSDictionary+XPCParse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "NSDictionary+XPCParse.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
176 | 1EEDD08B13DDC34800D5AEC3 /* NSDictionary+XPCParse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "NSDictionary+XPCParse.m"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
177 | 1EEDD08F13DDC48800D5AEC3 /* NSNumber+XPCParse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNumber+XPCParse.h"; sourceTree = ""; };
178 | 1EEDD09013DDC48800D5AEC3 /* NSNumber+XPCParse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNumber+XPCParse.m"; sourceTree = ""; };
179 | 1EEDD09713DDC8A300D5AEC3 /* NSObject+XPCParse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+XPCParse.h"; sourceTree = ""; };
180 | 1EEDD09813DDC8A300D5AEC3 /* NSObject+XPCParse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+XPCParse.m"; sourceTree = ""; };
181 | 1EEDD0A213DE65F800D5AEC3 /* NSData+XPCParse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "NSData+XPCParse.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
182 | 1EEDD0A313DE65F800D5AEC3 /* NSData+XPCParse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "NSData+XPCParse.m"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
183 | 1EEDD0AA13DE669D00D5AEC3 /* NSString+XPCParse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+XPCParse.h"; sourceTree = ""; };
184 | 1EEDD0AB13DE669D00D5AEC3 /* NSString+XPCParse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+XPCParse.m"; sourceTree = ""; };
185 | 1EEDD0AE13DE680500D5AEC3 /* XPCExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPCExtensions.h; sourceTree = ""; };
186 | 1EEDD0B013DE684300D5AEC3 /* NSArray+XPCParse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = "NSArray+XPCParse.h"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
187 | 1EEDD0B113DE684300D5AEC3 /* NSArray+XPCParse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = "NSArray+XPCParse.m"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
188 | 1EEDD0B413DE6C5100D5AEC3 /* multiply.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = multiply.json; sourceTree = ""; };
189 | 1EEDD0B613DE79D200D5AEC3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
190 | 1EEDD0C413DE8D0F00D5AEC3 /* XPCTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPCTypes.h; sourceTree = ""; };
191 | 1EEDD0CF13DE9FAB00D5AEC3 /* XPCKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = XPCKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
192 | 1EEDD0D313DE9FAB00D5AEC3 /* XPCKit-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "XPCKit-Info.plist"; sourceTree = ""; };
193 | 1EEDD0D513DE9FAB00D5AEC3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
194 | 1EEDD0EB13DEA0A400D5AEC3 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
195 | 1EEDD0ED13DEB01F00D5AEC3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
196 | 1EEDD0EF13DEB96F00D5AEC3 /* XPCUUID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPCUUID.h; sourceTree = ""; };
197 | 1EEDD0F013DEB97000D5AEC3 /* XPCUUID.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPCUUID.m; sourceTree = ""; };
198 | 1EF4D9DF141C38D0007BEEC0 /* NSFileHandle+XPCParse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSFileHandle+XPCParse.h"; sourceTree = ""; };
199 | 1EF4D9E0141C38D0007BEEC0 /* NSFileHandle+XPCParse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSFileHandle+XPCParse.m"; sourceTree = ""; };
200 | 1EF4D9E5141C3EA2007BEEC0 /* TestApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = TestApp.entitlements; sourceTree = ""; };
201 | 1EF4D9E6141C3EEE007BEEC0 /* TestService.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = TestService.entitlements; sourceTree = ""; };
202 | /* End PBXFileReference section */
203 |
204 | /* Begin PBXFrameworksBuildPhase section */
205 | 1EEDD02513DD485400D5AEC3 /* Frameworks */ = {
206 | isa = PBXFrameworksBuildPhase;
207 | buildActionMask = 2147483647;
208 | files = (
209 | 1EEDD0E913DEA07700D5AEC3 /* Foundation.framework in Frameworks */,
210 | );
211 | runOnlyForDeploymentPostprocessing = 0;
212 | };
213 | 1EEDD03813DD485400D5AEC3 /* Frameworks */ = {
214 | isa = PBXFrameworksBuildPhase;
215 | buildActionMask = 2147483647;
216 | files = (
217 | 1EEDD0EE13DEB02000D5AEC3 /* Foundation.framework in Frameworks */,
218 | 1EEDD03E13DD485400D5AEC3 /* SenTestingKit.framework in Frameworks */,
219 | 1EEDD04213DD485400D5AEC3 /* libXPCKit.a in Frameworks */,
220 | );
221 | runOnlyForDeploymentPostprocessing = 0;
222 | };
223 | 1EEDD05613DD48BB00D5AEC3 /* Frameworks */ = {
224 | isa = PBXFrameworksBuildPhase;
225 | buildActionMask = 2147483647;
226 | files = (
227 | 1EEDD0EC13DEA0A400D5AEC3 /* Cocoa.framework in Frameworks */,
228 | 1EEDD0EA13DEA08E00D5AEC3 /* Foundation.framework in Frameworks */,
229 | 1E835CB313DF74BF00338391 /* XPCKit.framework in Frameworks */,
230 | );
231 | runOnlyForDeploymentPostprocessing = 0;
232 | };
233 | 1EEDD07213DD48D800D5AEC3 /* Frameworks */ = {
234 | isa = PBXFrameworksBuildPhase;
235 | buildActionMask = 2147483647;
236 | files = (
237 | 1EEDD0BA13DE7A1000D5AEC3 /* libXPCKit.a in Frameworks */,
238 | 1EEDD0B713DE79D200D5AEC3 /* Foundation.framework in Frameworks */,
239 | );
240 | runOnlyForDeploymentPostprocessing = 0;
241 | };
242 | 1EEDD0CB13DE9FAB00D5AEC3 /* Frameworks */ = {
243 | isa = PBXFrameworksBuildPhase;
244 | buildActionMask = 2147483647;
245 | files = (
246 | 1E835CB113DF748000338391 /* Foundation.framework in Frameworks */,
247 | );
248 | runOnlyForDeploymentPostprocessing = 0;
249 | };
250 | /* End PBXFrameworksBuildPhase section */
251 |
252 | /* Begin PBXGroup section */
253 | 1EEDD01D13DD485400D5AEC3 = {
254 | isa = PBXGroup;
255 | children = (
256 | 1EEDD0ED13DEB01F00D5AEC3 /* Foundation.framework */,
257 | 1EEDD03113DD485400D5AEC3 /* XPCKit */,
258 | 1EEDD04313DD485400D5AEC3 /* XPCKitTests */,
259 | 1EEDD05C13DD48BB00D5AEC3 /* TestApp */,
260 | 1EEDD07613DD48D800D5AEC3 /* TestService */,
261 | 1EEDD02A13DD485400D5AEC3 /* Frameworks */,
262 | 1EEDD02913DD485400D5AEC3 /* Products */,
263 | );
264 | sourceTree = "";
265 | };
266 | 1EEDD02913DD485400D5AEC3 /* Products */ = {
267 | isa = PBXGroup;
268 | children = (
269 | 1EEDD02813DD485400D5AEC3 /* libXPCKit.a */,
270 | 1EEDD03C13DD485400D5AEC3 /* XPCKitTests.octest */,
271 | 1EEDD05913DD48BB00D5AEC3 /* TestApp.app */,
272 | 1EEDD07513DD48D800D5AEC3 /* com.mustacheware.TestService.xpc */,
273 | 1EEDD0CF13DE9FAB00D5AEC3 /* XPCKit.framework */,
274 | );
275 | name = Products;
276 | sourceTree = "";
277 | };
278 | 1EEDD02A13DD485400D5AEC3 /* Frameworks */ = {
279 | isa = PBXGroup;
280 | children = (
281 | 1EEDD0EB13DEA0A400D5AEC3 /* Cocoa.framework */,
282 | 1EEDD0B613DE79D200D5AEC3 /* Foundation.framework */,
283 | 1EEDD03D13DD485400D5AEC3 /* SenTestingKit.framework */,
284 | );
285 | name = Frameworks;
286 | sourceTree = "";
287 | };
288 | 1EEDD03113DD485400D5AEC3 /* XPCKit */ = {
289 | isa = PBXGroup;
290 | children = (
291 | 1EEDD0A013DE642200D5AEC3 /* Extensions */,
292 | 1EEDD03213DD485400D5AEC3 /* Supporting Files */,
293 | 1EEDD03413DD485400D5AEC3 /* XPCKit.h */,
294 | 1EEDD0C413DE8D0F00D5AEC3 /* XPCTypes.h */,
295 | 1EEDD0AE13DE680500D5AEC3 /* XPCExtensions.h */,
296 | 1EEDD08613DD508C00D5AEC3 /* XPCConnection.h */,
297 | 1EEDD08713DD508C00D5AEC3 /* XPCConnection.m */,
298 | 1E5F84A613E10DB700234F31 /* XPCService.h */,
299 | 1E5F84A713E10DB700234F31 /* XPCService.m */,
300 | 1EEDD0EF13DEB96F00D5AEC3 /* XPCUUID.h */,
301 | 1EEDD0F013DEB97000D5AEC3 /* XPCUUID.m */,
302 | );
303 | path = XPCKit;
304 | sourceTree = "";
305 | };
306 | 1EEDD03213DD485400D5AEC3 /* Supporting Files */ = {
307 | isa = PBXGroup;
308 | children = (
309 | 1EEDD0D313DE9FAB00D5AEC3 /* XPCKit-Info.plist */,
310 | 1EEDD0D413DE9FAB00D5AEC3 /* InfoPlist.strings */,
311 | 1EEDD03313DD485400D5AEC3 /* XPCKit-Prefix.pch */,
312 | );
313 | name = "Supporting Files";
314 | sourceTree = "";
315 | };
316 | 1EEDD04313DD485400D5AEC3 /* XPCKitTests */ = {
317 | isa = PBXGroup;
318 | children = (
319 | 1EEDD04913DD485400D5AEC3 /* XPCKitTests.h */,
320 | 1EEDD04B13DD485400D5AEC3 /* XPCKitTests.m */,
321 | 1EEDD04413DD485400D5AEC3 /* Supporting Files */,
322 | );
323 | path = XPCKitTests;
324 | sourceTree = "";
325 | };
326 | 1EEDD04413DD485400D5AEC3 /* Supporting Files */ = {
327 | isa = PBXGroup;
328 | children = (
329 | 1EEDD04513DD485400D5AEC3 /* XPCKitTests-Info.plist */,
330 | 1EEDD04613DD485400D5AEC3 /* InfoPlist.strings */,
331 | );
332 | name = "Supporting Files";
333 | sourceTree = "";
334 | };
335 | 1EEDD05C13DD48BB00D5AEC3 /* TestApp */ = {
336 | isa = PBXGroup;
337 | children = (
338 | 1EEDD06813DD48BB00D5AEC3 /* TestAppAppDelegate.h */,
339 | 1EEDD06913DD48BB00D5AEC3 /* TestAppAppDelegate.m */,
340 | 1EEDD06B13DD48BC00D5AEC3 /* MainMenu.xib */,
341 | 1EEDD05D13DD48BB00D5AEC3 /* Supporting Files */,
342 | );
343 | path = TestApp;
344 | sourceTree = "";
345 | };
346 | 1EEDD05D13DD48BB00D5AEC3 /* Supporting Files */ = {
347 | isa = PBXGroup;
348 | children = (
349 | 1EF4D9E5141C3EA2007BEEC0 /* TestApp.entitlements */,
350 | 1EEDD05E13DD48BB00D5AEC3 /* TestApp-Info.plist */,
351 | 1EEDD05F13DD48BB00D5AEC3 /* InfoPlist.strings */,
352 | 1EEDD06213DD48BB00D5AEC3 /* main.m */,
353 | 1EEDD06413DD48BB00D5AEC3 /* TestApp-Prefix.pch */,
354 | 1EEDD06513DD48BB00D5AEC3 /* Credits.rtf */,
355 | 1EEDD0B413DE6C5100D5AEC3 /* multiply.json */,
356 | );
357 | name = "Supporting Files";
358 | sourceTree = "";
359 | };
360 | 1EEDD07613DD48D800D5AEC3 /* TestService */ = {
361 | isa = PBXGroup;
362 | children = (
363 | 1EEDD07D13DD48D800D5AEC3 /* main.m */,
364 | 1EEDD07713DD48D800D5AEC3 /* Supporting Files */,
365 | );
366 | path = TestService;
367 | sourceTree = "";
368 | };
369 | 1EEDD07713DD48D800D5AEC3 /* Supporting Files */ = {
370 | isa = PBXGroup;
371 | children = (
372 | 1EEDD07813DD48D800D5AEC3 /* TestService-Info.plist */,
373 | 1EEDD07913DD48D800D5AEC3 /* InfoPlist.strings */,
374 | 1EEDD07C13DD48D800D5AEC3 /* TestService-Prefix.pch */,
375 | 1EF4D9E6141C3EEE007BEEC0 /* TestService.entitlements */,
376 | );
377 | name = "Supporting Files";
378 | sourceTree = "";
379 | };
380 | 1EEDD0A013DE642200D5AEC3 /* Extensions */ = {
381 | isa = PBXGroup;
382 | children = (
383 | 1EEDD09713DDC8A300D5AEC3 /* NSObject+XPCParse.h */,
384 | 1EEDD09813DDC8A300D5AEC3 /* NSObject+XPCParse.m */,
385 | 1EEDD08A13DDC34800D5AEC3 /* NSDictionary+XPCParse.h */,
386 | 1EEDD08B13DDC34800D5AEC3 /* NSDictionary+XPCParse.m */,
387 | 1EEDD0B013DE684300D5AEC3 /* NSArray+XPCParse.h */,
388 | 1EEDD0B113DE684300D5AEC3 /* NSArray+XPCParse.m */,
389 | 1EEDD08F13DDC48800D5AEC3 /* NSNumber+XPCParse.h */,
390 | 1EEDD09013DDC48800D5AEC3 /* NSNumber+XPCParse.m */,
391 | 1EEDD0A213DE65F800D5AEC3 /* NSData+XPCParse.h */,
392 | 1EEDD0A313DE65F800D5AEC3 /* NSData+XPCParse.m */,
393 | 1EEDD0AA13DE669D00D5AEC3 /* NSString+XPCParse.h */,
394 | 1EEDD0AB13DE669D00D5AEC3 /* NSString+XPCParse.m */,
395 | 1EF4D9DF141C38D0007BEEC0 /* NSFileHandle+XPCParse.h */,
396 | 1EF4D9E0141C38D0007BEEC0 /* NSFileHandle+XPCParse.m */,
397 | 1EB022A3141D9F3700BCC1FB /* NSDate+XPCParse.h */,
398 | 1EB022A4141D9F3700BCC1FB /* NSDate+XPCParse.m */,
399 | );
400 | name = Extensions;
401 | sourceTree = "";
402 | };
403 | /* End PBXGroup section */
404 |
405 | /* Begin PBXHeadersBuildPhase section */
406 | 1EEDD02613DD485400D5AEC3 /* Headers */ = {
407 | isa = PBXHeadersBuildPhase;
408 | buildActionMask = 2147483647;
409 | files = (
410 | 1EEDD08813DD508C00D5AEC3 /* XPCConnection.h in Headers */,
411 | 1EEDD08C13DDC34800D5AEC3 /* NSDictionary+XPCParse.h in Headers */,
412 | 1EEDD09113DDC48800D5AEC3 /* NSNumber+XPCParse.h in Headers */,
413 | 1EEDD09913DDC8A300D5AEC3 /* NSObject+XPCParse.h in Headers */,
414 | 1EEDD0A413DE65F800D5AEC3 /* NSData+XPCParse.h in Headers */,
415 | 1EEDD0AC13DE669E00D5AEC3 /* NSString+XPCParse.h in Headers */,
416 | 1EEDD0AF13DE680500D5AEC3 /* XPCExtensions.h in Headers */,
417 | 1EEDD0B213DE684300D5AEC3 /* NSArray+XPCParse.h in Headers */,
418 | 1EEDD0C513DE8D0F00D5AEC3 /* XPCTypes.h in Headers */,
419 | 1EEDD0F213DEB97000D5AEC3 /* XPCUUID.h in Headers */,
420 | 1E5F84A913E10DB700234F31 /* XPCService.h in Headers */,
421 | 1EF4D9E2141C38D0007BEEC0 /* NSFileHandle+XPCParse.h in Headers */,
422 | 1EB022A6141D9F3700BCC1FB /* NSDate+XPCParse.h in Headers */,
423 | );
424 | runOnlyForDeploymentPostprocessing = 0;
425 | };
426 | 1EEDD0CC13DE9FAB00D5AEC3 /* Headers */ = {
427 | isa = PBXHeadersBuildPhase;
428 | buildActionMask = 2147483647;
429 | files = (
430 | 1EF4D9D4141C36AA007BEEC0 /* NSObject+XPCParse.h in Headers */,
431 | 1EF4D9D5141C36AA007BEEC0 /* NSDictionary+XPCParse.h in Headers */,
432 | 1EF4D9D6141C36AA007BEEC0 /* NSArray+XPCParse.h in Headers */,
433 | 1EF4D9D7141C36AA007BEEC0 /* NSNumber+XPCParse.h in Headers */,
434 | 1EF4D9D8141C36AA007BEEC0 /* NSData+XPCParse.h in Headers */,
435 | 1EF4D9D9141C36AA007BEEC0 /* NSString+XPCParse.h in Headers */,
436 | 1EF4D9DA141C36AA007BEEC0 /* XPCKit.h in Headers */,
437 | 1EF4D9DB141C36AA007BEEC0 /* XPCTypes.h in Headers */,
438 | 1EF4D9DC141C36AA007BEEC0 /* XPCExtensions.h in Headers */,
439 | 1EF4D9DD141C36AA007BEEC0 /* XPCConnection.h in Headers */,
440 | 1E5F84A813E10DB700234F31 /* XPCService.h in Headers */,
441 | 1EF4D9E1141C38D0007BEEC0 /* NSFileHandle+XPCParse.h in Headers */,
442 | 1EEDD0F113DEB97000D5AEC3 /* XPCUUID.h in Headers */,
443 | 1EB022A5141D9F3700BCC1FB /* NSDate+XPCParse.h in Headers */,
444 | );
445 | runOnlyForDeploymentPostprocessing = 0;
446 | };
447 | /* End PBXHeadersBuildPhase section */
448 |
449 | /* Begin PBXNativeTarget section */
450 | 1EEDD02713DD485400D5AEC3 /* libXPCKit */ = {
451 | isa = PBXNativeTarget;
452 | buildConfigurationList = 1EEDD04F13DD485400D5AEC3 /* Build configuration list for PBXNativeTarget "libXPCKit" */;
453 | buildPhases = (
454 | 1EEDD02413DD485400D5AEC3 /* Sources */,
455 | 1EEDD02513DD485400D5AEC3 /* Frameworks */,
456 | 1EEDD02613DD485400D5AEC3 /* Headers */,
457 | );
458 | buildRules = (
459 | );
460 | dependencies = (
461 | );
462 | name = libXPCKit;
463 | productName = XPCKit;
464 | productReference = 1EEDD02813DD485400D5AEC3 /* libXPCKit.a */;
465 | productType = "com.apple.product-type.library.static";
466 | };
467 | 1EEDD03B13DD485400D5AEC3 /* XPCKitTests */ = {
468 | isa = PBXNativeTarget;
469 | buildConfigurationList = 1EEDD05213DD485400D5AEC3 /* Build configuration list for PBXNativeTarget "XPCKitTests" */;
470 | buildPhases = (
471 | 1EEDD03713DD485400D5AEC3 /* Sources */,
472 | 1EEDD03813DD485400D5AEC3 /* Frameworks */,
473 | 1EEDD03913DD485400D5AEC3 /* Resources */,
474 | 1EEDD03A13DD485400D5AEC3 /* ShellScript */,
475 | );
476 | buildRules = (
477 | );
478 | dependencies = (
479 | 1EEDD04113DD485400D5AEC3 /* PBXTargetDependency */,
480 | );
481 | name = XPCKitTests;
482 | productName = XPCKitTests;
483 | productReference = 1EEDD03C13DD485400D5AEC3 /* XPCKitTests.octest */;
484 | productType = "com.apple.product-type.bundle";
485 | };
486 | 1EEDD05813DD48BB00D5AEC3 /* TestApp */ = {
487 | isa = PBXNativeTarget;
488 | buildConfigurationList = 1EEDD06E13DD48BC00D5AEC3 /* Build configuration list for PBXNativeTarget "TestApp" */;
489 | buildPhases = (
490 | 1E835CB413DF74C300338391 /* Copy Frameworks */,
491 | 1EEDD08413DD497A00D5AEC3 /* Copy Services */,
492 | 1EEDD05713DD48BB00D5AEC3 /* Resources */,
493 | 1EEDD05513DD48BB00D5AEC3 /* Sources */,
494 | 1EEDD05613DD48BB00D5AEC3 /* Frameworks */,
495 | );
496 | buildRules = (
497 | );
498 | dependencies = (
499 | 1EEDD09513DDC6A300D5AEC3 /* PBXTargetDependency */,
500 | 1EEDD08313DD497400D5AEC3 /* PBXTargetDependency */,
501 | );
502 | name = TestApp;
503 | productName = TestApp;
504 | productReference = 1EEDD05913DD48BB00D5AEC3 /* TestApp.app */;
505 | productType = "com.apple.product-type.application";
506 | };
507 | 1EEDD07413DD48D800D5AEC3 /* TestService */ = {
508 | isa = PBXNativeTarget;
509 | buildConfigurationList = 1EEDD07F13DD48D800D5AEC3 /* Build configuration list for PBXNativeTarget "TestService" */;
510 | buildPhases = (
511 | 1EEDD07113DD48D800D5AEC3 /* Sources */,
512 | 1EEDD07213DD48D800D5AEC3 /* Frameworks */,
513 | 1EEDD07313DD48D800D5AEC3 /* Resources */,
514 | );
515 | buildRules = (
516 | );
517 | dependencies = (
518 | 1EEDD0B913DE7A0D00D5AEC3 /* PBXTargetDependency */,
519 | );
520 | name = TestService;
521 | productName = TestService;
522 | productReference = 1EEDD07513DD48D800D5AEC3 /* com.mustacheware.TestService.xpc */;
523 | productType = "com.apple.product-type.bundle";
524 | };
525 | 1EEDD0CE13DE9FAB00D5AEC3 /* XPCKit */ = {
526 | isa = PBXNativeTarget;
527 | buildConfigurationList = 1EEDD0DB13DE9FAB00D5AEC3 /* Build configuration list for PBXNativeTarget "XPCKit" */;
528 | buildPhases = (
529 | 1EEDD0CA13DE9FAB00D5AEC3 /* Sources */,
530 | 1EEDD0CB13DE9FAB00D5AEC3 /* Frameworks */,
531 | 1EEDD0CC13DE9FAB00D5AEC3 /* Headers */,
532 | 1EEDD0CD13DE9FAB00D5AEC3 /* Resources */,
533 | );
534 | buildRules = (
535 | );
536 | dependencies = (
537 | );
538 | name = XPCKit;
539 | productName = XPCKit;
540 | productReference = 1EEDD0CF13DE9FAB00D5AEC3 /* XPCKit.framework */;
541 | productType = "com.apple.product-type.framework";
542 | };
543 | /* End PBXNativeTarget section */
544 |
545 | /* Begin PBXProject section */
546 | 1EEDD01F13DD485400D5AEC3 /* Project object */ = {
547 | isa = PBXProject;
548 | attributes = {
549 | ORGANIZATIONNAME = Mustacheware;
550 | };
551 | buildConfigurationList = 1EEDD02213DD485400D5AEC3 /* Build configuration list for PBXProject "XPCKit" */;
552 | compatibilityVersion = "Xcode 3.2";
553 | developmentRegion = English;
554 | hasScannedForEncodings = 0;
555 | knownRegions = (
556 | en,
557 | );
558 | mainGroup = 1EEDD01D13DD485400D5AEC3;
559 | productRefGroup = 1EEDD02913DD485400D5AEC3 /* Products */;
560 | projectDirPath = "";
561 | projectRoot = "";
562 | targets = (
563 | 1EEDD0CE13DE9FAB00D5AEC3 /* XPCKit */,
564 | 1EEDD02713DD485400D5AEC3 /* libXPCKit */,
565 | 1EEDD05813DD48BB00D5AEC3 /* TestApp */,
566 | 1EEDD07413DD48D800D5AEC3 /* TestService */,
567 | 1EEDD03B13DD485400D5AEC3 /* XPCKitTests */,
568 | );
569 | };
570 | /* End PBXProject section */
571 |
572 | /* Begin PBXResourcesBuildPhase section */
573 | 1EEDD03913DD485400D5AEC3 /* Resources */ = {
574 | isa = PBXResourcesBuildPhase;
575 | buildActionMask = 2147483647;
576 | files = (
577 | 1EEDD04813DD485400D5AEC3 /* InfoPlist.strings in Resources */,
578 | 1EEDD04A13DD485400D5AEC3 /* XPCKitTests.h in Resources */,
579 | );
580 | runOnlyForDeploymentPostprocessing = 0;
581 | };
582 | 1EEDD05713DD48BB00D5AEC3 /* Resources */ = {
583 | isa = PBXResourcesBuildPhase;
584 | buildActionMask = 2147483647;
585 | files = (
586 | 1EEDD06113DD48BB00D5AEC3 /* InfoPlist.strings in Resources */,
587 | 1EEDD06713DD48BB00D5AEC3 /* Credits.rtf in Resources */,
588 | 1EEDD06D13DD48BC00D5AEC3 /* MainMenu.xib in Resources */,
589 | 1EEDD0B513DE6CA700D5AEC3 /* multiply.json in Resources */,
590 | );
591 | runOnlyForDeploymentPostprocessing = 0;
592 | };
593 | 1EEDD07313DD48D800D5AEC3 /* Resources */ = {
594 | isa = PBXResourcesBuildPhase;
595 | buildActionMask = 2147483647;
596 | files = (
597 | 1EEDD07B13DD48D800D5AEC3 /* InfoPlist.strings in Resources */,
598 | 1EF4D9E7141C3EEE007BEEC0 /* TestService.entitlements in Resources */,
599 | );
600 | runOnlyForDeploymentPostprocessing = 0;
601 | };
602 | 1EEDD0CD13DE9FAB00D5AEC3 /* Resources */ = {
603 | isa = PBXResourcesBuildPhase;
604 | buildActionMask = 2147483647;
605 | files = (
606 | 1EEDD0D613DE9FAB00D5AEC3 /* InfoPlist.strings in Resources */,
607 | );
608 | runOnlyForDeploymentPostprocessing = 0;
609 | };
610 | /* End PBXResourcesBuildPhase section */
611 |
612 | /* Begin PBXShellScriptBuildPhase section */
613 | 1EEDD03A13DD485400D5AEC3 /* ShellScript */ = {
614 | isa = PBXShellScriptBuildPhase;
615 | buildActionMask = 2147483647;
616 | files = (
617 | );
618 | inputPaths = (
619 | );
620 | outputPaths = (
621 | );
622 | runOnlyForDeploymentPostprocessing = 0;
623 | shellPath = /bin/sh;
624 | shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
625 | };
626 | /* End PBXShellScriptBuildPhase section */
627 |
628 | /* Begin PBXSourcesBuildPhase section */
629 | 1EEDD02413DD485400D5AEC3 /* Sources */ = {
630 | isa = PBXSourcesBuildPhase;
631 | buildActionMask = 2147483647;
632 | files = (
633 | 1EEDD08913DD508C00D5AEC3 /* XPCConnection.m in Sources */,
634 | 1EEDD0F413DEB97000D5AEC3 /* XPCUUID.m in Sources */,
635 | 1E5F84AB13E10DB700234F31 /* XPCService.m in Sources */,
636 | 1EEDD09A13DDC8A300D5AEC3 /* NSObject+XPCParse.m in Sources */,
637 | 1EEDD0A513DE65F800D5AEC3 /* NSData+XPCParse.m in Sources */,
638 | 1EEDD0AD13DE669E00D5AEC3 /* NSString+XPCParse.m in Sources */,
639 | 1EEDD09213DDC48800D5AEC3 /* NSNumber+XPCParse.m in Sources */,
640 | 1EEDD0B313DE684300D5AEC3 /* NSArray+XPCParse.m in Sources */,
641 | 1EEDD08D13DDC34800D5AEC3 /* NSDictionary+XPCParse.m in Sources */,
642 | 1EF4D9E4141C38D0007BEEC0 /* NSFileHandle+XPCParse.m in Sources */,
643 | 1EB022A8141D9F3700BCC1FB /* NSDate+XPCParse.m in Sources */,
644 | );
645 | runOnlyForDeploymentPostprocessing = 0;
646 | };
647 | 1EEDD03713DD485400D5AEC3 /* Sources */ = {
648 | isa = PBXSourcesBuildPhase;
649 | buildActionMask = 2147483647;
650 | files = (
651 | 1EEDD04C13DD485400D5AEC3 /* XPCKitTests.m in Sources */,
652 | 1EEDD08E13DDC34800D5AEC3 /* NSDictionary+XPCParse.m in Sources */,
653 | 1EEDD09313DDC48800D5AEC3 /* NSNumber+XPCParse.m in Sources */,
654 | 1EEDD09B13DDC8A300D5AEC3 /* NSObject+XPCParse.m in Sources */,
655 | );
656 | runOnlyForDeploymentPostprocessing = 0;
657 | };
658 | 1EEDD05513DD48BB00D5AEC3 /* Sources */ = {
659 | isa = PBXSourcesBuildPhase;
660 | buildActionMask = 2147483647;
661 | files = (
662 | 1EEDD06313DD48BB00D5AEC3 /* main.m in Sources */,
663 | 1EEDD06A13DD48BB00D5AEC3 /* TestAppAppDelegate.m in Sources */,
664 | );
665 | runOnlyForDeploymentPostprocessing = 0;
666 | };
667 | 1EEDD07113DD48D800D5AEC3 /* Sources */ = {
668 | isa = PBXSourcesBuildPhase;
669 | buildActionMask = 2147483647;
670 | files = (
671 | 1EEDD07E13DD48D800D5AEC3 /* main.m in Sources */,
672 | );
673 | runOnlyForDeploymentPostprocessing = 0;
674 | };
675 | 1EEDD0CA13DE9FAB00D5AEC3 /* Sources */ = {
676 | isa = PBXSourcesBuildPhase;
677 | buildActionMask = 2147483647;
678 | files = (
679 | 1EEDD0E413DEA04900D5AEC3 /* XPCConnection.m in Sources */,
680 | 1EEDD0F313DEB97000D5AEC3 /* XPCUUID.m in Sources */,
681 | 1E5F84AA13E10DB700234F31 /* XPCService.m in Sources */,
682 | 1EEDD0DE13DEA04900D5AEC3 /* NSObject+XPCParse.m in Sources */,
683 | 1EEDD0E213DEA04900D5AEC3 /* NSData+XPCParse.m in Sources */,
684 | 1EEDD0E313DEA04900D5AEC3 /* NSString+XPCParse.m in Sources */,
685 | 1EEDD0E113DEA04900D5AEC3 /* NSNumber+XPCParse.m in Sources */,
686 | 1EEDD0E013DEA04900D5AEC3 /* NSArray+XPCParse.m in Sources */,
687 | 1EEDD0DF13DEA04900D5AEC3 /* NSDictionary+XPCParse.m in Sources */,
688 | 1EF4D9E3141C38D0007BEEC0 /* NSFileHandle+XPCParse.m in Sources */,
689 | 1EB022A7141D9F3700BCC1FB /* NSDate+XPCParse.m in Sources */,
690 | );
691 | runOnlyForDeploymentPostprocessing = 0;
692 | };
693 | /* End PBXSourcesBuildPhase section */
694 |
695 | /* Begin PBXTargetDependency section */
696 | 1EEDD04113DD485400D5AEC3 /* PBXTargetDependency */ = {
697 | isa = PBXTargetDependency;
698 | target = 1EEDD02713DD485400D5AEC3 /* libXPCKit */;
699 | targetProxy = 1EEDD04013DD485400D5AEC3 /* PBXContainerItemProxy */;
700 | };
701 | 1EEDD08313DD497400D5AEC3 /* PBXTargetDependency */ = {
702 | isa = PBXTargetDependency;
703 | target = 1EEDD07413DD48D800D5AEC3 /* TestService */;
704 | targetProxy = 1EEDD08213DD497400D5AEC3 /* PBXContainerItemProxy */;
705 | };
706 | 1EEDD09513DDC6A300D5AEC3 /* PBXTargetDependency */ = {
707 | isa = PBXTargetDependency;
708 | target = 1EEDD02713DD485400D5AEC3 /* libXPCKit */;
709 | targetProxy = 1EEDD09413DDC6A300D5AEC3 /* PBXContainerItemProxy */;
710 | };
711 | 1EEDD0B913DE7A0D00D5AEC3 /* PBXTargetDependency */ = {
712 | isa = PBXTargetDependency;
713 | target = 1EEDD02713DD485400D5AEC3 /* libXPCKit */;
714 | targetProxy = 1EEDD0B813DE7A0D00D5AEC3 /* PBXContainerItemProxy */;
715 | };
716 | /* End PBXTargetDependency section */
717 |
718 | /* Begin PBXVariantGroup section */
719 | 1EEDD04613DD485400D5AEC3 /* InfoPlist.strings */ = {
720 | isa = PBXVariantGroup;
721 | children = (
722 | 1EEDD04713DD485400D5AEC3 /* en */,
723 | );
724 | name = InfoPlist.strings;
725 | sourceTree = "";
726 | };
727 | 1EEDD05F13DD48BB00D5AEC3 /* InfoPlist.strings */ = {
728 | isa = PBXVariantGroup;
729 | children = (
730 | 1EEDD06013DD48BB00D5AEC3 /* en */,
731 | );
732 | name = InfoPlist.strings;
733 | sourceTree = "";
734 | };
735 | 1EEDD06513DD48BB00D5AEC3 /* Credits.rtf */ = {
736 | isa = PBXVariantGroup;
737 | children = (
738 | 1EEDD06613DD48BB00D5AEC3 /* en */,
739 | );
740 | name = Credits.rtf;
741 | sourceTree = "";
742 | };
743 | 1EEDD06B13DD48BC00D5AEC3 /* MainMenu.xib */ = {
744 | isa = PBXVariantGroup;
745 | children = (
746 | 1EEDD06C13DD48BC00D5AEC3 /* en */,
747 | );
748 | name = MainMenu.xib;
749 | sourceTree = "";
750 | };
751 | 1EEDD07913DD48D800D5AEC3 /* InfoPlist.strings */ = {
752 | isa = PBXVariantGroup;
753 | children = (
754 | 1EEDD07A13DD48D800D5AEC3 /* en */,
755 | );
756 | name = InfoPlist.strings;
757 | sourceTree = "";
758 | };
759 | 1EEDD0D413DE9FAB00D5AEC3 /* InfoPlist.strings */ = {
760 | isa = PBXVariantGroup;
761 | children = (
762 | 1EEDD0D513DE9FAB00D5AEC3 /* en */,
763 | );
764 | name = InfoPlist.strings;
765 | sourceTree = "";
766 | };
767 | /* End PBXVariantGroup section */
768 |
769 | /* Begin XCBuildConfiguration section */
770 | 1EEDD04D13DD485400D5AEC3 /* Debug */ = {
771 | isa = XCBuildConfiguration;
772 | buildSettings = {
773 | ALWAYS_SEARCH_USER_PATHS = NO;
774 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
775 | COPY_PHASE_STRIP = NO;
776 | GCC_C_LANGUAGE_STANDARD = gnu99;
777 | GCC_DYNAMIC_NO_PIC = NO;
778 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
779 | GCC_OPTIMIZATION_LEVEL = 0;
780 | GCC_PREPROCESSOR_DEFINITIONS = (
781 | "DEBUG=1",
782 | "$(inherited)",
783 | );
784 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
785 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
786 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
787 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
788 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
789 | GCC_WARN_UNUSED_VARIABLE = YES;
790 | MACOSX_DEPLOYMENT_TARGET = 10.7;
791 | ONLY_ACTIVE_ARCH = NO;
792 | SDKROOT = macosx;
793 | };
794 | name = Debug;
795 | };
796 | 1EEDD04E13DD485400D5AEC3 /* Release */ = {
797 | isa = XCBuildConfiguration;
798 | buildSettings = {
799 | ALWAYS_SEARCH_USER_PATHS = NO;
800 | ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
801 | COPY_PHASE_STRIP = YES;
802 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
803 | GCC_C_LANGUAGE_STANDARD = gnu99;
804 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
805 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
806 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
807 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
808 | GCC_WARN_ABOUT_RETURN_TYPE = YES;
809 | GCC_WARN_UNUSED_VARIABLE = YES;
810 | MACOSX_DEPLOYMENT_TARGET = 10.7;
811 | SDKROOT = macosx;
812 | };
813 | name = Release;
814 | };
815 | 1EEDD05013DD485400D5AEC3 /* Debug */ = {
816 | isa = XCBuildConfiguration;
817 | buildSettings = {
818 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
819 | GCC_PREFIX_HEADER = "XPCKit/XPCKit-Prefix.pch";
820 | PRODUCT_NAME = XPCKit;
821 | };
822 | name = Debug;
823 | };
824 | 1EEDD05113DD485400D5AEC3 /* Release */ = {
825 | isa = XCBuildConfiguration;
826 | buildSettings = {
827 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
828 | GCC_PREFIX_HEADER = "XPCKit/XPCKit-Prefix.pch";
829 | PRODUCT_NAME = XPCKit;
830 | };
831 | name = Release;
832 | };
833 | 1EEDD05313DD485400D5AEC3 /* Debug */ = {
834 | isa = XCBuildConfiguration;
835 | buildSettings = {
836 | FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
837 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
838 | GCC_PREFIX_HEADER = "XPCKit/XPCKit-Prefix.pch";
839 | INFOPLIST_FILE = "XPCKitTests/XPCKitTests-Info.plist";
840 | OTHER_LDFLAGS = (
841 | "-ObjC",
842 | "-all_load",
843 | );
844 | PRODUCT_NAME = "$(TARGET_NAME)";
845 | WRAPPER_EXTENSION = octest;
846 | };
847 | name = Debug;
848 | };
849 | 1EEDD05413DD485400D5AEC3 /* Release */ = {
850 | isa = XCBuildConfiguration;
851 | buildSettings = {
852 | FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
853 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
854 | GCC_PREFIX_HEADER = "XPCKit/XPCKit-Prefix.pch";
855 | INFOPLIST_FILE = "XPCKitTests/XPCKitTests-Info.plist";
856 | OTHER_LDFLAGS = (
857 | "-ObjC",
858 | "-all_load",
859 | );
860 | PRODUCT_NAME = "$(TARGET_NAME)";
861 | WRAPPER_EXTENSION = octest;
862 | };
863 | name = Release;
864 | };
865 | 1EEDD06F13DD48BC00D5AEC3 /* Debug */ = {
866 | isa = XCBuildConfiguration;
867 | buildSettings = {
868 | CODE_SIGN_ENTITLEMENTS = TestApp/TestApp.entitlements;
869 | CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application";
870 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
871 | GCC_PREFIX_HEADER = "TestApp/TestApp-Prefix.pch";
872 | INFOPLIST_FILE = "TestApp/TestApp-Info.plist";
873 | OTHER_LDFLAGS = "-ObjC";
874 | PRODUCT_NAME = "$(TARGET_NAME)";
875 | WRAPPER_EXTENSION = app;
876 | };
877 | name = Debug;
878 | };
879 | 1EEDD07013DD48BC00D5AEC3 /* Release */ = {
880 | isa = XCBuildConfiguration;
881 | buildSettings = {
882 | CODE_SIGN_ENTITLEMENTS = TestApp/TestApp.entitlements;
883 | CODE_SIGN_IDENTITY = "3rd Party Mac Developer Application";
884 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
885 | GCC_PREFIX_HEADER = "TestApp/TestApp-Prefix.pch";
886 | INFOPLIST_FILE = "TestApp/TestApp-Info.plist";
887 | OTHER_LDFLAGS = "-ObjC";
888 | PRODUCT_NAME = "$(TARGET_NAME)";
889 | WRAPPER_EXTENSION = app;
890 | };
891 | name = Release;
892 | };
893 | 1EEDD08013DD48D800D5AEC3 /* Debug */ = {
894 | isa = XCBuildConfiguration;
895 | buildSettings = {
896 | CODE_SIGN_ENTITLEMENTS = TestService/TestService.entitlements;
897 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
898 | GCC_PREFIX_HEADER = "TestService/TestService-Prefix.pch";
899 | INFOPLIST_FILE = "TestService/TestService-Info.plist";
900 | MACH_O_TYPE = mh_execute;
901 | OTHER_LDFLAGS = (
902 | "-ObjC",
903 | "-all_load",
904 | );
905 | PRODUCT_NAME = "com.mustacheware.$(TARGET_NAME)";
906 | WRAPPER_EXTENSION = xpc;
907 | };
908 | name = Debug;
909 | };
910 | 1EEDD08113DD48D800D5AEC3 /* Release */ = {
911 | isa = XCBuildConfiguration;
912 | buildSettings = {
913 | CODE_SIGN_ENTITLEMENTS = TestService/TestService.entitlements;
914 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
915 | GCC_PREFIX_HEADER = "TestService/TestService-Prefix.pch";
916 | INFOPLIST_FILE = "TestService/TestService-Info.plist";
917 | MACH_O_TYPE = mh_execute;
918 | OTHER_LDFLAGS = (
919 | "-ObjC",
920 | "-all_load",
921 | );
922 | PRODUCT_NAME = "com.mustacheware.$(TARGET_NAME)";
923 | WRAPPER_EXTENSION = xpc;
924 | };
925 | name = Release;
926 | };
927 | 1EEDD0DC13DE9FAB00D5AEC3 /* Debug */ = {
928 | isa = XCBuildConfiguration;
929 | buildSettings = {
930 | DYLIB_COMPATIBILITY_VERSION = 1;
931 | DYLIB_CURRENT_VERSION = 1;
932 | FRAMEWORK_VERSION = A;
933 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
934 | GCC_PREFIX_HEADER = "XPCKit/XPCKit-Prefix.pch";
935 | INFOPLIST_FILE = "XPCKit/XPCKit-Info.plist";
936 | INSTALL_PATH = "@rpath/../Frameworks";
937 | PRODUCT_NAME = "$(TARGET_NAME)";
938 | WRAPPER_EXTENSION = framework;
939 | };
940 | name = Debug;
941 | };
942 | 1EEDD0DD13DE9FAB00D5AEC3 /* Release */ = {
943 | isa = XCBuildConfiguration;
944 | buildSettings = {
945 | DYLIB_COMPATIBILITY_VERSION = 1;
946 | DYLIB_CURRENT_VERSION = 1;
947 | FRAMEWORK_VERSION = A;
948 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
949 | GCC_PREFIX_HEADER = "XPCKit/XPCKit-Prefix.pch";
950 | INFOPLIST_FILE = "XPCKit/XPCKit-Info.plist";
951 | INSTALL_PATH = "@rpath/../Frameworks";
952 | PRODUCT_NAME = "$(TARGET_NAME)";
953 | WRAPPER_EXTENSION = framework;
954 | };
955 | name = Release;
956 | };
957 | /* End XCBuildConfiguration section */
958 |
959 | /* Begin XCConfigurationList section */
960 | 1EEDD02213DD485400D5AEC3 /* Build configuration list for PBXProject "XPCKit" */ = {
961 | isa = XCConfigurationList;
962 | buildConfigurations = (
963 | 1EEDD04D13DD485400D5AEC3 /* Debug */,
964 | 1EEDD04E13DD485400D5AEC3 /* Release */,
965 | );
966 | defaultConfigurationIsVisible = 0;
967 | defaultConfigurationName = Release;
968 | };
969 | 1EEDD04F13DD485400D5AEC3 /* Build configuration list for PBXNativeTarget "libXPCKit" */ = {
970 | isa = XCConfigurationList;
971 | buildConfigurations = (
972 | 1EEDD05013DD485400D5AEC3 /* Debug */,
973 | 1EEDD05113DD485400D5AEC3 /* Release */,
974 | );
975 | defaultConfigurationIsVisible = 0;
976 | defaultConfigurationName = Release;
977 | };
978 | 1EEDD05213DD485400D5AEC3 /* Build configuration list for PBXNativeTarget "XPCKitTests" */ = {
979 | isa = XCConfigurationList;
980 | buildConfigurations = (
981 | 1EEDD05313DD485400D5AEC3 /* Debug */,
982 | 1EEDD05413DD485400D5AEC3 /* Release */,
983 | );
984 | defaultConfigurationIsVisible = 0;
985 | defaultConfigurationName = Release;
986 | };
987 | 1EEDD06E13DD48BC00D5AEC3 /* Build configuration list for PBXNativeTarget "TestApp" */ = {
988 | isa = XCConfigurationList;
989 | buildConfigurations = (
990 | 1EEDD06F13DD48BC00D5AEC3 /* Debug */,
991 | 1EEDD07013DD48BC00D5AEC3 /* Release */,
992 | );
993 | defaultConfigurationIsVisible = 0;
994 | defaultConfigurationName = Release;
995 | };
996 | 1EEDD07F13DD48D800D5AEC3 /* Build configuration list for PBXNativeTarget "TestService" */ = {
997 | isa = XCConfigurationList;
998 | buildConfigurations = (
999 | 1EEDD08013DD48D800D5AEC3 /* Debug */,
1000 | 1EEDD08113DD48D800D5AEC3 /* Release */,
1001 | );
1002 | defaultConfigurationIsVisible = 0;
1003 | defaultConfigurationName = Release;
1004 | };
1005 | 1EEDD0DB13DE9FAB00D5AEC3 /* Build configuration list for PBXNativeTarget "XPCKit" */ = {
1006 | isa = XCConfigurationList;
1007 | buildConfigurations = (
1008 | 1EEDD0DC13DE9FAB00D5AEC3 /* Debug */,
1009 | 1EEDD0DD13DE9FAB00D5AEC3 /* Release */,
1010 | );
1011 | defaultConfigurationIsVisible = 0;
1012 | defaultConfigurationName = Release;
1013 | };
1014 | /* End XCConfigurationList section */
1015 | };
1016 | rootObject = 1EEDD01F13DD485400D5AEC3 /* Project object */;
1017 | }
1018 |
--------------------------------------------------------------------------------
/XPCKit.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/XPCKit/NSArray+XPCParse.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+XPCParse.h
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 | #import
22 |
23 | @interface NSArray (XPCParse)
24 |
25 | +(NSArray *)arrayWithContentsOfXPCObject:(xpc_object_t)object;
26 | -(xpc_object_t)newXPCObject;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/XPCKit/NSArray+XPCParse.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+XPCParse.m
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import "NSArray+XPCParse.h"
21 | #import "XPCExtensions.h"
22 |
23 | @implementation NSArray (XPCParse)
24 |
25 | +(NSArray *)arrayWithContentsOfXPCObject:(xpc_object_t)object{
26 | NSMutableArray *array = [NSMutableArray array];
27 | xpc_array_apply(object, ^_Bool(size_t index, xpc_object_t value) {
28 | id nsValue = [NSObject objectWithXPCObject:value];
29 | if(nsValue){
30 | [array insertObject:nsValue atIndex:index];
31 | }
32 | return true;
33 | });
34 | return [[array copy] autorelease];
35 | }
36 |
37 | -(xpc_object_t)newXPCObject{
38 | xpc_object_t array = xpc_array_create(NULL, 0);
39 | [self enumerateObjectsUsingBlock:^(id value, NSUInteger index, BOOL *stop) {
40 | if([value respondsToSelector:@selector(newXPCObject)]){
41 | xpc_object_t xpcValue = [value newXPCObject];
42 | xpc_array_set_value(array, XPC_ARRAY_APPEND, xpcValue);
43 | xpc_release(xpcValue);
44 | }
45 | }];
46 | return array;
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/XPCKit/NSData+XPCParse.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSData+XPCParse.h
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 | #import
22 |
23 | @interface NSData (XPCParse)
24 |
25 | +(NSData *)dataWithXPCObject:(xpc_object_t)xpc;
26 | -(xpc_object_t)newXPCObject;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/XPCKit/NSData+XPCParse.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSData+XPCParse.m
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import "NSData+XPCParse.h"
21 |
22 | @implementation NSData (XPCParse)
23 |
24 | +(NSData *)dataWithXPCObject:(xpc_object_t)xpcObject{
25 | NSData *data = nil;
26 | xpc_type_t type = xpc_get_type(xpcObject);
27 |
28 | // NOTE: mmap'd files do not work right now, this returns inconsistently-sized files for some reason.
29 | // Only remove the "NO &&" if you know what you're doing.
30 | if(NO && type == XPC_TYPE_SHMEM){
31 | void *buffer = NULL;
32 | size_t length = xpc_shmem_map(xpcObject, &buffer);
33 | if(length > 0){
34 | data = [NSData dataWithBytesNoCopy:buffer length:length freeWhenDone:NO];
35 | }
36 | }else if(type == XPC_TYPE_DATA){
37 | data = [NSData dataWithBytes:xpc_data_get_bytes_ptr(xpcObject)
38 | length:xpc_data_get_length(xpcObject)];
39 | }
40 | return data;
41 | }
42 |
43 | -(xpc_object_t)newXPCObject{
44 | return xpc_data_create([self bytes], [self length]);
45 | }
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/XPCKit/NSDate+XPCParse.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSDate+XPCParse.h
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 9/11/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 |
22 | @interface NSDate (NSDate_XPCParse)
23 |
24 | +(NSDate *)dateWithXPCObject:(xpc_object_t)xpc;
25 | -(xpc_object_t)newXPCObject;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/XPCKit/NSDate+XPCParse.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSDate+XPCParse.m
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 9/11/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import "NSDate+XPCParse.h"
21 | #import
22 |
23 | @implementation NSDate (XPCParse)
24 |
25 | +(NSDate *)dateWithXPCObject:(xpc_object_t)xpc{
26 | int64_t nanosecondsInterval = xpc_date_get_value(xpc);
27 | NSTimeInterval interval = nanosecondsInterval / 1000000000.;
28 | return [NSDate dateWithTimeIntervalSince1970:interval];
29 |
30 | }
31 |
32 | -(xpc_object_t)newXPCObject{
33 | return xpc_date_create((int64_t)([self timeIntervalSince1970] * 1000000000));
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/XPCKit/NSDictionary+XPCParse.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+XPCParse.h
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 | #import
22 |
23 | @interface NSDictionary (XPCParse)
24 |
25 | +(NSDictionary *)dictionaryWithContentsOfXPCObject:(xpc_object_t)object;
26 | -(xpc_object_t)newXPCObject;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/XPCKit/NSDictionary+XPCParse.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+XPCParse.m
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import "NSDictionary+XPCParse.h"
21 | #import "NSObject+XPCParse.h"
22 |
23 | @implementation NSDictionary (XPCParse)
24 |
25 | +(NSDictionary *)dictionaryWithContentsOfXPCObject:(xpc_object_t)object{
26 | NSMutableDictionary *dict = [NSMutableDictionary dictionary];
27 | xpc_dictionary_apply(object, ^bool(const char *key, xpc_object_t value){
28 | NSString *nsKey = [NSString stringWithCString:key encoding:NSUTF8StringEncoding];
29 | id nsValue = [NSObject objectWithXPCObject:value];
30 | if(nsKey && nsValue){
31 | [dict setObject:nsValue forKey:nsKey];
32 | }
33 | return true;
34 | });
35 | return [[dict copy] autorelease];
36 | }
37 |
38 | -(xpc_object_t)newXPCObject{
39 | xpc_object_t dictionary = xpc_dictionary_create(NULL, NULL, 0);
40 | for(NSString *key in [self allKeys]){
41 | id value = [self objectForKey:key];
42 | if([value respondsToSelector:@selector(newXPCObject)]){
43 | xpc_object_t xpcValue = [value newXPCObject];
44 | xpc_dictionary_set_value(dictionary, [key cStringUsingEncoding:NSUTF8StringEncoding], xpcValue);
45 | xpc_release(xpcValue);
46 | // }else{
47 | // NSLog(@"Error parsing %@: Cannot handle %@ data", key, [value class]);
48 | }
49 | }
50 | return dictionary;
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/XPCKit/NSFileHandle+XPCParse.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSFileHandle+XPCParse.h
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 9/10/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 |
22 | @interface NSFileHandle (XPCParse)
23 |
24 | +(NSFileHandle *)fileHandleWithXPCObject:(xpc_object_t)xpc;
25 | -(xpc_object_t)newXPCObject;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/XPCKit/NSFileHandle+XPCParse.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSFileHandle+XPCParse.m
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 9/10/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import "NSFileHandle+XPCParse.h"
21 |
22 | @implementation NSFileHandle (XPCParse)
23 |
24 | +(NSFileHandle *)fileHandleWithXPCObject:(xpc_object_t)xpc{
25 | int fd = xpc_fd_dup(xpc);
26 | NSFileHandle *handle = [[[NSFileHandle alloc] initWithFileDescriptor:fd closeOnDealloc:YES] autorelease];
27 | return handle;
28 | }
29 |
30 | -(xpc_object_t)newXPCObject{
31 | int fd = [self fileDescriptor];
32 | xpc_object_t object = xpc_fd_create(fd);
33 | return object;
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/XPCKit/NSNumber+XPCParse.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSNumber+XPCParse.h
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 |
22 | @interface NSNumber (XPCParse)
23 |
24 | +(NSNumber *)numberWithXPCObject:(xpc_object_t)xpc;
25 | -(xpc_object_t)newXPCObject;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/XPCKit/NSNumber+XPCParse.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSNumber+XPCParse.m
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import "NSNumber+XPCParse.h"
21 | #import
22 |
23 | @implementation NSNumber (XPCParse)
24 |
25 | +(NSNumber *)numberWithXPCObject:(xpc_object_t)xpc{
26 | NSNumber * object = nil;
27 | xpc_type_t type = xpc_get_type(xpc);
28 | if(type == XPC_TYPE_BOOL){
29 | object = [NSNumber numberWithBool:xpc_bool_get_value(xpc)];
30 | }else if(type == XPC_TYPE_UINT64){
31 | object = [NSNumber numberWithUnsignedLong:xpc_uint64_get_value(xpc)];
32 | }else if(type == XPC_TYPE_INT64){
33 | object = [NSNumber numberWithLong:xpc_int64_get_value(xpc)];
34 | }else if(type == XPC_TYPE_DOUBLE){
35 | object = [NSNumber numberWithDouble:xpc_double_get_value(xpc)];
36 | }
37 |
38 | return object;
39 | }
40 |
41 | -(xpc_object_t)newXPCObject{
42 | if(self == (NSNumber *)kCFBooleanTrue){
43 | return xpc_bool_create(true);
44 | }else if(self == (NSNumber *)kCFBooleanTrue){
45 | return xpc_bool_create(false);
46 | }else{
47 | const char* objCType = [self objCType];
48 | if(strcmp(objCType, @encode(unsigned long)) == 0){
49 | return xpc_uint64_create([self unsignedLongValue]);
50 | }else if(strcmp(objCType, @encode(long)) == 0){
51 | return xpc_int64_create([self longValue]);
52 | }else{
53 | return xpc_double_create([self doubleValue]);
54 | }
55 | }
56 | return NULL;
57 | }
58 |
59 | @end
60 |
--------------------------------------------------------------------------------
/XPCKit/NSObject+XPCParse.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+XPCParse.h
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 | #import
22 |
23 | @interface NSObject (XPCParse)
24 |
25 | +(id)objectWithXPCObject:(xpc_object_t)xpcObject;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/XPCKit/NSObject+XPCParse.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+XPCParse.m
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import "NSObject+XPCParse.h"
21 | #import
22 | #import "XPCExtensions.h"
23 |
24 | @implementation NSObject (XPCParse)
25 |
26 | +(id)objectWithXPCObject:(xpc_object_t)xpcObject{
27 | id object = nil;
28 | xpc_type_t type = xpc_get_type(xpcObject);
29 | if(type == XPC_TYPE_DICTIONARY){
30 | object = [NSDictionary dictionaryWithContentsOfXPCObject:xpcObject];
31 | }else if(type == XPC_TYPE_ARRAY){
32 | object = [NSArray arrayWithContentsOfXPCObject:xpcObject];
33 | }else if(type == XPC_TYPE_DATE){
34 | object = [NSDate dateWithXPCObject:xpcObject];
35 | }else if(type == XPC_TYPE_DATA || type == XPC_TYPE_SHMEM){
36 | object = [NSData dataWithXPCObject:xpcObject];
37 | }else if(type == XPC_TYPE_STRING){
38 | object = [NSString stringWithXPCObject:xpcObject];
39 | }else if(type == XPC_TYPE_UUID){
40 | object = [XPCUUID uuidWithXPCObject:xpcObject];
41 | }else if(type == XPC_TYPE_FD){
42 | object = [NSFileHandle fileHandleWithXPCObject:xpcObject];
43 | }else if(type == XPC_TYPE_BOOL || type == XPC_TYPE_UINT64 || type == XPC_TYPE_INT64 || type == XPC_TYPE_DOUBLE){
44 | object = [NSNumber numberWithXPCObject:xpcObject];
45 | }
46 | return object;
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/XPCKit/NSString+XPCParse.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+XPCParse.h
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 |
22 | @interface NSString (XPCParse)
23 |
24 | +(NSString *)stringWithXPCObject:(xpc_object_t)xpc;
25 | -(xpc_object_t)newXPCObject;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/XPCKit/NSString+XPCParse.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+XPCParse.m
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import "NSString+XPCParse.h"
21 |
22 | @implementation NSString (XPCParse)
23 |
24 | +(NSString *)stringWithXPCObject:(xpc_object_t)xpc{
25 | return [NSString stringWithUTF8String:xpc_string_get_string_ptr(xpc)];
26 | }
27 |
28 | -(xpc_object_t)newXPCObject{
29 | return xpc_string_create([self cStringUsingEncoding:NSUTF8StringEncoding]);
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/XPCKit/XPCConnection.h:
--------------------------------------------------------------------------------
1 | //
2 | // XPCConnection.h
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 | #import
22 | #import "XPCTypes.h"
23 |
24 | @interface XPCConnection : NSObject{
25 | xpc_connection_t _connection;
26 | dispatch_queue_t _dispatchQueue;
27 | XPCEventHandler _eventHandler;
28 | XPCConnectionHandler _connectionHandler;
29 | }
30 |
31 | - (id)initWithMachName:(NSString *)name listener:(BOOL)listen;
32 | - (id)initWithServiceName:(NSString *)serviceName;
33 | - (id)initWithConnection: (xpc_connection_t)connection;
34 |
35 | @property (nonatomic, copy) XPCEventHandler eventHandler;
36 | @property (nonatomic, copy) XPCConnectionHandler connectionHandler;
37 |
38 | @property (nonatomic, readonly) xpc_connection_t connection;
39 | @property (nonatomic, assign) dispatch_queue_t dispatchQueue;
40 |
41 | // connection properties
42 | @property (nonatomic, readonly) NSString *connectionName;
43 | @property (nonatomic, readonly) NSNumber *connectionEUID;
44 | @property (nonatomic, readonly) NSNumber *connectionEGID;
45 | @property (nonatomic, readonly) NSNumber *connectionProcessID;
46 | @property (nonatomic, readonly) NSString *connectionAuditSessionID;
47 |
48 | -(void)sendMessage:(NSDictionary *)message;
49 |
50 | -(void)suspend;
51 | -(void)resume;
52 |
53 | // handling connections
54 | -(void)receiveConnection:(xpc_connection_t)connection;
55 | @end
56 |
--------------------------------------------------------------------------------
/XPCKit/XPCConnection.m:
--------------------------------------------------------------------------------
1 | //
2 | // XPCConnection.m
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import "XPCConnection.h"
21 | #import
22 | #import "NSObject+XPCParse.h"
23 | #import "NSDictionary+XPCParse.h"
24 |
25 | #define XPCSendLogMessages 1
26 |
27 | @implementation XPCConnection
28 |
29 | @synthesize eventHandler=_eventHandler, dispatchQueue=_dispatchQueue, connection=_connection, connectionHandler=_connectionHandler;
30 |
31 | - (id)initWithMachName:(NSString *)name listener:(BOOL)listen{
32 | xpc_connection_t connection = xpc_connection_create_mach_service([name UTF8String], NULL, (listen ? XPC_CONNECTION_MACH_SERVICE_LISTENER : 0));
33 | self = [self initWithConnection:connection];
34 | xpc_release(connection);
35 | return self;
36 | }
37 |
38 | - (id)initWithServiceName:(NSString *)serviceName{
39 | xpc_connection_t connection = xpc_connection_create([serviceName cStringUsingEncoding:NSUTF8StringEncoding], NULL);
40 | self = [self initWithConnection:connection];
41 | xpc_release(connection);
42 | return self;
43 | }
44 |
45 | -(id)initWithConnection:(xpc_connection_t)connection{
46 | if(!connection){
47 | [self release];
48 | return nil;
49 | }
50 |
51 | if(self = [super init]){
52 | _connection = xpc_retain(connection);
53 | [self receiveConnection:_connection];
54 |
55 | dispatch_queue_t queue = dispatch_queue_create(xpc_connection_get_name(_connection), 0);
56 | self.dispatchQueue = queue;
57 | dispatch_release(queue);
58 |
59 | [self resume];
60 | }
61 | return self;
62 | }
63 |
64 | -(void)dealloc{
65 | if(_connection){
66 | xpc_connection_cancel(_connection);
67 | xpc_release(_connection);
68 | _connection = NULL;
69 | }
70 | if(_dispatchQueue){
71 | dispatch_release(_dispatchQueue);
72 | _dispatchQueue = NULL;
73 | }
74 |
75 | [super dealloc];
76 | }
77 |
78 | -(void)setDispatchQueue:(dispatch_queue_t)dispatchQueue{
79 | if(dispatchQueue){
80 | dispatch_retain(dispatchQueue);
81 | }
82 |
83 | if(_dispatchQueue){
84 | dispatch_release(_dispatchQueue);
85 | }
86 | _dispatchQueue = dispatchQueue;
87 |
88 | xpc_connection_set_target_queue(self.connection, self.dispatchQueue);
89 | }
90 |
91 | -(void)receiveConnection:(xpc_connection_t)connection{
92 | __block XPCConnection *this = self;
93 | xpc_connection_set_event_handler(connection, ^(xpc_object_t object){
94 | xpc_type_t type = xpc_get_type(object);
95 | if (type == XPC_TYPE_ERROR){
96 | // TODO: error handler or pass error to event handler
97 | char *errorDescription = xpc_copy_description(object);
98 | NSLog(@"XPCConnection - Error: %s", errorDescription);
99 | free(errorDescription);
100 | }else if(type == XPC_TYPE_CONNECTION){
101 | // used by mach listener connections, send to connection handler for accept/denial
102 | XPCConnection *connection = [[XPCConnection alloc] initWithConnection:object];
103 | if(this.connectionHandler){
104 | this.connectionHandler(connection);
105 | }
106 | [connection release];
107 | return;
108 | }else if(type == XPC_TYPE_DICTIONARY){
109 | id message = [NSObject objectWithXPCObject: object];
110 |
111 | #if XPCSendLogMessages
112 | if([message objectForKey:@"XPCDebugLog"]){
113 | NSLog(@"LOG: %@", [message objectForKey:@"XPCDebugLog"]);
114 | return;
115 | }
116 | #endif
117 |
118 | if(this.eventHandler){
119 | this.eventHandler(message, this);
120 | }
121 | }else{
122 | char *description = xpc_copy_description(object);
123 | NSLog(@"XPCConnection - unexpected event object: %s", description);
124 | free(description);
125 | }
126 | });
127 | }
128 |
129 | -(void)sendMessage:(NSDictionary *)aDictMessage{
130 | dispatch_async(self.dispatchQueue, ^{
131 | NSDictionary *dictMessage = aDictMessage;
132 | if(![dictMessage isKindOfClass:[NSDictionary class]]){
133 | dictMessage = [NSDictionary dictionaryWithObject:dictMessage forKey:@"contents"];
134 | }
135 |
136 | xpc_object_t message = NULL;
137 |
138 | // NSDate *date = [NSDate date];
139 | message = [dictMessage newXPCObject];
140 | // NSLog(@"Message encoding took %gs on average - %@", [[NSDate date] timeIntervalSinceDate:date], dictMessage);
141 |
142 | xpc_connection_send_message(_connection, message);
143 | xpc_release(message);
144 | });
145 | }
146 |
147 | -(NSString *)connectionName{
148 | __block char* name = NULL;
149 | dispatch_sync(self.dispatchQueue, ^{
150 | name = (char*)xpc_connection_get_name(_connection);
151 | });
152 | if(!name) return nil;
153 | return [NSString stringWithCString:name encoding:NSUTF8StringEncoding];
154 | }
155 |
156 | -(NSNumber *)connectionEUID{
157 | __block uid_t uid = 0;
158 | dispatch_sync(self.dispatchQueue, ^{
159 | uid = xpc_connection_get_euid(_connection);
160 | });
161 | return [NSNumber numberWithUnsignedInt:uid];
162 | }
163 |
164 | -(NSNumber *)connectionEGID{
165 | __block gid_t egid = 0;
166 | dispatch_sync(self.dispatchQueue, ^{
167 | egid = xpc_connection_get_egid(_connection);
168 | });
169 | return [NSNumber numberWithUnsignedInt:egid];
170 | }
171 |
172 | -(NSNumber *)connectionProcessID{
173 | __block pid_t pid = 0;
174 | dispatch_sync(self.dispatchQueue, ^{
175 | pid = xpc_connection_get_pid(_connection);
176 | });
177 | return [NSNumber numberWithUnsignedInt:pid];
178 | }
179 |
180 | -(NSNumber *)connectionAuditSessionID{
181 |
182 | __block au_asid_t auasid = 0;
183 | dispatch_sync(self.dispatchQueue, ^{
184 | auasid = xpc_connection_get_asid(_connection);
185 | });
186 | return [NSNumber numberWithUnsignedInt:auasid];
187 | }
188 |
189 | -(void)suspend{
190 | dispatch_async(self.dispatchQueue, ^{
191 | xpc_connection_suspend(_connection);
192 | });
193 | }
194 |
195 | -(void)resume{
196 | dispatch_async(self.dispatchQueue, ^{
197 | xpc_connection_resume(_connection);
198 | });
199 | }
200 |
201 | -(void)_sendLog:(NSString *)string{
202 | #if XPCSendLogMessages
203 | [self sendMessage:[NSDictionary dictionaryWithObject:string forKey:@"XPCDebugLog"]];
204 | #endif
205 | }
206 |
207 | @end
208 |
--------------------------------------------------------------------------------
/XPCKit/XPCExtensions.h:
--------------------------------------------------------------------------------
1 | //
2 | // XPCExtensions.h
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 | #import
22 |
23 | #import "NSObject+XPCParse.h"
24 |
25 | #import "NSDictionary+XPCParse.h"
26 | #import "NSArray+XPCParse.h"
27 |
28 | #import "NSNumber+XPCParse.h"
29 | #import "NSData+XPCParse.h"
30 | #import "NSString+XPCParse.h"
31 | #import "NSDate+XPCParse.h"
32 |
33 | #import "NSFileHandle+XPCParse.h"
34 |
35 | #import "XPCUUID.h"
36 |
--------------------------------------------------------------------------------
/XPCKit/XPCKit-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | com.mustacheware.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | FMWK
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | NSHumanReadableCopyright
26 | Copyright © 2011 Steve Streza. Licensed under the Apache 2.0 license.
27 | NSPrincipalClass
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/XPCKit/XPCKit-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'XPCKit' target in the 'XPCKit' project
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #endif
8 |
--------------------------------------------------------------------------------
/XPCKit/XPCKit.h:
--------------------------------------------------------------------------------
1 | //
2 | // XPCKit.h
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/24/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 |
22 | #import
23 | #import "XPCExtensions.h"
24 | #import "XPCTypes.h"
25 |
26 | #import "XPCConnection.h"
27 | #import "XPCService.h"
28 |
--------------------------------------------------------------------------------
/XPCKit/XPCService.h:
--------------------------------------------------------------------------------
1 | //
2 | // XPCService.h
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/27/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 | #import "XPCTypes.h"
22 | #import "XPCConnection.h"
23 |
24 | @interface XPCService : NSObject {
25 | NSArray *_connections;
26 | XPCConnectionHandler _connectionHandler;
27 | }
28 |
29 | @property (nonatomic, copy) XPCConnectionHandler connectionHandler;
30 | @property (nonatomic, readonly) NSArray *connections;
31 |
32 | +(void)runServiceWithConnectionHandler:(XPCConnectionHandler)connectionHandler;
33 | -(id)initWithConnectionHandler:(XPCConnectionHandler)connectionHandler;
34 |
35 | -(void)handleConnection:(XPCConnection *)connection;
36 |
37 | +(void)runService;
38 |
39 | @end
40 |
41 | // You can supply this as the parameter to xpc_main (but you might as
42 | // well just call +[XPService runServiceWithConnectionHandler:])
43 | static void XPCServiceConnectionHandler(xpc_connection_t handler);
--------------------------------------------------------------------------------
/XPCKit/XPCService.m:
--------------------------------------------------------------------------------
1 | //
2 | // XPCService.m
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/27/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import "XPCService.h"
21 |
22 | static void XPCServiceConnectionHandler(xpc_connection_t handler);
23 | static void XPCServiceConnectionHandler(xpc_connection_t handler){
24 | XPCConnection *connection = [[XPCConnection alloc] initWithConnection:handler];
25 | [[NSNotificationCenter defaultCenter] postNotificationName:XPCConnectionReceivedNotification object:connection];
26 | [connection release];
27 | }
28 |
29 | @implementation XPCService
30 |
31 | @synthesize connectionHandler=_connectionHandler, connections=_connections;
32 |
33 | -(id)initWithConnectionHandler:(XPCConnectionHandler)aConnectionHandler
34 | {
35 | self = [super init];
36 | if (self) {
37 | // Initialization code here.
38 | self.connectionHandler = aConnectionHandler;
39 | [[NSNotificationCenter defaultCenter] addObserverForName:XPCConnectionReceivedNotification
40 | object:nil
41 | queue:[NSOperationQueue mainQueue]
42 | usingBlock:^(NSNotification *note) {
43 | XPCConnection *connection = [note object];
44 | [self handleConnection:connection];
45 | }];
46 | }
47 |
48 | return self;
49 | }
50 |
51 | +(void)runService{
52 | xpc_main(XPCServiceConnectionHandler);
53 | }
54 |
55 | -(void)handleConnection:(XPCConnection *)connection{
56 | if(!_connections){
57 | _connections = [[NSMutableArray alloc] init];
58 | }
59 |
60 | [(NSMutableArray *)self.connections addObject:connection];
61 |
62 | // [connection _sendLog:@"We got a connection"];
63 |
64 | if(self.connectionHandler){
65 | self.connectionHandler(connection);
66 | }
67 | }
68 |
69 | +(void)runServiceWithConnectionHandler:(XPCConnectionHandler)connectionHandler{
70 | XPCService *service = [[XPCService alloc] initWithConnectionHandler:connectionHandler];
71 |
72 | [XPCService runService];
73 |
74 | [service release];
75 | }
76 |
77 | @end
78 |
--------------------------------------------------------------------------------
/XPCKit/XPCTypes.h:
--------------------------------------------------------------------------------
1 | //
2 | // XPCTypes.h
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/25/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 |
22 | #pragma mark Block-based callbacks
23 |
24 | @class XPCConnection;
25 | typedef void (^XPCEventHandler)(NSDictionary *, XPCConnection *);
26 | typedef void (^XPCConnectionHandler)(XPCConnection *);
27 |
28 | #pragma mark Notifications
29 |
30 | #define XPCConnectionReceivedNotification @"XPCConnectionReceivedNotification"
--------------------------------------------------------------------------------
/XPCKit/XPCUUID.h:
--------------------------------------------------------------------------------
1 | //
2 | // XPCUUID.h
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/26/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 |
22 | @interface XPCUUID : NSObject {
23 | CFUUIDRef _uuidRef;
24 | }
25 |
26 | @property (nonatomic, readonly) CFUUIDRef uuidRef;
27 | @property (nonatomic, readonly) NSString *string;
28 |
29 | +(XPCUUID *)uuid;
30 | +(XPCUUID *)uuidWithXPCObject:(xpc_object_t)xpc;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/XPCKit/XPCUUID.m:
--------------------------------------------------------------------------------
1 | //
2 | // XPCUUID.m
3 | // XPCKit
4 | //
5 | // Created by Steve Streza on 7/26/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import "XPCUUID.h"
21 |
22 | @interface XPCUUID (Private)
23 |
24 | - (id)initWithUUIDRef:(CFUUIDRef)uuidRef;
25 |
26 | @end
27 |
28 | @implementation XPCUUID
29 |
30 | @synthesize uuidRef=_uuidRef;
31 |
32 | +(XPCUUID *)uuid{
33 | CFUUIDRef uuidRef = CFUUIDCreate(NULL);
34 | XPCUUID *uuid = [[[self alloc] initWithUUIDRef:uuidRef] autorelease];
35 | CFRelease(uuidRef);
36 | return uuid;
37 | }
38 |
39 | +(XPCUUID *)uuidWithXPCObject:(xpc_object_t)xpc{
40 | const uint8_t *bytes = xpc_uuid_get_bytes(xpc);
41 |
42 | CFUUIDBytes uuidBytes;
43 | #define CopyByte(__idx) uuidBytes.byte ## __idx = bytes[__idx]
44 | CopyByte(0);
45 | CopyByte(1);
46 | CopyByte(2);
47 | CopyByte(3);
48 | CopyByte(4);
49 | CopyByte(5);
50 | CopyByte(6);
51 | CopyByte(7);
52 | CopyByte(8);
53 | CopyByte(9);
54 | CopyByte(10);
55 | CopyByte(11);
56 | CopyByte(12);
57 | CopyByte(13);
58 | CopyByte(14);
59 | CopyByte(15);
60 | #undef CopyByte
61 |
62 | CFUUIDRef uuidRef = CFUUIDCreateFromUUIDBytes(NULL, uuidBytes);
63 | XPCUUID *uuid = [[[self alloc] initWithUUIDRef:uuidRef] autorelease];
64 |
65 | CFRelease(uuidRef);
66 |
67 | return uuid;
68 | }
69 |
70 | -(xpc_object_t)newXPCObject{
71 | CFUUIDBytes uuidBytes = CFUUIDGetUUIDBytes(self.uuidRef);
72 | UInt8 *bytes = malloc(sizeof(UInt8) * 16);
73 |
74 | #define CopyByte(__idx) bytes[__idx] = uuidBytes.byte ## __idx
75 | CopyByte(0);
76 | CopyByte(1);
77 | CopyByte(2);
78 | CopyByte(3);
79 | CopyByte(4);
80 | CopyByte(5);
81 | CopyByte(6);
82 | CopyByte(7);
83 | CopyByte(8);
84 | CopyByte(9);
85 | CopyByte(10);
86 | CopyByte(11);
87 | CopyByte(12);
88 | CopyByte(13);
89 | CopyByte(14);
90 | CopyByte(15);
91 | #undef CopyByte
92 |
93 | xpc_object_t xpcUUID = xpc_uuid_create(bytes);
94 |
95 | free(bytes);
96 | return xpcUUID;
97 | }
98 |
99 | -(NSString *)string{
100 | return [((NSString *)CFUUIDCreateString(NULL, self.uuidRef)) autorelease];
101 | }
102 |
103 | -(NSString *)description{
104 | return [NSString stringWithFormat:@"<%@ %@>",[self class],self.string];
105 | }
106 |
107 | -(BOOL)isEqual:(id)object{
108 | return [[self description] isEqual:[object description]];
109 | }
110 |
111 | -(NSUInteger)hash{
112 | return [[self description] hash];
113 | }
114 |
115 | - (id)initWithUUIDRef:(CFUUIDRef)uuidRef{
116 | self = [super init];
117 | if (self) {
118 | // Initialization code here.
119 | _uuidRef = CFRetain(uuidRef);
120 | }
121 |
122 | return self;
123 | }
124 |
125 | -(void)dealloc{
126 | if(_uuidRef){
127 | CFRelease(_uuidRef);
128 | _uuidRef = nil;
129 | }
130 |
131 | [super dealloc];
132 | }
133 |
134 | @end
135 |
--------------------------------------------------------------------------------
/XPCKit/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/XPCKitTests/XPCKitTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ___VARIABLE_bundleIdentifierPrefix:bundleIdentifier___.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/XPCKitTests/XPCKitTests.h:
--------------------------------------------------------------------------------
1 | //
2 | // XPCKitTests.h
3 | // XPCKitTests
4 | //
5 | // Created by Steve Streza on 7/24/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import
21 |
22 | @interface XPCKitTests : SenTestCase
23 |
24 | -(void)testEqualityOfXPCRoundtripForObject:(id)object;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/XPCKitTests/XPCKitTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // XPCKitTests.m
3 | // XPCKitTests
4 | //
5 | // Created by Steve Streza on 7/24/11. Copyright 2011 XPCKit.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // you may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | //
19 |
20 | #import "XPCKitTests.h"
21 | #import "XPCKit.h"
22 |
23 | @implementation XPCKitTests
24 |
25 | - (void)setUp
26 | {
27 | [super setUp];
28 |
29 | // Set-up code here.
30 | }
31 |
32 | - (void)tearDown
33 | {
34 | // Tear-down code here.
35 |
36 | [super tearDown];
37 | }
38 |
39 | -(void)testString{
40 | [self testEqualityOfXPCRoundtripForObject:@""];
41 | [self testEqualityOfXPCRoundtripForObject:@"Hello world!"];
42 | }
43 |
44 | - (void)testNumbers{
45 | [self testEqualityOfXPCRoundtripForObject:[NSNumber numberWithInt:0]];
46 | [self testEqualityOfXPCRoundtripForObject:[NSNumber numberWithInt:1]];
47 | [self testEqualityOfXPCRoundtripForObject:[NSNumber numberWithInt:-1]];
48 | [self testEqualityOfXPCRoundtripForObject:[NSNumber numberWithDouble:42.1]];
49 | [self testEqualityOfXPCRoundtripForObject:[NSNumber numberWithLong:42]];
50 | [self testEqualityOfXPCRoundtripForObject:[NSNumber numberWithUnsignedLong:42]];
51 | [self testEqualityOfXPCRoundtripForObject:(id)kCFBooleanTrue];
52 | [self testEqualityOfXPCRoundtripForObject:(id)kCFBooleanFalse];
53 | [self testEqualityOfXPCRoundtripForObject:[NSNumber numberWithBool:YES]];
54 | [self testEqualityOfXPCRoundtripForObject:[NSNumber numberWithBool:NO]];
55 | }
56 |
57 | -(void)testArrays{
58 | [self testEqualityOfXPCRoundtripForObject:[NSArray array]];
59 | [self testEqualityOfXPCRoundtripForObject:[NSArray arrayWithObject:@"foo"]];
60 | [self testEqualityOfXPCRoundtripForObject:[NSArray arrayWithObjects:@"foo", @"bar", @"baz", nil]];
61 | }
62 |
63 | -(void)testDictionaries{
64 | [self testEqualityOfXPCRoundtripForObject:[NSDictionary dictionary]];
65 | [self testEqualityOfXPCRoundtripForObject:[NSDictionary dictionaryWithObject:@"bar" forKey:@"foo"]];
66 | [self testEqualityOfXPCRoundtripForObject:[NSDictionary dictionaryWithObjectsAndKeys:
67 | @"bar", @"foo",
68 | @"42", @"baz",
69 | [NSNumber numberWithInt:42], @"theAnswerToEverything",
70 | nil]];
71 | }
72 |
73 | -(void)testDates{
74 | [self testEqualityOfXPCRoundtripForObject:[NSDate date]];
75 | [self testEqualityOfXPCRoundtripForObject:[NSDate dateWithTimeIntervalSince1970:20.]];
76 | [self testEqualityOfXPCRoundtripForObject:[NSDate dateWithTimeIntervalSince1970:2000000.]];
77 | [self testEqualityOfXPCRoundtripForObject:[NSDate dateWithTimeIntervalSince1970:2000000000.]];
78 | [self testEqualityOfXPCRoundtripForObject:[NSDate dateWithTimeIntervalSinceNow:10.]];
79 | [self testEqualityOfXPCRoundtripForObject:[NSDate dateWithTimeIntervalSinceNow:-10.]];
80 | [self testEqualityOfXPCRoundtripForObject:[NSDate dateWithTimeIntervalSinceNow:10000.]];
81 | [self testEqualityOfXPCRoundtripForObject:[NSDate dateWithTimeIntervalSinceNow:-10000.]];
82 | }
83 |
84 | -(void)testUUID{
85 | // UUIDs are unique, so test a few at random
86 | STAssertFalse([[XPCUUID uuid] isEqual:[XPCUUID uuid]], @"Two identical UUIDs");
87 | STAssertFalse([[XPCUUID uuid] isEqual:[XPCUUID uuid]], @"Two identical UUIDs");
88 | STAssertFalse([[XPCUUID uuid] isEqual:[XPCUUID uuid]], @"Two identical UUIDs");
89 |
90 | [self testEqualityOfXPCRoundtripForObject:[XPCUUID uuid]];
91 | [self testEqualityOfXPCRoundtripForObject:[XPCUUID uuid]];
92 | [self testEqualityOfXPCRoundtripForObject:[XPCUUID uuid]];
93 | }
94 |
95 | -(void)testEqualityOfXPCRoundtripForObject:(id)object{
96 | STAssertNotNil(object, @"Source object is nil");
97 |
98 | xpc_object_t xpcObject = [object newXPCObject];
99 | STAssertNotNil(xpcObject, @"XPC Object is nil");
100 |
101 | id outObject = [NSObject objectWithXPCObject:xpcObject];
102 | STAssertNotNil(outObject, @"XPC-converted object is nil");
103 |
104 | if([object isKindOfClass:[NSDate class]]){
105 | NSTimeInterval delta = fabsf([object timeIntervalSinceDate:outObject]);
106 | BOOL smallEnough = (delta < 0.000001);
107 | STAssertTrue(smallEnough, @"Date %@ was not equal to result %@", object, outObject);
108 | }else{
109 | STAssertEqualObjects(object, outObject, @"Object %@ was not equal to result %@", object, outObject);
110 | }
111 |
112 | xpc_release(xpcObject);
113 | }
114 |
115 | @end
116 |
--------------------------------------------------------------------------------
/XPCKitTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------