iOS Developer Library/Guides

Working with Subscriptions, iOS In-App Purchase Programming Guide 번역

창업자닉군 2013. 9. 19. 09:51

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 문서의 Working with Subscriptions 부분을 번역해 놓은 페이지 입니다. 발 번역이라 이상한 부분이 있을 수 있습니다. 발견즉시 댓글을 달아 주세요.




Working with Subscriptions
구독에 대한 작업

Apps that use subscriptions have some additional behaviors and considerations. Subscriptions incorporate an element of time, and your app needs to have the appropriate logic to determine whether the subscription is currently active and what time periods the subscription was active in the past. Your app also needs to react to new and renewed subscriptions, and properly handle expired subscriptions. Figure 6-1 show an example subscription timeline, including some of the complexities your app needs to handle.

구독을 사용하는 응용 프로그램은 몇 가지 추가 행동과 고려 사항이 있습니다. 구독은 시간의 요소를 통합하고 응용 프로그램은 서브 스크립 션은 현재 활성화되어 있고 어떤 시간 기간 가입이 과거에 활성 여부를 확인하는 적절한 논리가 있어야합니다. 당신의 애플 리케이션은 새로운 갱신 구독에 반응하고, 제대로 만료 된 구독을 처리해야합니다. 그림 6-1는 응용 프로그램이 처리해야하는 복잡성의 일부를 포함하여, 예를 구독 타임 라인을 보여줍니다.

Figure 6-1  Example subscription timeline


Calculating a Subscription’s Active Period
구독의 활동 기간을 계산

Your app needs to determine what content the user has access to based on the period of time that the subscription was active. Consider, for example, a magazine that publishes a new issue on the first day of each month. On February 7, the user buys a 3 month subscription When the user buys the subscription, the February issue is delivered immediately. In addition, the user gets access to all of the issues that are published between the subscription’s start and end dates. Finally, on April 7, the subscription expires. There are a total of three issues available to the user—February, March, and April—as shown in Table 6-1.

귀하의 응용 프로그램은 사용자가 가입이 활성화 된 시간의 기간을 기준에 액세스 할 수있는 어떤 내용을 확인해야합니다. 예를 들어, 각 월의 첫 번째 날에 새로운 이슈를 게시 잡지를 고려하십시오.사용자가 구독을 구입하면 년 2 월 7 일, 사용자가 3 개월 가입을 구입, 2 월호는 즉시 전달됩니다. 또한, 사용자는 구독의 시작 및 끝 날짜 사이에 게시되는 모든 문제에 대한 액세스 권한을 얻을 수 있습니다. 마지막으로, 4 월 7 일에 가입이 만료됩니다.에 사용할 세 가지 문제의 전체 사용자 2 월, 3 월, 4 월 - 표 6-1에서와 같이.가있다

Table 6-1  Timeline of a sample subscription

Magazine issue

User has access to content?

January 1

No, subscription has not started

February 1

Yes, delivered when the user subscribed

March 1

Yes, delivered at the time of its publication

April 1

Yes, delivered at the time of its publication

May 1

No, subscription expired on April 7

To implement this logic in your app, keep a record of the date that each piece of content is published. The user is has access to all content published between the start and end dates, as well as the content that was initially unlocked when the subscription was purchased.

귀하의 응용 프로그램에이 논리를 구현하는 각 콘텐츠가 게시 한 날짜의 기록을 유지.사용자는 시작 날짜와 종료 날짜뿐만 아니라 서브 스크립 션을 구입하면 처음에 잠금이 해제 된 내용 사이에 출판 된 모든 콘텐츠에 액세스 할 수 있습니다.

Expiration and Renewal
만료 및 갱신

The renewal process begins with a “preflight” check, starting ten days before the expiration date. During those ten days, the store checks for any issues that might delay or prevent the subscription from being automatically renewed—for example, if the customer no longer has an active payment method, if the product’s price increased since the user bought the subscription, or if the product is no longer available. The store notifies users of any issue so that they can resolve it before the subscription needs to renew, ensuring their subscription is not interrupted.

갱신 프로세스는 만료일 10 일전부터 "프리 플라이트"체크로 시작합니다. 그 십일 동안 저장소 지연이나되는 가입을 방지 수있는 문제에 대한 검사 자동 갱신 - 예를 들어, 고객은 더 이상 사용자가 구독을 구입 한 이후 제품의 가격이 상승하면, 활성 지불 방법이없는 경우, 또는제품은 더 이상 사용할 수없는 경우. 구독이 자신의 가입이 중단되지 않습니다 보장, 갱신 할 필요가 전에 그것을 해결할 수 있도록 상점은 모든 문제를 사용자에게 알려줍니다.

During the 24 hour period before the subscription expires, the store starts trying to automatically renew it. The store makes several attempts to automatically renew the subscription, but eventually stops if there are too many failed attempts.

구독이 만료되기 전에 24 시간 기간 동안 저장소가 자동으로 갱신을 시도 시작합니다.저장소가 자동으로 구독을 갱신하는 여러 시도를 만들지 만, 너무 많은 실패한 시도가있을 경우 결국 정지합니다.

The store renews the subscription slightly it expires, to ensure that there there is no lapse in the subscription. However, lapses are still possible. For example, if the user’s payment information was no longer valid, then the first renewal attempt would fail. If the user didn’t update this information until after the subscription expired, there would be a short lapse in the subscription between the expiration date and the date that a subsequent automatic renewal succeeded. The user can also disable automatic renewal and intentionally let the subscription expire, then renew it at a later date, creating a longer lapse in the subscription. Make sure your app’s subscription logic can handle lapses of various durations correctly.

상점 구독에는 경과가 없다는 것을 보장하기 구독 약간 만료를 갱신합니다. 그러나 경과는 여전히 가능합니다.사용자의 결제 정보가 더 이상 유효 없었던 경우는 예를 들어, 첫 번째 갱신 시도가 실패합니다. 사용자가 구독 만료 때까지이 정보를 업데이트하지 않은 경우 만료 날짜 및 이후 자동 갱신이 성공 된 날짜 사이의 구독에서 짧은 경과있을 것입니다.사용자는 또한 자동 갱신을 사용하지 않도록 의도적으로 구독에 이상 경과를 만들어 나중에를 갱신 한 후, 구독 만료하도록 할 수 있습니다. 앱의 가입 로직이 올바르게 다양한 기간의 만료를 처리 할 수 ​​있는지 확인합니다.

After a subscription is successfully renewed, Store Kit adds a transaction for the renewal to the transaction queue. Your app checks the transaction queue on launch, and handles the renewal the same way as any other transaction. Note that if your app is already running when the subscription renews the transaction observer isnot called; your app finds out about the renewal the next time it is launched.

구독이 성공적으로 갱신 된 후, 스토어 키트는 트랜잭션 큐에 갱신 트랜잭션을 추가합니다. 귀하의 응용 프로그램은 실행의 트랜잭션 대기열을 확인하고 갱신 다른 어떤 거래와 같은 방식으로 처리합니다. 앱이 갱신이 시작됩니다 다음에 대해 발견, 구독라는 트랜잭션 옵저버 isnot 일을 갱신 할 때 응용 프로그램이 이미 실행중인 경우 있습니다.

Cancellation
해제

A subscription is paid for in full when it is purchased and can be refunded only by contacting Apple customer service. For example, if the user accidentally bought the wrong product, customer support can cancel the subscription and issue a refund. It is not possible for customers to change their mind in the middle of a subscription period and decide they don’t want to pay for the rest of the subscription.

그것은 단지 애플의 고객 서비스에 연락하여 구입 및 환불 될 수있을 때 구독이 전액 지급된다.사용자가 실수로 잘못된 제품을 구입하는 경우 예를 들어, 고객 지원은 등록을 취소하고 환불을 발행 할 수 있습니다. 고객이 가입 기간의 중간에 마음을 변경하고 결정들이 가입의 나머지를 지불하고 싶지 않아하는 것은 불가능합니다.

To check whether a purchase has been canceled, look for the cancellation date in the receipt. If the field is missing or has no date, the purchase is not canceled. If the field has a date in it, regardless of the subscription’s expiration date, the purchase has been canceled—treat a canceled receipt the same as if no purchase had ever been made.

구매가 취소되었는지 여부를 확인하려면, 영수증 캔슬 날짜를 찾으십시오.필드가 없거나 더 날짜가되지 않은 경우, 구입이 취소되지 않습니다.필드에 관계없이 등록의 유효 기한, 그것에있는 일이 있다면, 구입은 구입도 이루어지지했던 동일한 경우로 취소 접수를 취소 처리되었습니다.

Depending on the type of product, you may be able to check only the currently active subscription, or you may need to check all past subscriptions. For example, a magazine app would need to check all past subscriptions to determine which issues the user had access to.

제품의 유형에 따라, 당신은 현재 활성 구독을 확인하거나, 당신은 모든 과거의 구독을 확인해야 할 수 있습니다. 예를 들어, 잡지 앱은 사용자가 액세스었던 문제를 결정하기 위해 모든 과거 구독을 확인해야합니다.

Cross-Platform Considerations
크로스 플랫폼 고려 사항

Product identifiers are tied to a specific platform. If you want to let users who have a subscription in an iOS app access the content from an OS X app (or vice versa), that is up to your apps. You will need to have some system for identifying users and keeping track of what content they have subscribed to, similar to what you would implement for an app that uses non-renewable subscriptions.

제품 식별자는 특정 플랫폼에 묶여있다. 당신은 IOS 애플 리케이션에 가입 한 사용자가 귀하의 응용 프로그램입니다 OS X 응용 프로그램 (또는 그 반대)의 내용에 액세스 할 수 있도록하려는 경우. 당신은 재생 불가능한 구독을 사용하는 응용 프로그램에 대해 구현하는 것과 유사한 사용자를 식별하고 그들이에 가입 한 어떤 내용의 트랙을 유지하는 일부 시스템을 가지고해야합니다.

The Test Environment
테스트 환경

For the sake of testing, there are some differences in behavior between auto-renewable subscriptions in the production environment and in the test environment.
테스트를 위해서, 생산 환경과 테스트 환경에서 자동 갱신 구독과 행동에 약간의 차이가 있습니다.

Renewal happens at an accelerated rate, and auto-renewable subscriptions renew a maximum of six times per day. This lets you test how your app handles subscription renewal and how it handles a renewal after a lapse and how it handles a subscription history that includes gaps.
갱신은 빠른 속도로 발생하고, 자동 갱신 구독은 매일 6 회에 최대를 갱신. 이 앱이 등록 갱신 방법이 경과 한 후에는 그것이 어떻게 간격을 포함 구독 내역을 처리하는 갱신 처리를 처리하는 방법을 테스트 할 수 있습니다.

Because of the accelerated expiration and renewal rate, the subscription can expire before the system starts trying to renew the subscription, leaving a small lapse in the subscription period. Such lapses are also possible in production for a variety of reasons—make sure your app handles them correctly.

시스템은 가입 기간에있는 작은 경과를 떠나, 구독을 갱신하려고 시작하기 전에 때문에 가속 만료 및 갱신 속도, 구독 만료 될 수 있습니다. 이러한 경과는 응용 프로그램이 올바르게 처리해야 이유 메이크의 다양한 생산도 가능합니다.