简体   繁体   English

iMessage 扩展和应用内购买

[英]iMessage Extension and In-App-purchase

I'm trying to create an extension for iMessage with InApp-Purchase feature.我正在尝试使用 InApp-Purchase 功能为 iMessage 创建扩展。 basically I created an iMessage application which create two target.基本上我创建了一个 iMessage 应用程序,它创建了两个目标。

  • Your AppTarget你的应用目标
  • MessageExtension消息扩展

and each one has it's own bundle identifier.并且每个都有自己的包标识符。 ( extension has a prefix of app ). (扩展名的前缀为 app )。 now i am trying to create to in-app-purchase for my app.现在我正在尝试为我的应用创建应用内购买。 My app target does not have in-App purchase capability to make it active but my extension has.我的应用程序目标没有应用程序内购买功能使其处于活动状态,但我的扩展程序具有。 In iTunes connect my app id is my app target.在 iTunes 连接中,我的应用程序 ID 是我的应用程序目标。 so i should define in-app purchase for that.所以我应该为此定义应用内购买。

by end of the day when i am getting SKProductsResponse its empty and i guess because my product identifier has my app target prefix and not my extension prefix.一天结束时,当我得到SKProductsResponse为空时,我猜是因为我的产品标识符有我的应用程序目标前缀而不是我的扩展前缀。 has anybody experience in implementing of in-app-purchase for iMessage-extension ?有没有人在为 iMessage-extension 实施应用内购买方面的经验?

Try this solution, this is working fine for me.试试这个解决方案,这对我来说很好用。

com.company.application -> Your application target bundle

com.company.application.extension -> Your iMessage target bundle

com.company.application.extension.purchase_id_1 -> In-App identifier

You don't need an iMessage app target if you have a host iOS app.如果您有主机 iOS 应用程序,则不需要 iMessage 应用程序目标。 Adding an iMessage extension target is enough.添加一个 iMessage 扩展目标就足够了。 Please check this answer, this might be the reason.请检查答案,这可能是原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM