0

アプリ内購入をアプリに追加しようとしているので、インターウェブを検討した後、MKStoreKitを使用することにしました。これですべてが設定され、プロジェクトは正常に見えます。サーバー上にあるはずのファイルは実際にはサーバー上にあります。そして、この種のものすべて。

デバイスでアプリを実行し、テストボタン「購入」を押すと、混乱が始まります。まず、これは私が得た結果です。

    2012-02-09 17:45:28.324 MyApp[7147:707] checking if com.my.company.testinapp.pack001 pack is purchased
    2012-02-09 17:45:30.814 MyApp[7147:707] Review request cannot be checked now: (null)
    2012-02-09 17:45:33.335 MyApp[7147:707] NSUbiquitousKeyValueStore error: com.my.company.inapp has no valid com.apple.developer.ubiquity-kvstore-identifier entitlement
    2012-02-09 17:45:33.370 MyApp[7147:707] Problem in iTunes connect configuration for product: com.my.company.testinapp.pack001
    2012-02-09 17:45:34.063 MyApp[7147:707] User cancelled transaction: <SKPaymentTransaction: 0x8c0fde0>
    2012-02-09 17:45:34.064 MyApp[7147:707] error: Error Domain=SKErrorDomain Code=3 "Cannot connect to iTunes Store" UserInfo=0x8c1f210 {NSLocalizedDescription=Cannot connect to iTunes Store}
    2012-02-09 17:45:34.065 MyApp[7147:707] User Cancelled Transaction
    2012-02-09 17:45:58:174 MyApp[7147:20747] finished networking setup

一歩下がって、sceanrioを見てみましょう。

これは私の呼び出しコードです

- (IBAction)iap:(id)sender {
    NSLog(@"checking if %@ pack is purchased", kFeatureAId);
    if([MKStoreManager isFeaturePurchased:kFeatureAId]) { //unlock it
        NSLog(@"horray, you already purchased this item!");
    } else {
        [[MKStoreManager sharedManager] buyFeature:kFeatureAId
            onComplete:^(NSString* purchasedFeature) {
                NSLog(@"Purchased: %@", purchasedFeature);
            } onCancelled:^ {
                NSLog(@"User Cancelled Transaction");
        }];
    }
}

つまり、基本的には、テスト項目の購入を呼び出す以外に何もしていません。

これはMKStoreConfig.hです

#define kConsumableBaseFeatureId @"com.my.company.inapp"                        /* this is the bundle id */
#define kFeatureAId @"com.my.company.testinapp.pack001"                         /* this is the product id */
#define kConsumableFeatureBId @"com.my.company.testinapp.pack001.582046155"     /* this is the product id + product number */
#define FishBasket @"FishBasket"

#define SERVER_PRODUCT_MODEL 4
#define OWN_SERVER @"http://testings.company.my.com/inappscripts"
#define REVIEW_ALLOWED 1

#warning Shared Secret Missing Ignore this warning if you don't use auto-renewable subscriptions
#define kSharedSecret @"d43ecfa9d8b94facfbcfed1eca509dbe"

これらの情報は、私のケースシナリオの分析を行うのに十分です。詳細が必要な場合は、質問してください。喜んでお答えします。

誰かがこれで私を助けてくれることを願っています。:) 前もって感謝します!

-k-

4

1 に答える 1

6

「製品の iTunes Connect 構成に問題があります: com.my.company.testinapp.pack001」というメッセージが表示された場合は、製品が iTunes Connect で正しく構成されていないことを意味します。

すでに「売却済」ですか?

スクリーンショットをアップロードして、状態を「開発者承認」としてマークしましたか?

これが初めてのアプリである場合は、銀行と税金の明細書を Apple に提出しましたか? - 奇妙なことに、製品を「合法的に」販売できない場合、IAP は失敗します。「Contracts, Tax and Banking」の情報には、3 つのセクションすべてに緑色のチェックマークが表示されます。

それが役立つことを願っています。

-- Mugunth (私は MKStoreKit を書きました)

于 2012-02-10T14:38:41.220 に答える