Agreement Update : Review the updated Paid Applications Schedule.记录上架流程与问题

协议升级

协议升级

  • 更新了三个协议 Agreements, Tax, and Banking 。这次升级必须要一个一个点进去填写相应的信息。
    协议,税务,银行卡 需要填写的信息比较简单,大约2个工作日内审核完毕。

iTunes Connect上创建APP

设置购买付费

1.在 My Apps 中创建一个新App
2.My App -> Pricing and Availability -> Price Schedule 添加售价

添加内购项目

1.2.My App -> In-App Purchases 添加内购项

添加测试账户

1.User and Role -> SandBox Testers -> 添加沙盒测试用户
2.取消移动端的iTunes账户
3.需要付费时 填入测试用户

资料填写

  • 尽量详细
  • 尽量不要漏

参考源码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#import "IAPManager.h"


@implementation IAPManager

-(void) attachObserver{
NSLog(@"AttachObserver");
[[SKPaymentQueue defaultQueue] addTransactionObserver:self];
}

-(BOOL) CanMakePayment{
return [SKPaymentQueue canMakePayments];
}

-(void) requestProductData:(NSString *)productIdentifiers{
NSArray *idArray = [productIdentifiers componentsSeparatedByString:@"\t"];
NSSet *idSet = [NSSet setWithArray:idArray];
[self sendRequest:idSet];
}

-(void)sendRequest:(NSSet *)idSet{
SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers:idSet];
request.delegate = self;
[request start];
}

-(void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response{
NSArray *products = response.products;

for (SKProduct *p in products) {
UnitySendMessage("Main", "ShowProductList", [[self productInfo:p] UTF8String]);
}

for(NSString *invalidProductId in response.invalidProductIdentifiers){
NSLog(@"Invalid product id:%@",invalidProductId);
}
}

-(void)buyRequest:(NSString *)productIdentifier{
SKPayment *payment = [SKPayment paymentWithProductIdentifier:productIdentifier];
[[SKPaymentQueue defaultQueue] addPayment:payment];
}

-(NSString *)productInfo:(SKProduct *)product{
NSArray *info = [NSArray arrayWithObjects:product.localizedTitle,product.localizedDescription,product.price,product.productIdentifier, nil];

return [info componentsJoinedByString:@"\t"];
}



-(void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions{
for (SKPaymentTransaction *transaction in transactions) {
switch (transaction.transactionState) {
case SKPaymentTransactionStatePurchased:
[self completeTransaction:transaction];
break;
case SKPaymentTransactionStateFailed:
[self failedTransaction:transaction];
break;
case SKPaymentTransactionStateRestored:
[self restoreTransaction:transaction];
break;
default:
break;
}
}
}

-(void) completeTransaction:(SKPaymentTransaction *)transaction{
NSString * productIdentifier = [[NSString alloc] initWithData:transaction.transactionReceipt encoding:NSUTF8StringEncoding];
NSString * receipt = [[productIdentifier dataUsingEncoding:NSUTF8StringEncoding] base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength];
receipt = [receipt stringByReplacingOccurrencesOfString:@"\r" withString:@""];
receipt = [receipt stringByReplacingOccurrencesOfString:@"\n" withString:@""];

UnitySendMessage("PAYManager", "BuyGoldIAPComplete",[receipt UTF8String]);
[[SKPaymentQueue defaultQueue] finishTransaction:transaction];
}


-(void) restoreTransaction:(SKPaymentTransaction *)transaction{
NSLog(@"Restore transaction : %@",transaction.transactionIdentifier);
[[SKPaymentQueue defaultQueue] finishTransaction:transaction];
}


-(void) provideContent:(SKPaymentTransaction *)transaction{

UnitySendMessage("Main", "ProvideContent", [transaction.transactionIdentifier UTF8String]);
}

-(void) failedTransaction:(SKPaymentTransaction *)transaction{
NSLog(@"Failed transaction : %@",transaction.transactionIdentifier);

if (transaction.error.code != SKErrorPaymentCancelled) {
NSLog(@"!Cancelled");
}
[[SKPaymentQueue defaultQueue] finishTransaction:transaction];
}
@end


static IAPManager* iap_manager = nil;


IAPManager* GetIAPManager()
{
if (iap_manager == nil) {
iap_manager = [[IAPManager alloc] init];
[iap_manager attachObserver];
}
return iap_manager;
}


bool IsProductAvailable(){
return [GetIAPManager() CanMakePayment];
}

void RequstProductInfo(void *p){
NSString *list = [NSString stringWithUTF8String:p];
NSLog(@"productKey:%@",list);
[GetIAPManager() requestProductData:list];
}

void BuyProduct(void *p){
[GetIAPManager() buyRequest:[NSString stringWithUTF8String:p]];
}

WARNING

  • 上传App Icon 需要上传1024*1024的,而不能有圆角
  • 必须添加测试账号
  • .ipa文件不能包含中文
  • 必须保证Private Policy URL的可用性
  • Cleared for Sale 需要勾选
  • 支付完成需要拿着苹果收费凭据去服务器校验 验证本地服务购买的有效性
  • 苹果校验错误码如下 沙盒校验地址 正式校验地址
    协议升级

关于协议升级的中文链接
关于商家事项的中文链接