Introduction | Designing Your App’s Store | Displaying Your App’s Store UI | Requesting Payment
Delivering Products | Providing Purchased Content | Working with Subscriptions | Preparing for App Review

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




Requesting Payment
지불 요청

In the second part of the purchase process, after the user has chosen to purchase a particular product, your app submits payment request to the App Store, as shown in Figure 3-1.

사용자가 특정 제품을 구매하기로 결정 후 구매 프로세스의 두 번째 부분에서, 당신의 응용 프로그램은 그림 3-1에서와 같이 앱 스토어에 지불 요청을 제출합니다.

Figure 3-1  Stages of the purchase process—requesting payment


Creating a Payment Request
지불 요청 만들기

When the user selects a product to buy, create a payment request using a product object. Populate the quantity if needed, and add the payment to the transaction queue to submit it to the App Store for processing. Adding a payment object to the queue multiple times results in multiple transactions—the user will be charged multiple times and your app will be expected to deliver the product multiple times. Listing 3-1 shows a simplified example of the process.

사용자가 구입할 수있는 제품을 선택하면, 제품 개체를 사용하여 지불 요청을 만듭니다. 필요한 경우 양을 채우고 처리를 위해 앱 스토어에 제출하는 트랜잭션 큐에 지불을 추가합니다. 복수의 큐에 여러 번 결과에 지불 객체를 추가 거래 - 사용자가 여러 번 요금이 부과 될 수 있으며, 귀하의 응용 프로그램은 제품을 여러 번 제공 할 것으로 예상됩니다. 목록 3-1는 프로세스의 단순화 된 예를 보여줍니다.

Listing 3-1  Creating a payment request

// At app launch
[[SKPaymentQueue defaultQueue] addTransactionObserver:observer];
 
// ...
 
// When the user buys a product
SKPayment payment = [SKPayment paymentWithProduct:product];
payment.quantity = 2;
[[SKPaymentQueue defaultQueue] addPayment:payment];

Store Kit calls the transaction queue observer to handle a completed or failed payment request. For information about implementing the observer, see “Providing Purchased Content.”

스토어 키트는 트랜잭션 큐 관찰자가 완료되거나 실패 지불 요청을 처리하기 위해 호출합니다. 관찰자를 구현하는 방법에 대한 자세한 내용은 "구입 한 컨텐츠를 제공"을 참조하십시오.

Submitting a Payment Request
지불 요청을 제출

The transaction queue plays a central role in letting your app communicate with the App Store through the Store Kit framework. You add work to the queue that the App Store needs to act on, such as a payment request that needs to be processed. After the App Store has processed the request, Store Kit calls your transaction queue observer to handle the result. In addition to using the transaction queue for payment requests, your app also uses the transaction queue to download hosted content and to find out that subscriptions have been renewed, as discussed in “Providing Purchased Content” and “Working with Subscriptions.”

트랜잭션 큐는 스토어 키트 프레임 워크를 통해 앱 스토어에 앱 통신을시키는의 중심 역할을한다. 당신은 앱 스토어와 같은 처리해야하는 지불 요청으로 행동 할 필요가있는 큐에 작업을 추가합니다.앱 스토어가 요청을 처리 한 후, 스토어 키트는 결과를 처리하는 트랜잭션 큐 옵저버를 호출합니다. 지불 요청에 대한 트랜잭션 큐를 사용하는 것 외에도, 앱도 호스팅 콘텐츠를 다운로드하고 구독으로 "구입 한 콘텐츠를 제공"과의 논의, 갱신 된 알 트랜잭션 큐를 사용하여 "구독에 대한 작업."

Register your observer when your app is launched, and make sure that the observer is ready to handle a transaction at any time, not only after you add a transaction to the queue. For example, consider the case of a user buying something in your app right before going into a tunnel. Your app isn’t able to deliver the purchased content because there is no network connection. The next time your app is launched, Store Kit calls your transaction queue observer again and delivers the purchased content at that time. Similarly, if your app fails to mark a transaction as finished, Store Kit calls the observer every time that your app is launched until the transaction in properly marked as finished.

앱이 실행될 때 관찰자를 등록하고 큐에 트랜잭션을 추가 한 후뿐만 아니라 관찰자는 언제든지 트랜잭션을 처리 할 준비가되어 있는지 확인합니다. 예를 들어, 오른쪽 터널로 가기 전에 응용 프로그램에서 뭔가를 구입하는 사용자의 경우를 고려. 귀하의 응용 프로그램은 네트워크 연결이 없기 때문에 구입 한 콘텐츠를 제공 할 수 없습니다. 앱이 실행되는 다음 번 스토어 키트가 다시 트랜잭션 큐 관찰자 호출하고 그 당시 구입 한 콘텐츠를 제공합니다. 앱이 마무리 트랜잭션을 표시하지 않을 경우 마찬가지로 스토어 키트는 관찰자에게 앱이 마무리 제대로 표시에서 트랜잭션까지 출시 될 때마다 호출합니다.

Suggested Testing Steps
제안 된 테스트 단계

Test each part of your code to verify that you have implemented it correctly.
당신이 올바르게 구현되었는지 확인하는 코드의 각 부분을 테스트합니다.

Sign In to the iTunes Store with Your Test Account
테스트 계정으로 iTunes Store에 로그인

Create a test user account in iTunes Connect, as described in iTunes Connect Developer Guide.
로 iTunes에서 설명한 연결 아이튠즈에서 테스트 사용자 계정을 생성하는 개발자 가이드를 연결합니다.

On a development iOS device, sign out of the iTunes Store in Settings. Then build and run your app from Xcode.
개발 IOS 장치에서 설정에서 아이튠즈 스토어에서 로그 아웃. 그런 다음 빌드 엑스 코드에서 응용 프로그램을 실행합니다.

On a development OS X device, sign out of the Mac App Store. Then build your app in Xcode and launch it from Finder.
개발 OS X 장치에서, 맥 앱 스토어에서 로그 아웃. 그런 엑스 코드에서 응용 프로그램을 구축하고 Finder에서 그것을 실행합니다.

Use your app to make an in-app purchase. When prompted to sign in to the App Store, use your test account. Note that the text “[Environment: Sandbox]” appears as part of the prompt, indicating that you are connected to the test environment.

인 - 앱 구매를 만들기 위해 응용 프로그램을 사용합니다.앱 스토어에 로그인하라는 메시지가 표시되면 테스트 계정을 사용합니다. 당신이 테스트 환경에 연결되어 있음을 나타내는 프롬프트의 일부로 표시 : 텍스트 "[샌드 박스 환경은]"라고합니다.

If the text “[Environment: Sandbox]” does not appear, that indicates you are using the production environment. Make sure you are running a development signed build of your app. Production signed builds use the production environment.

텍스트를 "[환경 : 샌드 박스]"가 표시되지 않습니다, ​​그건 당신이 프로덕션 환경을 사용하고 있음을 나타냅니다. 당신이 개발을 실행하고 있는지 확인합니다 귀하의 응용 프로그램 빌드 서명했다. 생산 빌드 환경을 사용하여 서명했다.

Verify Your Observer Code
귀하의 관찰자 코드 확인

Review the transaction observer’s implementation of the SKPaymentTransactionObserver protocol. Verify that it can handle transactions even if you aren’t currently displaying your app’s store UI and even if you didn’t recently initiate a purchase.

SKPaymentTransactionObserver 프로토콜의 트랜잭션 관찰자의 구현을 검토합니다. 현재 앱의 상점 UI를 표시하지 않습니다 그리고 당신은 최근에 구매를 시작하지 않았더라도해도 트랜잭션을 처리 할 수 ​​있는지 확인합니다.

Locate the call to the addTransactionObserver: method of SKPaymentQueue in your code. Verify that your app calls this method at app launch.

코드에서 SKPaymentQueue의 방법 : addTransactionObserver 호출을 찾습니다. 앱이 앱 시작시이 메서드를 호출하는지 확인합니다.

Test Fetching the List of Products
제품 목록 가져 오기 테스트

If your product identifiers are embedded in your app, set a breakpoint in your code after they are loaded and verify that the instance of NSArray contains the expected list of product identifiers.

제품 식별자가 응용 프로그램에 포함 된 경우,이로드 된 후 코드에서 중단 점을 설정하고있는 NSArray의 인스턴스가 제품 식별자의 예상 목록이 포함되어 있는지 확인합니다.

If your product identifiers are fetched from a server, manually fetch the JSON file—using a web browser such as Safari or a command-line utility such as curl—and verify that the data returned from your server contains the expected list of product identifiers. Also verify that your server correctly implements standard HTTP caching mechanisms.

제품 식별자는 서버에서 가져온 경우, 수동으로 JSON을 가져올 파일을 사용하여 데이터가 서버에서 반환하는 등의 사파리와 같은 웹 브라우저 또는 컬 및 확인과 같은 명령 줄 유틸리티하는 제품 식별자의 예상 목록이 포함되어 있습니다. 또한 서버가 올바르게 표준 HTTP 캐싱 메커니즘을 구현하는지 확인합니다.

Test a Products Request
제품 요청을 테스트

Using the list of product identifiers that you tested, create and submit an instance of SKProductsRequest. Set a breakpoint in your code, and inspect the lists of valid and invalid product identifiers. If there are invalid product identifiers, review your products in iTunes Connect and correct your JSON file or property list.

당신이 검사하는 제품 식별자 목록을 사용하여 SKProductsRequest의 인스턴스를 작성하고 제출합니다. 코드에서 중단 점을 설정하고, 유효하고 유효하지 않은 제품 식별자의 목록을 검사합니다. 잘못된 제품 식별자가있는 경우, iTunes에서 제품을 검토 연결하고 JSON 파일 또는 재산 목록을 수정합니다.

Test a Payment Request
지불 요청을 테스트

Create an instance of SKPayment using a valid product identifier that you have already tested. Set a breakpoint and inspect the payment request. Add the payment request to the transaction queue, and set a breakpoint to confirm that the paymentQueue:updatedTransactions: method of your observer is called.

이미 테스트 한 유효한 제품 식별자를 사용하여 SKPayment의 인스턴스를 만듭니다.중단 점을 설정하고 결제 요청을 검사합니다.트랜잭션 큐에 지불 요청을 추가하고 paymentQueue 확인하는 중단 점을 설정 updatedTransactions : 귀하의 관찰자 메서드가 호출됩니다.

During testing, it’s ok to finish the transaction immediately without providing the content. However, even during testing, failing to finish the transaction can cause problems: unfinished transaction remain in the queue indefinitely, which could interfere with later testing.

테스트하는 동안, 그것은 콘텐츠를 제공하지 않고 즉시 트랜잭션을 완료 괜찮아요. 그러나 심지어 테스트하는 동안 트랜잭션을 완료하는 데 실패하면 문제가 발생할 수 있습니다 : 끝나지 않은 트랜잭션을 나중에 시험을 방해 할 수있는 무한정 대기열에 남아 있습니다.

Posted by 창업자닉군
,

Introduction | Designing Your App’s Store | Displaying Your App’s Store UI | Requesting Payment
Delivering Products | Providing Purchased Content | Working with Subscriptions | Preparing for App Review

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




Displaying Your App’s Store UI
귀하의 응용 프로그램의 저장소 UI를 표시

In the first part of the purchase process, your app presents its store UI to the user, and then lets the user selects a product, as shown in Figure 2-1. The second and third part of the process are described in the two chapters that follow this one.

구매 프로세스의 첫 번째 부분에서는 여러분의 응용 프로그램은 사용자에게 자사의 매장 UI를 제공하고 그림 2-1과 같이 사용자가 제품을 선택 할 수 있습니다. 프로세스의 두 번째 및 세 번째 부분은이 하나를 따라 두 장에 설명되어 있습니다.

Figure 2-1  Stages of the purchase process—displaying store UI



Getting a List of Product IDs
제품 ID 목록 가져 오기

To get a list of product identifiers, have your app either read them from a file in your app bundle or fetch them from your server. Table 2-1 summarizes the differences between the two approaches. If you offer a fixed list of products, such as an in-app purchase to remove ads, embed the list in your app bundle. If your list of product identifiers can change without you updating your app, have your app fetch the list from your server.

제품 식별자의 목록을 얻으려면, 당신의 애플 리케이션 중 하나를 귀하의 응용 프로그램 번들에 파일을 읽거나 서버에서 그들을 가져올 수 있습니다. 표 2-1은 두 가지 방식의 차이점을 요약 한 것입니다. 당신은 광고를 제거하는 등의 앱내 구매로 제품의 고정 된 목록을 제공하는 경우, 귀하의 응용 프로그램 번들의 목록을 포함합니다. 제품 식별자의 목록이 앱을 업데이트하지 않고 변경할 수없는 경우 응용 프로그램이 서버에서 목록을 가져올 수 있습니다.

Table 2-1  Comparison of approaches for obtaining product identifiers

Embedded in the app bundle

Fetched from your server

Used for purchases that

Unlock functionality

Deliver content

List of products can change

When the app is updated

At any time

Requires a server

No

Yes

There is no runtime mechanism to fetch a list of all products configured for an app in iTunes Connect. You are responsible for managing your app’s list of products and providing that information to your app.

연결 iTunes에서 응용 프로그램에 대해 구성된 모든 제품의 목록을 가져 오기하는 런타임 메커니즘은 없습니다. 당신이 제품의 응용 프로그램의 목록을 관리하고 응용 프로그램에 해당 정보를 제공 할 책임이 있습니다.

Embedding Product IDs in the App Bundle
앱 번들 제품 ID를 포함

Include a property list file in your app bundle containing an array of product identifiers, such as the following:
다음과 같은 제품 식별자의 배열을 포함하는 응용 번들 프로퍼티리스트 파일을 포함합니다 :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
 "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
    <string>com.example.level1</string>
    <string>com.example.level2</string>
    <string>com.example.rocket_car</string>
</array>
</plist>

To get product identifiers from the property list, locate the file in the app bundle and read it.
속성 목록에서 제품 ID를 얻으려면 응용 프로그램 번들에 파일을 찾아 그것을 읽고.

NSURL * url = [[NSBundle mainBundle] URLForResource:@"product_ids"
                                     withExtension:@"plist"];
NSArray * productIdentifiers = [NSArray arrayWithContentsOfURL:url];

Fetching Product IDs from Your Server
귀하의 서버에서 제품 ID를 가져 오기

Store a JSON file on your server with the product identifiers. For example:
제품 식별자 서버에 JSON 파일을 저장합니다. 예를 들면 :

[
    "com.example.level1",
    "com.example.level2",
    "com.example.rocket_car"
]

To get product identifiers from your server, fetch the JSON file and read it.
서버에서 제품 ID를 얻으려면, JSON 파일을 가져오고 그것을 읽고.

-fetchProductIdentifiersFromURL:(NSURL*)url delegate(id):delegate
{
    dispatch_queue_t global_queue =
           dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0);
    dispatch_async(global_queue, ^{
        NSError * err;
        NSData * jsonData = [NSData dataWithContentsOfURL:url
                                                  options:NULL
                                                    error:&err];
        if (!jsonData) {
           // Handle the error...
        }
 
        NSArray * productIdentifiers = [NSJSONSerialization
            JSONObjectWithData:jsonData options:NULL error:&err];
        if (!productIdentifiers) {
           // Handle the error...
        }
 
        dispatch_queue_t main_queue = dispatch_get_main_queue();
        dispatch_async(main_queue, ^{
           [delegate displayProducts:productIdentifiers];
        }
    });
}

For information about downloading files using NSURLConnection, see “Using NSURLConnection” in URL Loading System Programming Guide.

NSURLConnection을 사용하여 파일을 다운로드하는 방법에 대한 자세한 내용은 URL 로딩 시스템 프로그래밍 설명서의 "사용하여 NSURLConnection"을 참조하십시오.

To ensure that your app remains responsive, use a background thread to download the JSON file and extract the list of product identifiers. To minimize the data transferred, use standard HTTP caching mechanisms, such as the Last-Modified and If-Modified-Since headers.

앱이 반응이 유지되도록하기 위해, JSON 파일을 다운로드 및 제품 식별자의 목록을 추출하기 위해 백그라운드 스레드를 사용합니다. 전송 된 데이터를 최소화하는 등 마지막으로 수정과에서 If-modified-since 헤더를 같은 표준 HTTP 캐싱 메커니즘을 사용합니다.

Retrieving Product Information
제품 정보 검색

To make sure your users see only products that are actually available for purchase, query the App Store before displaying your store UI.

사용자가 구입 사실에만 사용할 수 있습니다 제품을 볼 수 있는지 확인하려면, 당신의 상점 UI를 표시하기 전에 앱 스토어를 쿼리합니다.

Use a products request object to query the App Store. First, create an instance of SKProductsRequest and initialize it with a list of product identifiers. The products request retrieves information about valid products, along with a list of the invalid product identifiers, and then calls its delegate to process the result. The delegate must implement the SKProductsRequestDelegate protocol to handle the response from the App Store. Listing 2-1 shows a simple implementation of both pieces of code.

앱 스토어를 쿼리하는 제품 요청 개체를 사용합니다. 첫째, SKProductsRequest의 인스턴스를 생성하고 제품 식별자의리스트로 초기화합니다.제품 요청은 잘못된 제품 ID 목록과 함께, 유효한 제품에 대한 정보를 검색하고 결과를 처리하기 위해 대리자를 호출합니다.대리자는 앱 스토어에서 응답을 처리하는 SKProductsRequestDelegate 프로토콜을 구현해야합니다. 목록 2-1은 코드의 두 조각의 간단한 구현을 보여줍니다.

Listing 2-1  Retrieving product information

// Custom method
- validateProductIdentifiers:(NSArray *)productIdentifiers
{
    SKProductsRequest productsRequest = [[SKProductsRequest alloc]
        initWithProductIdentifiers:[NSSet setWithArray:productIdentifiers]];
    productsRequest.delegate = self;
    [productsRequest start];
}
 
// SKProductsRequestDelegate protocol method
- (void)productsRequest:(SKProductsRequest *)request
     didReceiveResponse:(SKProductsResponse *)response
{
    self.products = response.products;
 
    for (NSString * invalidProductIdentifier in response.invalidProductIdentifiers) {
        // Handle any invalid product identifiers.
    }
 
    [self displayStoreUI]; // Custom method
}

When the user purchases a product, you need the corresponding product object to create a payment request, so keep a reference to the array of product objects that is returned to the delegate. If the list of products your app sells can change, you may want to create a custom class that encapsulates a reference to the product object as well as other information—for example, pictures or description text that you fetch from your server.

사용자가 제품을 구입하면, 당신은 지불 요청을 만들하므로 대리자에 반환 제품 개체의 배열에 대한 참조를 유지하기 위해 해당 제품 개체가 필요합니다. 앱이 판매하는 제품의 목록을 변경할 수 있다면, 당신은 당신의 서버에서 가져올 수있는 제품 객체에 대한 참조뿐만 아니라 다른 정보 예를 들어, 사진이나 설명 텍스트를 캡슐화하는 사용자 정의 클래스를 만들 수 있습니다.

The way you handle invalid product identifiers depends on where the list of product identifiers came from. If your app loaded the list from its app bundle, log a note to aid debugging and ignore the invalid identifiers. If your app fetched the list from your server, let your server know which product identifiers were invalid. As with all other interactions between your app and your server, the details and mechanics of this are up to you.

당신이 잘못된 제품 식별자를 처리하는 방법은 제품 식별자의 목록을 어디에서 왔는지에 따라 달라집니다. 앱이 자사의 애플 리케이션 번들에서 목록을로드하는 경우, 디버깅을 보조하고 유효하지 않은 식별자를 무시하는 메모를 기록합니다. 앱이 서버에서 목록을 가져온 경우, 서버 제품 식별자가 잘못된 경우 어느 알려 주시기 바랍니다. 귀하의 응용 프로그램과 서버 사이의 모든 상호 작용과 마찬가지로, 이것의 세부 사항 및 역학 당신에게 달려 있습니다.

Present Your Store UI
당신의 상점 UI를 제시

The design of your store has an import impact on your in-app sales, so it’s worth investing the time and effort to get it right. Design the user interface for your app’s store so that it integrates with the rest of your app. Store Kit can’t provide a store UI for you. Only you know your app and its content well enough to design your store UI so it showcases your products in their best light and integrates with the rest of your app.

상점의 디자인은 당신의 앱에서 판매에 수입 영향을, 그래서 시간과 바로 그것을 얻기 위해 노력을 투자 가치가있다. 당신의 응용 프로그램의 나머지 부분과 통합되도록 응용 프로그램의 저장소에 대한 사용자 인터페이스를 디자인합니다. 스토어 키트는 당신을 위해 저장소 UI를 제공 할 수 없습니다. 오직 당신 만이 당신의 애플 리케이션 그것이 최선 빛에있는 당신의 제품을 전시하고 응용 프로그램의 나머지 부분과 통합 그래야 당신의 상점 UI를 설계하는 충분히 그 내용을 알고있다.

Consider the following guidelines as you design and implement your app’s store UI:
당신은 당신의 애플 리케이션의 상점 UI를 설계하고 구현으로 다음과 같은 지침을 고려

Display a store only if the user can make payments. To determine whether the user can make payments, call the canMakePayments class method of theSKPaymentQueue class. If the user can’t make payments (for example, because of parental restrictions), either tell the user that the store is not currently supported (by displaying appropriate UI) or omit the store portion of your UI entirely.

사용자가 지불 할 수있는 경우에만 저장소를 표시합니다.사용자가 지불 할 수 있는지 여부를 확인하려면, theSKPaymentQueue 클래스의 canMakePayments 클래스 메서드를 호출합니다.사용자가 지불 (예를 들어,이 부모의 제한)를 할 수없는 경우, 저장소가 현재 지원되지 않는 사용자에게 알려 (해당 UI를 표시하여) 또는 전적으로 UI의 저장 부분을 생략하거나.

Expose as much information about a product as possible. Users want to know exactly what they’re going to buy. If possible, let users interact with a product. For example, a game that lets the user buy new characters can let users run a short course as the new character. Likewise, a drawing app that lets the user buy additional brushes can let users draw with the new brush on a small scratch pad. This kind of design gives users an opportunity to experience the product and be convinced they want to buy it.

가능한 한 제품에 대한 많은 정보를 노출합니다. 사용자는 살거야 정확히 알고 싶어요. 가능하면, 사용자가 제품과 상호 작용할 수 있습니다. 예를 들어, 사용자가 새로운 캐릭터를 구입할 수있는 게임은 사용자가 새로운 캐릭터로 짧은 과정을 실행할 수 있습니다. 마찬가지로, 사용자가 추가로 브러쉬를 살 수있는 드로잉 응용 프로그램은 사용자가 작은 스크래치 패드에 새로운 브러시로 그릴 수 있도록 할 수 있습니다. 디자인의이 종류는 사용자에게 제품을 경험하고 그들은 그것을 사고 싶은 확신 할 수있는 기회를 제공합니다.

Use the properties of your product objects to populate your store’s user interface. Their properties give you information such as the product’s price and its description. Combine this with additional data from your server or the app bundle, such as images or demos of your products.

상점의 사용자 인터페이스를 채울 제품 개체의 속성을 사용합니다. 그들의 속성은 당신에게 같은 제품의 가격 및 설명과 같은 정보를 제공합니다. 이러한 이미지 또는 제품의 데모와 같은 서버 또는 응용 프로그램 번들에서 추가 데이터를 사용하여이 작업을 결합합니다.

Display prices using the locale and currency returned by the store. Don’t try to convert the price to a different currency in your UI, even if the user’s locale and the price’s locale are different. Consider, for example, an English-speaking user in China who pays for purchases with a Chinese credit card but prefers the US English locale settings for apps. You app would display its UI according to the user’s locale, using US English as requested by the user. It would display prices according to the products’ locale, using the currency that corresponds to the Chinese locale (renminbi) with that locale’s formatting. Converting the prices to US dollars (to match the US English locale) would be misleading because the user is billed in renminbi, not US dollars. Listing 2-2 shows how to correctly format a price using the product’s locale information.

저장소에서 반환 된 로케일과 통화를하여 가격을 표시합니다.사용자의 로케일과 가격의 로케일이 다른 경우에도 UI에서 다른 통화로 가격을 변환하려고하지 마십시오. 예를 들어, 중국 신용 카드로 구매를 위해 지불하지만, 애플 리케이션을위한 영어 (미국) 로케일 설정을 선호하는 중국에서 영어 사용을 고려하십시오. 당신이 애플 리케이션은 사용자가 요청한 미국 영어를 사용하여 사용자의 로케일에 따라 자사의 UI를 표시합니다. 그것은 그 로케일의 서식 중국어 로케일 (인민폐)에 해당하는 통화를 사용하여 제품의 로케일에 따라 가격을 표시한다.사용자가 위안화가 아닌 달러에 청구되기 때문에 달러 (미국 영어 로캘과 일치하는)에 가격을 변환하는 것은 잘못된 것입니다. 목록 2-2 정확하게 제품의 로케일 정보를 사용하여 가격을 포맷하는 방법을 보여줍니다.

Listing 2-2  Formatting a product’s price

NSNumberFormatter * numberFormatter = [[NSNumberFormatter alloc] init];
[numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4];
[numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[numberFormatter setLocale:product.priceLocale];
NSString * formattedPrice = [numberFormatter stringFromNumber:product.price];

After a user selects a product to buy, your app connects to the store to request payment for the product.

사용자가 구입할 수있는 제품을 선택 한 후, 응용 프로그램은 제품에 대한 지불을 요청하는 저장소에 연결합니다.

Posted by 창업자닉군
,

IntroductionDesigning Your App’s StoreDisplaying Your App’s Store UIRequesting Payment
Delivering ProductsProviding Purchased ContentWorking with SubscriptionsPreparing for App Review

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




Designing Your App’s Store
귀하의 응용 프로그램의 저장소를 설계

The first step in designing your app’s store is to determine which types of product you need to use to build the user experience you designed for in your app. Aproduct is something you want to sell in your app’s store. You create and configure products in iTunes Connect, and your app interacts with products using theSKProduct and SKProductsRequest classes.
귀하의 응용 프로그램의 저장소를 설계하는 첫 번째 단계는 당신이 당신의 응용 프로그램에 맞게 설계된 사용자 경험을 구축하기 위해 사용해야하는 제품의 어떤 종류를 결정하는 것입니다. aproduct에는 당신이 당신의 응용 프로그램의 가게에서 판매 할 무언가이다. 당신이 만들고 iTunes에서 제품을 구성 연결을하고 응용 theSKProduct 및 SKProductsRequest 클래스를 사용하는 제품과 상호 작용합니다.

Understanding What You Can Sell Using In-App Purchase
당신은 앱내 구매를 사용하여 판매 할 수있는 무엇 이해

You can use In-App Purchase to sell content, app functionality, and services:
당신은 콘텐츠, 응용 프로그램 기능 및 서비스를 판매 구매 - 응용 프로그램에서 사용할 수 있습니다 :

  • Content. Deliver digital content or assets, such as magazines, photos, and artwork. Content can also be used by the app itself—for example, additional characters and levels in a game, filters in a camera app, and stationery in a word processor.
    콘텐츠입니다. 같은 잡지, 사진, 아트 워크 같은 디지털 콘텐츠 또는 자산을 제공합니다. 내용은 또한 응용 프로그램에서 사용할 수있는 자체 - 예를 들어, 추가 캐릭터와 게임, 카메라 응용 프로그램에서 필터 및 워드 프로세서에서 편지지 수준.

  • App functionality. Unlock behavior, and expand features you’ve already delivered. For example, a free game that offers multiplayer mode as an in-app purchase and a free weather app that lets users make a one-time purchase to remove ads.
    응용 프로그램 기능을 제공합니다. 동작의 잠금을 해제하고 ​​이미 제공 한 기능을 확장합니다. 예를 들어, 응용 프로그램 내 구입 및 사용자가 광고를 제거하는 일회성 구매를 할 수있는 무료 날씨 앱으로 멀티 플레이어 모드를 제공하는 무료 게임.

  • Services. Have users pay for one-time services such as voice transcription, and for ongoing services such as access to a collection of data.
    서비스를 제공합니다. 사용자는 이러한 음성 녹음 등의 일회성 서비스 비용을 지불해야하고, 이러한 데이터의 컬렉션에 대한 액세스와 같은 지속적인 서비스를 위해.

You can’t use In-App Purchase to sell real-world goods and services or unsuitable content:
당신은 실제 상품과 서비스 또는 부적합한 콘텐츠를 판매하는 구매 - 응용 프로그램에서 사용할 수 없습니다

  • Real-world goods and services. You must deliver a digital good or service within your application when using In-App Purchase. Use a different payment mechanism to let your users buy real-world goods and services in your app, such as a credit card or payment service.
    실제 상품과 서비스를 제공합니다. 구매 - 응용 프로그램에서 사용할 때 응용 프로그램 내에서 디지털 재화 나 서비스를 제공해야합니다. 사용자가 이러한 신용 카드 결제 서비스와 같은 응용 프로그램에서 실제 상품과 서비스를 구매하도록 다른 지불 메커니즘을 사용합니다.

  • Unsuitable content. Do not use In-App Purchase to sell content that the App Review Guidelines do not allow, for example, pornography, hate speech, or defamation.
    부적절한 내용. 앱 리뷰 가이드 라인을 허용하지 않는 내용을 판매 구매 - 응용 프로그램에서 사용하지 않는, 예를 들어, 포르노​​, 음성 또는 명예 훼손 싫어.

For detailed information about what you can offer using In-App Purchase, see your license agreement and the App Review Guidelines. Reviewing the guidelines carefully before you start coding helps you avoid delays and rejection during the review process. If the guidelines don’t address your case in sufficient detail, you can ask the App Review team specific questions using the online contact form.
당신이 구입 - 응용 프로그램에서 사용을 제공 할 수있는 작업에 대한 자세한 내용은 사용권 계약과 앱 심사 지침을 참조하십시오. 당신이 코딩을 시작하기 전에 신중하게 지침을 검토하면 심사 과정에서 지연 및 거부를 방지하는 데 도움이됩니다.지침이 충분 세부 사건을 해결하지 않으면, 당신은 온라인 문의 양식을 사용하여 응용 프로그램 검토 팀 특정 질문을 할 수 있습니다.

After you know what products you want to sell in your app and you determine that In-App Purchase is the appropriate way to sell those products, you need to create the products in iTunes Connect.
당신은 당신의 애플 리케이션에서 판매하고 앱내 구매는 해당 제품을 판매하는 적절한 방법이 있음을 결정하기 위해 원하는 제품을 알고 나면, 당신은 아이튠즈 커넥트에있는 제품을 만들어야합니다.

Creating Products in iTunes Connect
아이튠즈에서 만드는 제품 연결

Before you can start testing code, you need to configure products for your app to interact with. You can configure products in iTunes Connect at any time. As you develop your app, expect to configure a few test products early on, and come back later to configure additional products as your app’s design develops.
당신이 테스트 코드를 시작하기 전에, 당신은 상호 작용하는 응용을위한 제품을 구성해야합니다. 언제든지 접속 iTunes에서 제품을 구성 할 수 있습니다. 당신이 응용 프로그램을 개발할 때, 초기에 몇 가지 테스트 제품을 구성 할 것으로 예상하고, 앱의 디자인 개발과 같은 추가 제품을 구성하기 위해 나중에 돌아와.

Products are reviewed when you submit your app as part of the app review process. Before users can buy a product, it must be approved by the reviewer and you must mark it as “cleared for sale” in iTunes Connect.
당신은 응용 프로그램 검토 프로세스의 일부로 응용 프로그램을 제출할 때 제품 리뷰입니다. 사용자가 제품을 구입하기 전에, 그것은 검토 승인을 받아야하고 당신이 그것을 같은 아이튠즈에서 "판매 취소"연결 표시해야합니다.

A typical timeline for a new app might look as follows:
다음과 같이 새 응용 프로그램을위한 일반적인 타임 라인 보일 수 있습니다 :

  1. Create products in iTunes Connect.
    연결 iTunes에서 제품을 만들 수 있습니다.

  2. Write code that uses those products in test environment.
    테스트 환경에서 이러한 제품을 사용하는 코드를 작성합니다.

  3. Refine your app design, and go back into iTunes Connect to create additional products or adjust the existing products.
    앱 디자인 수정, 추가 제품을 만들거나 기존 제품을 조정하는 연결 iTunes로 돌아갑니다.

  4. Continue iterating, refining, and testing, both your app’s code and the products.
    앱의 코드와 제품 모두, 정제 및 테스트, 반복 계속합니다.

  5. Submit the app and products for review.
    검토 응용 프로그램 및 제품을 제출합니다.

For details about configuring products in iTunes Connect, see “In-App Purchase” in iTunes Connect Developer Guide.
연결 iTunes에서 제품을 구성하는 방법에 대한 자세한 내용은 개발자 가이드를 연결 아이튠즈에서 "앱내 구매"를 참조하십시오.

Types of Product
제품의 종류

Product types let you use In-App Purchase in several different situations, by letting the products behave in different ways that are appropriate for specific use cases. In iTunes Connect, you select one of the following product types:
제품 유형은 제품이 특정 사용 사례에 적합한 다른 방식으로 동작시키는 것으로, 여러 가지 상황에서 인 - 앱 구매를 사용하자. 연결 아이튠즈에서는 다음 제품의 유형 중 하나를 선택 :

  • Consumable products. Items that get used up over the course of running your app. Examples include minutes for a Voice over IP app and one-time services such as voice transcription.
    소모품 제품. 앱을 실행하는 과정을 통해 최대 익숙해 항목이 없습니다. 예를 들면 IP 응용 프로그램과 같은 음성 녹음 등의 일회성 서비스를 통해 음성 (분)이 (가) 있습니다.

  • Non-consumable products. Items that remain available to the user indefinitely on all of the user’s devices. They are made available to all of the user’s devices. Examples include content, such as books and game levels, and additional app functionality.
    비 소모품 제품.사용자의 모든 장치에 무기한 사용자가 사용 가능한 상태로 유지 항목이 없습니다. 그들은 사용자의 모든 장치에 사용할 수 있습니다. 예로는 책과 게임 레벨 등의 내용 및 추가 응용 프로그램 기능을 이용하실 수 있습니다.

  • Auto-renewable subscriptions. Episodic content. Like non-consumable products, auto-renewable subscriptions remain available to the user indefinitely on all of the user’s devices. Unlike non-consumable products, auto-renewable subscriptions have an expiration date. You deliver new content regularly, and users get access to content published during the time period that their subscription is active. When an auto-renewable subscription is about to expire, the system automatically renews it on the user’s behalf.
    자동 갱신 구독. 에피소드 내용. 비 소모품 제품과 마찬가지로, 자동 갱신 구독은 사용자의 모든 장치에 무기한 사용자가 사용 가능한 상태로 남아있게됩니다. 비 소모품 제품과는 달리, 자동 갱신 구독 만료 날짜가 있습니다. 당신은 정기적으로 새로운 콘텐츠를 제공하고, 사용자는 가입이 활성 상태인지 확인 기간 동안 게시 된 콘텐츠에 액세스 할 수 있습니다.자동 재생 구독이 만료 될 때 시스템이 자동으로 사용자의 대신에 그것을 갱신합니다.

  • Non-renewable subscriptions. Subscriptions that don’t involve delivering episodic content. Examples include access to a database of historic photos or a collection of flight maps. It is your app’s responsibility to make the subscription available on all of the user’s devices and to let users restore the purchase. This product type is often used when your users already have an account on your server, which you can use to identify them when restoring content. Expiration and the duration of the subscription are also left to your app (or your server) to implement and enforce.
    비 재생 구독. 에피소드 내용을 전달 포함되지 않습니다 구독. 예 역사적인 사진의 데이터베이스에 액세스 혹은 단기지도의 컬렉션을 포함합니다. 그것은 사용자의 모든 장치에서 구독이 가능하게하고 사용자가 구입을 복원하도록 앱의 책임입니다. 사용자가 이미 콘텐츠를 복원 할 때 그들을 식별하는 데 사용할 수있는 서버에 계정을 가지고 때이 제품의 유형은 종종 사용됩니다. 만료 및 구독 기간도 구현하고 적용하기 위해 응용 프로그램 (또는 서버)에 남아 있습니다.

  • Free subscriptions. A way to put free subscription content in Newsstand. After a user signs up for a free subscription, the content is available on all devices associated with the user’s Apple ID. Free subscriptions do not expire and can be offered only in Newsstand-enabled apps.
    무료 구독. 신문 가판대에서 무료 구독 콘텐츠를 넣어하는 방법입니다.사용자가 무료 구독까지 서명 한 내용은 사용자의 애플 ID와 관련된 모든 장치에서 사용할 수 있습니다. 무료 구독은 만료되지 않습니다 만 가판대 지원 응용 프로그램에 제공 할 수 있습니다.

Differences Between Product Types
제품 유형 간의 차이점

Each product type is designed for a particular use case. The behavior of different products differs in certain ways, as shown in Table 1-1. For example, consumable products get used up and subscriptions expire, so the store lets the user buy the products of these types multiple times.
각 제품 유형은 특정 사용 케이스를 위해 설계되었습니다. 표 1-1에서와 같이 다른 제품의 동작은 특정 방법으로 다릅니다. 예를 들어, 그래서 저장소가 사용자가 이러한 유형의 여러 시대의 제품을 구입 할 수 있습니다, ​​소모품 제품은 최대 익숙해 및 구독 만료됩니다.

Table 1-1  Comparison of product types

Product type

Consumable

Non-consumable

Auto-renewable

Non-renewing

Free Subscription

Users can buy

Multiple times

Once

Multiple times

Multiple times

Once

Synced across devices

Not synced

By the system

By the system

By your app

By the system

Restored

Not restored

By the system

By the system

By your app

By the system

Appears in the receipt

Once

Always

Always

Once

Always

Products that expire or get used up—consumable products, auto-renewable subscriptions, and non-renewing subscriptions—can be purchased multiple times to get the consumable item again or extend the subscription. Non-consumable products and free subscriptions unlock content that remains available to the user indefinitely, so these can only be purchased once.
제품 만료되거나 최대 소비 제품, 자동 재생 구독, 비 갱신 구독 - 수 다시 소모품을 얻거나 구독을 연장하기 위해 여러 번 구입 익숙해합니다. 비 소모품 제품 무료 구독 무기한 사용자가 사용 가능한 상태로 유지 콘텐츠의 잠금을 해제, 그래서 이들은 한 번만 구입하실 수 있습니다.

Products that do not get used up are made available across all of the user’s devices. These products are also restored so users can continue to access their purchased content even after erasing a device or buying a new device. Consumable products by their nature are not meant to be synced or restored. Users understand that, for example, buying ten more bubbles on their iPhone does not also give them ten bubbles on their iPad.
까지 사용하지 않는 제품은 사용자의 모든 장치에 걸쳐 사용할 수 있습니다. 사용자는 심지어 장치를 지우거나 새로운 장치를 구입 한 후 구매 한 콘텐츠에 계속 액세스 할 수 있도록이 제품은 또한 복원됩니다. 자신의 특성상 소모품 제품은 동기화하거나 복원 할 의미가 없습니다. 예를 들어, 사용자가 자신의 아이폰에 열 더 많은 거품을 구입하는 것이 아니라 그들에게 그들의 iPad에서 열 거품을주지 않는 것으로 알고 있습니다.

Store Kit handles the syncing and restoring process for auto-renewable and free subscriptions, and for non-consumable products. Your app is responsible for syncing and restoring non-renewable subscriptions.
스토어 키트는 동기화 및 자동 재생 무료 구독 프로세스를 복원, 비 소모품 제품을 처리합니다. 귀하의 응용 프로그램이 아닌 재생 구독을 동기화하고 복원 할 책임이 있습니다.

Non-renewing subscriptions differ from auto-renewable subscriptions in a few key ways which give your app the flexibility to implement the correct behavior for your needs:
비 갱신 구독은 응용 프로그램 요구 사항에 대한 올바른 동작을 구현할 수있는 유연성을 제공합니다 몇 가지 주요 방법으로 자동 갱신 구독 다릅니다

  • Your app is responsible for calculating the time period that the subscription is active, and determining what content needs to be made available to the user.
    귀하의 응용 프로그램은 가입이 활성 상태인지 시간을 계산하고, 콘텐츠가 사용자에게 제공해야하는지 결정하기위한 책임이 있습니다.

  • Your app is responsible for detecting that a subscription is approaching its expiration date and prompting the user to renew the subscription by purchasing the product again.
    귀하의 응용 프로그램은 구독 만료 날짜를 접근하고 사용자가 제품을 다시 구입하여 구독을 갱신하라는 것을 감지 할 책임이 있습니다.

  • Your app is responsible for making subscriptions available across all the user’s devices after they are purchased. For example, most subscriptions are provided by a server; your server would need some mechanism to identify users and associate subscription purchases with the user who purchased them.
    귀하의 응용 프로그램은 구입 후 사용자의 모든 장치에 걸쳐 구독 사용할 수 있도록 할 책임이 있습니다. 예를 들어, 대부분의 가입은 서버에 의해 제공되는, 당신의 서버를 구입 한 사용자와 사용자와 연관 구독 구매를 확인하기 위해 몇 가지 메커니즘이 필요합니다.

Posted by 창업자닉군
,