如何制作可验证收据的 Mac App Store 应用程序?

发布于 2024-10-08 13:10:32 字数 1381 浏览 9 评论 0原文

我制作了一个应用程序,根据 Apple 文档。文档说要签署您的应用程序,制作一个包(带签名),然后通过命令行安装它。然后运行应用程序,看到没有收据,返回代码 173,它会提示您测试帐户登录(它确实这样做了)。我提供测试帐户(通过在 iTunesConnect 上设置测试用户)。然后,什么也没有发生。然后它应该将收据下载到应用程序包中并重新启动应用程序,但它两者都没有。控制台只说:

12/22/10 1:06:01 PM store_helper[75986] -[ISURLOperation run]
12/22/10 1:06:01 PM store_helper[75986] port created: 'com.apple.storeClient-23457' (75986)
12/22/10 1:06:01 PM store_helper[75986] Creating run loop source
12/22/10 1:06:01 PM store_helper[75986] adding source to run loop
12/22/10 1:06:01 PM storeagent[81090]   promptResponse: <CKSignInPromptResponse:0x10101ce20 returnCode:1>
12/22/10 1:06:01 PM storeagent[81090]   wrote primary DSID: 1391703719
12/22/10 1:06:01 PM storeagent[81090]   wrote primary DSID: 1391703719
12/22/10 1:06:01 PM storeagent[81090]   -[ISURLOperation run]
12/22/10 1:06:02 PM storeagent[81090]   unsignedBags: 0
12/22/10 1:06:02 PM storeagent[81090]   -[ISURLOperation run]

我的构建后脚本如下所示:

codesign -f -s "3rd Party Mac Developer Application: MYCOMPANYNAME" -v build/Release/AppStoreTest.app    
cd build/Release
productbuild --component AppStoreTest.app /Applications --sign "3rd Party Mac Developer Installer: MYCOMPANYNAME"  AppStoreTest.pkg

我做错了什么吗?

I've made an app that validates its receipt using the ValidateStoreReceipt code on GitHub according to the Apple documentation. The docs say to sign your app, make a package (with signing), and then install it via command line. Then run the app, see there is no receipt, return code 173, and it'll prompt you for a test account login (which it does). I supply the test account (from setting up a test user on iTunesConnect). Then, nothing happens. It should then download a receipt into the app bundle and relaunch the application, but it does neither. The Console says only this:

12/22/10 1:06:01 PM store_helper[75986] -[ISURLOperation run]
12/22/10 1:06:01 PM store_helper[75986] port created: 'com.apple.storeClient-23457' (75986)
12/22/10 1:06:01 PM store_helper[75986] Creating run loop source
12/22/10 1:06:01 PM store_helper[75986] adding source to run loop
12/22/10 1:06:01 PM storeagent[81090]   promptResponse: <CKSignInPromptResponse:0x10101ce20 returnCode:1>
12/22/10 1:06:01 PM storeagent[81090]   wrote primary DSID: 1391703719
12/22/10 1:06:01 PM storeagent[81090]   wrote primary DSID: 1391703719
12/22/10 1:06:01 PM storeagent[81090]   -[ISURLOperation run]
12/22/10 1:06:02 PM storeagent[81090]   unsignedBags: 0
12/22/10 1:06:02 PM storeagent[81090]   -[ISURLOperation run]

My post build script looks like this:

codesign -f -s "3rd Party Mac Developer Application: MYCOMPANYNAME" -v build/Release/AppStoreTest.app    
cd build/Release
productbuild --component AppStoreTest.app /Applications --sign "3rd Party Mac Developer Installer: MYCOMPANYNAME"  AppStoreTest.pkg

Am I doing something wrong??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

少女的英雄梦 2024-10-15 13:10:32

我想我找到了答案!看起来您必须在 itunesconnect 上实际设置整个应用程序,一直到您要上传它,然后它才能工作。仅拥有捆绑包 ID 是不够的;还需要提供捆绑包 ID。它必须等待上传。
只是想我会把它扔在那里以防其他人遇到这个问题。

I think I found the answer! It looks like you have to actually set up your whole app on itunesconnect, all the way up to the point where you're going to upload it, before it'll work. Just having the bundle ID is not enough; it has to be pending upload.
Just thought I'd throw that out there in case anybody else runs into this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文