{"id":137999,"date":"2021-07-08T00:00:00","date_gmt":"2021-07-08T00:00:00","guid":{"rendered":"https:\/\/adapty.io\/jp-storekit-2\/"},"modified":"2025-06-26T13:05:08","modified_gmt":"2025-06-26T13:05:08","slug":"storekit-2","status":"publish","type":"post","link":"https:\/\/adapty.io\/ja\/blog\/storekit-2\/","title":{"rendered":"StoreKit 2 API \u306e\u65b0\u6a5f\u80fd\u3068\u3001Apple \u304c\u30a2\u30d7\u30ea\u5185\u8cfc\u5165\u306e\u7d71\u5408\u3092\u52b9\u7387\u5316\u3057\u305f\u65b9\u6cd5"},"content":{"rendered":"\n
Apple\u306f\u3001\u6700\u8fd1\u958b\u50ac\u3055\u308c\u305fWWDC 2021\u3067 StoreKit 2\u306e\u65b0\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u306f\u3001iOS\u3067\u306e\u8cfc\u5165\u3092\u7ba1\u7406\u3059\u308b\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002\u30a2\u30d7\u30ea\u5185\u8cfc\u5165 (in-app purchase) \u3068\u30b5\u30d6\u30b9\u30af\u30ea\u30d7\u30b7\u30e7\u30f3 (subscription) \u6a5f\u80fd\u306b\u5bfe\u5fdc\u3059\u308b\u30a2\u30d7\u30ea\u306e\u30b7\u30a7\u30a2\u306f\u7740\u5b9f\u306b\u4f38\u3073\u3066\u3044\u307e\u3059\u3002Apple\u306fStoreKit 2\u3092\u30ea\u30ea\u30fc\u30b9\u3059\u308b\u3053\u3068\u3067\u3001\u30a2\u30d7\u30ea\u5185\u8cfc\u5165\u306e\u30a2\u30d7\u30ea\u3078\u306e\u7d71\u5408\u3092\u5927\u5e45\u306b\u7c21\u7d20\u5316\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u3092\u53d7\u3051\u3066\u3001\u5f53\u793e\u306fApp Store\u30b5\u30fc\u30d0API\u3092\u6d3b\u7528\u3057\u3001\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9 (server-side) \u3067StoreKit 2\u3092\u5c0e\u5165\u3059\u308b\u3053\u3068\u3092\u691c\u8a0e\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n
\u73fe\u5728\u306eAPI\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3059\u308b\u305f\u3081\u306b\u5171\u6709\u30b7\u30fc\u30af\u30ec\u30c3\u30c8 (shared secret) \u304c\u5fc5\u8981\u3067\u3059\u3002\u3053\u308c\u306f\u3001App Store Connect\u3067\u53d6\u5f97\u3067\u304d\u308b\u79d8\u5bc6\u306e\u56fa\u5b9a\u6587\u5b57\u5217\u3067\u3059\u3002\u65b0\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306eAPI\u3067\u306f\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u8a8d\u8a3c\u306bJSON Web Token (JWT)\u3000\u6a19\u6e96\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n \u307e\u305a\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u627f\u8a8d\u306b\u4f7f\u7528\u3059\u308b\u79d8\u5bc6\u9375<\/a>\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002App Store Connect\u3092\u958b\u304d\u3001[\u30e6\u30fc\u30b6\u30fc\u3068\u30a2\u30af\u30bb\u30b9] \u30bb\u30af\u30b7\u30e7\u30f3\u306b\u79fb\u52d5\u3057\u3066\u304b\u3089\u3001[\u30ad\u30fc] \u30bf\u30d6\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002\u30a2\u30d7\u30ea\u5185\u8cfc\u5165\u30ad\u30fc\u306e\u7a2e\u985e\u3092\u9078\u629e\u3057\u307e\u3059\u3002\u65b0\u3057\u3044\u30ad\u30fc\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002\u305d\u306eID\u3082\u5fc5\u8981\u306b\u306a\u308b\u305f\u3081\u3001App Store Connect API\u30bf\u30d6\u306e\u767a\u884c\u8005ID\u3068\u540c\u3058\u30da\u30fc\u30b8\u306b\u30b3\u30d4\u30fc\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n \u6b21\u306e\u624b\u9806\u3068\u3057\u3066\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u627f\u8a8d\u306b\u4f7f\u7528\u3055\u308c\u308b\u30c8\u30fc\u30af\u30f3\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u3053\u306e\u30d7\u30ed\u30bb\u30b9\u306f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3067\u8a73\u3057\u304f\u8aac\u660e\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u305d\u308c\u307b\u3069\u6ce8\u610f\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 Python\u306e\u65e2\u5b58\u306e\u5b9f\u88c5\u306e\u4f8b\u3092\u6b21\u306b\u793a\u3057\u307e\u3059\u3002\u65b0\u3057\u3044\u30ea\u30af\u30a8\u30b9\u30c8\u3054\u3068\u306b\u65b0\u3057\u3044\u30c8\u30fc\u30af\u30f3\u3092\u751f\u6210\u3057\u3066\u3082\u610f\u5473\u304c\u306a\u3044\u305f\u3081\u3001\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002\u30c8\u30fc\u30af\u30f3\u3092\u4f5c\u6210\u3059\u308b\u3068\u304d\u306f\u3001\u6709\u52b9\u671f\u9593 (lifetime) \u3092\u6700\u592760\u5206\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u305d\u306e\u671f\u9593\u4e2d\u306f\u540c\u3058\u30c8\u30fc\u30af\u30f3\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<\/a><\/figure>\n\n\n\n
\u30ad\u30fc\u306e\u751f\u6210<\/h3>\n\n\n\n
\u30c8\u30fc\u30af\u30f3\u306e\u4f5c\u6210<\/h3>\n\n\n\n