Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add sample projects.

  • Loading branch information...
commit 6ed21c735d8a83379eed50bea162dff9d433c342 1 parent e5acf2f
@glassonion1 authored
Showing with 3,274 additions and 115 deletions.
  1. +6 −1 ios/AddressBook/AddressBook.xcodeproj/project.pbxproj
  2. +6 −6 ios/AddressBook/AddressBook/DetailViewController.h
  3. +0 −14 ios/AddressBook/AddressBook/MasterViewController.m
  4. +8 −9 ios/AddressBook/AddressBook/en.lproj/MainStoryboard_iPad.storyboard
  5. BIN  ios/AddressBook/Default-568h@2x.png
  6. +4 −1 ios/AddressBookForiCloud/AddressBook.xcodeproj/project.pbxproj
  7. +2 −0  ios/ArchiveSample/ArchiveSample.xcodeproj/project.pbxproj
  8. +0 −2  ios/ArchiveSample/ArchiveSample/Address.m
  9. +0 −2  ios/ArchiveSample/ArchiveSample/Person.m
  10. +9 −2 ios/ArchiveSample/ArchiveSample/ViewController.m
  11. +476 −0 ios/CollectionViewSample/CollectionViewSample.xcodeproj/project.pbxproj
  12. +7 −0 ios/CollectionViewSample/CollectionViewSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  13. +15 −0 ios/CollectionViewSample/CollectionViewSample/AppDelegate.h
  14. +46 −0 ios/CollectionViewSample/CollectionViewSample/AppDelegate.m
  15. +49 −0 ios/CollectionViewSample/CollectionViewSample/CollectionViewSample-Info.plist
  16. +14 −0 ios/CollectionViewSample/CollectionViewSample/CollectionViewSample-Prefix.pch
  17. BIN  ios/CollectionViewSample/CollectionViewSample/Default-568h@2x.png
  18. BIN  ios/CollectionViewSample/CollectionViewSample/Default.png
  19. BIN  ios/CollectionViewSample/CollectionViewSample/Default@2x.png
  20. +13 −0 ios/CollectionViewSample/CollectionViewSample/ViewController.h
  21. +53 −0 ios/CollectionViewSample/CollectionViewSample/ViewController.m
  22. +2 −0  ios/CollectionViewSample/CollectionViewSample/en.lproj/InfoPlist.strings
  23. +26 −0 ios/CollectionViewSample/CollectionViewSample/en.lproj/MainStoryboard_iPad.storyboard
  24. +67 −0 ios/CollectionViewSample/CollectionViewSample/en.lproj/MainStoryboard_iPhone.storyboard
  25. +18 −0 ios/CollectionViewSample/CollectionViewSample/main.m
  26. +22 −0 ios/CollectionViewSample/CollectionViewSampleTests/CollectionViewSampleTests-Info.plist
  27. +13 −0 ios/CollectionViewSample/CollectionViewSampleTests/CollectionViewSampleTests.h
  28. +32 −0 ios/CollectionViewSample/CollectionViewSampleTests/CollectionViewSampleTests.m
  29. +2 −0  ios/CollectionViewSample/CollectionViewSampleTests/en.lproj/InfoPlist.strings
  30. +319 −0 ios/InAppPurchaseSample/InAppPurchaseSample.xcodeproj/project.pbxproj
  31. +7 −0 ios/InAppPurchaseSample/InAppPurchaseSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  32. +15 −0 ios/InAppPurchaseSample/InAppPurchaseSample/AppDelegate.h
  33. +46 −0 ios/InAppPurchaseSample/InAppPurchaseSample/AppDelegate.m
  34. BIN  ios/InAppPurchaseSample/InAppPurchaseSample/Default-568h@2x.png
  35. BIN  ios/InAppPurchaseSample/InAppPurchaseSample/Default.png
  36. BIN  ios/InAppPurchaseSample/InAppPurchaseSample/Default@2x.png
  37. +49 −0 ios/InAppPurchaseSample/InAppPurchaseSample/InAppPurchaseSample-Info.plist
  38. +14 −0 ios/InAppPurchaseSample/InAppPurchaseSample/InAppPurchaseSample-Prefix.pch
  39. +19 −0 ios/InAppPurchaseSample/InAppPurchaseSample/ViewController.h
  40. +136 −0 ios/InAppPurchaseSample/InAppPurchaseSample/ViewController.m
  41. +2 −0  ios/InAppPurchaseSample/InAppPurchaseSample/en.lproj/InfoPlist.strings
  42. +26 −0 ios/InAppPurchaseSample/InAppPurchaseSample/en.lproj/MainStoryboard_iPad.storyboard
  43. +95 −0 ios/InAppPurchaseSample/InAppPurchaseSample/en.lproj/MainStoryboard_iPhone.storyboard
  44. +18 −0 ios/InAppPurchaseSample/InAppPurchaseSample/main.m
  45. +36 −1 ios/LifecycleEventSample/LifecycleEventSample/AppDelegate.m
  46. +12 −23 ios/LifecycleEventSample/LifecycleEventSample/ModalViewController.m
  47. +36 −26 ios/LifecycleEventSample/LifecycleEventSample/ViewController.m
  48. +4 −5 ios/LifecycleEventSample/LifecycleEventSample/en.lproj/MainStoryboard_iPhone.storyboard
  49. +313 −0 ios/MemoryDataManagement/MemoryDataManagement.xcodeproj/project.pbxproj
  50. +7 −0 ios/MemoryDataManagement/MemoryDataManagement.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  51. +17 −0 ios/MemoryDataManagement/MemoryDataManagement/AppDelegate.h
  52. +54 −0 ios/MemoryDataManagement/MemoryDataManagement/AppDelegate.m
  53. BIN  ios/MemoryDataManagement/MemoryDataManagement/Default-568h@2x.png
  54. BIN  ios/MemoryDataManagement/MemoryDataManagement/Default.png
  55. BIN  ios/MemoryDataManagement/MemoryDataManagement/Default@2x.png
  56. +49 −0 ios/MemoryDataManagement/MemoryDataManagement/MemoryDataManagement-Info.plist
  57. +14 −0 ios/MemoryDataManagement/MemoryDataManagement/MemoryDataManagement-Prefix.pch
  58. +19 −0 ios/MemoryDataManagement/MemoryDataManagement/ViewController.h
  59. +44 −0 ios/MemoryDataManagement/MemoryDataManagement/ViewController.m
  60. +2 −0  ios/MemoryDataManagement/MemoryDataManagement/en.lproj/InfoPlist.strings
  61. +26 −0 ios/MemoryDataManagement/MemoryDataManagement/en.lproj/MainStoryboard_iPad.storyboard
  62. +88 −0 ios/MemoryDataManagement/MemoryDataManagement/en.lproj/MainStoryboard_iPhone.storyboard
  63. +18 −0 ios/MemoryDataManagement/MemoryDataManagement/main.m
  64. +1 −6 ios/NSOperationSample2/NSOperationSample2/HttpAsyncOperation.h
  65. +6 −3 ios/NSOperationSample2/NSOperationSample2/HttpAsyncOperation.m
  66. +1 −4 ios/NSOperationSample2/NSOperationSample2/HttpOperation.h
  67. +4 −1 ios/NSOperationSample2/NSOperationSample2/HttpOperation.m
  68. +11 −0 ios/NSOperationSample2/NSOperationSample2/ViewController.m
  69. +19 −4 ios/NSOperationSample2/NSOperationSample2/en.lproj/MainStoryboard_iPhone.storyboard
  70. +476 −0 ios/TableViewSample/TableViewSample.xcodeproj/project.pbxproj
  71. +7 −0 ios/TableViewSample/TableViewSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  72. +15 −0 ios/TableViewSample/TableViewSample/AppDelegate.h
  73. +46 −0 ios/TableViewSample/TableViewSample/AppDelegate.m
  74. BIN  ios/TableViewSample/TableViewSample/Default-568h@2x.png
  75. BIN  ios/TableViewSample/TableViewSample/Default.png
  76. BIN  ios/TableViewSample/TableViewSample/Default@2x.png
  77. +49 −0 ios/TableViewSample/TableViewSample/TableViewSample-Info.plist
  78. +14 −0 ios/TableViewSample/TableViewSample/TableViewSample-Prefix.pch
  79. +13 −0 ios/TableViewSample/TableViewSample/ViewController.h
  80. +72 −0 ios/TableViewSample/TableViewSample/ViewController.m
  81. +2 −0  ios/TableViewSample/TableViewSample/en.lproj/InfoPlist.strings
  82. +26 −0 ios/TableViewSample/TableViewSample/en.lproj/MainStoryboard_iPad.storyboard
  83. +47 −0 ios/TableViewSample/TableViewSample/en.lproj/MainStoryboard_iPhone.storyboard
  84. +18 −0 ios/TableViewSample/TableViewSample/main.m
  85. +22 −0 ios/TableViewSample/TableViewSampleTests/TableViewSampleTests-Info.plist
  86. +13 −0 ios/TableViewSample/TableViewSampleTests/TableViewSampleTests.h
  87. +32 −0 ios/TableViewSample/TableViewSampleTests/TableViewSampleTests.m
  88. +2 −0  ios/TableViewSample/TableViewSampleTests/en.lproj/InfoPlist.strings
  89. +3 −5 ios/TouchSample/TouchSample/en.lproj/MainStoryboard_iPhone.storyboard
View
7 ios/AddressBook/AddressBook.xcodeproj/project.pbxproj
@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
+ 6E1A72E6160BCB0B005BD7A9 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E1A72E5160BCB0B005BD7A9 /* Default-568h@2x.png */; };
FF084DE1146E74490092A1A2 /* Person.m in Sources */ = {isa = PBXBuildFile; fileRef = FF084DE0146E74490092A1A2 /* Person.m */; };
FF084DE5146E746D0092A1A2 /* Address.m in Sources */ = {isa = PBXBuildFile; fileRef = FF084DE4146E746D0092A1A2 /* Address.m */; };
FFA54098146E6E33005589B6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FFA54097146E6E32005589B6 /* UIKit.framework */; };
@@ -24,6 +25,7 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 6E1A72E5160BCB0B005BD7A9 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
FF084DDF146E74490092A1A2 /* Person.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Person.h; sourceTree = "<group>"; };
FF084DE0146E74490092A1A2 /* Person.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Person.m; sourceTree = "<group>"; };
FF084DE3146E746D0092A1A2 /* Address.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Address.h; sourceTree = "<group>"; };
@@ -66,6 +68,7 @@
FFA54088146E6E32005589B6 = {
isa = PBXGroup;
children = (
+ 6E1A72E5160BCB0B005BD7A9 /* Default-568h@2x.png */,
FFA5409F146E6E33005589B6 /* AddressBook */,
FFA54096146E6E32005589B6 /* Frameworks */,
FFA54094146E6E32005589B6 /* Products */,
@@ -177,6 +180,7 @@
FFA540A4146E6E33005589B6 /* InfoPlist.strings in Resources */,
FFA540AD146E6E33005589B6 /* MainStoryboard_iPhone.storyboard in Resources */,
FFA540B0146E6E33005589B6 /* MainStoryboard_iPad.storyboard in Resources */,
+ 6E1A72E6160BCB0B005BD7A9 /* Default-568h@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -232,7 +236,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: taisuke fujita (Y8FAU24X57)";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
@@ -247,6 +251,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "524D2144-96C2-413D-B62D-0F2CA701792E";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
View
12 ios/AddressBook/AddressBook/DetailViewController.h
@@ -14,11 +14,11 @@
@property (strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (strong, nonatomic) Person *detailItem;
-@property (strong, nonatomic) IBOutlet UIScrollView *scrollView;
-@property (strong, nonatomic) IBOutlet UITextField *nameField;
-@property (strong, nonatomic) IBOutlet UITextField *zipCodeField;
-@property (strong, nonatomic) IBOutlet UITextField *stateField;
-@property (strong, nonatomic) IBOutlet UITextField *cityField;
-@property (strong, nonatomic) IBOutlet UITextField *otherField;
+@property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
+@property (weak, nonatomic) IBOutlet UITextField *nameField;
+@property (weak, nonatomic) IBOutlet UITextField *zipCodeField;
+@property (weak, nonatomic) IBOutlet UITextField *stateField;
+@property (weak, nonatomic) IBOutlet UITextField *cityField;
+@property (weak, nonatomic) IBOutlet UITextField *otherField;
@end
View
14 ios/AddressBook/AddressBook/MasterViewController.m
@@ -215,20 +215,6 @@ - (void)controllerWillChangeContent:(NSFetchedResultsController *)controller
[self.tableView beginUpdates];
}
-- (void)controller:(NSFetchedResultsController *)controller didChangeSection:(id <NSFetchedResultsSectionInfo>)sectionInfo
- atIndex:(NSUInteger)sectionIndex forChangeType:(NSFetchedResultsChangeType)type
-{
- switch(type) {
- case NSFetchedResultsChangeInsert:
- [self.tableView insertSections:[NSIndexSet indexSetWithIndex:sectionIndex] withRowAnimation:UITableViewRowAnimationFade];
- break;
-
- case NSFetchedResultsChangeDelete:
- [self.tableView deleteSections:[NSIndexSet indexSetWithIndex:sectionIndex] withRowAnimation:UITableViewRowAnimationFade];
- break;
- }
-}
-
- (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject
atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type
newIndexPath:(NSIndexPath *)newIndexPath
View
17 ios/AddressBook/AddressBook/en.lproj/MainStoryboard_iPad.storyboard
@@ -1,15 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.1" toolsVersion="2182" systemVersion="11D50b" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="5">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2843" systemVersion="12C60" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="5">
<dependencies>
- <deployment defaultVersion="1296" identifier="iOS"/>
- <development defaultVersion="4200" identifier="xcode"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1181"/>
+ <deployment defaultVersion="1536" identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1929"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="14">
<objects>
- <placeholder placeholderIdentifier="IBFirstResponder" id="13" sceneMemberID="firstResponder"/>
<navigationController id="3" sceneMemberID="viewController">
<navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="6">
<autoresizingMask key="autoresizingMask"/>
@@ -18,13 +16,13 @@
<segue destination="19" kind="relationship" relationship="rootViewController" id="25"/>
</connections>
</navigationController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="13" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="448" y="-630"/>
</scene>
<!--Detail View Controller - Detail-->
<scene sceneID="16">
<objects>
- <placeholder placeholderIdentifier="IBFirstResponder" id="15" sceneMemberID="firstResponder"/>
<viewController storyboardIdentifier="" title="Detail" id="4" customClass="DetailViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="26">
<rect key="frame" x="0.0" y="64" width="703" height="704"/>
@@ -116,13 +114,13 @@
<outlet property="zipCodeField" destination="OKK-Jc-uWu" id="s8d-bP-CSY"/>
</connections>
</viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="15" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="448" y="248"/>
</scene>
<!--Split View Controller-->
<scene sceneID="18">
<objects>
- <placeholder placeholderIdentifier="IBFirstResponder" id="17" sceneMemberID="firstResponder"/>
<splitViewController id="5" sceneMemberID="viewController">
<toolbarItems/>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="blackTranslucent"/>
@@ -132,13 +130,13 @@
<segue destination="42" kind="relationship" relationship="detailViewController" id="51"/>
</connections>
</splitViewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="17" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-687" y="-630"/>
</scene>
<!--Master View Controller - Master-->
<scene sceneID="24">
<objects>
- <placeholder placeholderIdentifier="IBFirstResponder" id="23" sceneMemberID="firstResponder"/>
<tableViewController storyboardIdentifier="" title="Master" clearsSelectionOnViewWillAppear="NO" id="19" customClass="MasterViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="20">
<rect key="frame" x="0.0" y="64" width="320" height="704"/>
@@ -177,13 +175,13 @@
<barButtonItem key="rightBarButtonItem" systemItem="add" id="RPX-uk-0zK"/>
</navigationItem>
</tableViewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="23" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="859" y="-631"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="50">
<objects>
- <placeholder placeholderIdentifier="IBFirstResponder" id="49" userLabel="First Responder" sceneMemberID="firstResponder"/>
<navigationController id="42" sceneMemberID="viewController">
<navigationBar key="navigationBar" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="43">
<autoresizingMask key="autoresizingMask"/>
@@ -192,6 +190,7 @@
<segue destination="4" kind="relationship" relationship="rootViewController" id="52"/>
</connections>
</navigationController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="49" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-366" y="248"/>
</scene>
View
BIN  ios/AddressBook/Default-568h@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
5 ios/AddressBookForiCloud/AddressBook.xcodeproj/project.pbxproj
@@ -234,7 +234,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: taisuke fujita (Y8FAU24X57)";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
@@ -249,6 +249,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "9BDB8DA2-AE0B-4F36-B7FF-6F666E32A620";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
@@ -279,10 +280,12 @@
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_ENTITLEMENTS = AddressBook/AddressBook.entitlements;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "AddressBook/AddressBook-Prefix.pch";
INFOPLIST_FILE = "AddressBook/AddressBook-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
WRAPPER_EXTENSION = app;
};
name = Debug;
View
2  ios/ArchiveSample/ArchiveSample.xcodeproj/project.pbxproj
@@ -236,6 +236,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
@@ -305,6 +306,7 @@
6E72CCA815CADE3B000D83F9 /* Release */,
);
defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
View
2  ios/ArchiveSample/ArchiveSample/Address.m
@@ -11,8 +11,6 @@
@implementation Address
-@synthesize zipCode = _zipCode, state = _state, city = _city, other = _other;
-
- (id)initWithCoder:(NSCoder *)decoder
{
self = [super init];
View
2  ios/ArchiveSample/ArchiveSample/Person.m
@@ -11,8 +11,6 @@
@implementation Person
-@synthesize name = _name, address = _address;
-
- (id)initWithCoder:(NSCoder *)decoder
{
self = [super init];
View
11 ios/ArchiveSample/ArchiveSample/ViewController.m
@@ -38,8 +38,15 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
}
- (IBAction)respondToSaveButtonClick:(id)sender {
+ /*
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(
+ NSDocumentDirectory,
+ NSUserDomainMask, YES);
+ NSLog(@"%@", paths[0]);
+ */
+
NSString *directory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
- NSString *filePath = [NSString stringWithFormat:@"%@/data.dat", directory];
+ NSString *filePath = [directory stringByAppendingPathComponent:@"data.dat"];
Person *tYamada = [[Person alloc] init];
tYamada.name = @"山田太郎";
@@ -78,7 +85,7 @@ - (IBAction)respondToSaveButtonClick:(id)sender {
- (IBAction)respondToLoadButtonClick:(id)sender {
NSString *directory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
- NSString *filePath = [NSString stringWithFormat:@"%@/data.dat", directory];
+ NSString *filePath = [directory stringByAppendingPathComponent:@"data.dat"];
NSArray *array = [NSKeyedUnarchiver unarchiveObjectWithFile:filePath];
if (array) {
for (Person *person in array) {
View
476 ios/CollectionViewSample/CollectionViewSample.xcodeproj/project.pbxproj
@@ -0,0 +1,476 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 6EC41579165998410095C5AE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EC41578165998410095C5AE /* UIKit.framework */; };
+ 6EC4157B165998410095C5AE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EC4157A165998410095C5AE /* Foundation.framework */; };
+ 6EC4157D165998410095C5AE /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EC4157C165998410095C5AE /* CoreGraphics.framework */; };
+ 6EC41583165998410095C5AE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6EC41581165998410095C5AE /* InfoPlist.strings */; };
+ 6EC41585165998410095C5AE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EC41584165998410095C5AE /* main.m */; };
+ 6EC41589165998410095C5AE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EC41588165998410095C5AE /* AppDelegate.m */; };
+ 6EC4158B165998410095C5AE /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6EC4158A165998410095C5AE /* Default.png */; };
+ 6EC4158D165998410095C5AE /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6EC4158C165998410095C5AE /* Default@2x.png */; };
+ 6EC4158F165998410095C5AE /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6EC4158E165998410095C5AE /* Default-568h@2x.png */; };
+ 6EC41592165998410095C5AE /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6EC41590165998410095C5AE /* MainStoryboard_iPhone.storyboard */; };
+ 6EC41595165998410095C5AE /* MainStoryboard_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6EC41593165998410095C5AE /* MainStoryboard_iPad.storyboard */; };
+ 6EC41598165998410095C5AE /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EC41597165998410095C5AE /* ViewController.m */; };
+ 6EC415A0165998410095C5AE /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EC4159F165998410095C5AE /* SenTestingKit.framework */; };
+ 6EC415A1165998410095C5AE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EC41578165998410095C5AE /* UIKit.framework */; };
+ 6EC415A2165998410095C5AE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EC4157A165998410095C5AE /* Foundation.framework */; };
+ 6EC415AA165998410095C5AE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6EC415A8165998410095C5AE /* InfoPlist.strings */; };
+ 6EC415AD165998410095C5AE /* CollectionViewSampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EC415AC165998410095C5AE /* CollectionViewSampleTests.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 6EC415A3165998410095C5AE /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 6EC4156B165998410095C5AE /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 6EC41573165998410095C5AE;
+ remoteInfo = CollectionViewSample;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+ 6EC41574165998410095C5AE /* CollectionViewSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CollectionViewSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 6EC41578165998410095C5AE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 6EC4157A165998410095C5AE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 6EC4157C165998410095C5AE /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 6EC41580165998410095C5AE /* CollectionViewSample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CollectionViewSample-Info.plist"; sourceTree = "<group>"; };
+ 6EC41582165998410095C5AE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 6EC41584165998410095C5AE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 6EC41586165998410095C5AE /* CollectionViewSample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CollectionViewSample-Prefix.pch"; sourceTree = "<group>"; };
+ 6EC41587165998410095C5AE /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+ 6EC41588165998410095C5AE /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+ 6EC4158A165998410095C5AE /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
+ 6EC4158C165998410095C5AE /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
+ 6EC4158E165998410095C5AE /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
+ 6EC41591165998410095C5AE /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPhone.storyboard; sourceTree = "<group>"; };
+ 6EC41594165998410095C5AE /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPad.storyboard; sourceTree = "<group>"; };
+ 6EC41596165998410095C5AE /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
+ 6EC41597165998410095C5AE /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
+ 6EC4159E165998410095C5AE /* CollectionViewSampleTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CollectionViewSampleTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 6EC4159F165998410095C5AE /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
+ 6EC415A7165998410095C5AE /* CollectionViewSampleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CollectionViewSampleTests-Info.plist"; sourceTree = "<group>"; };
+ 6EC415A9165998410095C5AE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 6EC415AB165998410095C5AE /* CollectionViewSampleTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CollectionViewSampleTests.h; sourceTree = "<group>"; };
+ 6EC415AC165998410095C5AE /* CollectionViewSampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CollectionViewSampleTests.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 6EC41571165998410095C5AE /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 6EC41579165998410095C5AE /* UIKit.framework in Frameworks */,
+ 6EC4157B165998410095C5AE /* Foundation.framework in Frameworks */,
+ 6EC4157D165998410095C5AE /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 6EC4159A165998410095C5AE /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 6EC415A0165998410095C5AE /* SenTestingKit.framework in Frameworks */,
+ 6EC415A1165998410095C5AE /* UIKit.framework in Frameworks */,
+ 6EC415A2165998410095C5AE /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 6EC41569165998410095C5AE = {
+ isa = PBXGroup;
+ children = (
+ 6EC4157E165998410095C5AE /* CollectionViewSample */,
+ 6EC415A5165998410095C5AE /* CollectionViewSampleTests */,
+ 6EC41577165998410095C5AE /* Frameworks */,
+ 6EC41575165998410095C5AE /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 6EC41575165998410095C5AE /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 6EC41574165998410095C5AE /* CollectionViewSample.app */,
+ 6EC4159E165998410095C5AE /* CollectionViewSampleTests.octest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 6EC41577165998410095C5AE /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 6EC41578165998410095C5AE /* UIKit.framework */,
+ 6EC4157A165998410095C5AE /* Foundation.framework */,
+ 6EC4157C165998410095C5AE /* CoreGraphics.framework */,
+ 6EC4159F165998410095C5AE /* SenTestingKit.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 6EC4157E165998410095C5AE /* CollectionViewSample */ = {
+ isa = PBXGroup;
+ children = (
+ 6EC41587165998410095C5AE /* AppDelegate.h */,
+ 6EC41588165998410095C5AE /* AppDelegate.m */,
+ 6EC41590165998410095C5AE /* MainStoryboard_iPhone.storyboard */,
+ 6EC41593165998410095C5AE /* MainStoryboard_iPad.storyboard */,
+ 6EC41596165998410095C5AE /* ViewController.h */,
+ 6EC41597165998410095C5AE /* ViewController.m */,
+ 6EC4157F165998410095C5AE /* Supporting Files */,
+ );
+ path = CollectionViewSample;
+ sourceTree = "<group>";
+ };
+ 6EC4157F165998410095C5AE /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 6EC41580165998410095C5AE /* CollectionViewSample-Info.plist */,
+ 6EC41581165998410095C5AE /* InfoPlist.strings */,
+ 6EC41584165998410095C5AE /* main.m */,
+ 6EC41586165998410095C5AE /* CollectionViewSample-Prefix.pch */,
+ 6EC4158A165998410095C5AE /* Default.png */,
+ 6EC4158C165998410095C5AE /* Default@2x.png */,
+ 6EC4158E165998410095C5AE /* Default-568h@2x.png */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ 6EC415A5165998410095C5AE /* CollectionViewSampleTests */ = {
+ isa = PBXGroup;
+ children = (
+ 6EC415AB165998410095C5AE /* CollectionViewSampleTests.h */,
+ 6EC415AC165998410095C5AE /* CollectionViewSampleTests.m */,
+ 6EC415A6165998410095C5AE /* Supporting Files */,
+ );
+ path = CollectionViewSampleTests;
+ sourceTree = "<group>";
+ };
+ 6EC415A6165998410095C5AE /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 6EC415A7165998410095C5AE /* CollectionViewSampleTests-Info.plist */,
+ 6EC415A8165998410095C5AE /* InfoPlist.strings */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 6EC41573165998410095C5AE /* CollectionViewSample */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 6EC415B0165998410095C5AE /* Build configuration list for PBXNativeTarget "CollectionViewSample" */;
+ buildPhases = (
+ 6EC41570165998410095C5AE /* Sources */,
+ 6EC41571165998410095C5AE /* Frameworks */,
+ 6EC41572165998410095C5AE /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = CollectionViewSample;
+ productName = CollectionViewSample;
+ productReference = 6EC41574165998410095C5AE /* CollectionViewSample.app */;
+ productType = "com.apple.product-type.application";
+ };
+ 6EC4159D165998410095C5AE /* CollectionViewSampleTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 6EC415B3165998410095C5AE /* Build configuration list for PBXNativeTarget "CollectionViewSampleTests" */;
+ buildPhases = (
+ 6EC41599165998410095C5AE /* Sources */,
+ 6EC4159A165998410095C5AE /* Frameworks */,
+ 6EC4159B165998410095C5AE /* Resources */,
+ 6EC4159C165998410095C5AE /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 6EC415A4165998410095C5AE /* PBXTargetDependency */,
+ );
+ name = CollectionViewSampleTests;
+ productName = CollectionViewSampleTests;
+ productReference = 6EC4159E165998410095C5AE /* CollectionViewSampleTests.octest */;
+ productType = "com.apple.product-type.bundle";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 6EC4156B165998410095C5AE /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0450;
+ ORGANIZATIONNAME = "Revolution 9";
+ };
+ buildConfigurationList = 6EC4156E165998410095C5AE /* Build configuration list for PBXProject "CollectionViewSample" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 6EC41569165998410095C5AE;
+ productRefGroup = 6EC41575165998410095C5AE /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 6EC41573165998410095C5AE /* CollectionViewSample */,
+ 6EC4159D165998410095C5AE /* CollectionViewSampleTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 6EC41572165998410095C5AE /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 6EC41583165998410095C5AE /* InfoPlist.strings in Resources */,
+ 6EC4158B165998410095C5AE /* Default.png in Resources */,
+ 6EC4158D165998410095C5AE /* Default@2x.png in Resources */,
+ 6EC4158F165998410095C5AE /* Default-568h@2x.png in Resources */,
+ 6EC41592165998410095C5AE /* MainStoryboard_iPhone.storyboard in Resources */,
+ 6EC41595165998410095C5AE /* MainStoryboard_iPad.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 6EC4159B165998410095C5AE /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 6EC415AA165998410095C5AE /* InfoPlist.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 6EC4159C165998410095C5AE /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 6EC41570165998410095C5AE /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 6EC41585165998410095C5AE /* main.m in Sources */,
+ 6EC41589165998410095C5AE /* AppDelegate.m in Sources */,
+ 6EC41598165998410095C5AE /* ViewController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 6EC41599165998410095C5AE /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 6EC415AD165998410095C5AE /* CollectionViewSampleTests.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 6EC415A4165998410095C5AE /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 6EC41573165998410095C5AE /* CollectionViewSample */;
+ targetProxy = 6EC415A3165998410095C5AE /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 6EC41581165998410095C5AE /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 6EC41582165998410095C5AE /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 6EC41590165998410095C5AE /* MainStoryboard_iPhone.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 6EC41591165998410095C5AE /* en */,
+ );
+ name = MainStoryboard_iPhone.storyboard;
+ sourceTree = "<group>";
+ };
+ 6EC41593165998410095C5AE /* MainStoryboard_iPad.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 6EC41594165998410095C5AE /* en */,
+ );
+ name = MainStoryboard_iPad.storyboard;
+ sourceTree = "<group>";
+ };
+ 6EC415A8165998410095C5AE /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 6EC415A9165998410095C5AE /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 6EC415AE165998410095C5AE /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 6EC415AF165998410095C5AE /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 6EC415B1165998410095C5AE /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "CollectionViewSample/CollectionViewSample-Prefix.pch";
+ INFOPLIST_FILE = "CollectionViewSample/CollectionViewSample-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ 6EC415B2165998410095C5AE /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "CollectionViewSample/CollectionViewSample-Prefix.pch";
+ INFOPLIST_FILE = "CollectionViewSample/CollectionViewSample-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+ 6EC415B4165998410095C5AE /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/CollectionViewSample.app/CollectionViewSample";
+ FRAMEWORK_SEARCH_PATHS = (
+ "\"$(SDKROOT)/Developer/Library/Frameworks\"",
+ "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "CollectionViewSample/CollectionViewSample-Prefix.pch";
+ INFOPLIST_FILE = "CollectionViewSampleTests/CollectionViewSampleTests-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Debug;
+ };
+ 6EC415B5165998410095C5AE /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/CollectionViewSample.app/CollectionViewSample";
+ FRAMEWORK_SEARCH_PATHS = (
+ "\"$(SDKROOT)/Developer/Library/Frameworks\"",
+ "\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "CollectionViewSample/CollectionViewSample-Prefix.pch";
+ INFOPLIST_FILE = "CollectionViewSampleTests/CollectionViewSampleTests-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUNDLE_LOADER)";
+ WRAPPER_EXTENSION = octest;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 6EC4156E165998410095C5AE /* Build configuration list for PBXProject "CollectionViewSample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 6EC415AE165998410095C5AE /* Debug */,
+ 6EC415AF165998410095C5AE /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 6EC415B0165998410095C5AE /* Build configuration list for PBXNativeTarget "CollectionViewSample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 6EC415B1165998410095C5AE /* Debug */,
+ 6EC415B2165998410095C5AE /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+ 6EC415B3165998410095C5AE /* Build configuration list for PBXNativeTarget "CollectionViewSampleTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 6EC415B4165998410095C5AE /* Debug */,
+ 6EC415B5165998410095C5AE /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 6EC4156B165998410095C5AE /* Project object */;
+}
View
7 ...ionViewSample/CollectionViewSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:CollectionViewSample.xcodeproj">
+ </FileRef>
+</Workspace>
View
15 ios/CollectionViewSample/CollectionViewSample/AppDelegate.h
@@ -0,0 +1,15 @@
+//
+// AppDelegate.h
+// CollectionViewSample
+//
+// Created by fujita taisuke on 2012/11/19.
+// Copyright (c) 2012年 Revolution 9. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@end
View
46 ios/CollectionViewSample/CollectionViewSample/AppDelegate.m
@@ -0,0 +1,46 @@
+//
+// AppDelegate.m
+// CollectionViewSample
+//
+// Created by fujita taisuke on 2012/11/19.
+// Copyright (c) 2012年 Revolution 9. All rights reserved.
+//
+
+#import "AppDelegate.h"
+
+@implementation AppDelegate
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ // Override point for customization after application launch.
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+}
+
+@end
View
49 ios/CollectionViewSample/CollectionViewSample/CollectionViewSample-Info.plist
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.9revolution9.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIMainStoryboardFile</key>
+ <string>MainStoryboard_iPhone</string>
+ <key>UIMainStoryboardFile~ipad</key>
+ <string>MainStoryboard_iPad</string>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
View
14 ios/CollectionViewSample/CollectionViewSample/CollectionViewSample-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'CollectionViewSample' target in the 'CollectionViewSample' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_5_0
+#warning "This project uses features only available in iOS SDK 5.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
View
BIN  ios/CollectionViewSample/CollectionViewSample/Default-568h@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  ios/CollectionViewSample/CollectionViewSample/Default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  ios/CollectionViewSample/CollectionViewSample/Default@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
13 ios/CollectionViewSample/CollectionViewSample/ViewController.h
@@ -0,0 +1,13 @@
+//
+// ViewController.h
+// CollectionViewSample
+//
+// Created by fujita taisuke on 2012/11/19.
+// Copyright (c) 2012年 Revolution 9. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface ViewController : UICollectionViewController
+
+@end
View
53 ios/CollectionViewSample/CollectionViewSample/ViewController.m
@@ -0,0 +1,53 @@
+//
+// ViewController.m
+// CollectionViewSample
+//
+// Created by fujita taisuke on 2012/11/19.
+// Copyright (c) 2012年 Revolution 9. All rights reserved.
+//
+
+#import "ViewController.h"
+
+@interface ViewController ()
+
+@end
+
+@implementation ViewController
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view, typically from a nib.
+}
+
+- (void)didReceiveMemoryWarning
+{
+ [super didReceiveMemoryWarning];
+ // Dispose of any resources that can be recreated.
+}
+
+- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
+{
+ return 1;
+}
+
+- (NSInteger)collectionView:(UICollectionView *)collectionView
+ numberOfItemsInSection:(NSInteger)section
+{
+ return 32;
+}
+
+- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView
+ cellForItemAtIndexPath:(NSIndexPath *)indexPath
+{
+ UICollectionViewCell *cell = [self.collectionView dequeueReusableCellWithReuseIdentifier:@"Cell"
+ forIndexPath:indexPath];
+ cell.backgroundColor = [UIColor whiteColor];
+ UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, 40, 40)];
+ label.text = [NSString stringWithFormat:@"Cell %d", indexPath.row];
+ label.font = [UIFont systemFontOfSize:12];
+ [cell addSubview:label];
+ return cell;
+}
+
+@end
View
2  ios/CollectionViewSample/CollectionViewSample/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
View
26 ios/CollectionViewSample/CollectionViewSample/en.lproj/MainStoryboard_iPad.storyboard
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2519" systemVersion="12A206j" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="2">
+ <dependencies>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1856"/>
+ </dependencies>
+ <scenes>
+ <!--class Prefix:identifier View Controller-->
+ <scene sceneID="4">
+ <objects>
+ <viewController id="2" customClass="ViewController" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="5">
+ <rect key="frame" x="0.0" y="20" width="768" height="1004"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="3" sceneMemberID="firstResponder"/>
+ </objects>
+ </scene>
+ </scenes>
+ <simulatedMetricsContainer key="defaultSimulatedMetrics">
+ <simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackTranslucent"/>
+ <simulatedOrientationMetrics key="orientation"/>
+ <simulatedScreenMetrics key="destination"/>
+ </simulatedMetricsContainer>
+</document>
View
67 ios/CollectionViewSample/CollectionViewSample/en.lproj/MainStoryboard_iPhone.storyboard
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2844" systemVersion="12C60" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="Hig-bs-Bqs">
+ <dependencies>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1930"/>
+ </dependencies>
+ <scenes>
+ <!--View Controller-->
+ <scene sceneID="hhd-3j-Xla">
+ <objects>
+ <collectionViewController autoresizesArchivedViewToFullSize="NO" id="Hig-bs-Bqs" customClass="ViewController" sceneMemberID="viewController">
+ <collectionView key="view" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" minimumZoomScale="0.0" maximumZoomScale="0.0" dataMode="prototypes" id="pL4-dO-Xlz">
+ <rect key="frame" x="0.0" y="20" width="320" height="548"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="0MV-uC-Fh5">
+ <size key="itemSize" width="50" height="50"/>
+ <size key="headerReferenceSize" width="0.0" height="0.0"/>
+ <size key="footerReferenceSize" width="0.0" height="0.0"/>
+ <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
+ </collectionViewFlowLayout>
+ <cells>
+ <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" restorationIdentifier="" reuseIdentifier="Cell" id="gJG-Ae-uj7">
+ <rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
+ <rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+ </view>
+ </collectionViewCell>
+ </cells>
+ <connections>
+ <outlet property="dataSource" destination="Hig-bs-Bqs" id="9ki-Cy-OK0"/>
+ <outlet property="delegate" destination="Hig-bs-Bqs" id="6XU-zx-EeA"/>
+ </connections>
+ </collectionView>
+ </collectionViewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="wSg-tT-kda" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="311" y="47"/>
+ </scene>
+ </scenes>
+ <classes>
+ <class className="UICollectionReusableView" superclassName="UIView">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/UICollectionReusableView.h"/>
+ </class>
+ <class className="UICollectionViewCell" superclassName="UICollectionReusableView">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/UICollectionViewCell.h"/>
+ </class>
+ <class className="UICollectionViewController" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/UICollectionViewController.h"/>
+ </class>
+ <class className="UICollectionViewFlowLayout" superclassName="UICollectionViewLayout">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/UICollectionViewFlowLayout.h"/>
+ </class>
+ <class className="UICollectionViewLayout" superclassName="NSObject">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/UICollectionViewLayout.h"/>
+ </class>
+ <class className="ViewController" superclassName="UICollectionViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/ViewController.h"/>
+ </class>
+ </classes>
+ <simulatedMetricsContainer key="defaultSimulatedMetrics">
+ <simulatedStatusBarMetrics key="statusBar"/>
+ <simulatedOrientationMetrics key="orientation"/>
+ <simulatedScreenMetrics key="destination" type="retina4"/>
+ </simulatedMetricsContainer>
+</document>
View
18 ios/CollectionViewSample/CollectionViewSample/main.m
@@ -0,0 +1,18 @@
+//
+// main.m
+// CollectionViewSample
+//
+// Created by fujita taisuke on 2012/11/19.
+// Copyright (c) 2012年 Revolution 9. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import "AppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}
View
22 ios/CollectionViewSample/CollectionViewSampleTests/CollectionViewSampleTests-Info.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.9revolution9.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>
View
13 ios/CollectionViewSample/CollectionViewSampleTests/CollectionViewSampleTests.h
@@ -0,0 +1,13 @@
+//
+// CollectionViewSampleTests.h
+// CollectionViewSampleTests
+//
+// Created by fujita taisuke on 2012/11/19.
+// Copyright (c) 2012年 Revolution 9. All rights reserved.
+//
+
+#import <SenTestingKit/SenTestingKit.h>
+
+@interface CollectionViewSampleTests : SenTestCase
+
+@end
View
32 ios/CollectionViewSample/CollectionViewSampleTests/CollectionViewSampleTests.m
@@ -0,0 +1,32 @@
+//
+// CollectionViewSampleTests.m
+// CollectionViewSampleTests
+//
+// Created by fujita taisuke on 2012/11/19.
+// Copyright (c) 2012年 Revolution 9. All rights reserved.
+//
+
+#import "CollectionViewSampleTests.h"
+
+@implementation CollectionViewSampleTests
+
+- (void)setUp
+{
+ [super setUp];
+
+ // Set-up code here.
+}
+
+- (void)tearDown
+{
+ // Tear-down code here.
+
+ [super tearDown];
+}
+
+- (void)testExample
+{
+ STFail(@"Unit tests are not implemented yet in CollectionViewSampleTests");
+}
+
+@end
View
2  ios/CollectionViewSample/CollectionViewSampleTests/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
View
319 ios/InAppPurchaseSample/InAppPurchaseSample.xcodeproj/project.pbxproj
@@ -0,0 +1,319 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 6E836626163AA66D00FDC3B2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E836625163AA66D00FDC3B2 /* UIKit.framework */; };
+ 6E836628163AA66D00FDC3B2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E836627163AA66D00FDC3B2 /* Foundation.framework */; };
+ 6E83662A163AA66D00FDC3B2 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E836629163AA66D00FDC3B2 /* CoreGraphics.framework */; };
+ 6E836630163AA66D00FDC3B2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6E83662E163AA66D00FDC3B2 /* InfoPlist.strings */; };
+ 6E836632163AA66D00FDC3B2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E836631163AA66D00FDC3B2 /* main.m */; };
+ 6E836636163AA66D00FDC3B2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E836635163AA66D00FDC3B2 /* AppDelegate.m */; };
+ 6E836638163AA66D00FDC3B2 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E836637163AA66D00FDC3B2 /* Default.png */; };
+ 6E83663A163AA66D00FDC3B2 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E836639163AA66D00FDC3B2 /* Default@2x.png */; };
+ 6E83663C163AA66D00FDC3B2 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6E83663B163AA66D00FDC3B2 /* Default-568h@2x.png */; };
+ 6E83663F163AA66D00FDC3B2 /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6E83663D163AA66D00FDC3B2 /* MainStoryboard_iPhone.storyboard */; };
+ 6E836642163AA66D00FDC3B2 /* MainStoryboard_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6E836640163AA66D00FDC3B2 /* MainStoryboard_iPad.storyboard */; };
+ 6E836645163AA66E00FDC3B2 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E836644163AA66E00FDC3B2 /* ViewController.m */; };
+ 6E83664C163AA7EE00FDC3B2 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E83664B163AA7EE00FDC3B2 /* StoreKit.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 6E836621163AA66D00FDC3B2 /* InAppPurchaseSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InAppPurchaseSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 6E836625163AA66D00FDC3B2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ 6E836627163AA66D00FDC3B2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 6E836629163AA66D00FDC3B2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 6E83662D163AA66D00FDC3B2 /* InAppPurchaseSample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "InAppPurchaseSample-Info.plist"; sourceTree = "<group>"; };
+ 6E83662F163AA66D00FDC3B2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 6E836631163AA66D00FDC3B2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 6E836633163AA66D00FDC3B2 /* InAppPurchaseSample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "InAppPurchaseSample-Prefix.pch"; sourceTree = "<group>"; };
+ 6E836634163AA66D00FDC3B2 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+ 6E836635163AA66D00FDC3B2 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+ 6E836637163AA66D00FDC3B2 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
+ 6E836639163AA66D00FDC3B2 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
+ 6E83663B163AA66D00FDC3B2 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
+ 6E83663E163AA66D00FDC3B2 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPhone.storyboard; sourceTree = "<group>"; };
+ 6E836641163AA66D00FDC3B2 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPad.storyboard; sourceTree = "<group>"; };
+ 6E836643163AA66D00FDC3B2 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
+ 6E836644163AA66E00FDC3B2 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
+ 6E83664B163AA7EE00FDC3B2 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 6E83661E163AA66D00FDC3B2 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 6E83664C163AA7EE00FDC3B2 /* StoreKit.framework in Frameworks */,
+ 6E836626163AA66D00FDC3B2 /* UIKit.framework in Frameworks */,
+ 6E836628163AA66D00FDC3B2 /* Foundation.framework in Frameworks */,
+ 6E83662A163AA66D00FDC3B2 /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 6E836616163AA66D00FDC3B2 = {
+ isa = PBXGroup;
+ children = (
+ 6E83662B163AA66D00FDC3B2 /* InAppPurchaseSample */,
+ 6E836624163AA66D00FDC3B2 /* Frameworks */,
+ 6E836622163AA66D00FDC3B2 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 6E836622163AA66D00FDC3B2 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 6E836621163AA66D00FDC3B2 /* InAppPurchaseSample.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 6E836624163AA66D00FDC3B2 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 6E83664B163AA7EE00FDC3B2 /* StoreKit.framework */,
+ 6E836625163AA66D00FDC3B2 /* UIKit.framework */,
+ 6E836627163AA66D00FDC3B2 /* Foundation.framework */,
+ 6E836629163AA66D00FDC3B2 /* CoreGraphics.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ 6E83662B163AA66D00FDC3B2 /* InAppPurchaseSample */ = {
+ isa = PBXGroup;
+ children = (
+ 6E836634163AA66D00FDC3B2 /* AppDelegate.h */,
+ 6E836635163AA66D00FDC3B2 /* AppDelegate.m */,
+ 6E83663D163AA66D00FDC3B2 /* MainStoryboard_iPhone.storyboard */,
+ 6E836640163AA66D00FDC3B2 /* MainStoryboard_iPad.storyboard */,
+ 6E836643163AA66D00FDC3B2 /* ViewController.h */,
+ 6E836644163AA66E00FDC3B2 /* ViewController.m */,
+ 6E83662C163AA66D00FDC3B2 /* Supporting Files */,
+ );
+ path = InAppPurchaseSample;
+ sourceTree = "<group>";
+ };
+ 6E83662C163AA66D00FDC3B2 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 6E83662D163AA66D00FDC3B2 /* InAppPurchaseSample-Info.plist */,
+ 6E83662E163AA66D00FDC3B2 /* InfoPlist.strings */,
+ 6E836631163AA66D00FDC3B2 /* main.m */,
+ 6E836633163AA66D00FDC3B2 /* InAppPurchaseSample-Prefix.pch */,
+ 6E836637163AA66D00FDC3B2 /* Default.png */,
+ 6E836639163AA66D00FDC3B2 /* Default@2x.png */,
+ 6E83663B163AA66D00FDC3B2 /* Default-568h@2x.png */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 6E836620163AA66D00FDC3B2 /* InAppPurchaseSample */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 6E836648163AA66E00FDC3B2 /* Build configuration list for PBXNativeTarget "InAppPurchaseSample" */;
+ buildPhases = (
+ 6E83661D163AA66D00FDC3B2 /* Sources */,
+ 6E83661E163AA66D00FDC3B2 /* Frameworks */,
+ 6E83661F163AA66D00FDC3B2 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = InAppPurchaseSample;
+ productName = InAppPurchaseSample;
+ productReference = 6E836621163AA66D00FDC3B2 /* InAppPurchaseSample.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 6E836618163AA66D00FDC3B2 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0450;
+ ORGANIZATIONNAME = "Revolution 9";
+ };
+ buildConfigurationList = 6E83661B163AA66D00FDC3B2 /* Build configuration list for PBXProject "InAppPurchaseSample" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 6E836616163AA66D00FDC3B2;
+ productRefGroup = 6E836622163AA66D00FDC3B2 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 6E836620163AA66D00FDC3B2 /* InAppPurchaseSample */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 6E83661F163AA66D00FDC3B2 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 6E836630163AA66D00FDC3B2 /* InfoPlist.strings in Resources */,
+ 6E836638163AA66D00FDC3B2 /* Default.png in Resources */,
+ 6E83663A163AA66D00FDC3B2 /* Default@2x.png in Resources */,
+ 6E83663C163AA66D00FDC3B2 /* Default-568h@2x.png in Resources */,
+ 6E83663F163AA66D00FDC3B2 /* MainStoryboard_iPhone.storyboard in Resources */,
+ 6E836642163AA66D00FDC3B2 /* MainStoryboard_iPad.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 6E83661D163AA66D00FDC3B2 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 6E836632163AA66D00FDC3B2 /* main.m in Sources */,
+ 6E836636163AA66D00FDC3B2 /* AppDelegate.m in Sources */,
+ 6E836645163AA66E00FDC3B2 /* ViewController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 6E83662E163AA66D00FDC3B2 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 6E83662F163AA66D00FDC3B2 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 6E83663D163AA66D00FDC3B2 /* MainStoryboard_iPhone.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 6E83663E163AA66D00FDC3B2 /* en */,
+ );
+ name = MainStoryboard_iPhone.storyboard;
+ sourceTree = "<group>";
+ };
+ 6E836640163AA66D00FDC3B2 /* MainStoryboard_iPad.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 6E836641163AA66D00FDC3B2 /* en */,
+ );
+ name = MainStoryboard_iPad.storyboard;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 6E836646163AA66E00FDC3B2 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: taisuke fujita (Y8FAU24X57)";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+ ONLY_ACTIVE_ARCH = YES;
+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "524D2144-96C2-413D-B62D-0F2CA701792E";
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 6E836647163AA66E00FDC3B2 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 6.0;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 6E836649163AA66E00FDC3B2 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "InAppPurchaseSample/InAppPurchaseSample-Prefix.pch";
+ INFOPLIST_FILE = "InAppPurchaseSample/InAppPurchaseSample-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ 6E83664A163AA66E00FDC3B2 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "InAppPurchaseSample/InAppPurchaseSample-Prefix.pch";
+ INFOPLIST_FILE = "InAppPurchaseSample/InAppPurchaseSample-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 6E83661B163AA66D00FDC3B2 /* Build configuration list for PBXProject "InAppPurchaseSample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 6E836646163AA66E00FDC3B2 /* Debug */,
+ 6E836647163AA66E00FDC3B2 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 6E836648163AA66E00FDC3B2 /* Build configuration list for PBXNativeTarget "InAppPurchaseSample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 6E836649163AA66E00FDC3B2 /* Debug */,
+ 6E83664A163AA66E00FDC3B2 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 6E836618163AA66D00FDC3B2 /* Project object */;
+}
View
7 ...PurchaseSample/InAppPurchaseSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:InAppPurchaseSample.xcodeproj">
+ </FileRef>
+</Workspace>
View
15 ios/InAppPurchaseSample/InAppPurchaseSample/AppDelegate.h
@@ -0,0 +1,15 @@
+//
+// AppDelegate.h
+// InAppPurchaseSample
+//
+// Created by fujita taisuke on 2012/10/26.
+// Copyright (c) 2012年 Revolution 9. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@end
View
46 ios/InAppPurchaseSample/InAppPurchaseSample/AppDelegate.m
@@ -0,0 +1,46 @@
+//
+// AppDelegate.m
+// InAppPurchaseSample
+//
+// Created by fujita taisuke on 2012/10/26.
+// Copyright (c) 2012年 Revolution 9. All rights reserved.
+//
+
+#import "AppDelegate.h"
+
+@implementation AppDelegate
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ // Override point for customization after application launch.
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+}
+
+@end
View
BIN  ios/InAppPurchaseSample/InAppPurchaseSample/Default-568h@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  ios/InAppPurchaseSample/InAppPurchaseSample/Default.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  ios/InAppPurchaseSample/InAppPurchaseSample/Default@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
49 ios/InAppPurchaseSample/InAppPurchaseSample/InAppPurchaseSample-Info.plist
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.9revolution9.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIMainStoryboardFile</key>
+ <string>MainStoryboard_iPhone</string>
+ <key>UIMainStoryboardFile~ipad</key>
+ <string>MainStoryboard_iPad</string>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
View
14 ios/InAppPurchaseSample/InAppPurchaseSample/InAppPurchaseSample-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'InAppPurchaseSample' target in the 'InAppPurchaseSample' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_5_0
+#warning "This project uses features only available in iOS SDK 5.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
View
19 ios/InAppPurchaseSample/InAppPurchaseSample/ViewController.h
@@ -0,0 +1,19 @@
+//
+// ViewController.h
+// InAppPurchaseSample
+//
+// Created by fujita taisuke on 2012/10/26.
+// Copyright (c) 2012年 Revolution 9. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <StoreKit/StoreKit.h>
+
+@interface ViewController : UIViewController <UIAlertViewDelegate, SKProductsRequestDelegate, SKPaymentTransactionObserver>
+
+@property (nonatomic, weak) IBOutlet UILabel *label;
+
+- (IBAction)respondToBuyBottonClick:(id)sender;
+- (IBAction)respondToRestoreBottonClick:(id)sender;
+
+@end
View
136 ios/InAppPurchaseSample/InAppPurchaseSample/ViewController.m
@@ -0,0 +1,136 @@
+//
+// ViewController.m
+// InAppPurchaseSample
+//
+// Created by fujita taisuke on 2012/10/26.
+// Copyright (c) 2012年 Revolution 9. All rights reserved.
+//
+
+#import "ViewController.h"
+
+@interface ViewController ()
+
+@end
+
+@implementation ViewController
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+}
+
+- (void)didReceiveMemoryWarning
+{
+ [super didReceiveMemoryWarning];
+}
+
+- (IBAction)respondToBuyBottonClick:(id)sender
+{
+ if (![SKPaymentQueue canMakePayments]) {
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"エラー"
+ message:@"アプリ内課金の使用が制限されています。"
+ delegate:nil
+ cancelButtonTitle:nil
+ otherButtonTitles:@"OK", nil];
+ [alert show];
+ return;
+ }
+ NSSet *set = [NSSet setWithObjects:@"com.9revolution9.adsremover", nil];
+ SKProductsRequest *productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:set];
+ productsRequest.delegate = self;
+ [productsRequest start];
+}
+
+- (IBAction)respondToRestoreBottonClick:(id)sender
+{
+ [[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
+}
+
+- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
+ // 途中で止まった処理を再開する Consumable アイテムにも有効
+ [[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
+}
+
+- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {
+ // 無効なアイテムがないかチェック
+ if ([response.invalidProductIdentifiers count] > 0) {
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"エラー"
+ message:@"アイテムIDが不正です。"
+ delegate:nil
+ cancelButtonTitle:@"OK"
+ otherButtonTitles:nil, nil];
+ [alert show];
+ return;
+ }
+ // 購入処理開始
+ [[SKPaymentQueue defaultQueue] addTransactionObserver:self];
+ for (SKProduct *product in response.products) {
+ SKPayment *payment = [SKPayment paymentWithProduct:product];
+ [[SKPaymentQueue defaultQueue] addPayment:payment];
+ }
+}
+
+- (void)applicationDidEnterBackground
+{
+ // リストア処理開始
+ [[SKPaymentQueue defaultQueue] removeTransactionObserver:self];
+}
+
+- (void)applicationWillEnterForeground
+{
+ [[SKPaymentQueue defaultQueue] addTransactionObserver:self];
+}
+
+- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions {
+ for (SKPaymentTransaction *transaction in transactions) {
+ if (transaction.transactionState == SKPaymentTransactionStatePurchasing) {
+ // 購入処理中
+ } else if (transaction.transactionState == SKPaymentTransactionStatePurchased) {
+ [queue finishTransaction:transaction];
+ } else if (transaction.transactionState == SKPaymentTransactionStateFailed) {
+ [queue finishTransaction:transaction];
+ if (transaction.error.code == SKErrorUnknown) {
+ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"処理が途中中断されました"
+ message:[transaction.error localizedDescription]
+ delegate:self
+ cancelButtonTitle:nil
+ otherButtonTitles:@"OK", nil];
+ [alert show];
+ }
+ } else {
+ // 復帰処理完了
+ [queue finishTransaction:transaction];
+ }
+ }
+}
+
+- (void)paymentQueue:(SKPaymentQueue *)queue removedTransactions:(NSArray *)transactions
+{
+ for (SKPaymentTransaction *transaction in transactions) {
+ if (transaction.transactionState == SKPaymentTransactionStatePurchased) {
+ self.label.text = @"購入しました。";
+ }
+ }
+ [[SKPaymentQueue defaultQueue] removeTransactionObserver:self];
+}
+
+- (void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError:(NSError *)error
+{
+ if ([queue.transactions count] == 0) {
+ [[SKPaymentQueue defaultQueue] removeTransactionObserver:self];
+ }
+}
+
+- (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue
+{
+ for (SKPaymentTransaction *transaction in queue.transactions) {
+ if (transaction.transactionState == SKPaymentTransactionStatePurchased) {
+ self.label.text = @"リストアしました。";
+ }
+ }
+ if ([queue.transactions count] == 0) {
+ [[SKPaymentQueue defaultQueue] removeTransactionObserver:self];
+ }
+}
+
+@end
View
2  ios/InAppPurchaseSample/InAppPurchaseSample/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
View
26 ios/InAppPurchaseSample/InAppPurchaseSample/en.lproj/MainStoryboard_iPad.storyboard
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2519" systemVersion="12A206j" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="2">
+ <dependencies>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1856"/>
+ </dependencies>
+ <scenes>
+ <!--class Prefix:identifier View Controller-->
+ <scene sceneID="4">
+ <objects>
+ <viewController id="2" customClass="ViewController" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="5">
+ <rect key="frame" x="0.0" y="20" width="768" height="1004"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="3" sceneMemberID="firstResponder"/>
+ </objects>
+ </scene>
+ </scenes>
+ <simulatedMetricsContainer key="defaultSimulatedMetrics">
+ <simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackTranslucent"/>
+ <simulatedOrientationMetrics key="orientation"/>
+ <simulatedScreenMetrics key="destination"/>
+ </simulatedMetricsContainer>
+</document>
View
95 ios/InAppPurchaseSample/InAppPurchaseSample/en.lproj/MainStoryboard_iPhone.storyboard
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2843" systemVersion="12C60" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="2">
+ <dependencies>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1929"/>
+ </dependencies>
+ <scenes>
+ <!--View Controller-->
+ <scene sceneID="5">
+ <objects>
+ <viewController id="2" customClass="ViewController" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="3">
+ <rect key="frame" x="0.0" y="20" width="320" height="460"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Vwn-xT-jXH">
+ <constraints>
+ <constraint firstAttribute="width" constant="100" id="lkW-HY-QlE"/>
+ </constraints>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+ <state key="normal" title="アイテム購入">
+ <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <state key="highlighted">
+ <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <connections>
+ <action selector="respondToBuyBottonClick:" destination="2" eventType="touchUpInside" id="rRA-cl-Nl4"/>
+ </connections>
+ </button>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vFt-Gx-Qhy">
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+ <state key="normal" title="リストアする">
+ <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <state key="highlighted">
+ <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <connections>
+ <action selector="respondToRestoreBottonClick:" destination="2" eventType="touchUpInside" id="NTv-TA-nMk"/>
+ </connections>
+ </button>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="購入したアイテム:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="d5U-SA-SCr">
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="XXX" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9B4-Pm-EEx">
+ <fontDescription key="fontDescription" type="system" pointSize="17"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ <constraints>
+ <constraint firstItem="Vwn-xT-jXH" firstAttribute="top" secondItem="3" secondAttribute="top" constant="208" id="7bB-pJ-S6t"/>
+ <constraint firstItem="9B4-Pm-EEx" firstAttribute="leading" secondItem="d5U-SA-SCr" secondAttribute="trailing" constant="8" symbolic="YES" type="default" id="PPJ-Lb-ff7"/>
+ <constraint firstItem="d5U-SA-SCr" firstAttribute="leading" secondItem="3" secondAttribute="leading" constant="20" symbolic="YES" type="default" id="S84-Fy-FtB"/>
+ <constraint firstItem="d5U-SA-SCr" firstAttribute="top" secondItem="3" secondAttribute="top" constant="95" id="V3Z-aN-RmZ"/>
+ <constraint firstItem="vFt-Gx-Qhy" firstAttribute="centerX" secondItem="3" secondAttribute="centerX" type="default" id="XXN-wh-Udv"/>
+ <constraint firstItem="vFt-Gx-Qhy" firstAttribute="leading" secondItem="Vwn-xT-jXH" secondAttribute="leading" type="default" id="ZgV-7w-elw"/>
+ <constraint firstItem="vFt-Gx-Qhy" firstAttribute="trailing" secondItem="Vwn-xT-jXH" secondAttribute="trailing" type="default" id="qwd-0V-DgH"/>
+ <constraint firstItem="9B4-Pm-EEx" firstAttribute="baseline" secondItem="d5U-SA-SCr" secondAttribute="baseline" type="default" id="zLE-LR-v0L"/>
+ <constraint firstItem="vFt-Gx-Qhy" firstAttribute="top" secondItem="Vwn-xT-jXH" secondAttribute="bottom" constant="8" symbolic="YES" type="default" id="zRL-Fc-AKE"/>
+ </constraints>
+ </view>
+ <connections>
+ <outlet property="label" destination="9B4-Pm-EEx" id="iFv-BB-aMx"/>
+ </connections>
+ </viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/>
+ </objects>
+ <point key="canvasLocation" x="121" y="60"/>
+ </scene>
+ </scenes>
+ <classes>
+ <class className="NSLayoutConstraint" superclassName="NSObject">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/NSLayoutConstraint.h"/>
+ </class>
+ <class className="ViewController" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/ViewController.h"/>
+ <relationships>
+ <relationship kind="action" name="respondToBuyBottonClick:"/>
+ <relationship kind="action" name="respondToRestoreBottonClick:"/>
+ <relationship kind="outlet" name="label" candidateClass="UILabel"/>
+ </relationships>
+ </class>
+ </classes>
+ <simulatedMetricsContainer key="defaultSimulatedMetrics">
+ <simulatedStatusBarMetrics key="statusBar"/>
+ <simulatedOrientationMetrics key="orientation"/>
+ <simulatedScreenMetrics key="destination"/>
+ </simulatedMetricsContainer>
+</document>
View
18 ios/InAppPurchaseSample/InAppPurchaseSample/main.m
@@ -0,0 +1,18 @@
+//
+// main.m
+// InAppPurchaseSample
+//
+// Created by fujita taisuke on 2012/10/26.
+// Copyright (c) 2012年 Revolution 9. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import "AppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}
View
37 ios/LifecycleEventSample/LifecycleEventSample/AppDelegate.m
@@ -12,10 +12,16 @@ @implementation AppDelegate
@synthesize window = _window;
+- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ NSLog(@"%@#%@", NSStringFromClass([self class]), NSStringFromSelector(_cmd));
+ return YES;
+}
+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSLog(@"%@#%@", NSStringFromClass([self class]), NSStringFromSelector(_cmd));
- NSLog(@"%@", [NSThread callStackSymbols]);
+ //NSLog(@"%@", [NSThread callStackSymbols]);
NSLog(@"rootViewController:%@", [[[UIApplication sharedApplication].windows objectAtIndex:0] rootViewController]);
return YES;
}
@@ -50,4 +56,33 @@ - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application
NSLog(@"%@#%@", NSStringFromClass([self class]), NSStringFromSelector(_cmd));
}
+
+- (UIViewController *) application:(UIApplication *)application viewControllerWithRestorationIdentifierPath:(NSArray *)identifierComponents coder:(NSCoder *)coder
+{
+ NSLog(@"%@#%@", NSStringFromClass([self class]), NSStringFromSelector(_cmd));
+ return nil;
+}
+
+- (BOOL) application:(UIApplication *)application shouldSaveApplicationState:(NSCoder *)coder
+{
+ NSLog(@"%@#%@", NSStringFromClass([self class]), NSStringFromSelector(_cmd));
+ return YES;
+}
+
+- (BOOL) application:(UIApplication *)application shouldRestoreApplicationState:(NSCoder *)coder
+{
+ NSLog(@"%@#%@", NSStringFromClass([self class]), NSStringFromSelector(_cmd));
+ return YES;
+}
+
+- (void) application:(UIApplication *)application willEncodeRestorableStateWithCoder:(NSCoder *)coder
+{
+ NSLog(@"%@#%@", NSStringFromClass([self class]), NSStringFromSelector(_cmd));
+}
+
+- (void) application:(UIApplication *)application didDecodeRestorableStateWithCoder:(NSCoder *)coder
+{