我的应用程序因应用程序购买中未续订的恢复按钮而被拒绝.我必须删除恢复按钮吗?如果我必须这样做,那么用户将如何恢复他的购买.请帮助.
我想从我的iphone应用程序上传YouTube上的视频..我试过这个http://urinieto.com/2010/10/upload-videos-to-youtube-with-iphone-custom-app/ 但最后我收到错误Domain = com.google.GDataServiceDomain Code = 400"无法完成操作.(com.google.GDataServiceDomain错误400.)"UserInfo = 0x4d921f0 {}
谁能帮我.感谢名单!
我的代码
NSString *devKey = [mDeveloperKeyField text];
GDataServiceGoogleYouTube *service = [self youTubeService];
[service setYouTubeDeveloperKey:devKey];
NSString *username = [mUsernameField text];
NSString *clientID = [mClientIDField text];
NSURL *url = [GDataServiceGoogleYouTube youTubeUploadURLForUserID:username
clientID:clientID];
// load the file data
NSString *path = [[NSBundle mainBundle] pathForResource:@"YouTubeTest" ofType:@"m4v"];
NSData *data = [NSData dataWithContentsOfFile:path];
NSString *filename = [path lastPathComponent];
// gather all the metadata needed for the mediaGroup
NSString *titleStr = [mTitleField text];
GDataMediaTitle *title = …Run Code Online (Sandbox Code Playgroud) 嗨我需要在Inapp-Purchase中实现恢复功能,为此创建了一个"恢复"按钮,它是调用方法
-(void)restorePurchasedProductsWithProductId:(NSString*)prodID
{
_productIdsArray = [[NSMutableArray alloc] init];
productID = [prodID retain];
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
}
Run Code Online (Sandbox Code Playgroud)
它给了我一个输入苹果id密码的弹出窗口.在这样做之后没有任何反应.
我读到了它所调用的地方
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
Run Code Online (Sandbox Code Playgroud)
所以我喜欢这样
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
{
NSLog(@"paymentQueue");
for (SKPaymentTransaction *transaction in transactions)
{
switch (transaction.transactionState)
{
case SKPaymentTransactionStatePurchased:
[self completeTransaction:transaction];
break;
case SKPaymentTransactionStateFailed:
[self failedTransaction:transaction];
break;
case SKPaymentTransactionStateRestored:
NSLog(@"restored");
[self restoreTransaction:transaction];
break;
default:
break;
}
}
}
Run Code Online (Sandbox Code Playgroud)
但问题是上面的方法并没有调用这个
- (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue
Run Code Online (Sandbox Code Playgroud)
也不
-(void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError:(NSError *)error
Run Code Online (Sandbox Code Playgroud)
我还包括了所需的协议,
有些正文可以帮助我为什么这些委托方法不会要求恢复过程.我正在尝试使用测试帐户.