开发者

Help me on StoreKit Implementation

i am trying to create a app which is going to charge $1 for sending digital photo.

i want to charge the user when he clicks the send e-photo button.

and i created test application on iTunes Connect and set the necessary configura开发者_运维知识库tions and also created In App Purchase….

now i want to create a coding part ( storekit ) which interacts with the store…

can you please show some code which can help me to try the above scenerio

Thanks for your time

Update 1

//
//  InAppPurchaseTestingViewController.h
//  InAppPurchaseTesting
//


#import <UIKit/UIKit.h>
#import <StoreKit/StoreKit.h>

@interface InAppPurchaseTestingViewController : UIViewController {

}

@end

//
//  InAppPurchaseTestingViewController.m
//  InAppPurchaseTesting


#import "InAppPurchaseTestingViewController.h"

@implementation InAppPurchaseTestingViewController

- (void)viewDidLoad 
{
  NSLog(@"View is loaded");

  if ([SKPaymentQueue canMakePayments])
  {
      NSLog(@"can make payments");
  }
  else
  {
      NSLog(@"cannot make payments");
  }

  [super viewDidLoad];
}

This is what the code i have now...

can you pls show me some code how to connect to the appstore...


You should read through the In App Purchase Programming Guide and also read all the related "See Also" documentation. After reading through all the documentation, if you have a specific question about something that's not working the way you expect or understand it to work, you should return and ask that more specific question (hopefully with code samples of your own) so that we can help you.

Apple doesn't provide any full code samples for StoreKit, but the documentation is pretty thorough and after reading, googling StoreKit will get you hits on numerous blogs walking you through the process step-by-step.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜