Skip to content
Browse files

Fixed issue on iPad

  • Loading branch information...
1 parent 9fc9e34 commit e2a37fa76f2f4889f39b9e708a28d80d35af6dad @yoshiokatsuneo committed Nov 7, 2011
View
18 CamLingual.xcodeproj/project.pbxproj
@@ -746,15 +746,21 @@
071A0947142385D800E7BE90 /* Distribution */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CODE_SIGN_IDENTITY = "iPhone Distribution: Tsuneo Yoshioka";
+ ARCHS = (
+ armv6,
+ "$(ARCHS_STANDARD_32_BIT)",
+ );
+ CODE_SIGN_IDENTITY = "iPhone Distribution";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "CamLingual/CamLingual-Prefix.pch";
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
HEADER_SEARCH_PATHS = /usr/include/libxml2;
INFOPLIST_FILE = "CamLingual/CamLingual-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 4.2;
PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE = "100EBAD1-8A33-440F-9A14-ECFC04A47366";
+ PROVISIONING_PROFILE = "";
+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
};
@@ -826,6 +832,10 @@
07D2A8B413F3E79700A5E60D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = (
+ armv6,
+ "$(ARCHS_STANDARD_32_BIT)",
+ );
CODE_SIGN_IDENTITY = "iPhone Developer";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "CamLingual/CamLingual-Prefix.pch";
@@ -843,6 +853,10 @@
07D2A8B513F3E79700A5E60D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ARCHS = (
+ armv6,
+ "$(ARCHS_STANDARD_32_BIT)",
+ );
CODE_SIGN_IDENTITY = "iPhone Developer";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "CamLingual/CamLingual-Prefix.pch";
View
4 CamLingual/CamLingualViewController.m
@@ -681,7 +681,7 @@ - (IBAction)openPhoto:(id)sender {
return;
}
if([ticketManager availableTickets]<=0){
- [ticketManager inAppPurchase:self action:@selector(openPhoto:)];
+ [ticketManager inAppPurchase:self action:@selector(openPhoto:) sender:sender];
return;
}
@@ -692,7 +692,7 @@ - (IBAction)openPhoto:(id)sender {
- (IBAction)openAlbum:(id)sender {
if([ticketManager availableTickets]<=0){
- [ticketManager inAppPurchase:self action:@selector(openAlbum:)];
+ [ticketManager inAppPurchase:self action:@selector(openAlbum:) sender:sender];
return;
}
View
3 CamLingual/TicketManager.h
@@ -13,11 +13,12 @@
{
BOOL fProcessing;
}
-- (void)inAppPurchase:(NSObject*)target action:(SEL)selector;
+- (void)inAppPurchase:(NSObject*)target action:(SEL)selector sender:(id)sender;
@property NSInteger availableTickets;
@property NSInteger usedTickets;
@property(retain) NSObject *iap_target;
@property SEL iap_selector;
+@property(retain) id iap_sender;
@end
View
9 CamLingual/TicketManager.m
@@ -15,7 +15,7 @@ @implementation TicketManager
@synthesize iap_target = _iap_target;
@synthesize iap_selector = _iap_selector;
-
+@synthesize iap_sender = _iap_sender;
- (void)errorAlert:(NSError*)error
{
NSLog(@"%s: localizedDescription:%@, userInfo:%@", __FUNCTION__, [error localizedDescription], [error userInfo]);
@@ -86,11 +86,11 @@ - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)tran
NSLog(@"SKPaymentTransactionStatePurchased");
self.availableTickets = self.availableTickets + 200;
[queue finishTransaction:transaction];
- [self.iap_target performSelector:self.iap_selector withObject:nil];
+ [self.iap_target performSelector:self.iap_selector withObject:self.iap_sender];
fProcessing = NO;
break;
case SKPaymentTransactionStateFailed:
- NSLog(@"SKPaymentTransactionStateFailed");
+ NSLog(@"SKPaymentTransactionStateFailed: %@", transaction.error);
[queue finishTransaction:transaction];
fProcessing = NO;
break;
@@ -109,7 +109,7 @@ -(void)request:(SKRequest *)request didFailWithError:(NSError *)error
[self errorAlert:error];
fProcessing = NO;
}
-- (void)inAppPurchase:(NSObject*)target action:(SEL)selector
+- (void)inAppPurchase:(NSObject*)target action:(SEL)selector sender:(id)sender
{
if(fProcessing){
return;
@@ -124,6 +124,7 @@ - (void)inAppPurchase:(NSObject*)target action:(SEL)selector
self.iap_target = target;
self.iap_selector = selector;
+ self.iap_sender = sender;
[skProductsRequest start];
}

0 comments on commit e2a37fa

Please sign in to comment.
Something went wrong with that request. Please try again.