Permalink
Browse files

Added test for restoring.

  • Loading branch information...
1 parent 85913ee commit eb948cfba3e8f1be5e3849e99399a77202d42af4 @millenomi committed Feb 3, 2010
Showing with 61 additions and 10 deletions.
  1. +55 −10 MainWindow.xib
  2. +1 −0 TestApp.h
  3. +5 −0 TestApp.m
View
@@ -40,7 +40,7 @@
<int key="NSvFlags">1316</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="IBUIButton" id="938425146">
+ <object class="IBUIButton" id="198722900">
<reference key="NSNextResponder" ref="380026005"/>
<int key="NSvFlags">1316</int>
<string key="NSFrame">{{122, 196}, {72, 37}}</string>
@@ -49,26 +49,45 @@
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
<int key="IBUIContentHorizontalAlignment">0</int>
<int key="IBUIContentVerticalAlignment">0</int>
- <object class="NSFont" key="IBUIFont">
+ <object class="NSFont" key="IBUIFont" id="931861077">
<string key="NSName">Helvetica-Bold</string>
<double key="NSSize">15</double>
<int key="NSfFlags">16</int>
</object>
<int key="IBUIButtonType">1</int>
<string key="IBUINormalTitle">Prova</string>
- <object class="NSColor" key="IBUIHighlightedTitleColor">
+ <object class="NSColor" key="IBUIHighlightedTitleColor" id="160811193">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
<object class="NSColor" key="IBUINormalTitleColor">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
</object>
- <object class="NSColor" key="IBUINormalTitleShadowColor">
+ <object class="NSColor" key="IBUINormalTitleShadowColor" id="718216524">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC41AA</bytes>
</object>
</object>
+ <object class="IBUIButton" id="444183479">
+ <reference key="NSNextResponder" ref="380026005"/>
+ <int key="NSvFlags">1316</int>
+ <string key="NSFrame">{{118, 249}, {80, 37}}</string>
+ <reference key="NSSuperview" ref="380026005"/>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <reference key="IBUIFont" ref="931861077"/>
+ <int key="IBUIButtonType">1</int>
+ <string key="IBUINormalTitle">Restore</string>
+ <reference key="IBUIHighlightedTitleColor" ref="160811193"/>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+ </object>
+ <reference key="IBUINormalTitleShadowColor" ref="718216524"/>
+ </object>
</object>
<object class="NSPSMatrix" key="NSFrameMatrix"/>
<string key="NSFrameSize">{320, 480}</string>
@@ -105,12 +124,21 @@
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
<string key="label">buy</string>
- <reference key="source" ref="938425146"/>
+ <reference key="source" ref="198722900"/>
<reference key="destination" ref="987256611"/>
<int key="IBEventType">7</int>
</object>
<int key="connectionID">10</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">restore</string>
+ <reference key="source" ref="444183479"/>
+ <reference key="destination" ref="987256611"/>
+ <int key="IBEventType">7</int>
+ </object>
+ <int key="connectionID">13</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -126,7 +154,8 @@
<reference key="object" ref="380026005"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="938425146"/>
+ <reference ref="198722900"/>
+ <reference ref="444183479"/>
</object>
<reference key="parent" ref="0"/>
</object>
@@ -143,14 +172,19 @@
</object>
<object class="IBObjectRecord">
<int key="objectID">6</int>
- <reference key="object" ref="938425146"/>
+ <reference key="object" ref="198722900"/>
<reference key="parent" ref="380026005"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">7</int>
<reference key="object" ref="987256611"/>
<reference key="parent" ref="0"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">11</int>
+ <reference key="object" ref="444183479"/>
+ <reference key="parent" ref="380026005"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -159,6 +193,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.CustomClassName</string>
<string>-2.CustomClassName</string>
+ <string>11.IBPluginDependency</string>
<string>2.IBAttributePlaceholdersKey</string>
<string>2.IBEditorWindowLastContentRect</string>
<string>2.IBPluginDependency</string>
@@ -171,6 +206,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UIApplication</string>
<string>UIResponder</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<object class="NSMutableDictionary">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
@@ -202,7 +238,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">10</int>
+ <int key="maxID">13</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -211,8 +247,17 @@
<string key="className">TestApp</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
- <string key="NS.key.0">buy</string>
- <string key="NS.object.0">id</string>
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>buy</string>
+ <string>restore</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ </object>
</object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">window</string>
View
@@ -15,5 +15,6 @@
}
- (IBAction) buy;
+- (IBAction) restore;
@end
View
@@ -28,6 +28,11 @@ - (IBAction) buy;
[pr start];
}
+- (IBAction) restore;
+{
+ [[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
+}
+
- (void) productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response;
{
if ([response.products count] == 0)

0 comments on commit eb948cf

Please sign in to comment.