Introduction | Overview of In-App Purchase | Retrieving Product Information | Making a Purchase
Adding a Store to Your Application | Verifying Store Receipts | Testing a Store | Auto-Renewable Subscriptions


본 페이지는 iOS In-App Purchase Programming Guide 문서의 Adding a Store to Your Application 부분을 번역해 놓은 페이지 입니다. 발 번역이라 이상한 부분이 있을 수 있습니다. 발견즉시 댓글을 달아 주세요.




Adding a Store to Your Application
귀하의 응용 프로그램에 저장소 추가

This chapter provides guided steps for adding a store to your application.
이 장에서는 응용 프로그램 저장소를 추가 안내 단계를 제공합니다.

The Step-By-Step Process

When you set up the project, make sure to link to StoreKit.framework. You can then add a store by following these steps:

프로젝트를 설정할 때, StoreKit.framework에 연결해야합니다. 그런 다음 단계를 수행하여 저장소를 추가 할 수 있습니다 :


  1. Decide what products you wish to deliver with your application.
    응용 프로그램과 함께 제공하고자하는 어떤 제품을 결정합니다.

    There are limitations on the types of features you can offer. Store Kit does not allow your application to patch itself or download additional code. Products must either work with existing code in your application or must be implemented using data files delivered from a remote server. If you wish to add a feature that requires changes to your source code, you need to ship an updated version of your application.

    당신이 제공 할 수있는 기능의 종류제한이 있습니다. 스토어 키트는 응용 프로그램 자체를 패치 또는 추가 코드를 다운로드 할 수 없습니다. 제품은 어느 응용 프로그램에서 기존 코드로 작업해야하거나 원격 서버에서 전송 데이터 파일을 사용하여 구현해야합니다. 당신은 소스 코드를 변경해야하는 기능을 추가하고자하는 경우, 당신은 응용 프로그램의 업데이트 된 버전을 출시합니다.


  2. Register product information for each product with iTunes Connect.
    아이튠즈 연결 각 제품에 대한 제품 정보를 등록합니다.

    You revisit this step every time you want to add a new product to your application’s store. Every product requires a unique product identifier string. The App Store uses this string to look up product information and to process payments. Product identifiers are specific to your iTunes Connect account and are registered with iTunes Connect in a way similar to how you registered your application.

    이 단계 당신이 응용 프로그램의 저장소에 제품을 추가 할 때마다 방문. 각 제품은 고유 한 제품 ID 문자열이 필요합니다.앱 스토어이 문자열 제품 정보를 조회하고 결제를 처리하는 데 사용합니다. 제품 ID는 아이튠즈에 특정 계정을 연결하고 아이튠즈 응용 프로그램을 등록하는 방법과 유사한 방법으로 연결에 등록됩니다.


    The process to create and register product information is described in iTunes Connect Developer Guide.
    제품 정보를 작성하고 등록하는 과정은 iTunes에서 설명하는 개발자 가이드를 연결합니다.


  3. Determine whether payments can be processed.
    결제가 처리 할 수 있는지 여부를 결정합니다.

    A user can disable the ability to make purchases inside applications. Your application should check to see whether payments can be purchased before queuing new payment requests. Your application might do this before displaying a store to the user (as shown here) or it may defer this check until the user actually attempts to purchase an item. The latter allows the user to see items that they could purchase when payments are enabled.

    사용자는 응용 프로그램 내부에 구매를 할 수있는 능력을 해제 할 수 있습니다. 응용 프로그램은 지불이 큐에 새로운 지불 요청하기 전에 구입 할 수 있는지 여부를 확인해야합니다. 응용 프로그램이 사용자에게 저장소를 표시하기 전에작업을 수행 할 수 있습니다 (다음과 같이) 또는 사용자가 실제로 상품을 구입하려고 할 때까지이 검사를 연기 할 수 있습니다.후자는 사용자가 결제가 활성화 될 때 그들이 구입할 수있는 항목을 볼 수 있습니다.

    if ([SKPaymentQueue canMakePayments]) {
       // Display a store to the user.
    } else {
       // Warn the user that purchases are disabled.
    }
  4. Retrieve information about products.
    제품에 대한 정보 검색 할 수 있습니다.

    Your application creates an SKProductsRequest object and initializes it with a set of product identifiers for the items you wish to sell, attaches a delegate to the request, and then starts it. The response holds the localized product information for all valid product identifiers.

    응용 프로그램 SKProductsRequest 개체를 만들고 당신이 판매하고자하는 항목에 대한 제품 식별자 세트로 초기화 요청에 대리자를 연결 한 시작합니다.응답이 유효한 모든 제품 식별자에 대한 지역화 된 제품의 정보를 보유하고 있습니다.


    Keep the array of valid products from the response. When the user selects a product to buy, you will need a product object to create the payment request.

    응답에서 유효한 제품의 배열을 유지한다.사용자가 구입할 수있는 제품을 선택하면, 당신은 지불 요청을 만들어야 할 제품 개체가 필요합니다.

    - (void) requestProductData
    {
        SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers:
                [NSSet setWithObject: kMyFeatureIdentifier]];
        request.delegate = self;
        [request start];
    }
    - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
    {
        NSArray *myProducts = response.products;
        // Populate your UI from the products list.
        // Save a reference to the products list.
    }
  5. Add a user interface that displays products to the user.
    사용자에게 제품을 표시하는 사용자 인터페이스를 추가합니다.

    Store Kit does not provide user interface classes. The look and feel of how you offer products to your customers is up to you!
    스토어 키트사용자 인터페이스 클래스를 제공하지 않습니다. 당신이 당신의 고객에게 제품을 제공하는 방법의 모양과 느낌당신에게 달려!

  6. Register a transaction observer with the payment queue.
    결제 트랜잭션 옵저버를 등록합니다.

    Your application should instantiate a transaction observer and add it as an observer of the payment queue.
    응용 프로그램이 트랜잭션 관찰자를 인스턴스화하고 결제 큐의 관찰자 추가해야합니다.

    MyStoreObserver *observer = [[MyStoreObserver alloc] init];
    [[SKPaymentQueue defaultQueue] addTransactionObserver:observer];

    Your application should add the observer when your application launches. The App Store remembers queued transactions even if your application exited before completing all transactions. Adding an observer during initialization ensures that all previously queued transactions are seen by your application.
    응용 프로그램을 시작할 때 응용 프로그램은 관찰자를 추가해야합니다. 응용 프로그램이 모든 트랜잭션을 완료하기 전에 종료해도 앱 스토어대기중인 트랜잭션을 기억합니다. 초기화하는 동안 관찰자를 추가하면 이전에 대기중인 트랜잭션은 응용 프로그램에서 볼 수 있도록합니다.

  7. Implement the paymentQueue:updatedTransactions: method on MyStoreObserver.
    updatedTransactions : MyStoreObserver 방법 paymentQueue를 구현합니다.

    The observer’s paymentQueue:updatedTransactions: method is called whenever new transactions are created or updated.
    관찰자의 paymentQueue : updatedTransactions : 새 트랜잭션을 만들거나 업데이트 할 때마다 메서드가 호출됩니다.

    - (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];
                default:
                    break;
            }
        }
    }
  8. Your observer provides the product when the user successfully purchases an item.
    귀하의 관찰자는 사용자가 성공적으로 아이템을 구매 제품을 제공합니다.

    - (void) completeTransaction: (SKPaymentTransaction *)transaction
    {
        // Your application should implement these two methods.
        [self recordTransaction:transaction];
        [self provideContent:transaction.payment.productIdentifier];
     
        // Remove the transaction from the payment queue.
        [[SKPaymentQueue defaultQueue] finishTransaction: transaction];
    }

    A successful transaction includes a transactionIdentifier property and a transactionReceipt property that record the details of the processed payment. Your application is not required to do anything with this information. You may wish to record this information to establish an audit trail for the transaction. If your application uses a server to deliver content, the receipt can be sent to your server and validated by the App Store.
    성공적인 거래transactionIdentifier 속성과 처리 된 지불의 세부 사항을 기록하는 transactionReceipt 속성을 포함합니다. 응용 프로그램은이 정보를 아무것도 할 필요가 없습니다. 당신은 트랜잭션에 대한 감사 추적을 설정하려면이 정보를 기록 수 있습니다. 응용 프로그램 콘텐츠를 제공하는 서버를 사용하는 경우, 영수증은 서버로 전송 앱 스토어에서 유효성을 검사 할 수 있습니다.

    It is critical that your application take whatever steps are necessary to provide the product that the user purchased. Payment has already been collected, so the user expects to receive the new purchase. See “Feature Delivery” for suggestions on how you might implement this.
    응용 프로그램은 사용자가 구매 한 제품을 제공하는 데 필요한 모든 단계를 수행하는 것이 중요합니다. 결제이미 수집 된, 그래서 사용자는 새로운 구매를받을 것으로 기대하고있다. 당신이 구현하는 방법에 대한 제안 "기능 배달"을 참조하십시오.

    Once you’ve delivered the product, your application must call finishTransaction: to complete the transaction. When you call finishTransaction:, the transaction is removed from the payment queue. To ensure that products are not lost, your application should deliver the product before callingfinishTransaction:.
    제품을 전달하고 나면, 응용 프로그램 finishTransaction를 호출해야합니다 : 트랜잭션을 완료 할 수 있습니다. 당신이 finishTransaction를 호출 할 , 트랜잭션은 결제 에서 제거됩니다. 제품이 손실되지 않도록하려면 응용 프로그램 callingfinishTransaction 전에 제품을 제공합니다.

  9. Finish the transaction for a restored purchase.
    복원 구입 거래를 완료하십시오.

    - (void) restoreTransaction: (SKPaymentTransaction *)transaction
    {
        [self recordTransaction: transaction];
        [self provideContent: transaction.originalTransaction.payment.productIdentifier];
        [[SKPaymentQueue defaultQueue] finishTransaction: transaction];
    }

    This routine is similar to that for a purchased item. A restored purchase provides a new transaction, including a different transaction identifier and receipt. You can save this information separately as part of any audit trail if you desire. However, when it comes time to complete the transaction, you’ll want to recover the original transaction that holds the actual payment object and use its product identifier.
    이 루틴은 구입 항목에 대한 유사합니다.복원 구입은 다른 트랜잭션 식별자와 영수증 새 트랜잭션을 제공합니다. 당신이 원하는 경우에 당신은 어떤 감사의 일부로서 별도로 정보를 저장할 수 있습니다. 그러나, 트랜잭션을 완료하는 데 시간이 올 때, 당신은 실제 지불 객체를 보유하고있는 원래의 트랜잭션을 복구하고 자사의 제품 식별자를 사용하는 것이 좋습니다.

  10. Finish the transaction for a failed purchase.
    실패한 구입 거래를 완료하십시오.

    - (void) failedTransaction: (SKPaymentTransaction *)transaction
    {
        if (transaction.error.code != SKErrorPaymentCancelled) {
            // Optionally, display an error here.
        }
        [[SKPaymentQueue defaultQueue] finishTransaction: transaction];
    }

    Usually a transaction fails because the user decided not to purchase the item. Your application can read the error field on a failed transaction to learn exactly why the transaction failed.

    The only requirement for a failed purchase is that your application remove it from the queue. If your application chooses to put up an dialog displaying the error to the user, you should avoid presenting an error when the user cancels a purchase.
    사용자가 아이템을 구매하지 않기로 결정하기 때문에 일반적으로 트랜잭션이 실패합니다. 응용 프로그램이 트랜잭션이 실패한 이유를 정확하게 배울 수있는 실패 트랜잭션오류 필드를 읽을 수 있습니다.
    실패한 구입을위한 유일한 요구 사항은 응용 프로그램이 큐에서 제거하는 것입니다. 응용 프로그램이 사용자에게 오류를 표시하는 대화 상자를 넣어 선택하면, 사용자가 구매를 취소 할 때 오류를 제시 피해야한다.

  11. With all the infrastructure in place, you can finish the user interface. When the user selects an item in the store, create a payment object and add it to the payment queue.
    곳에서 인프라, 사용자 인터페이스를 완료 할 수 있습니다.사용자가 저장소에 항목을 선택하면 결제 개체를 만들고 결제 에 추가합니다.

    SKProduct *selectedProduct = <#from the products response list#>;
    SKPayment *payment = [SKPayment paymentWithProduct:selectedProduct];
    [[SKPaymentQueue defaultQueue] addPayment:payment];

    If your store offers the ability to purchase more than one of a product, you can create a single payment and set the quantity property.
    당신의 가게는 제품 중 하나 이상을 구입 할 수있는 기능을 제공하는 경우, 당신은 하나의 지불을 만들고 속성을 설정할 수 있습니다.

    SKProduct *selectedProduct = <#from the products response list#>;
    SKMutablePayment *payment = [SKMutablePayment paymentWithProduct:selectedProduct];
    payment.quantity = 3;
    [[SKPaymentQueue defaultQueue] addPayment:payment];

Where to Go Next

The code provided in these steps is best used for the built-in product model. If your application uses a server to deliver content, you are responsible for designing and implementing the protocols used to communicate between your application and your server. Your server should also verify receipts before delivering products to your application.
단계에서 제공된 코드가장 기본 제품 모델에 사용됩니다. 응용 프로그램 콘텐츠를 제공하는 서버를 사용하는 경우, 당신은 응용 프로그램과 서버 사이의 통신에 사용되는 프로토콜을 설계 및 구현에 대한 책임이 있습니다. 서버응용 프로그램에 제품을 전달하기 전에 영수증을 확인해야합니다.

Posted by 창업자닉군
,

Introduction | Overview of In-App Purchase | Retrieving Product Information | Making a Purchase
Adding a Store to Your Application | Verifying Store Receipts | Testing a Store | Auto-Renewable Subscriptions


본 페이지는 iOS In-App Purchase Programming Guide 문서의 Making a Purchase 부분을 번역해 놓은 페이지 입니다. 발 번역이라 이상한 부분이 있을 수 있습니다. 발견즉시 댓글을 달아 주세요.




Making a Purchase
구매하기

When the user is ready to purchase an item, your application asks the App Store to collect payment. When your application asks for payment, the App Store creates a persistent transaction and continues to process the payment, even if the user quits and relaunches your application. The App Store synchronizes the list of pending transactions with your application and delivers updates to your application when the status of any of these transactions changes.

사용자가 항목을 구입 할 준비가되면, 애플리케이션은 지불을 수집하는 앱 스토어요청합니다. 응용 프로그램이 지불을 요구하는 경우, 앱 스토어지속적인 트랜잭션을 생성하고 결제를 처리하는 데 계속 사용자가 종료하더라도 응용 프로그램을 다시 실행합니다.앱 스토어응용 프로그램과 함께 보류중인 트랜잭션의 목록을 동기화하고 응용 프로그램에 대한 업데이트를 제공 할 때 이러한 트랜잭션 변경 사항상태를 표시합니다.

Collecting Payments
지불 수금

To collect payment, your application creates a payment object and queues it on the payment queue, as shown in Figure 3-1.

Figure 3-1  Adding a payment request to the queue
Adding a Payment Request to the Queue

When the payment is added to the payment queue, a persistent transaction is created to hold it. After the payment is processed, the transaction is updated with information about the payment collection. Your application implements an observer that receives messages when transactions are updated. The observer should provide purchased items to the user and then remove the transaction from the payment queue.

결제 후 에 추가 될 때, 지속적인 트랜잭션유지하기 위해 만들어집니다.결제가 처리 된 후, 트랜잭션은 지불 수집에 대한 정보로 업데이트됩니다. 응용 프로그램이 트랜잭션이 업데이트 될 때 메시지를받는 관찰자를 구현합니다.관찰자는 사용자에게 구매 한 품목을 제공하고 지급 대기열에서 트랜잭션을 제거해야합니다.

SKPayment

Collecting payment starts with a payment object. The payment object includes a product identifier and optionally includes the quantity of that product to be purchased. You can queue the same payment object more than once; each time a payment object is queued results in a separate request for payment.

지불을 수집하는 것은 지불 객체로 시작합니다.지불 객체는 제품 식별자를 포함하고 선택적으로 구입할 수있는 해당 제품의 양을 포함한다. 당신은 한 번 이상 같은 지불 객체를 할 수 있으며, 각 시간을 지불 객체는 지불을위한 별도의 요청 결과를 대기하고 있습니다.


Users can disable the ability to make purchases in the Settings application. Before attempting to queue a purchase, your application should first confirm that payment can be processed. You do this by calling the payment queue’s canMakePayments method.

사용자는 설정 응용 프로그램에서 구매를 할 수있는 능력을 해제 할 수 있습니다. 구입하기 전에, 애플리케이션은 먼저 결제가 처리 할 수있는 확인해야합니다. 당신은 지불 canMakePayments 메서드를 호출하여이 작업을 수행합니다.


SKPaymentQueue

The payment queue is used to communicate with the App Store. When payments are added to the queue, Store Kit transmits the request to the App Store. Store Kit presents dialogs to ask the user to authorize payment. The completed transaction is returned to your application’s observer.

결제 큐는 앱 스토어와 통신하는 데 사용됩니다. 지불은 큐에 추가 될 때, 스토어 키트앱 스토어에 요청을 전송합니다. 스토어 키트는 지불승인하도록 사용자에게 요청하는 대화 상자를 표시합니다.완료된 트랜잭션이 응용 프로그램의 관찰자에게 반환됩니다.

SKPaymentTransaction

A transaction is created for every payment added to the queue. Each transaction has properties that allow your application to determine the status of the transaction. When payment is collected, the transaction includes additional details about the successful transaction.

모든 지불이 큐에 추가에 대한 트랜잭션이 생성됩니다. 각 트랜잭션응용 프로그램에서 트랜잭션의 상태를 확인할 수있는 속성이 있습니다. 결제가 수집 될 때, 트랜잭션이 성공적인 거래에 대한 추가 정보를 포함합니다.


Although your application can ask the payment queue for a list of pending transactions, it is more common for an application to wait until the payment queue notifies the payment queue’s observer with a list of updated transactions.

응용 프로그램이 보류중인 트랜잭션목록을 결제 큐를 요청할 수 있지만, 지불 큐가 업데이트 트랜잭션의 목록을 결제 관찰자에게 알립니다 때까지 기다려야하는 응용 프로그램에 더 일반적입니다.

SKPaymentTransactionObserver

Your application implements the SKPaymentTransactionObserver protocol on an object and adds it as an observer to the payment queue. The observer’s primary responsibility is to examine completed transactions, deliver items that were successfully purchased, and remove those transactions from the payment queue.

응용 프로그램 개체에 SKPaymentTransactionObserver 프로토콜을 구현하고 결제 큐에 관찰자 추가합니다.관찰자의 일차적 책임완료된 트랜잭션을 검사 성공적으로 구매 된 품목전달하고 결제 큐에서 해당 트랜잭션을 제거하는 것입니다.


Your application should associate an observer with the payment queue when it launches, rather than wait until the user attempts to purchase an item. Transactions are not lost when an application terminates. The next time the application launches, Store Kit resumes processing transactions. Adding the observer during your application’s initialization ensures that all transactions are returned to your application.

응용 프로그램시작할 때 결제 큐에 관찰자를 연결하는 대신 사용자가 항목을 구입하려고 할 때까지 기다려야합니다.응용 프로그램이 종료 될 때 트랜잭션이 손실되지 않습니다.다음 번에 응용 프로그램 스토어 키트트랜잭션 처리다시 시작, 시작합니다. 응용 프로그램의 초기화 중에 관찰자를 추가하면 모든 트랜잭션이 응용 프로그램에 반환됩니다 보장합니다.

Restoring Transactions
트랜잭션을 복원

Once a transaction has been processed and removed from the queue, your application normally never sees it again. However, if your application supports product types that must be restorable, you must include an interface that allows users to restore these purchases. This interface allows a user to add the product to other devices or, if the original device was wiped, to restore the transaction on the original device.

트랜잭션 처리 대기열에서 제거 된 후 응용 프로그램이 정상적으로 다시보고하지 않습니다. 응용 프로그램을 복원 할 수 있어야 제품 유형을 지원하는 경우, 당신은 사용자가 이러한 구매를 복원 할 수있는 인터페이스를 포함해야합니다. 이 인터페이스는 원래 장치가 전멸 된 경우 사용자가 원래의 장치에 트랜잭션을 복원하려면 다른 장치에 제품을 추가하거나 할 수 있습니다.


Store Kit provides built-in functionality to restore transactions for non-consumable products, auto-renewable subscriptions and free subscriptions. To restore transactions, your application calls the payment queue’s restoreCompletedTransactions method. The payment queue sends a request to the App Store to restore the transactions. In return, the App Store generates a new restore transaction for each transaction that was previously completed. The restore transaction object’s originalTransaction property holds a copy of the original transaction. Your application processes a restore transaction by retrieving the original transaction and using it to unlock the purchased content. After Store Kit restores all the previous transactions, it notifies the payment queue observers by calling their paymentQueueRestoreCompletedTransactionsFinished: method.

스토어 키트가 아닌 소모품 제품, 자동 재생 구독 및 무료 구독에 대한 거래를 복원하는 기능을 내장하고 있습니다. 트랜잭션을 복원하려면 응용 프로그램이 지불 restoreCompletedTransactions 메서드를 호출합니다.결제 큐는 트랜잭션을 복구하는 앱 스토어요청을 보냅니다. 반환에서는, 앱 스토어 이전에 완성 된 각 트랜잭션에 대해 새로운 복원 트랜잭션을 생성합니다.복원 트랜잭션 개체originalTransaction 속성은 원본 트랜잭션의 사본을 보유하고 있습니다. 응용 프로그램은 원래 트랜잭션을 검색하고 구입 한 콘텐츠의 잠금을 해제하기 위해 그것을 사용하여 복원 트랜잭션을 처리합니다. 방법 : 스토어 키트는 이전의 트랜잭션을 복원 한 후에는 자신의 paymentQueueRestoreCompletedTransactionsFinished를 호출하여 결제 관찰자에게 알립니다.


If the user attempts to purchase a restorable product (instead of using the restore interface you implemented), the application receives a regular transaction for that item, not a restore transaction. However, the user is not charged again for that product. Your application should treat these transactions identically to those of the original transaction.

사용자가 (대신 구현 한 복원 인터페이스를 사용하여)의 복원이 제품을 구입하려고하면 응용 프로그램은 해당 항목이 아닌 복원 거래를 위해 정기적으로 거래를받습니다. 그러나 사용자 해당 제품을 다시 청구되지 않습니다. 응용 프로그램은 원래 트랜잭션의 사람들에게 동일하게 이러한 트랜잭션 처리해야합니다.


Non-renewing subscriptions and consumable products are not automatically restored by Store Kit. Non-renewing subscriptions must be restorable, however. To restore these products, you must record transactions on your own server when they are purchased and provide your own mechanism to restore those transactions to the user’s devices.

갱신 구독 및 소모품 제품 것은 자동으로 저장 장비복원되지 않습니다. 갱신 구독 그러나 복원 할 수 있어야합니다. 이 제품을 복원하려면, 당신은 그들이 구입 자신의 서버 트랜잭션을 기록하고 사용자의 장치에 해당 트랜잭션을 복구하는 자신의 메커니즘을 제공해야합니다.

Posted by 창업자닉군
,

Introduction | Overview of In-App Purchase | Retrieving Product Information | Making a Purchase
Adding a Store to Your Application | Verifying Store Receipts | Testing a Store | Auto-Renewable Subscriptions


본 페이지는 iOS In-App Purchase Programming Guide 문서의 Retrieving Product Information 부분을 번역해 놓은 페이지 입니다. 발 번역이라 이상한 부분이 있을 수 있습니다. 발견즉시 댓글을 달아 주세요.




Retrieving Product Information
제품 정보 검색

When your application is ready to display a store to the user, it must populate its user interface with information from the App Store. This chapter details how to request product details from the App Store.

응용 프로그램이 사용자에게 저장소를 표시 할 준비가되면, 그것은 앱 스토어의 정보로 사용자 인터페이스채워야합니다. 이 장에서는 앱 스토어에서 제품 상세를 요청하는 방법을 자세히 설명합니다.

Sending Requests to the App Store
앱 스토어에 요청을 보내기

Store Kit provides a common mechanism to request information from the App Store. Your application creates and initializes a request object, attaches a delegate to it, and starts the request. Starting a request transmits it to the App Store, where it is processed. When the App Store processes the request, the request’s delegate is called asynchronously to deliver the results to your application. Figure 2-1 shows the request model.

스토어 키트앱 스토어에서 정보를 요청하는 일반적인 메커니즘을 제공합니다. 응용 프로그램 생성 요청 개체를 초기화, 그것은에 대리자연결하고, 요청을 시작합니다.요청을 시작하면이 처리되는 앱 스토어,전송합니다.앱 스토어가 요청을 처리 할 때 요청의 대리자가 응용 프로그램에 결과를 전달하기 위해 비동기 적으로 호출합니다. 그림 2-1는 요청 모델을 보여줍니다.

Figure 2-1  Store Kit request model
Store Kit Requests

If your application quits while a request is pending, your application needs to resend it.

요청이 보류되는 동안 응용 프로그램이 종료하면 응용 프로그램 다시 할 필요가있다.

SKRequest

SKRequest is an abstract base class for requests sent to the store.

SKRequest 가게에 보낸 요청에 대한 추상 기본 클래스입니다.

SKRequestDelegate

SKRequestDelegate is a protocol that your application implements to handle requests that completed successfully and requests that failed because of an error.

SKRequestDelegate 응용 프로그램이 성공적으로 완료 요청 오류로 인해 실패한 요청을 처리하기 위해 구현하는 프로토콜입니다.

Requesting Information About Products
제품에 관하여 정보 요청

Your application uses a products request to retrieve localized information about a product. Your application creates a request that contains a list of product identifier strings. As described earlier, your application might embed product identifiers inside your application or it might retrieve the identifiers from an external server.

응용 프로그램이 제품에 대한 지역화 된 정보를 검색 할 제품 요청을 사용합니다. 응용 프로그램 제품 ID 문자열의 목록을 포함하는 요청을 생성합니다. 앞에서 설명한 것처럼, 응용 프로그램이 응용 프로그램 내에서 제품 식별자를 포함 할 수 있거나 외부 서버에서 식별자를 검색 할 수 있습니다.


When you start the products request, the product identifier strings are transmitted to the App Store. The App Store responds with the localized information you previously entered in iTunes Connect. You use these details to populate the user interface of your store. Figure 2-2 shows a products request.

당신이 제품요청을 시작할 때, 제품 ID 문자열은 앱 스토어전송됩니다.앱 스토어는 이전에 연결 아이튠즈에 입력 된 지역화 된 정보로 응답합니다. 당신은 당신의 저장소의 사용자 인터페이스를 채울 이러한 세부 정보를 사용합니다. 그림 2-2제품요청을 보여줍니다.

Figure 2-2  A request for localized product information
Products Request

SKProductsRequest

An SKProductsRequest object is created with a list of product identifier strings for the products you want to display in your store.

SKProductsRequest 개체가 당신이 당신의 상점에서 표시 할 제품에 대한 제품 ID 문자열의 목록이 생성됩니다.

SKProductsRequestDelegate

The SKProductsRequestDelegate protocol is implemented by an object in your application to receive the response from the store. It receives the response asynchronously when the request is successfully processed.

SKProductsRequestDelegate 프로토콜은 저장소에서 응답을 수신하는 응용 프로그램에서 객체에 의해 구현됩니다.요청이 성공적으로 처리 될 때 비동기 적으로 응답을받습니다.

SKProductsResponse

An SKProductsResponse object contains a SKProduct object for each valid product identifier in the original request as well as a list of the product identifiers that were not recognized by the store. The store might not recognize the identifier for a number of reasons; it might be misspelled, marked unavailable for sale, or changes you have made in iTunes Connect have not propagated to all of the App Store servers.

SKProductsResponse 개체는 원래 요청의 각 유효한 제품 식별자뿐만 아니라 상점에서 인식되지 않은 제품 식별자의 목록 SKProduct 개체가 포함되어 있습니다.저장소는 여러 가지 이유에 대한 식별자를 인식하지 못할 수도 있습니다, ​​그것은 앱 스토어모든 서버에 전달하지 않은, 맞춤법이 틀린 판매 사용할 수 없음으로 표시하거나, 아이튠즈 커넥트에서 수행 한 변경 될 수 있습니다.

SKProduct

An SKProduct object provides localized information about a product you’ve registered with the App Store.

SKProduct 객체는 앱 스토어등록한 제품에 대한 지역화 된 정보를 제공합니다.

Posted by 창업자닉군
,