iCuke 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +13 -0
- data/LICENSE +20 -0
- data/README.rdoc +69 -0
- data/Rakefile +80 -0
- data/VERSION +1 -0
- data/app/iCuke/.gitignore +1 -0
- data/app/iCuke/Classes/FlipsideView.h +13 -0
- data/app/iCuke/Classes/FlipsideView.m +32 -0
- data/app/iCuke/Classes/FlipsideViewController.h +25 -0
- data/app/iCuke/Classes/FlipsideViewController.m +54 -0
- data/app/iCuke/Classes/MainView.h +15 -0
- data/app/iCuke/Classes/MainView.m +32 -0
- data/app/iCuke/Classes/MainViewController.h +16 -0
- data/app/iCuke/Classes/MainViewController.m +86 -0
- data/app/iCuke/Classes/iCukeAppDelegate.h +20 -0
- data/app/iCuke/Classes/iCukeAppDelegate.m +33 -0
- data/app/iCuke/FlipsideView.xib +444 -0
- data/app/iCuke/MainView.xib +520 -0
- data/app/iCuke/MainWindow.xib +355 -0
- data/app/iCuke/SniffingView.h +20 -0
- data/app/iCuke/SniffingView.m +191 -0
- data/app/iCuke/iCuke-Info.plist +30 -0
- data/app/iCuke/iCuke.xcodeproj/project.pbxproj +313 -0
- data/app/iCuke/iCuke_Prefix.pch +14 -0
- data/app/iCuke/main.m +16 -0
- data/ext/iCuke/.gitignore +2 -0
- data/ext/iCuke/DefaultsResponse.h +5 -0
- data/ext/iCuke/DefaultsResponse.m +67 -0
- data/ext/iCuke/EventResponse.h +5 -0
- data/ext/iCuke/EventResponse.m +122 -0
- data/ext/iCuke/Rakefile +22 -0
- data/ext/iCuke/Recorder.h +15 -0
- data/ext/iCuke/Recorder.m +85 -0
- data/ext/iCuke/RecorderResponse.h +5 -0
- data/ext/iCuke/RecorderResponse.m +59 -0
- data/ext/iCuke/SynthesizeSingleton.h +68 -0
- data/ext/iCuke/ViewResponse.h +5 -0
- data/ext/iCuke/ViewResponse.m +84 -0
- data/ext/iCuke/Viewer.h +8 -0
- data/ext/iCuke/Viewer.m +153 -0
- data/ext/iCuke/iCukeHTTPResponseHandler.h +50 -0
- data/ext/iCuke/iCukeHTTPResponseHandler.m +381 -0
- data/ext/iCuke/iCukeHTTPServer.h +53 -0
- data/ext/iCuke/iCukeHTTPServer.m +365 -0
- data/ext/iCuke/iCukeServer.h +16 -0
- data/ext/iCuke/iCukeServer.m +46 -0
- data/ext/iCuke/json/JSON.h +50 -0
- data/ext/iCuke/json/NSObject+SBJSON.h +68 -0
- data/ext/iCuke/json/NSObject+SBJSON.m +53 -0
- data/ext/iCuke/json/NSString+SBJSON.h +58 -0
- data/ext/iCuke/json/NSString+SBJSON.m +55 -0
- data/ext/iCuke/json/SBJSON.h +75 -0
- data/ext/iCuke/json/SBJSON.m +212 -0
- data/ext/iCuke/json/SBJsonBase.h +86 -0
- data/ext/iCuke/json/SBJsonBase.m +78 -0
- data/ext/iCuke/json/SBJsonParser.h +87 -0
- data/ext/iCuke/json/SBJsonParser.m +475 -0
- data/ext/iCuke/json/SBJsonWriter.h +129 -0
- data/ext/iCuke/json/SBJsonWriter.m +228 -0
- data/features/icuke.feature +17 -0
- data/features/support/env.rb +3 -0
- data/iCuke.gemspec +113 -0
- data/lib/icuke/cucumber.rb +211 -0
- data/lib/icuke/simulate.rb +132 -0
- data/lib/icuke/simulator.rb +107 -0
- data/lib/icuke.rb +1 -0
- metadata +163 -0
@@ -0,0 +1,313 @@
|
|
1
|
+
// !$*UTF8*$!
|
2
|
+
{
|
3
|
+
archiveVersion = 1;
|
4
|
+
classes = {
|
5
|
+
};
|
6
|
+
objectVersion = 45;
|
7
|
+
objects = {
|
8
|
+
|
9
|
+
/* Begin PBXBuildFile section */
|
10
|
+
0EAC07971146A18E0093E76E /* GraphicsServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0EAC07961146A18E0093E76E /* GraphicsServices.framework */; };
|
11
|
+
0EC78A4C114555A2005E8CD8 /* SniffingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0EC78A4B114555A2005E8CD8 /* SniffingView.m */; };
|
12
|
+
1D3623260D0F684500981E51 /* iCukeAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* iCukeAppDelegate.m */; };
|
13
|
+
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
|
14
|
+
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
|
15
|
+
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
|
16
|
+
280E754D0DD40C5E005A515E /* FlipsideView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 280E754A0DD40C5E005A515E /* FlipsideView.xib */; };
|
17
|
+
280E754E0DD40C5E005A515E /* MainView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 280E754B0DD40C5E005A515E /* MainView.xib */; };
|
18
|
+
280E754F0DD40C5E005A515E /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 280E754C0DD40C5E005A515E /* MainWindow.xib */; };
|
19
|
+
288765590DF743DE002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765580DF743DE002DB57D /* CoreGraphics.framework */; };
|
20
|
+
289233A60DB2D0840083E9F9 /* FlipsideView.m in Sources */ = {isa = PBXBuildFile; fileRef = 289233A30DB2D0840083E9F9 /* FlipsideView.m */; };
|
21
|
+
289233A70DB2D0840083E9F9 /* MainView.m in Sources */ = {isa = PBXBuildFile; fileRef = 289233A50DB2D0840083E9F9 /* MainView.m */; };
|
22
|
+
289233AE0DB2D0DB0083E9F9 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 289233A90DB2D0DB0083E9F9 /* MainViewController.m */; };
|
23
|
+
289233B00DB2D0DB0083E9F9 /* FlipsideViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 289233AD0DB2D0DB0083E9F9 /* FlipsideViewController.m */; };
|
24
|
+
/* End PBXBuildFile section */
|
25
|
+
|
26
|
+
/* Begin PBXFileReference section */
|
27
|
+
0EAC07961146A18E0093E76E /* GraphicsServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GraphicsServices.framework; path = Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.2.sdk/System/Library/PrivateFrameworks/GraphicsServices.framework; sourceTree = DEVELOPER_DIR; };
|
28
|
+
0EC78A4A114555A2005E8CD8 /* SniffingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SniffingView.h; sourceTree = "<group>"; };
|
29
|
+
0EC78A4B114555A2005E8CD8 /* SniffingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SniffingView.m; sourceTree = "<group>"; };
|
30
|
+
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
31
|
+
1D3623240D0F684500981E51 /* iCukeAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iCukeAppDelegate.h; sourceTree = "<group>"; };
|
32
|
+
1D3623250D0F684500981E51 /* iCukeAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iCukeAppDelegate.m; sourceTree = "<group>"; };
|
33
|
+
1D6058910D05DD3D006BFB54 /* iCuke.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iCuke.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
34
|
+
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
35
|
+
280E754A0DD40C5E005A515E /* FlipsideView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = FlipsideView.xib; sourceTree = "<group>"; };
|
36
|
+
280E754B0DD40C5E005A515E /* MainView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainView.xib; sourceTree = "<group>"; };
|
37
|
+
280E754C0DD40C5E005A515E /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
|
38
|
+
288765580DF743DE002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
39
|
+
289233A20DB2D0840083E9F9 /* FlipsideView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlipsideView.h; path = Classes/FlipsideView.h; sourceTree = "<group>"; };
|
40
|
+
289233A30DB2D0840083E9F9 /* FlipsideView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FlipsideView.m; path = Classes/FlipsideView.m; sourceTree = "<group>"; };
|
41
|
+
289233A40DB2D0840083E9F9 /* MainView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainView.h; path = Classes/MainView.h; sourceTree = "<group>"; };
|
42
|
+
289233A50DB2D0840083E9F9 /* MainView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MainView.m; path = Classes/MainView.m; sourceTree = "<group>"; };
|
43
|
+
289233A80DB2D0DB0083E9F9 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
|
44
|
+
289233A90DB2D0DB0083E9F9 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
|
45
|
+
289233AC0DB2D0DB0083E9F9 /* FlipsideViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlipsideViewController.h; path = Classes/FlipsideViewController.h; sourceTree = "<group>"; };
|
46
|
+
289233AD0DB2D0DB0083E9F9 /* FlipsideViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FlipsideViewController.m; path = Classes/FlipsideViewController.m; sourceTree = "<group>"; };
|
47
|
+
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
48
|
+
32CA4F630368D1EE00C91783 /* iCuke_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iCuke_Prefix.pch; sourceTree = "<group>"; };
|
49
|
+
8D1107310486CEB800E47090 /* iCuke-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "iCuke-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
|
50
|
+
/* End PBXFileReference section */
|
51
|
+
|
52
|
+
/* Begin PBXFrameworksBuildPhase section */
|
53
|
+
1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
|
54
|
+
isa = PBXFrameworksBuildPhase;
|
55
|
+
buildActionMask = 2147483647;
|
56
|
+
files = (
|
57
|
+
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
|
58
|
+
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
|
59
|
+
288765590DF743DE002DB57D /* CoreGraphics.framework in Frameworks */,
|
60
|
+
0EAC07971146A18E0093E76E /* GraphicsServices.framework in Frameworks */,
|
61
|
+
);
|
62
|
+
runOnlyForDeploymentPostprocessing = 0;
|
63
|
+
};
|
64
|
+
/* End PBXFrameworksBuildPhase section */
|
65
|
+
|
66
|
+
/* Begin PBXGroup section */
|
67
|
+
080E96DDFE201D6D7F000001 /* Application Delegate */ = {
|
68
|
+
isa = PBXGroup;
|
69
|
+
children = (
|
70
|
+
1D3623240D0F684500981E51 /* iCukeAppDelegate.h */,
|
71
|
+
1D3623250D0F684500981E51 /* iCukeAppDelegate.m */,
|
72
|
+
);
|
73
|
+
name = "Application Delegate";
|
74
|
+
path = Classes;
|
75
|
+
sourceTree = "<group>";
|
76
|
+
};
|
77
|
+
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
78
|
+
isa = PBXGroup;
|
79
|
+
children = (
|
80
|
+
1D6058910D05DD3D006BFB54 /* iCuke.app */,
|
81
|
+
);
|
82
|
+
name = Products;
|
83
|
+
sourceTree = "<group>";
|
84
|
+
};
|
85
|
+
281C6CD70DB2D82200F60ACC /* Flipside View */ = {
|
86
|
+
isa = PBXGroup;
|
87
|
+
children = (
|
88
|
+
289233A20DB2D0840083E9F9 /* FlipsideView.h */,
|
89
|
+
289233A30DB2D0840083E9F9 /* FlipsideView.m */,
|
90
|
+
289233AC0DB2D0DB0083E9F9 /* FlipsideViewController.h */,
|
91
|
+
289233AD0DB2D0DB0083E9F9 /* FlipsideViewController.m */,
|
92
|
+
);
|
93
|
+
name = "Flipside View";
|
94
|
+
sourceTree = "<group>";
|
95
|
+
};
|
96
|
+
289233A00DB2D0730083E9F9 /* Main View */ = {
|
97
|
+
isa = PBXGroup;
|
98
|
+
children = (
|
99
|
+
289233A40DB2D0840083E9F9 /* MainView.h */,
|
100
|
+
289233A50DB2D0840083E9F9 /* MainView.m */,
|
101
|
+
289233A80DB2D0DB0083E9F9 /* MainViewController.h */,
|
102
|
+
289233A90DB2D0DB0083E9F9 /* MainViewController.m */,
|
103
|
+
);
|
104
|
+
name = "Main View";
|
105
|
+
sourceTree = "<group>";
|
106
|
+
};
|
107
|
+
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
|
108
|
+
isa = PBXGroup;
|
109
|
+
children = (
|
110
|
+
289233A00DB2D0730083E9F9 /* Main View */,
|
111
|
+
281C6CD70DB2D82200F60ACC /* Flipside View */,
|
112
|
+
080E96DDFE201D6D7F000001 /* Application Delegate */,
|
113
|
+
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
114
|
+
29B97317FDCFA39411CA2CEA /* Resources */,
|
115
|
+
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
116
|
+
19C28FACFE9D520D11CA2CBB /* Products */,
|
117
|
+
);
|
118
|
+
name = CustomTemplate;
|
119
|
+
sourceTree = "<group>";
|
120
|
+
};
|
121
|
+
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
122
|
+
isa = PBXGroup;
|
123
|
+
children = (
|
124
|
+
32CA4F630368D1EE00C91783 /* iCuke_Prefix.pch */,
|
125
|
+
29B97316FDCFA39411CA2CEA /* main.m */,
|
126
|
+
0EC78A4A114555A2005E8CD8 /* SniffingView.h */,
|
127
|
+
0EC78A4B114555A2005E8CD8 /* SniffingView.m */,
|
128
|
+
);
|
129
|
+
name = "Other Sources";
|
130
|
+
sourceTree = "<group>";
|
131
|
+
};
|
132
|
+
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
133
|
+
isa = PBXGroup;
|
134
|
+
children = (
|
135
|
+
280E754A0DD40C5E005A515E /* FlipsideView.xib */,
|
136
|
+
280E754B0DD40C5E005A515E /* MainView.xib */,
|
137
|
+
280E754C0DD40C5E005A515E /* MainWindow.xib */,
|
138
|
+
8D1107310486CEB800E47090 /* iCuke-Info.plist */,
|
139
|
+
);
|
140
|
+
name = Resources;
|
141
|
+
sourceTree = "<group>";
|
142
|
+
};
|
143
|
+
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
144
|
+
isa = PBXGroup;
|
145
|
+
children = (
|
146
|
+
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
|
147
|
+
1D30AB110D05D00D00671497 /* Foundation.framework */,
|
148
|
+
288765580DF743DE002DB57D /* CoreGraphics.framework */,
|
149
|
+
0EAC07961146A18E0093E76E /* GraphicsServices.framework */,
|
150
|
+
);
|
151
|
+
name = Frameworks;
|
152
|
+
sourceTree = "<group>";
|
153
|
+
};
|
154
|
+
/* End PBXGroup section */
|
155
|
+
|
156
|
+
/* Begin PBXNativeTarget section */
|
157
|
+
1D6058900D05DD3D006BFB54 /* iCuke */ = {
|
158
|
+
isa = PBXNativeTarget;
|
159
|
+
buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "iCuke" */;
|
160
|
+
buildPhases = (
|
161
|
+
1D60588D0D05DD3D006BFB54 /* Resources */,
|
162
|
+
1D60588E0D05DD3D006BFB54 /* Sources */,
|
163
|
+
1D60588F0D05DD3D006BFB54 /* Frameworks */,
|
164
|
+
);
|
165
|
+
buildRules = (
|
166
|
+
);
|
167
|
+
dependencies = (
|
168
|
+
);
|
169
|
+
name = iCuke;
|
170
|
+
productName = iCuke;
|
171
|
+
productReference = 1D6058910D05DD3D006BFB54 /* iCuke.app */;
|
172
|
+
productType = "com.apple.product-type.application";
|
173
|
+
};
|
174
|
+
/* End PBXNativeTarget section */
|
175
|
+
|
176
|
+
/* Begin PBXProject section */
|
177
|
+
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
178
|
+
isa = PBXProject;
|
179
|
+
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iCuke" */;
|
180
|
+
compatibilityVersion = "Xcode 3.1";
|
181
|
+
hasScannedForEncodings = 1;
|
182
|
+
knownRegions = (
|
183
|
+
English,
|
184
|
+
Japanese,
|
185
|
+
French,
|
186
|
+
German,
|
187
|
+
en,
|
188
|
+
);
|
189
|
+
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
|
190
|
+
projectDirPath = "";
|
191
|
+
projectRoot = "";
|
192
|
+
targets = (
|
193
|
+
1D6058900D05DD3D006BFB54 /* iCuke */,
|
194
|
+
);
|
195
|
+
};
|
196
|
+
/* End PBXProject section */
|
197
|
+
|
198
|
+
/* Begin PBXResourcesBuildPhase section */
|
199
|
+
1D60588D0D05DD3D006BFB54 /* Resources */ = {
|
200
|
+
isa = PBXResourcesBuildPhase;
|
201
|
+
buildActionMask = 2147483647;
|
202
|
+
files = (
|
203
|
+
280E754D0DD40C5E005A515E /* FlipsideView.xib in Resources */,
|
204
|
+
280E754E0DD40C5E005A515E /* MainView.xib in Resources */,
|
205
|
+
280E754F0DD40C5E005A515E /* MainWindow.xib in Resources */,
|
206
|
+
);
|
207
|
+
runOnlyForDeploymentPostprocessing = 0;
|
208
|
+
};
|
209
|
+
/* End PBXResourcesBuildPhase section */
|
210
|
+
|
211
|
+
/* Begin PBXSourcesBuildPhase section */
|
212
|
+
1D60588E0D05DD3D006BFB54 /* Sources */ = {
|
213
|
+
isa = PBXSourcesBuildPhase;
|
214
|
+
buildActionMask = 2147483647;
|
215
|
+
files = (
|
216
|
+
1D60589B0D05DD56006BFB54 /* main.m in Sources */,
|
217
|
+
1D3623260D0F684500981E51 /* iCukeAppDelegate.m in Sources */,
|
218
|
+
289233A60DB2D0840083E9F9 /* FlipsideView.m in Sources */,
|
219
|
+
289233A70DB2D0840083E9F9 /* MainView.m in Sources */,
|
220
|
+
289233AE0DB2D0DB0083E9F9 /* MainViewController.m in Sources */,
|
221
|
+
289233B00DB2D0DB0083E9F9 /* FlipsideViewController.m in Sources */,
|
222
|
+
0EC78A4C114555A2005E8CD8 /* SniffingView.m in Sources */,
|
223
|
+
);
|
224
|
+
runOnlyForDeploymentPostprocessing = 0;
|
225
|
+
};
|
226
|
+
/* End PBXSourcesBuildPhase section */
|
227
|
+
|
228
|
+
/* Begin XCBuildConfiguration section */
|
229
|
+
1D6058940D05DD3E006BFB54 /* Debug */ = {
|
230
|
+
isa = XCBuildConfiguration;
|
231
|
+
buildSettings = {
|
232
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
233
|
+
COPY_PHASE_STRIP = NO;
|
234
|
+
FRAMEWORK_SEARCH_PATHS = (
|
235
|
+
"$(inherited)",
|
236
|
+
"\"$(DEVELOPER_DIR)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.2.sdk/System/Library/PrivateFrameworks\"",
|
237
|
+
);
|
238
|
+
GCC_DYNAMIC_NO_PIC = NO;
|
239
|
+
GCC_OPTIMIZATION_LEVEL = 0;
|
240
|
+
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
241
|
+
GCC_PREFIX_HEADER = iCuke_Prefix.pch;
|
242
|
+
INFOPLIST_FILE = "iCuke-Info.plist";
|
243
|
+
PRODUCT_NAME = iCuke;
|
244
|
+
};
|
245
|
+
name = Debug;
|
246
|
+
};
|
247
|
+
1D6058950D05DD3E006BFB54 /* Release */ = {
|
248
|
+
isa = XCBuildConfiguration;
|
249
|
+
buildSettings = {
|
250
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
251
|
+
COPY_PHASE_STRIP = YES;
|
252
|
+
FRAMEWORK_SEARCH_PATHS = (
|
253
|
+
"$(inherited)",
|
254
|
+
"\"$(DEVELOPER_DIR)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.2.sdk/System/Library/PrivateFrameworks\"",
|
255
|
+
);
|
256
|
+
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
257
|
+
GCC_PREFIX_HEADER = iCuke_Prefix.pch;
|
258
|
+
INFOPLIST_FILE = "iCuke-Info.plist";
|
259
|
+
PRODUCT_NAME = iCuke;
|
260
|
+
};
|
261
|
+
name = Release;
|
262
|
+
};
|
263
|
+
C01FCF4F08A954540054247B /* Debug */ = {
|
264
|
+
isa = XCBuildConfiguration;
|
265
|
+
buildSettings = {
|
266
|
+
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
267
|
+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
268
|
+
GCC_C_LANGUAGE_STANDARD = c99;
|
269
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
270
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
271
|
+
PREBINDING = NO;
|
272
|
+
SDKROOT = iphoneos3.1.2;
|
273
|
+
};
|
274
|
+
name = Debug;
|
275
|
+
};
|
276
|
+
C01FCF5008A954540054247B /* Release */ = {
|
277
|
+
isa = XCBuildConfiguration;
|
278
|
+
buildSettings = {
|
279
|
+
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
280
|
+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
281
|
+
GCC_C_LANGUAGE_STANDARD = c99;
|
282
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
283
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
284
|
+
PREBINDING = NO;
|
285
|
+
SDKROOT = iphoneos3.1.2;
|
286
|
+
};
|
287
|
+
name = Release;
|
288
|
+
};
|
289
|
+
/* End XCBuildConfiguration section */
|
290
|
+
|
291
|
+
/* Begin XCConfigurationList section */
|
292
|
+
1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "iCuke" */ = {
|
293
|
+
isa = XCConfigurationList;
|
294
|
+
buildConfigurations = (
|
295
|
+
1D6058940D05DD3E006BFB54 /* Debug */,
|
296
|
+
1D6058950D05DD3E006BFB54 /* Release */,
|
297
|
+
);
|
298
|
+
defaultConfigurationIsVisible = 0;
|
299
|
+
defaultConfigurationName = Release;
|
300
|
+
};
|
301
|
+
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iCuke" */ = {
|
302
|
+
isa = XCConfigurationList;
|
303
|
+
buildConfigurations = (
|
304
|
+
C01FCF4F08A954540054247B /* Debug */,
|
305
|
+
C01FCF5008A954540054247B /* Release */,
|
306
|
+
);
|
307
|
+
defaultConfigurationIsVisible = 0;
|
308
|
+
defaultConfigurationName = Release;
|
309
|
+
};
|
310
|
+
/* End XCConfigurationList section */
|
311
|
+
};
|
312
|
+
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
313
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
//
|
2
|
+
// Prefix header for all source files of the 'iCuke' target in the 'iCuke' project
|
3
|
+
//
|
4
|
+
#import <Availability.h>
|
5
|
+
|
6
|
+
#ifndef __IPHONE_3_0
|
7
|
+
#warning "This project uses features only available in iPhone SDK 3.0 and later."
|
8
|
+
#endif
|
9
|
+
|
10
|
+
|
11
|
+
#ifdef __OBJC__
|
12
|
+
#import <Foundation/Foundation.h>
|
13
|
+
#import <UIKit/UIKit.h>
|
14
|
+
#endif
|
data/app/iCuke/main.m
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
//
|
2
|
+
// main.m
|
3
|
+
// iCuke
|
4
|
+
//
|
5
|
+
// Created by Rob Holland on 02/03/2010.
|
6
|
+
// Copyright The IT Refinery 2010. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <UIKit/UIKit.h>
|
10
|
+
|
11
|
+
int main(int argc, char *argv[]) {
|
12
|
+
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
13
|
+
int retVal = UIApplicationMain(argc, argv, nil, nil);
|
14
|
+
[pool release];
|
15
|
+
return retVal;
|
16
|
+
}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
#import "DefaultsResponse.h"
|
2
|
+
#import "iCukeHTTPServer.h"
|
3
|
+
#import "JSON.h"
|
4
|
+
|
5
|
+
@implementation DefaultsResponse
|
6
|
+
+ (void)load
|
7
|
+
{
|
8
|
+
[iCukeHTTPResponseHandler registerHandler:self];
|
9
|
+
}
|
10
|
+
|
11
|
+
+ (BOOL)canHandleRequest:(CFHTTPMessageRef)aRequest
|
12
|
+
method:(NSString *)requestMethod
|
13
|
+
url:(NSURL *)requestURL
|
14
|
+
headerFields:(NSDictionary *)requestHeaderFields
|
15
|
+
{
|
16
|
+
return [requestURL.path isEqualToString:@"/defaults"];
|
17
|
+
}
|
18
|
+
|
19
|
+
- (void)startResponse
|
20
|
+
{
|
21
|
+
NSUserDefaults *user_defaults = [NSUserDefaults standardUserDefaults];
|
22
|
+
NSString *json = [[url query] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
23
|
+
NSLog(@"defaults json: %@", json);
|
24
|
+
NSData *defaultsData = nil;
|
25
|
+
|
26
|
+
if (!json) {
|
27
|
+
NSDictionary *defaults = [user_defaults dictionaryRepresentation];
|
28
|
+
|
29
|
+
defaultsData = [[defaults JSONRepresentation] dataUsingEncoding:NSUTF8StringEncoding];
|
30
|
+
} else {
|
31
|
+
id parsed_json = [json JSONValue];
|
32
|
+
|
33
|
+
NSEnumerator *enumerator = [parsed_json keyEnumerator];
|
34
|
+
id key;
|
35
|
+
while ((key = [enumerator nextObject])) {
|
36
|
+
[user_defaults setObject: [parsed_json objectForKey: key] forKey: key];
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
CFHTTPMessageRef response = CFHTTPMessageCreateResponse(kCFAllocatorDefault, 200, NULL, kCFHTTPVersion1_1);
|
41
|
+
CFHTTPMessageSetHeaderFieldValue(response, (CFStringRef)@"Connection", (CFStringRef)@"close");
|
42
|
+
CFHTTPMessageSetHeaderFieldValue(response, (CFStringRef)@"Content-Type", (CFStringRef)@"application/json");
|
43
|
+
|
44
|
+
if (defaultsData)
|
45
|
+
CFHTTPMessageSetHeaderFieldValue(response, (CFStringRef)@"Content-Length",
|
46
|
+
(CFStringRef)[NSString stringWithFormat:@"%ld", [defaultsData length]]);
|
47
|
+
|
48
|
+
CFDataRef headerData = CFHTTPMessageCopySerializedMessage(response);
|
49
|
+
|
50
|
+
@try
|
51
|
+
{
|
52
|
+
[fileHandle writeData:(NSData *)headerData];
|
53
|
+
if (defaultsData)
|
54
|
+
[fileHandle writeData:defaultsData];
|
55
|
+
}
|
56
|
+
@catch (NSException *exception)
|
57
|
+
{
|
58
|
+
// Ignore the exception, it normally just means the client
|
59
|
+
// closed the connection from the other end.
|
60
|
+
}
|
61
|
+
@finally
|
62
|
+
{
|
63
|
+
CFRelease(headerData);
|
64
|
+
[server closeHandler:self];
|
65
|
+
}
|
66
|
+
}
|
67
|
+
@end
|
@@ -0,0 +1,122 @@
|
|
1
|
+
#import "EventResponse.h"
|
2
|
+
#import "iCukeHTTPServer.h"
|
3
|
+
#import "JSON.h"
|
4
|
+
#import "Recorder.h"
|
5
|
+
|
6
|
+
typedef struct {
|
7
|
+
unsigned char index;
|
8
|
+
unsigned char index2;
|
9
|
+
unsigned char type;
|
10
|
+
unsigned char flags;
|
11
|
+
float sizeX;
|
12
|
+
float sizeY;
|
13
|
+
float x;
|
14
|
+
float y;
|
15
|
+
int x6;
|
16
|
+
} gs_path_info_t;
|
17
|
+
|
18
|
+
typedef struct {
|
19
|
+
int type;
|
20
|
+
short deltaX;
|
21
|
+
short deltaY;
|
22
|
+
float x3;
|
23
|
+
float x4;
|
24
|
+
float pinch1;
|
25
|
+
float pinch2;
|
26
|
+
float averageX;
|
27
|
+
float averageY;
|
28
|
+
unsigned char x9_1;
|
29
|
+
unsigned char pathCount;
|
30
|
+
unsigned char x9_3;
|
31
|
+
unsigned char x9_4;
|
32
|
+
} gs_hand_info_t;
|
33
|
+
|
34
|
+
@implementation EventResponse
|
35
|
+
+ (void)load
|
36
|
+
{
|
37
|
+
[iCukeHTTPResponseHandler registerHandler:self];
|
38
|
+
}
|
39
|
+
|
40
|
+
+ (BOOL)canHandleRequest:(CFHTTPMessageRef)aRequest
|
41
|
+
method:(NSString *)requestMethod
|
42
|
+
url:(NSURL *)requestURL
|
43
|
+
headerFields:(NSDictionary *)requestHeaderFields
|
44
|
+
{
|
45
|
+
return [requestURL.path isEqualToString:@"/event"];
|
46
|
+
}
|
47
|
+
|
48
|
+
- (void)startResponse
|
49
|
+
{
|
50
|
+
NSString *json = [[url query] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
51
|
+
id event_data = [json JSONValue];
|
52
|
+
NSArray *events;
|
53
|
+
|
54
|
+
if ([event_data isKindOfClass:[NSDictionary class]]) {
|
55
|
+
events = [NSArray arrayWithObject: event_data];
|
56
|
+
} else {
|
57
|
+
events = event_data;
|
58
|
+
}
|
59
|
+
|
60
|
+
for (NSMutableDictionary *event in events) {
|
61
|
+
gs_hand_info_t hand_info;
|
62
|
+
|
63
|
+
bzero(&hand_info, sizeof(hand_info));
|
64
|
+
|
65
|
+
NSMutableDictionary *data = [event objectForKey: @"Data"];
|
66
|
+
|
67
|
+
hand_info.type = [[data objectForKey: @"Type"] integerValue];
|
68
|
+
NSDictionary *delta = [data objectForKey: @"Delta"];
|
69
|
+
hand_info.deltaX = [[delta objectForKey: @"X"] shortValue];
|
70
|
+
hand_info.deltaY = [[delta objectForKey: @"Y"] shortValue];
|
71
|
+
hand_info.averageX = [[[delta objectForKey: @"WindowLocation"] objectForKey: @"X"] floatValue];
|
72
|
+
hand_info.averageY = [[[delta objectForKey: @"WindowLocation"] objectForKey: @"Y"] floatValue];
|
73
|
+
|
74
|
+
NSArray *points = [data objectForKey: @"Paths"];
|
75
|
+
|
76
|
+
hand_info.pathCount = (unsigned char)[points count];
|
77
|
+
|
78
|
+
NSMutableData *raw_data = [NSMutableData dataWithBytes: &hand_info length: sizeof(hand_info)];
|
79
|
+
|
80
|
+
int index = hand_info.pathCount == 1 ? 2 : 1;
|
81
|
+
|
82
|
+
for (NSDictionary *point in points) {
|
83
|
+
gs_path_info_t path_info;
|
84
|
+
|
85
|
+
bzero(&path_info, sizeof(path_info));
|
86
|
+
|
87
|
+
path_info.index = path_info.index2 = index++;
|
88
|
+
path_info.type = hand_info.type == 6 ? 1 : 2;
|
89
|
+
path_info.sizeX = [[[point objectForKey: @"Size"] objectForKey: @"X"] floatValue];
|
90
|
+
path_info.sizeY = [[[point objectForKey: @"Size"] objectForKey: @"Y"] floatValue];
|
91
|
+
path_info.x = [[[point objectForKey: @"Location"] objectForKey: @"X"] floatValue];
|
92
|
+
path_info.y = [[[point objectForKey: @"Location"] objectForKey: @"Y"] floatValue];
|
93
|
+
|
94
|
+
[raw_data appendBytes: &path_info length: sizeof(path_info)];
|
95
|
+
}
|
96
|
+
|
97
|
+
[event setObject: raw_data forKey: @"Data"];
|
98
|
+
}
|
99
|
+
|
100
|
+
[[Recorder sharedRecorder] load: events];
|
101
|
+
[[Recorder sharedRecorder] play];
|
102
|
+
|
103
|
+
CFHTTPMessageRef response = CFHTTPMessageCreateResponse(kCFAllocatorDefault, 200, NULL, kCFHTTPVersion1_1);
|
104
|
+
CFHTTPMessageSetHeaderFieldValue(response, (CFStringRef)@"Connection", (CFStringRef)@"close");
|
105
|
+
CFDataRef headerData = CFHTTPMessageCopySerializedMessage(response);
|
106
|
+
|
107
|
+
@try
|
108
|
+
{
|
109
|
+
[fileHandle writeData:(NSData *)headerData];
|
110
|
+
}
|
111
|
+
@catch (NSException *exception)
|
112
|
+
{
|
113
|
+
// Ignore the exception, it normally just means the client
|
114
|
+
// closed the connection from the other end.
|
115
|
+
}
|
116
|
+
@finally
|
117
|
+
{
|
118
|
+
CFRelease(headerData);
|
119
|
+
[server closeHandler:self];
|
120
|
+
}
|
121
|
+
}
|
122
|
+
@end
|
data/ext/iCuke/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'rake/clean'
|
2
|
+
|
3
|
+
SDK_VERSION = '3.1.2'
|
4
|
+
SDK_ROOT = "/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator#{SDK_VERSION}.sdk"
|
5
|
+
CFLAGS = '-arch i386 -pipe -std=c99 -DTARGET_OS_IPHONE'
|
6
|
+
SDK_CFLAGS = "-isysroot #{SDK_ROOT} -F/System/Library/PrivateFrameworks -D__IPHONE_OS_VERSION_MIN_REQUIRED=30000"
|
7
|
+
CC = '/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2'
|
8
|
+
|
9
|
+
rule '.o' => '.m' do |o|
|
10
|
+
sh "#{CC} -I. -Ijson -c -o #{o.name} -fvisibility=hidden -x objective-c #{CFLAGS} #{SDK_CFLAGS} #{o.source}"
|
11
|
+
end
|
12
|
+
|
13
|
+
CLEAN.include('**/*.o')
|
14
|
+
|
15
|
+
file 'libicuke.dylib' => FileList['**/*.m'].ext('.o') do |t|
|
16
|
+
sh "#{CC} -dynamiclib -o #{t.name} -fvisibility=hidden #{CFLAGS} #{SDK_CFLAGS} -framework Foundation -framework GraphicsServices -framework UIKit -framework CFNetwork -framework AXRuntime #{t.prerequisites.join(' ')}"
|
17
|
+
end
|
18
|
+
|
19
|
+
CLEAN.include('libicuke.dylib')
|
20
|
+
|
21
|
+
task :install => 'libicuke.dylib'
|
22
|
+
task :default => :install
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#import <Foundation/Foundation.h>
|
2
|
+
|
3
|
+
@interface Recorder : NSObject {
|
4
|
+
NSMutableArray* eventList;
|
5
|
+
}
|
6
|
+
|
7
|
+
+(Recorder *)sharedRecorder;
|
8
|
+
-(void)record;
|
9
|
+
-(void)saveToFile:(NSString*)path;
|
10
|
+
-(void)load:(NSArray*)events;
|
11
|
+
-(void)loadFromFile:(NSString*)path;
|
12
|
+
-(void)play;
|
13
|
+
-(void)stop;
|
14
|
+
|
15
|
+
@end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
#import <UIKit/UIKit.h>
|
2
|
+
|
3
|
+
#import "Recorder.h"
|
4
|
+
|
5
|
+
@interface UIApplication (Recording)
|
6
|
+
|
7
|
+
-(void)_addRecorder:(id)recorder;
|
8
|
+
-(void)_removeRecorder:(id)recorder;
|
9
|
+
-(void)_playbackEvents:(NSArray*)events atPlaybackRate:(float)playbackRate messageWhenDone:(id)target withSelector:(SEL)selector;
|
10
|
+
|
11
|
+
@end
|
12
|
+
|
13
|
+
static Recorder *sharedRecorder = nil;
|
14
|
+
|
15
|
+
@implementation Recorder
|
16
|
+
|
17
|
+
+(Recorder *)sharedRecorder {
|
18
|
+
if (sharedRecorder == nil) {
|
19
|
+
sharedRecorder = [[super allocWithZone:NULL] init];
|
20
|
+
}
|
21
|
+
return sharedRecorder;
|
22
|
+
}
|
23
|
+
|
24
|
+
-(id)init {
|
25
|
+
self = [super init];
|
26
|
+
|
27
|
+
eventList = [[NSMutableArray alloc] init];
|
28
|
+
|
29
|
+
return self;
|
30
|
+
}
|
31
|
+
|
32
|
+
-(void)dealloc {
|
33
|
+
[eventList release];
|
34
|
+
[super dealloc];
|
35
|
+
}
|
36
|
+
|
37
|
+
-(void)record {
|
38
|
+
[eventList removeAllObjects];
|
39
|
+
|
40
|
+
NSLog(@"Starting recording");
|
41
|
+
|
42
|
+
[[UIApplication sharedApplication] _addRecorder: self];
|
43
|
+
}
|
44
|
+
|
45
|
+
-(void)saveToFile:(NSString*)path {
|
46
|
+
NSLog(@"Saving events to file: %@", path);
|
47
|
+
|
48
|
+
[eventList writeToFile: path atomically: YES];
|
49
|
+
}
|
50
|
+
|
51
|
+
-(void)stop {
|
52
|
+
NSLog(@"Stopping recording");
|
53
|
+
|
54
|
+
[[UIApplication sharedApplication] _removeRecorder: self];
|
55
|
+
}
|
56
|
+
|
57
|
+
-(void)recordApplicationEvent:(NSDictionary*)event {
|
58
|
+
NSLog(@"Recorded event: %@", event);
|
59
|
+
|
60
|
+
[eventList addObject:event];
|
61
|
+
}
|
62
|
+
|
63
|
+
-(void)load:(NSArray*)events {
|
64
|
+
NSLog(@"Loading events");
|
65
|
+
|
66
|
+
[eventList setArray: events];
|
67
|
+
}
|
68
|
+
|
69
|
+
-(void)loadFromFile:(NSString*)path {
|
70
|
+
NSLog(@"Loading events from file: %@", path);
|
71
|
+
|
72
|
+
[eventList setArray: [NSMutableArray arrayWithContentsOfFile: path]];
|
73
|
+
}
|
74
|
+
|
75
|
+
-(void)play {
|
76
|
+
NSLog(@"Starting playback");
|
77
|
+
|
78
|
+
[[UIApplication sharedApplication] _playbackEvents: eventList atPlaybackRate: 1.0f messageWhenDone: self withSelector: @selector(done:)];
|
79
|
+
}
|
80
|
+
|
81
|
+
-(void)done:(NSDictionary*)detail {
|
82
|
+
NSLog(@"Finished playback");
|
83
|
+
}
|
84
|
+
|
85
|
+
@end
|