{"id":157677,"date":"2012-11-07T09:28:03","date_gmt":"2012-11-07T05:28:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=157677"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=157677","title":{"rendered":"<span class=\"post_title\">\u041f\u0430\u0440\u0430 \u0441\u043b\u043e\u0432 \u043e\u0431 \u043e\u0442\u043b\u0430\u0434\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 App Store<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440, \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b <a href=\"http:\/\/www.madewithmarmalade.com\/\">Marmalade<\/a> \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0434\u043e\u0431\u0435\u043d \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0442\u043b\u0430\u0434\u043a\u0443 \u0432\u0441\u0435\u0445 \u043c\u044b\u0441\u043b\u0438\u043c\u044b\u0445 \u0438 \u043d\u0435\u043c\u044b\u0441\u043b\u0438\u043c\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0439, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u044f\u0434 \u0437\u0430\u0434\u0430\u0447 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u043d \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u043c\u043e\u0436\u0435\u0442. \u041a \u0442\u0430\u043a\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0430\u043c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0442\u043b\u0430\u0434\u043a\u0430 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0438\u0437 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u0447\u0435\u0440\u0435\u0437 App Store \u0438\u043b\u0438 Android Market). \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0439 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435, \u043d\u043e, \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0441 \u043f\u043e\u043a\u0443\u043f\u043a\u043e\u0439 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u043e\u0442\u043b\u0430\u0434\u0438\u0442\u044c \u043f\u043e\u0434 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c. \u041e \u0442\u043e\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0438\u0436\u0435:<\/p>\n<p>  <a name=\"habracut\"><\/a> <br \/>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 s3e\/s3eIOSAppStoreBilling, \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0435 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 examples \u043a Marmalade. \u0415\u0441\u043b\u0438 \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u0442\u043e \u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0430\u043c \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u2014 \u044d\u0442\u043e \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u043d\u043e, \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 \u00abThis example only works on iPhone with a test store set up for in-app purchase\u00bb. \u042d\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043d\u043e \u043d\u0430\u043c \u0442\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043e\u0442\u043b\u0430\u0434\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c \u043d\u0430 IPhone. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e. \u041c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0443, \u0438\u043c\u0438\u0442\u0438\u0440\u0443\u044e\u0449\u0443\u044e (\u0432 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0435) \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 <a href=\"http:\/\/docs.madewithmarmalade.com\/native\/api_reference\/api\/Examples3eIOSAppStoreBilling.html\">S3E iOS App Store Billing<\/a>. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 mkb-\u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"bash\">#!\/usr\/bin\/env mkb files {     s3eIOSAppStoreBilling.cpp     AppStoreStub.h     AppStoreStub.cpp } ... <\/code><\/pre>\n<p>  \u0421\u0430\u043c \u043a\u043e\u0434 \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0438 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u0435\u043d. \u0412 h-\u0444\u0430\u0439\u043b\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 App Store Billing \u043c\u044b \u0434\u043e\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0443 \u0441 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u043c \u00abStub\u00bb \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u0441\u0431\u043e\u0440\u043a\u0430 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u0430\u044f, \u043f\u043e\u0434\u043c\u0435\u043d\u044f\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u044b \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u043e\u0439 #define:<\/p>\n<pre><code class=\"cpp\">#ifndef _APPSTORESTUB_H_ #define _APPSTORESTUB_H_  #include &lt;string.h&gt; #include &quot;s3eTypes.h&quot; #include &quot;s3eIOSAppStoreBilling.h&quot;  #if defined IW_DEBUG #define s3eIOSAppStoreBillingAvailable   \\                s3eIOSAppStoreBillingAvailableStub #define s3eIOSAppStoreBillingGetInt  \\                s3eIOSAppStoreBillingGetIntStub #define s3eIOSAppStoreBillingInit \\                s3eIOSAppStoreBillingInitStub #define s3eIOSAppStoreBillingStart \\                s3eIOSAppStoreBillingInitStub #define s3eIOSAppStoreBillingTerminate \\                s3eIOSAppStoreBillingTerminateStub #define s3eIOSAppStoreBillingStop \\                s3eIOSAppStoreBillingTerminateStub #define s3eIOSAppStoreBillingRequestProductInformation  \\                s3eIOSAppStoreBillingRequestProductInformationStub #define s3eIOSAppStoreBillingCancelProductInformationRequests \\                s3eIOSAppStoreBillingCancelProductInformationRequestsStub #define s3eIOSAppStoreBillingRequestPayment \\                s3eIOSAppStoreBillingRequestPaymentStub #define s3eIOSAppStoreBillingCompleteTransaction \\                s3eIOSAppStoreBillingCompleteTransactionStub #define s3eIOSAppStoreBillingRestoreCompletedTransactions \\                s3eIOSAppStoreBillingRestoreCompletedTransactionsStub #endif  s3eBool   s3eIOSAppStoreBillingAvailableStub(); int32     s3eIOSAppStoreBillingGetIntStub(s3eIOSAppStoreBillingProperty property); s3eResult s3eIOSAppStoreBillingInitStub(s3eProductInformationCallbackFn infoCallback,                                           s3ePaymentTransactionUpdateCallbackFn updateCallback,                                           void* userData); void      s3eIOSAppStoreBillingTerminateStub(); s3eResult s3eIOSAppStoreBillingRequestProductInformationStub(const char** productIdentifiers,                                           uint32 numProductIdentifiers); void      s3eIOSAppStoreBillingCancelProductInformationRequestsStub(); s3eResult s3eIOSAppStoreBillingRequestPaymentStub(s3ePaymentRequest* paymentRequest); s3eResult s3eIOSAppStoreBillingCompleteTransactionStub(s3ePaymentTransaction*  transaction,                                           s3eBool finalise); s3eResult s3eIOSAppStoreBillingRestoreCompletedTransactionsStub(); void      appStoreStubUpdate(); #endif\t\/\/ _APPSTORESTUB_H_  <\/code><\/pre>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u0432\u0435\u0440\u0445\u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e:<\/p>\n<pre><code class=\"cpp\">#include &quot;AppStoreStub.h&quot;  #define PRODUCT_INFO_REQUESTED                               0x0001 #define TRANSACTION_REQUESTED                                0x0002  s3eProductInformationCallbackFn productInfoCallback          = NULL; s3ePaymentTransactionUpdateCallbackFn transactionCallback    = NULL; void* billingData                                            = NULL;  s3eProductInformation productInformation; s3ePaymentTransaction transaction; s3eTransactionReceipt receipt; int eventMask = 0;  s3eBool s3eIOSAppStoreBillingAvailableStub() { \treturn S3E_TRUE; }  int32 s3eIOSAppStoreBillingGetIntStub(s3eIOSAppStoreBillingProperty property) { \tswitch (property) { \t\tcase S3E_IOSAPPSTOREBILLING_CAN_MAKE_PAYMENTS: \t\t\treturn 1; \t\tdefault: \t\t\treturn 0; \t} }  s3eResult s3eIOSAppStoreBillingInitStub(s3eProductInformationCallbackFn infoCallback,                                           s3ePaymentTransactionUpdateCallbackFn updateCallback,   \t\t\t\t\t\t\t\t\t\tvoid* userData) { \tproductInfoCallback = infoCallback; \ttransactionCallback = updateCallback; \tbillingData = userData; \treturn S3E_RESULT_SUCCESS; }  void s3eIOSAppStoreBillingTerminateStub() {}  s3eResult s3eIOSAppStoreBillingRequestProductInformationStub(const char** productIdentifiers,   \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t uint32 numProductIdentifiers) {     if (numProductIdentifiers != 1) return S3E_RESULT_ERROR; \tmemset(&productInformation, 0, sizeof(productInformation)); \tstrcpy(productInformation.m_ProductID, *productIdentifiers); \tstrcpy(productInformation.m_LocalisedTitle, *productIdentifiers); \tstrcpy(productInformation.m_LocalisedDescription, *productIdentifiers); \tstrcpy(productInformation.m_FormattedPrice, &quot;0.00&quot;); \tstrcpy(productInformation.m_PriceLocale, &quot;0.00&quot;); \tproductInformation.m_Price = 0; \tproductInformation.m_ProductStoreStatus = S3E_PRODUCT_STORE_STATUS_VALID;     eventMask |= PRODUCT_INFO_REQUESTED; \treturn S3E_RESULT_SUCCESS; }  void s3eIOSAppStoreBillingCancelProductInformationRequestsStub() {}  s3eResult s3eIOSAppStoreBillingRequestPaymentStub(s3ePaymentRequest* paymentRequest) { \tmemset(&transaction, 0, sizeof(transaction)); \ttransaction.m_TransactionStatus = S3E_PAYMENT_STATUS_PURCHASED; \ttransaction.m_Request = paymentRequest; \ttransaction.m_Retain = S3E_FALSE; \ttransaction.m_TransactionReceipt = &receipt; \tstrcpy(transaction.m_TransactionID, &quot;1&quot;); \tstrcpy(transaction.m_OriginalTransactionID, &quot;1&quot;); \tmemset(&receipt, 0, sizeof(receipt)); \treceipt.m_ReceiptSize = 0; \teventMask |= TRANSACTION_REQUESTED; \treturn S3E_RESULT_ERROR;  \/\/ ??? }  s3eResult s3eIOSAppStoreBillingCompleteTransactionStub(s3ePaymentTransaction*  transaction,   \t\t\t\t\t\t\t\t\t\t\t\t\t   s3eBool finalise) { \treturn S3E_RESULT_SUCCESS; }  s3eResult s3eIOSAppStoreBillingRestoreCompletedTransactionsStub() { \treturn S3E_RESULT_SUCCESS; }  void appStoreStubUpdate() { #if defined IW_DEBUG \tif (eventMask != 0) { \t\tif (eventMask & PRODUCT_INFO_REQUESTED) { \t\t\tproductInfoCallback(&productInformation, billingData); \t\t} \t\tif (eventMask & TRANSACTION_REQUESTED) { \t\t\ttransactionCallback(&transaction, billingData); \t\t} \t\teventMask = 0; \t} #endif } <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 appStoreStubUpdate. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e App Store Billing API \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u043e\u043c. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b\u0437\u043e\u0432\u044b callback \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0432\u043d\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0435 s3eIOSAppStoreBillingRequestProductInformation \u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u043a\u0443\u043f\u043a\u0438 s3eIOSAppStoreBillingRequestPayment. \u042d\u0442\u0438 \u0432\u044b\u0437\u043e\u0432\u044b \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432 appStoreStubUpdate, \u0432\u044b\u0437\u044b\u0432\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0438\u0437 update-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 Maramalade-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435, \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043a\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 s3eIOSAppStoreBillingRequestPaymentStub. \u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043c\u043d\u0435 \u0441\u0430\u043c\u043e\u043c\u0443 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u0435\u043d \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442. \u041f\u043e \u043b\u043e\u0433\u0438\u043a\u0435 \u0432\u0435\u0449\u0435\u0439, \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c S3E_RESULT_SUCCESS (\u0440\u0430\u0432\u043d\u043e\u0435 0), \u043d\u043e \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<pre><code class=\"cpp\">            if (s3eIOSAppStoreBillingRequestPayment(&g_PaymentRequest))                 SetStatus(&quot;Purchasing %s...&quot;, g_ProductID2);             else                 SetStatus(&quot;Purchasing %s FAILED&quot;, g_ProductID2); <\/code><\/pre>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c, \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041f\u043e \u0432\u0441\u0435\u0439 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0443, \u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043f\u0440\u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 iPhone.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u043e \u0447\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c, \u044d\u0442\u043e \u0447\u0435\u043a. \u0412 s3eIOSAppStoreBillingRequestPaymentStub \u043c\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043f\u0443\u0441\u0442\u043e\u0439 \u0447\u0435\u043a:<\/p>\n<pre><code class=\"cpp\">    ... \tmemset(&receipt, 0, sizeof(receipt)); \treceipt.m_ReceiptSize = 0;     ... <\/code><\/pre>\n<p>  \u041d\u043e \u044d\u0442\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0435 \u0432\u043f\u043e\u043b\u043d\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u0435\u0440\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u043a \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e\u0441\u044f \u0432 \u043d\u0435\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u0430\u0442\u0443 \u043f\u043e\u043a\u0443\u043f\u043a\u0438). \u041e \u0442\u043e\u043c \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0447\u0435\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"http:\/\/developer.apple.com\/library\/mac\/#releasenotes\/General\/ValidateAppStoreReceipt\/_index.html\">\u0437\u0434\u0435\u0441\u044c<\/a>. <a href=\"http:\/\/developer.apple.com\/library\/ios\/#documentation\/NetworkingInternet\/Conceptual\/StoreKitGuide\/VerifyingStoreReceipts\/VerifyingStoreReceipts.html\">\u0417\u0434\u0435\u0441\u044c<\/a> \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0447\u0435\u043a\u0430.<\/p>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e. \u0412 \u043a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c #include AppStoreStub.h (\u043e\u043d \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u0434\u0442\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c) \u0438 \u0432\u044b\u0437\u043e\u0432 appStoreStubUpdate, \u0434\u043b\u044f \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432:<\/p>\n<pre><code class=\"cpp\">bool ExampleUpdate() {     appStoreStubUpdate();     ... <\/code><\/pre>\n<p>  \u0421\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0432 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u0435\u0433\u043e \u043f\u043e\u0434 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u043e\u043c, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0435 \u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u043f\u043e\u043a\u0443\u043f\u043a\u0438, \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u044f \u043f\u0440\u0438 \u044d\u0442\u043e\u043c App Store.   \t\t\t \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/157677\/\"> http:\/\/habrahabr.ru\/post\/157677\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440, \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b <a href=\"http:\/\/www.madewithmarmalade.com\/\">Marmalade<\/a> \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0434\u043e\u0431\u0435\u043d \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0442\u043b\u0430\u0434\u043a\u0443 \u0432\u0441\u0435\u0445 \u043c\u044b\u0441\u043b\u0438\u043c\u044b\u0445 \u0438 \u043d\u0435\u043c\u044b\u0441\u043b\u0438\u043c\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0439, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u044f\u0434 \u0437\u0430\u0434\u0430\u0447 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u043d \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u043c\u043e\u0436\u0435\u0442. \u041a \u0442\u0430\u043a\u0438\u043c \u0437\u0430\u0434\u0430\u0447\u0430\u043c \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0442\u043b\u0430\u0434\u043a\u0430 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0438\u0437 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u0447\u0435\u0440\u0435\u0437 App Store \u0438\u043b\u0438 Android Market). \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0439 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435, \u043d\u043e, \u0447\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0441 \u043f\u043e\u043a\u0443\u043f\u043a\u043e\u0439 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u043e\u0442\u043b\u0430\u0434\u0438\u0442\u044c \u043f\u043e\u0434 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c. \u041e \u0442\u043e\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0438\u0436\u0435:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-157677","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/157677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=157677"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/157677\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=157677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=157677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=157677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}