iCuke 0.5.5 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +2 -0
- data/.gitmodules +3 -0
- data/README.rdoc +8 -7
- data/Rakefile +10 -30
- data/VERSION +1 -1
- data/app/.gitignore +3 -0
- data/app/LICENSE +20 -0
- data/app/Readme.markdown +3 -0
- data/app/Shared/AppDelegate_Shared.h +17 -0
- data/app/Shared/AppDelegate_Shared.m +25 -0
- data/app/{images/yellowslide.png → Shared/Icon.png} +0 -0
- data/app/Shared/ModalViewController.h +15 -0
- data/app/Shared/ModalViewController.m +96 -0
- data/app/Shared/TestViewController_Shared.h +15 -0
- data/app/Shared/TestViewController_Shared.m +43 -0
- data/app/{Info.plist → Shared/Universal-Info.plist} +17 -4
- data/app/Shared/Universal_Prefix.pch +8 -0
- data/app/Shared/main.m +14 -0
- data/app/Universal.xcodeproj/project.pbxproj +301 -0
- data/app/iPad/AppDelegate_Pad.h +15 -0
- data/app/iPad/AppDelegate_Pad.m +28 -0
- data/app/iPad/Default-Landscape.png +0 -0
- data/app/iPad/Default-Portrait.png +0 -0
- data/app/iPad/MainWindow_Pad.xib +343 -0
- data/app/iPad/TestViewController_Pad.h +15 -0
- data/app/iPad/TestViewController_Pad.m +52 -0
- data/app/iPhone/AppDelegate_Phone.h +15 -0
- data/app/iPhone/AppDelegate_Phone.m +28 -0
- data/app/{images/segment_search.png → iPhone/Default.png} +0 -0
- data/app/iPhone/MainWindow_Phone.xib +363 -0
- data/app/iPhone/TestViewController_Phone.h +15 -0
- data/app/iPhone/TestViewController_Phone.m +36 -0
- data/bin/.gitignore +1 -0
- data/bin/icuke +10 -0
- data/bin/icuke-module +17 -0
- data/ext/.gitignore +1 -0
- data/ext/Rakefile +6 -0
- data/ext/WaxSim/Simulator.h +31 -0
- data/ext/WaxSim/Simulator.m +131 -0
- data/ext/WaxSim/WaxSim.m +110 -0
- data/ext/WaxSim/WaxSim.xcodeproj/project.pbxproj +238 -0
- data/ext/WaxSim/WaxSim_Prefix.pch +7 -0
- data/ext/WaxSim/iPhoneSimulatorRemoteClient/iPhoneSimulatorRemoteClient.h +126 -0
- data/ext/iCuke/Rakefile +14 -17
- data/ext/iCuke/libicuke-sdk3.1.dylib +0 -0
- data/ext/iCuke/libicuke-sdk4.0.dylib +0 -0
- data/ext/iCuke/libicuke.dylib +0 -0
- data/ext/iCuke/{DefaultsResponse.h → sdk3.1/DefaultsResponse.h} +0 -0
- data/ext/iCuke/{DefaultsResponse.m → sdk3.1/DefaultsResponse.m} +0 -0
- data/ext/iCuke/{EventResponse.h → sdk3.1/EventResponse.h} +0 -0
- data/ext/iCuke/{EventResponse.m → sdk3.1/EventResponse.m} +0 -0
- data/ext/iCuke/sdk3.1/ModuleResponse.h +5 -0
- data/ext/iCuke/sdk3.1/ModuleResponse.m +76 -0
- data/ext/iCuke/sdk3.1/Rakefile +20 -0
- data/ext/iCuke/{Recorder.h → sdk3.1/Recorder.h} +0 -0
- data/ext/iCuke/{Recorder.m → sdk3.1/Recorder.m} +0 -0
- data/ext/iCuke/{RecorderResponse.h → sdk3.1/RecorderResponse.h} +0 -0
- data/ext/iCuke/{RecorderResponse.m → sdk3.1/RecorderResponse.m} +0 -0
- data/ext/iCuke/{SynthesizeSingleton.h → sdk3.1/SynthesizeSingleton.h} +0 -0
- data/ext/iCuke/{ViewResponse.h → sdk3.1/ViewResponse.h} +0 -0
- data/ext/iCuke/{ViewResponse.m → sdk3.1/ViewResponse.m} +0 -0
- data/ext/iCuke/{Viewer.h → sdk3.1/Viewer.h} +0 -0
- data/ext/iCuke/sdk3.1/Viewer.m +203 -0
- data/ext/iCuke/{iCukeHTTPResponseHandler.h → sdk3.1/iCukeHTTPResponseHandler.h} +0 -0
- data/ext/iCuke/{iCukeHTTPResponseHandler.m → sdk3.1/iCukeHTTPResponseHandler.m} +0 -0
- data/ext/iCuke/{iCukeHTTPServer.h → sdk3.1/iCukeHTTPServer.h} +0 -0
- data/ext/iCuke/{iCukeHTTPServer.m → sdk3.1/iCukeHTTPServer.m} +0 -0
- data/ext/iCuke/{iCukeServer.h → sdk3.1/iCukeServer.h} +0 -2
- data/ext/iCuke/{iCukeServer.m → sdk3.1/iCukeServer.m} +22 -20
- data/ext/iCuke/{json → sdk3.1/json}/JSON.h +0 -0
- data/ext/iCuke/{json → sdk3.1/json}/NSObject+SBJSON.h +0 -0
- data/ext/iCuke/{json → sdk3.1/json}/NSObject+SBJSON.m +0 -0
- data/ext/iCuke/{json → sdk3.1/json}/NSString+SBJSON.h +0 -0
- data/ext/iCuke/{json → sdk3.1/json}/NSString+SBJSON.m +0 -0
- data/ext/iCuke/{json → sdk3.1/json}/SBJSON.h +0 -0
- data/ext/iCuke/{json → sdk3.1/json}/SBJSON.m +0 -0
- data/ext/iCuke/{json → sdk3.1/json}/SBJsonBase.h +0 -0
- data/ext/iCuke/{json → sdk3.1/json}/SBJsonBase.m +0 -0
- data/ext/iCuke/{json → sdk3.1/json}/SBJsonParser.h +0 -0
- data/ext/iCuke/{json → sdk3.1/json}/SBJsonParser.m +0 -0
- data/ext/iCuke/{json → sdk3.1/json}/SBJsonWriter.h +0 -0
- data/ext/iCuke/{json → sdk3.1/json}/SBJsonWriter.m +0 -0
- data/ext/iCuke/sdk4.0/DefaultsResponse.h +5 -0
- data/ext/iCuke/sdk4.0/DefaultsResponse.m +66 -0
- data/ext/iCuke/sdk4.0/EventResponse.h +5 -0
- data/ext/iCuke/sdk4.0/EventResponse.m +130 -0
- data/ext/iCuke/sdk4.0/ModuleResponse.h +5 -0
- data/ext/iCuke/sdk4.0/ModuleResponse.m +76 -0
- data/ext/iCuke/sdk4.0/Rakefile +20 -0
- data/ext/iCuke/sdk4.0/Recorder.h +17 -0
- data/ext/iCuke/sdk4.0/Recorder.m +90 -0
- data/ext/iCuke/sdk4.0/RecorderResponse.h +6 -0
- data/ext/iCuke/sdk4.0/RecorderResponse.m +68 -0
- data/ext/iCuke/sdk4.0/SynthesizeSingleton.h +68 -0
- data/ext/iCuke/sdk4.0/ViewResponse.h +5 -0
- data/ext/iCuke/sdk4.0/ViewResponse.m +84 -0
- data/ext/iCuke/sdk4.0/Viewer.h +8 -0
- data/ext/iCuke/{Viewer.m → sdk4.0/Viewer.m} +14 -0
- data/ext/iCuke/sdk4.0/iCukeHTTPResponseHandler.h +50 -0
- data/ext/iCuke/sdk4.0/iCukeHTTPResponseHandler.m +381 -0
- data/ext/iCuke/sdk4.0/iCukeHTTPServer.h +53 -0
- data/ext/iCuke/sdk4.0/iCukeHTTPServer.m +365 -0
- data/ext/iCuke/sdk4.0/iCukeServer.h +14 -0
- data/ext/iCuke/sdk4.0/iCukeServer.m +65 -0
- data/ext/iCuke/sdk4.0/json/JSON.h +50 -0
- data/ext/iCuke/sdk4.0/json/NSObject+SBJSON.h +68 -0
- data/ext/iCuke/sdk4.0/json/NSObject+SBJSON.m +53 -0
- data/ext/iCuke/sdk4.0/json/NSString+SBJSON.h +58 -0
- data/ext/iCuke/sdk4.0/json/NSString+SBJSON.m +55 -0
- data/ext/iCuke/sdk4.0/json/SBJSON.h +75 -0
- data/ext/iCuke/sdk4.0/json/SBJSON.m +212 -0
- data/ext/iCuke/sdk4.0/json/SBJsonBase.h +86 -0
- data/ext/iCuke/sdk4.0/json/SBJsonBase.m +78 -0
- data/ext/iCuke/sdk4.0/json/SBJsonParser.h +87 -0
- data/ext/iCuke/sdk4.0/json/SBJsonParser.m +475 -0
- data/ext/iCuke/sdk4.0/json/SBJsonWriter.h +129 -0
- data/ext/iCuke/sdk4.0/json/SBJsonWriter.m +228 -0
- data/features/iphone.feature +15 -0
- data/features/support/env.rb +1 -1
- data/iCuke.gemspec +118 -114
- data/lib/icuke/cucumber.rb +93 -64
- data/lib/icuke/screen.rb +110 -0
- data/lib/icuke/sdk.rb +134 -0
- data/lib/icuke/simulate.rb +9 -5
- data/lib/icuke/simulator.rb +10 -11
- data/lib/icuke/waxsim.rb +36 -0
- data/lib/icuke.rb +2 -1
- metadata +124 -129
- data/app/AlertsViewController.h +0 -59
- data/app/AlertsViewController.m +0 -341
- data/app/AppDelegate.h +0 -60
- data/app/AppDelegate.m +0 -101
- data/app/ButtonsViewController.h +0 -80
- data/app/ButtonsViewController.m +0 -448
- data/app/Constants.h +0 -58
- data/app/ControlsViewController.h +0 -72
- data/app/ControlsViewController.m +0 -379
- data/app/ImagesViewController.h +0 -62
- data/app/ImagesViewController.m +0 -137
- data/app/MainViewController.h +0 -57
- data/app/MainViewController.m +0 -262
- data/app/Picker/CustomPickerDataSource.h +0 -55
- data/app/Picker/CustomPickerDataSource.m +0 -135
- data/app/Picker/CustomView.h +0 -62
- data/app/Picker/CustomView.m +0 -119
- data/app/PickerViewController.h +0 -88
- data/app/PickerViewController.m +0 -402
- data/app/Prefix.pch +0 -5
- data/app/ReadMe.txt +0 -82
- data/app/SearchBarController.h +0 -58
- data/app/SearchBarController.m +0 -105
- data/app/SegmentViewController.h +0 -54
- data/app/SegmentViewController.m +0 -195
- data/app/TextFieldController.h +0 -67
- data/app/TextFieldController.m +0 -342
- data/app/TextViewController.h +0 -57
- data/app/TextViewController.m +0 -164
- data/app/ToolbarViewController.h +0 -74
- data/app/ToolbarViewController.m +0 -303
- data/app/TransitionViewController.h +0 -64
- data/app/TransitionViewController.m +0 -178
- data/app/UICatalog.xcodeproj/project.pbxproj +0 -615
- data/app/WebViewController.h +0 -57
- data/app/WebViewController.m +0 -173
- data/app/en.lproj/AlertsViewController.xib +0 -144
- data/app/en.lproj/ButtonsViewController.xib +0 -147
- data/app/en.lproj/ControlsViewController.xib +0 -147
- data/app/en.lproj/ImagesViewController.xib +0 -264
- data/app/en.lproj/Localizable.strings +0 -41
- data/app/en.lproj/MainWindow.xib +0 -306
- data/app/en.lproj/PickerViewController.xib +0 -415
- data/app/en.lproj/SearchBarController.xib +0 -142
- data/app/en.lproj/SegmentViewController.xib +0 -143
- data/app/en.lproj/TextFieldController.xib +0 -167
- data/app/en.lproj/TextViewController.xib +0 -149
- data/app/en.lproj/ToolbarViewController.xib +0 -491
- data/app/en.lproj/TransitionViewController.xib +0 -255
- data/app/en.lproj/WebViewController.xib +0 -141
- data/app/images/12-6AM.png +0 -0
- data/app/images/12-6PM.png +0 -0
- data/app/images/6-12AM.png +0 -0
- data/app/images/6-12PM.png +0 -0
- data/app/images/Default.png +0 -0
- data/app/images/Icon.png +0 -0
- data/app/images/UIButton_custom.png +0 -0
- data/app/images/blueButton.png +0 -0
- data/app/images/orangeslide.png +0 -0
- data/app/images/scene1.jpg +0 -0
- data/app/images/scene2.jpg +0 -0
- data/app/images/scene3.jpg +0 -0
- data/app/images/scene4.jpg +0 -0
- data/app/images/scene5.jpg +0 -0
- data/app/images/segment_check.png +0 -0
- data/app/images/segment_tools.png +0 -0
- data/app/images/slider_ball.png +0 -0
- data/app/images/whiteButton.png +0 -0
- data/app/main.m +0 -58
- data/features/uicatalog.feature +0 -20
- data/lib/icuke/com.apple.Accessibility.plist +0 -0
- data/lib/icuke/headless.rb +0 -54
- data/lib/icuke/xcode.rb +0 -164
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
|
|
3
|
+
<data>
|
|
4
|
+
<int key="IBDocument.SystemTarget">800</int>
|
|
5
|
+
<string key="IBDocument.SystemVersion">10D541</string>
|
|
6
|
+
<string key="IBDocument.InterfaceBuilderVersion">760</string>
|
|
7
|
+
<string key="IBDocument.AppKitVersion">1038.29</string>
|
|
8
|
+
<string key="IBDocument.HIToolboxVersion">460.00</string>
|
|
9
|
+
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
|
10
|
+
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
|
11
|
+
<string key="NS.object.0">81</string>
|
|
12
|
+
</object>
|
|
13
|
+
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
|
14
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
15
|
+
<integer value="2"/>
|
|
16
|
+
</object>
|
|
17
|
+
<object class="NSArray" key="IBDocument.PluginDependencies">
|
|
18
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
19
|
+
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
|
20
|
+
</object>
|
|
21
|
+
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
|
22
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
23
|
+
<object class="NSArray" key="dict.sortedKeys" id="0">
|
|
24
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
25
|
+
</object>
|
|
26
|
+
<object class="NSMutableArray" key="dict.values">
|
|
27
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
28
|
+
</object>
|
|
29
|
+
</object>
|
|
30
|
+
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
|
31
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
32
|
+
<object class="IBProxyObject" id="841351856">
|
|
33
|
+
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
|
34
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
|
35
|
+
</object>
|
|
36
|
+
<object class="IBProxyObject" id="450319686">
|
|
37
|
+
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
|
38
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
|
39
|
+
</object>
|
|
40
|
+
<object class="IBUICustomObject" id="987256611">
|
|
41
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
|
42
|
+
</object>
|
|
43
|
+
<object class="IBUIWindow" id="380026005">
|
|
44
|
+
<reference key="NSNextResponder"/>
|
|
45
|
+
<int key="NSvFlags">1316</int>
|
|
46
|
+
<object class="NSPSMatrix" key="NSFrameMatrix"/>
|
|
47
|
+
<string key="NSFrameSize">{320, 480}</string>
|
|
48
|
+
<reference key="NSSuperview"/>
|
|
49
|
+
<object class="NSColor" key="IBUIBackgroundColor">
|
|
50
|
+
<int key="NSColorSpace">1</int>
|
|
51
|
+
<bytes key="NSRGB">MSAxIDEAA</bytes>
|
|
52
|
+
</object>
|
|
53
|
+
<bool key="IBUIOpaque">NO</bool>
|
|
54
|
+
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
|
55
|
+
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
|
56
|
+
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
|
57
|
+
<bool key="IBUIResizesToFullScreen">YES</bool>
|
|
58
|
+
</object>
|
|
59
|
+
</object>
|
|
60
|
+
<object class="IBObjectContainer" key="IBDocument.Objects">
|
|
61
|
+
<object class="NSMutableArray" key="connectionRecords">
|
|
62
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
63
|
+
<object class="IBConnectionRecord">
|
|
64
|
+
<object class="IBCocoaTouchOutletConnection" key="connection">
|
|
65
|
+
<string key="label">delegate</string>
|
|
66
|
+
<reference key="source" ref="841351856"/>
|
|
67
|
+
<reference key="destination" ref="987256611"/>
|
|
68
|
+
</object>
|
|
69
|
+
<int key="connectionID">5</int>
|
|
70
|
+
</object>
|
|
71
|
+
<object class="IBConnectionRecord">
|
|
72
|
+
<object class="IBCocoaTouchOutletConnection" key="connection">
|
|
73
|
+
<string key="label">window</string>
|
|
74
|
+
<reference key="source" ref="987256611"/>
|
|
75
|
+
<reference key="destination" ref="380026005"/>
|
|
76
|
+
</object>
|
|
77
|
+
<int key="connectionID">6</int>
|
|
78
|
+
</object>
|
|
79
|
+
</object>
|
|
80
|
+
<object class="IBMutableOrderedSet" key="objectRecords">
|
|
81
|
+
<object class="NSArray" key="orderedObjects">
|
|
82
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
83
|
+
<object class="IBObjectRecord">
|
|
84
|
+
<int key="objectID">0</int>
|
|
85
|
+
<reference key="object" ref="0"/>
|
|
86
|
+
<reference key="children" ref="1000"/>
|
|
87
|
+
<nil key="parent"/>
|
|
88
|
+
</object>
|
|
89
|
+
<object class="IBObjectRecord">
|
|
90
|
+
<int key="objectID">2</int>
|
|
91
|
+
<reference key="object" ref="380026005"/>
|
|
92
|
+
<object class="NSMutableArray" key="children">
|
|
93
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
94
|
+
</object>
|
|
95
|
+
<reference key="parent" ref="0"/>
|
|
96
|
+
</object>
|
|
97
|
+
<object class="IBObjectRecord">
|
|
98
|
+
<int key="objectID">-1</int>
|
|
99
|
+
<reference key="object" ref="841351856"/>
|
|
100
|
+
<reference key="parent" ref="0"/>
|
|
101
|
+
<string key="objectName">File's Owner</string>
|
|
102
|
+
</object>
|
|
103
|
+
<object class="IBObjectRecord">
|
|
104
|
+
<int key="objectID">4</int>
|
|
105
|
+
<reference key="object" ref="987256611"/>
|
|
106
|
+
<reference key="parent" ref="0"/>
|
|
107
|
+
<string key="objectName">App Delegate</string>
|
|
108
|
+
</object>
|
|
109
|
+
<object class="IBObjectRecord">
|
|
110
|
+
<int key="objectID">-2</int>
|
|
111
|
+
<reference key="object" ref="450319686"/>
|
|
112
|
+
<reference key="parent" ref="0"/>
|
|
113
|
+
</object>
|
|
114
|
+
</object>
|
|
115
|
+
</object>
|
|
116
|
+
<object class="NSMutableDictionary" key="flattenedProperties">
|
|
117
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
118
|
+
<object class="NSArray" key="dict.sortedKeys">
|
|
119
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
120
|
+
<string>-1.CustomClassName</string>
|
|
121
|
+
<string>-2.CustomClassName</string>
|
|
122
|
+
<string>2.IBAttributePlaceholdersKey</string>
|
|
123
|
+
<string>2.IBEditorWindowLastContentRect</string>
|
|
124
|
+
<string>2.IBPluginDependency</string>
|
|
125
|
+
<string>2.UIWindow.visibleAtLaunch</string>
|
|
126
|
+
<string>4.CustomClassName</string>
|
|
127
|
+
<string>4.IBPluginDependency</string>
|
|
128
|
+
</object>
|
|
129
|
+
<object class="NSMutableArray" key="dict.values">
|
|
130
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
131
|
+
<string>UIApplication</string>
|
|
132
|
+
<string>UIResponder</string>
|
|
133
|
+
<object class="NSMutableDictionary">
|
|
134
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
135
|
+
<reference key="dict.sortedKeys" ref="0"/>
|
|
136
|
+
<object class="NSMutableArray" key="dict.values">
|
|
137
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
138
|
+
</object>
|
|
139
|
+
</object>
|
|
140
|
+
<string>{{520, 800}, {320, 480}}</string>
|
|
141
|
+
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
|
142
|
+
<integer value="1"/>
|
|
143
|
+
<string>AppDelegate_Phone</string>
|
|
144
|
+
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
|
145
|
+
</object>
|
|
146
|
+
</object>
|
|
147
|
+
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
|
148
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
149
|
+
<reference key="dict.sortedKeys" ref="0"/>
|
|
150
|
+
<object class="NSMutableArray" key="dict.values">
|
|
151
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
152
|
+
</object>
|
|
153
|
+
</object>
|
|
154
|
+
<nil key="activeLocalization"/>
|
|
155
|
+
<object class="NSMutableDictionary" key="localizations">
|
|
156
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
157
|
+
<reference key="dict.sortedKeys" ref="0"/>
|
|
158
|
+
<object class="NSMutableArray" key="dict.values">
|
|
159
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
160
|
+
</object>
|
|
161
|
+
</object>
|
|
162
|
+
<nil key="sourceID"/>
|
|
163
|
+
<int key="maxID">8</int>
|
|
164
|
+
</object>
|
|
165
|
+
<object class="IBClassDescriber" key="IBDocument.Classes">
|
|
166
|
+
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
|
167
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
168
|
+
<object class="IBPartialClassDescription">
|
|
169
|
+
<string key="className">AppDelegate_Phone</string>
|
|
170
|
+
<string key="superclassName">NSObject</string>
|
|
171
|
+
<object class="NSMutableDictionary" key="outlets">
|
|
172
|
+
<string key="NS.key.0">window</string>
|
|
173
|
+
<string key="NS.object.0">UIWindow</string>
|
|
174
|
+
</object>
|
|
175
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
176
|
+
<string key="majorKey">IBProjectSource</string>
|
|
177
|
+
<string key="minorKey">iPhone/AppDelegate_Phone.h</string>
|
|
178
|
+
</object>
|
|
179
|
+
</object>
|
|
180
|
+
<object class="IBPartialClassDescription">
|
|
181
|
+
<string key="className">AppDelegate_Phone</string>
|
|
182
|
+
<string key="superclassName">NSObject</string>
|
|
183
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
184
|
+
<string key="majorKey">IBUserSource</string>
|
|
185
|
+
<string key="minorKey"/>
|
|
186
|
+
</object>
|
|
187
|
+
</object>
|
|
188
|
+
</object>
|
|
189
|
+
<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
|
|
190
|
+
<bool key="EncodedWithXMLCoder">YES</bool>
|
|
191
|
+
<object class="IBPartialClassDescription">
|
|
192
|
+
<string key="className">NSObject</string>
|
|
193
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
194
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
195
|
+
<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
|
|
196
|
+
</object>
|
|
197
|
+
</object>
|
|
198
|
+
<object class="IBPartialClassDescription">
|
|
199
|
+
<string key="className">NSObject</string>
|
|
200
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
201
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
202
|
+
<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
|
|
203
|
+
</object>
|
|
204
|
+
</object>
|
|
205
|
+
<object class="IBPartialClassDescription">
|
|
206
|
+
<string key="className">NSObject</string>
|
|
207
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
208
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
209
|
+
<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
|
|
210
|
+
</object>
|
|
211
|
+
</object>
|
|
212
|
+
<object class="IBPartialClassDescription">
|
|
213
|
+
<string key="className">NSObject</string>
|
|
214
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
215
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
216
|
+
<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
|
|
217
|
+
</object>
|
|
218
|
+
</object>
|
|
219
|
+
<object class="IBPartialClassDescription">
|
|
220
|
+
<string key="className">NSObject</string>
|
|
221
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
222
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
223
|
+
<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
|
|
224
|
+
</object>
|
|
225
|
+
</object>
|
|
226
|
+
<object class="IBPartialClassDescription">
|
|
227
|
+
<string key="className">NSObject</string>
|
|
228
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
229
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
230
|
+
<string key="minorKey">Foundation.framework/Headers/NSNetServices.h</string>
|
|
231
|
+
</object>
|
|
232
|
+
</object>
|
|
233
|
+
<object class="IBPartialClassDescription">
|
|
234
|
+
<string key="className">NSObject</string>
|
|
235
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
236
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
237
|
+
<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
|
|
238
|
+
</object>
|
|
239
|
+
</object>
|
|
240
|
+
<object class="IBPartialClassDescription">
|
|
241
|
+
<string key="className">NSObject</string>
|
|
242
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
243
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
244
|
+
<string key="minorKey">Foundation.framework/Headers/NSPort.h</string>
|
|
245
|
+
</object>
|
|
246
|
+
</object>
|
|
247
|
+
<object class="IBPartialClassDescription">
|
|
248
|
+
<string key="className">NSObject</string>
|
|
249
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
250
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
251
|
+
<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
|
|
252
|
+
</object>
|
|
253
|
+
</object>
|
|
254
|
+
<object class="IBPartialClassDescription">
|
|
255
|
+
<string key="className">NSObject</string>
|
|
256
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
257
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
258
|
+
<string key="minorKey">Foundation.framework/Headers/NSStream.h</string>
|
|
259
|
+
</object>
|
|
260
|
+
</object>
|
|
261
|
+
<object class="IBPartialClassDescription">
|
|
262
|
+
<string key="className">NSObject</string>
|
|
263
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
264
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
265
|
+
<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
|
|
266
|
+
</object>
|
|
267
|
+
</object>
|
|
268
|
+
<object class="IBPartialClassDescription">
|
|
269
|
+
<string key="className">NSObject</string>
|
|
270
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
271
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
272
|
+
<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
|
|
273
|
+
</object>
|
|
274
|
+
</object>
|
|
275
|
+
<object class="IBPartialClassDescription">
|
|
276
|
+
<string key="className">NSObject</string>
|
|
277
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
278
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
279
|
+
<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
|
|
280
|
+
</object>
|
|
281
|
+
</object>
|
|
282
|
+
<object class="IBPartialClassDescription">
|
|
283
|
+
<string key="className">NSObject</string>
|
|
284
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
285
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
286
|
+
<string key="minorKey">Foundation.framework/Headers/NSXMLParser.h</string>
|
|
287
|
+
</object>
|
|
288
|
+
</object>
|
|
289
|
+
<object class="IBPartialClassDescription">
|
|
290
|
+
<string key="className">NSObject</string>
|
|
291
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
292
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
293
|
+
<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
|
|
294
|
+
</object>
|
|
295
|
+
</object>
|
|
296
|
+
<object class="IBPartialClassDescription">
|
|
297
|
+
<string key="className">NSObject</string>
|
|
298
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
299
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
300
|
+
<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
|
|
301
|
+
</object>
|
|
302
|
+
</object>
|
|
303
|
+
<object class="IBPartialClassDescription">
|
|
304
|
+
<string key="className">NSObject</string>
|
|
305
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="565734826">
|
|
306
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
307
|
+
<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
|
|
308
|
+
</object>
|
|
309
|
+
</object>
|
|
310
|
+
<object class="IBPartialClassDescription">
|
|
311
|
+
<string key="className">UIApplication</string>
|
|
312
|
+
<string key="superclassName">UIResponder</string>
|
|
313
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
314
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
315
|
+
<string key="minorKey">UIKit.framework/Headers/UIApplication.h</string>
|
|
316
|
+
</object>
|
|
317
|
+
</object>
|
|
318
|
+
<object class="IBPartialClassDescription">
|
|
319
|
+
<string key="className">UIResponder</string>
|
|
320
|
+
<string key="superclassName">NSObject</string>
|
|
321
|
+
<reference key="sourceIdentifier" ref="565734826"/>
|
|
322
|
+
</object>
|
|
323
|
+
<object class="IBPartialClassDescription">
|
|
324
|
+
<string key="className">UIView</string>
|
|
325
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
326
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
327
|
+
<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
|
|
328
|
+
</object>
|
|
329
|
+
</object>
|
|
330
|
+
<object class="IBPartialClassDescription">
|
|
331
|
+
<string key="className">UIView</string>
|
|
332
|
+
<string key="superclassName">UIResponder</string>
|
|
333
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
334
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
335
|
+
<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
|
|
336
|
+
</object>
|
|
337
|
+
</object>
|
|
338
|
+
<object class="IBPartialClassDescription">
|
|
339
|
+
<string key="className">UIWindow</string>
|
|
340
|
+
<string key="superclassName">UIView</string>
|
|
341
|
+
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
|
342
|
+
<string key="majorKey">IBFrameworkSource</string>
|
|
343
|
+
<string key="minorKey">UIKit.framework/Headers/UIWindow.h</string>
|
|
344
|
+
</object>
|
|
345
|
+
</object>
|
|
346
|
+
</object>
|
|
347
|
+
</object>
|
|
348
|
+
<int key="IBDocument.localizationMode">0</int>
|
|
349
|
+
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
|
350
|
+
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
|
351
|
+
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
|
352
|
+
<integer value="800" key="NS.object.0"/>
|
|
353
|
+
</object>
|
|
354
|
+
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
|
355
|
+
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
|
356
|
+
<integer value="3100" key="NS.object.0"/>
|
|
357
|
+
</object>
|
|
358
|
+
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
|
359
|
+
<string key="IBDocument.LastKnownRelativeProjectPath">../Universal.xcodeproj</string>
|
|
360
|
+
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
|
361
|
+
<string key="IBCocoaTouchPluginVersion">81</string>
|
|
362
|
+
</data>
|
|
363
|
+
</archive>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TestViewController_Phone.h
|
|
3
|
+
// Universal
|
|
4
|
+
//
|
|
5
|
+
// Created by Sam Soffes on 4/12/10.
|
|
6
|
+
// Copyright 2010 Sam Soffes. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import "TestViewController_Shared.h"
|
|
10
|
+
|
|
11
|
+
@interface TestViewController_Phone : TestViewController_Shared {
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// TestViewController_Phone.m
|
|
3
|
+
// Universal
|
|
4
|
+
//
|
|
5
|
+
// Created by Sam Soffes on 4/12/10.
|
|
6
|
+
// Copyright 2010 Sam Soffes. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import "TestViewController_Phone.h"
|
|
10
|
+
#import "ModalViewController.h"
|
|
11
|
+
|
|
12
|
+
@implementation TestViewController_Phone
|
|
13
|
+
|
|
14
|
+
#pragma mark -
|
|
15
|
+
#pragma mark UIViewController
|
|
16
|
+
#pragma mark -
|
|
17
|
+
|
|
18
|
+
- (void)viewDidLoad {
|
|
19
|
+
[super viewDidLoad];
|
|
20
|
+
self.title = @"iPhone";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
#pragma mark -
|
|
25
|
+
#pragma mark Actions
|
|
26
|
+
#pragma mark -
|
|
27
|
+
|
|
28
|
+
- (void)test:(id)sender {
|
|
29
|
+
ModalViewController *viewController = [[ModalViewController alloc] init];
|
|
30
|
+
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
|
|
31
|
+
[viewController release];
|
|
32
|
+
[self.navigationController presentModalViewController:navigationController animated:YES];
|
|
33
|
+
[navigationController release];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@end
|
data/bin/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
iphonesim
|
data/bin/icuke
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require 'fileutils'
|
|
4
|
+
|
|
5
|
+
base = File.expand_path(ARGV[0])
|
|
6
|
+
FileUtils.mkdir_p(File.join(base, 'features', 'support'))
|
|
7
|
+
File.open(File.join(base, 'features', 'support', 'env.rb'), 'w') do |f|
|
|
8
|
+
f.puts "require 'icuke/cucumber'"
|
|
9
|
+
end
|
|
10
|
+
FileUtils.touch File.join(base, 'features', 'example.feature')
|
data/bin/icuke-module
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require File.join(File.dirname(__FILE__), '..', 'lib', 'icuke', 'sdk')
|
|
4
|
+
|
|
5
|
+
sdk = ARGV[0]
|
|
6
|
+
ICuke::SDK.use_latest(sdk)
|
|
7
|
+
file = ARGV[1]
|
|
8
|
+
frameworks = ['Foundation', 'CFNetwork']
|
|
9
|
+
frameworks.concat(ARGV[2 .. -1])
|
|
10
|
+
frameworks = frameworks.map { |f| "-framework #{f}" }.join(' ')
|
|
11
|
+
|
|
12
|
+
compile = "#{ICuke::SDK.gcc} -c -o #{File.basename(file, '.m')}.o #{file} "
|
|
13
|
+
puts compile
|
|
14
|
+
system compile
|
|
15
|
+
link = "#{ICuke::SDK.ld} -dynamiclib -o #{ICuke::SDK.dylib(File.basename(file, '.m'))} -undefined dynamic_lookup #{File.basename(file, '.m')}.o #{frameworks}"
|
|
16
|
+
puts link
|
|
17
|
+
system link
|
data/ext/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bin
|
data/ext/Rakefile
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Simulator.h
|
|
3
|
+
// Sim
|
|
4
|
+
//
|
|
5
|
+
// Created by ProbablyInteractive on 7/28/09.
|
|
6
|
+
// Copyright 2009 Probably Interactive. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Cocoa/Cocoa.h>
|
|
10
|
+
#import "iPhoneSimulatorRemoteClient.h"
|
|
11
|
+
|
|
12
|
+
@class DTiPhoneSimulatorSystemRoot;
|
|
13
|
+
|
|
14
|
+
@interface Simulator : NSObject <DTiPhoneSimulatorSessionDelegate> {
|
|
15
|
+
NSString *_appPath;
|
|
16
|
+
DTiPhoneSimulatorSystemRoot *_sdk;
|
|
17
|
+
NSNumber *_family;
|
|
18
|
+
DTiPhoneSimulatorSession* _session;
|
|
19
|
+
NSDictionary *_env;
|
|
20
|
+
NSArray *_args;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@property (nonatomic, readonly) DTiPhoneSimulatorSession* session;
|
|
24
|
+
|
|
25
|
+
+ (NSArray *)availableSDKs;
|
|
26
|
+
|
|
27
|
+
- (id)initWithAppPath:(NSString *)appPath sdk:(NSString *)sdk family:(NSString *)family env:(NSDictionary *)env args:(NSArray *)args;
|
|
28
|
+
- (int)launch;
|
|
29
|
+
- (void)end;
|
|
30
|
+
|
|
31
|
+
@end
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
//
|
|
2
|
+
//
|
|
3
|
+
// Sim
|
|
4
|
+
//
|
|
5
|
+
// Created by ProbablyInteractive on 7/28/09.
|
|
6
|
+
// Copyright 2009 Probably Interactive. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import "Simulator.h"
|
|
10
|
+
|
|
11
|
+
#include <sys/param.h>
|
|
12
|
+
#include <objc/runtime.h>
|
|
13
|
+
|
|
14
|
+
#define WaxLog(format, args...) \
|
|
15
|
+
printf("%s\n", [[NSString stringWithFormat:(format), ## args] UTF8String])
|
|
16
|
+
|
|
17
|
+
@implementation Simulator
|
|
18
|
+
|
|
19
|
+
@synthesize session=_session;
|
|
20
|
+
|
|
21
|
+
- (id)initWithAppPath:(NSString *)appPath sdk:(NSString *)sdk family:(NSString *)family env:(NSDictionary *)env args:(NSArray *)args {
|
|
22
|
+
self = [super init];
|
|
23
|
+
|
|
24
|
+
NSFileManager *fileManager = [NSFileManager defaultManager];
|
|
25
|
+
if (![appPath isAbsolutePath]) {
|
|
26
|
+
appPath = [[fileManager currentDirectoryPath] stringByAppendingPathComponent:appPath];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
_appPath = [appPath retain];
|
|
30
|
+
|
|
31
|
+
if (![fileManager fileExistsAtPath:_appPath]) {
|
|
32
|
+
WaxLog(@"App path '%@' does not exist!", _appPath);
|
|
33
|
+
exit(EXIT_FAILURE);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (!sdk) _sdk = [[DTiPhoneSimulatorSystemRoot defaultRoot] retain];
|
|
37
|
+
else {
|
|
38
|
+
_sdk = [[DTiPhoneSimulatorSystemRoot rootWithSDKVersion:sdk] retain];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (!_sdk) {
|
|
42
|
+
WaxLog(@"Unknown sdk '%@'", sdk);
|
|
43
|
+
WaxLog(@"Available sdks are...");
|
|
44
|
+
for (id root in [DTiPhoneSimulatorSystemRoot knownRoots]) {
|
|
45
|
+
WaxLog(@" %@", [root sdkVersion]);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
exit(EXIT_FAILURE);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if ([family isEqualToString: @"ipad"]) {
|
|
52
|
+
_family = [NSNumber numberWithInt: 2];
|
|
53
|
+
} else {
|
|
54
|
+
_family = [NSNumber numberWithInt: 1];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
_env = [env retain];
|
|
58
|
+
_args = [args retain];
|
|
59
|
+
|
|
60
|
+
return self;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
+ (NSArray *)availableSDKs {
|
|
64
|
+
NSMutableArray *sdks = [NSMutableArray array];
|
|
65
|
+
for (id root in [DTiPhoneSimulatorSystemRoot knownRoots]) {
|
|
66
|
+
[sdks addObject:[root sdkVersion]];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return sdks;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
- (int)launch {
|
|
73
|
+
WaxLog(@"Launching '%@' on'%@'", _appPath, [_sdk sdkDisplayName]);
|
|
74
|
+
|
|
75
|
+
DTiPhoneSimulatorApplicationSpecifier *appSpec = [DTiPhoneSimulatorApplicationSpecifier specifierWithApplicationPath:_appPath];
|
|
76
|
+
if (!appSpec) {
|
|
77
|
+
WaxLog(@"Could not load application specifier for '%@'", _appPath);
|
|
78
|
+
return EXIT_FAILURE;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
DTiPhoneSimulatorSystemRoot *sdkRoot = [DTiPhoneSimulatorSystemRoot defaultRoot];
|
|
82
|
+
|
|
83
|
+
DTiPhoneSimulatorSessionConfig *config = [[DTiPhoneSimulatorSessionConfig alloc] init];
|
|
84
|
+
[config setApplicationToSimulateOnStart:appSpec];
|
|
85
|
+
[config setSimulatedSystemRoot:sdkRoot];
|
|
86
|
+
[config setSimulatedDeviceFamily:_family];
|
|
87
|
+
[config setSimulatedApplicationShouldWaitForDebugger:NO];
|
|
88
|
+
[config setSimulatedApplicationLaunchArgs:_args];
|
|
89
|
+
[config setSimulatedApplicationLaunchEnvironment:_env];
|
|
90
|
+
[config setLocalizedClientName:@"iCuke"];
|
|
91
|
+
|
|
92
|
+
// Make the simulator output to the current STDOUT & STDERR
|
|
93
|
+
char path[MAXPATHLEN];
|
|
94
|
+
fcntl(STDOUT_FILENO, F_GETPATH, &path);
|
|
95
|
+
[config setSimulatedApplicationStdOutPath:[NSString stringWithUTF8String:path]];
|
|
96
|
+
|
|
97
|
+
fcntl(STDERR_FILENO, F_GETPATH, &path);
|
|
98
|
+
[config setSimulatedApplicationStdErrPath:[NSString stringWithUTF8String:path]];
|
|
99
|
+
|
|
100
|
+
_session = [[DTiPhoneSimulatorSession alloc] init];
|
|
101
|
+
[_session setDelegate:self];
|
|
102
|
+
[_session setSimulatedApplicationPID:[NSNumber numberWithInt:35]];
|
|
103
|
+
|
|
104
|
+
NSError *error;
|
|
105
|
+
if (![_session requestStartWithConfig:config timeout:30 error:&error]) {
|
|
106
|
+
WaxLog(@"Could not start simulator session: %@", [error localizedDescription]);
|
|
107
|
+
return EXIT_FAILURE;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return EXIT_SUCCESS;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
- (void)end {
|
|
114
|
+
[_session requestEndWithTimeout:0];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// DTiPhoneSimulatorSession Delegate
|
|
118
|
+
// ---------------------------------
|
|
119
|
+
- (void)session:(DTiPhoneSimulatorSession *)session didStart:(BOOL)started withError:(NSError *)error {
|
|
120
|
+
if (!started) {
|
|
121
|
+
WaxLog(@"Session failed to start. %@", [error localizedDescription]);
|
|
122
|
+
exit(EXIT_FAILURE);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
- (void)session:(DTiPhoneSimulatorSession *)session didEndWithError:(NSError *)error {
|
|
127
|
+
WaxLog(@"Session ended with error. %@", [error localizedDescription]);
|
|
128
|
+
if ([error code] != 2) exit(EXIT_FAILURE); // if it is a timeout error, that's cool. We are probably rebooting
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@end
|