开发者

How do I make a Mac App Store app that validates receipts?

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??


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜