事务管理器未在 Xcode 中显示 storekit 2 事务
我正在尝试使用configuration.storekit 文件在本地测试应用内购买。 我能够在模拟器上执行获取、购买、恢复等操作,但事务管理器上不会显示同样的操作 [(选择 Xcode)调试 -> Storekit -> 管理事务...]
另外,我无法使用 StoreKitTest 框架在测试用例中使用产品 ID 获取产品,
我已经使用 pod lib create 来制作 MyFramework 的 cocoapod,其中包含所有应用内购买相关的代码/逻辑。有一个测试用例目标(MyFramework-Unit-Tests),尝试将 StoreKit 配置文件与 MyFramework 和 MyFramework-Unit-Tests 目标链接,并且也没有链接
我创建了一个文件 IAPSubscriptions.storekit,并尝试指定目标到它 - MyFramework、MyFramework-Unit-Tests
有没有人遇到过这些问题,我该如何解决这些问题?
供参考: 我遵循的模块化是: https://github.com/kudoleh/iOS-Modular-Architecture 我的 podfile 有: def MyFramework_pod pod 'MyFramework', :path =>; 'DevPods/MyFramework', :testspecs => ['测试'] 结束
abstract_target'MyFramework'做 项目“DevPods/MyFramework/Example/MyFramework.xcodeproj” 目标“MyFramework_Example”执行 平台:ios,'15.0' 我的Framework_pod 结尾
我的 podspec 有: s.test_spec '测试' 执行 |test_spec| test_spec.source_files = 'MyFramework/Tests/**/*' 结尾
I am trying to test in-app purchase localy using configuration.storekit file.
I'm able to do perform the fetch, buy, restore, etc on the simulator, but the same is not getting displayed on the Transaction Manager [(with Xcode selected) Debug->Storekit->Manage Transactions...]
Also, I am not able to fetch the products using product IDs in the testcases using StoreKitTest framework
I have use pod lib create to make a cocoapod of MyFramework which is having all the In-App purchase related code/logic. Have a target for testcases (MyFramework-Unit-Tests), have tried linking the StoreKit Configuration File with both the MyFramework and MyFramework-Unit-Tests targets, and without linking too
I have created a file IAPSubscriptions.storekit, and have tried specifying target to it - MyFramework, MyFramework-Unit-Tests
Has anyone faced these issues, and how shall I resolve these?
For reference:
Modularisation followed by me is wrt: https://github.com/kudoleh/iOS-Modular-Architecture
My podfile has:
def MyFramework_pod
pod 'MyFramework', :path => 'DevPods/MyFramework', :testspecs => ['Tests']
end
abstract_target 'MyFramework' do
project 'DevPods/MyFramework/Example/MyFramework.xcodeproj'
target 'MyFramework_Example' do
platform :ios, '15.0'
MyFramework_pod
end
end
My podspec has:
s.test_spec 'Tests' do |test_spec|
test_spec.source_files = 'MyFramework/Tests/**/*'
end
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过将 StoreKit.framework 添加为应用程序项目的依赖项解决了该问题。
在 Xcode 中,此功能称为“应用内购买”。
I resolved the issue by adding the StoreKit.framework as a dependency to the app project.
In Xcode, this capability is known as "In-App Purchase".