Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: jeanfabre on October 31, 2012, 02:09:11 AM

Title: Prime31 IOS StoreKit with PlayMaker
Post by: jeanfabre on October 31, 2012, 02:09:11 AM
Hello Everyone,

 Still very early, but I think it reached a state where it needs more testing, so I am realising now an alpha version of Prime31 IOS StoreKit port to PlayMaker.

You will need obviously the Prime31 IOS storeKit from the asset store. Then you will need to set up your IOS application in Itunes to use IAP,  and set up the products you want. you will also need to create testing accounts to test the IAP featurs, etc etc. so be prepared for some well known IOS application cumbersome set up.

 In the sample you will find in this package, DO NOT FORGET to inject your own product Identifiers in the action "Store Kit Request Product Data", and also DO NOT FORGET to inject your own secret Key in the action "Store Kit Validate Auto Renewable Receipt"

Study carefully the design patterns in the sample I created, especially how I only rely on the "STOREKIT / XXX"  global events to transit from a state where I call the storekit for a asynchronous action, like get Product Data or purchase product.

 NOTES: I do get a weird bug that even Prime31 never saw before, and can't even google for it properly, so I must do something very wrong.... but I do not get any TransactionIdentifier when getting all saved transactions... Hence why this is still in alpha stage until I get to the bottom of this issue.

 so if someone can back me up on this, I would be grateful.

Some convenient actions might be missing, so don't hesitate to share your views and issues, this will help making this a usable and convenient system.

also, you can turn off the visual debbugging of the proxy by opening the  PlayMakerStoreKitProxy script and set visualDebug variable to false, and all on screen debug will go away.

bye,

 Jean
 
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: DARK_ETERNAL on October 31, 2012, 11:46:56 AM
Perhaps I can lend a hand. I was thinking about making some stuff with Prime31 plugins, but, as you've already started, I might help you test your work, and maybe suggest and work on some improvements or missing things.

Greetings.
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: jeanfabre on November 01, 2012, 04:32:46 AM
Hi,

 yes you are welcome indeed.

 the current struggle for me is why I don't get an transactions Id on my saved Transactions, that's beyond my comprehension, and even Prime31 never actually seen something like that...

So I can't really reach the validation receipt stage of the process at the moment.

bye,

 Jean
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: jeanfabre on November 13, 2012, 06:37:25 AM
Hi,

 New version available on the initial post, with a new action get a transaction by its product Id as well as few corrections and typos on Events names.

I am left with dealing with downloads and creating a set of Parse actions to store transactions that apple won't store itself, once that is done, I think it will good to go on the wiki.

 One project is close to submission using this bridge, so finger crossed!

bye,

 Jean
 
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: VictorRayDev on November 13, 2012, 11:21:46 PM
Thanks for your hard work I see myself using this in a near future!
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: pneill on February 04, 2013, 10:29:20 AM
Hi Jean,

Did you ever get a chance to finish this up?   What's the current state?

Thanks!
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: jeanfabre on February 08, 2013, 01:57:37 AM
Hi,

 No, I haven't had a chance to finish this unfortunatly. But I had to implement  a regular scripted IAP with it few days ago and I have a php script that verify receipts with itunes, because doing otherwise is not recommended and will be likely subject to hack by your gamers. So the parse approach would not really be appropriate and fit all the needs.

 pm me if you need the php scripts tho.

Bye,

 Jean
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: LightSoftStudio on April 22, 2013, 11:46:01 AM
Hello I download this plug-in now how can i Validate the purchase?
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: jeanfabre on April 23, 2013, 02:27:17 PM
Hi,

 Validation happens on your server side, this is something important to consider because if you validate on the device, then it's easy to hack.

 bye,

 Jean
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: Mayhem on April 23, 2013, 03:12:57 PM
Hey jean, do you still work on this plugin? :)
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: lolonoa on April 23, 2013, 07:52:16 PM
Hi, jeanfabre, I download the package, it seems missing the StoreKitProduct in the sample scence
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: jeanfabre on April 23, 2013, 11:51:53 PM
hi,

 the storekit product are unique to your application IAP set up, so you need to log to your apple developer, set up your application and define your products, and then edit the sample to use them references.

bye,

 Jean
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: JieAlan on April 29, 2013, 12:19:30 PM
 :D
I care about this for long time;
I download this and it works in my iPhone, it can get the productList and saved transcations, but when I purchased,it faild :-\
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: jeanfabre on April 29, 2013, 02:52:56 PM
Hi,

 Are you sure you are all set for sandbox mode, and that the apple account you are using on the device you test is an account you have created in your apple developer account as a "test" account? else that will fail for sure.

 also, if you did, you may still have the wrong account on your device, for this make sure you log out, and NOT login manually, and only let the IAP purchase find out that your device is not logged to an account, and then login with your test account ( basically, only log into your test account when you press purchase within your app).

 bye,

 Jean
 bye,

 Jean
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: tezer86 on June 11, 2013, 12:06:02 PM
Sounds great, how can I get my hands on this. If I buy prime 31 store kit and I have playmaker when can I get the actions?

Cheers
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: jeanfabre on June 14, 2013, 02:17:29 AM
Hi,

 it's in the first post of this thread as an attachment. Never made it to the wiki page cause it's still an alpha, it needs proper testing and validation so if it works for you, let me know, and I can promote this to the wiki.

bye,

 Jean
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: escpodgames on June 14, 2013, 05:05:20 AM
Ill be trying to use this next week - have a game that needs 5 coin packs so should be a good test for the actions.
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: escpodgames on June 26, 2013, 05:05:44 AM
Finally had a crack at this and So far I think I understand most of it.
Just a few questions thought.

Just looking at the order in which you use the actions and where each one goes, so far I have -
Get can make payments => Request product data => Get product data => Purchase product
Is this correct - and where does the Validate receipt come in :S
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: jeanfabre on June 26, 2013, 05:32:52 AM
Hi,

 yes correct. The validate receipt comes when you want to check for what was purchased.

read very carefully these two links, it's explaining what are receipt validate and when to do it, how to do it.

http://www.raywenderlich.com/23266/in-app-purchases-in-ios-6-tutorial-consumables-and-receipt-validation

http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/VerifyingStoreReceipts/VerifyingStoreReceipts.html

bye,

 Jean
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: escpodgames on June 26, 2013, 06:37:43 AM
Awesome, thanks for the links too :)
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: escpodgames on October 24, 2013, 12:04:47 AM
Finally taking a look at the transaction validation and have a question -\

For the Store kit Get Transaction Data By index, what exactly is the index? where does that come from? how do you get it?
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: jeanfabre on October 24, 2013, 01:20:55 AM
Hi,

the index is simply the "row" in the list returned, so if you have 10 transaction, index 0 if the first transaction returned and 9 is the last.

 do not rely on this to reference transaction during validation, use the transaction id instead, this index is only here to iterate through them,

bye,

 Jean
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: escpodgames on October 24, 2013, 01:46:39 AM
Ah ok, that makes sense. Next question (should be the last) what is the best way to get the transaction id of the current transaction that requires validation?
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: jeanfabre on October 24, 2013, 01:58:09 AM
Hi,

You mean in terms of IAP logic or within PlayMaker custom actions? It's been a long time I haven't tackled IAP, and I can't really remember what was the process for retrieving pending transactions, but to get transactions id, you use the custom action StoreKitGetTransationDataByIndex after you called StorekitGetAllSavedTransactions OR StoreKitRestoreCompletedTransactions.

now, which one you want to call and what to do with them is something you'll ned to read in the Apple IAP doc.


In all cases, you'll have to host a server side system to monitor and buffer transactions if you really want to be secure.

 I should have more time next week to have a proper look with you if you want.

bye,

 Jean
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: escpodgames on October 24, 2013, 03:37:20 AM
Security is rather laughable on mobile, if people want to pirate my game .. they will. I've worked on many top mobile games and all have been pirated at some point so I'm not so worried. I'll do some more reading up on it but if I don't have to validate purchases this will be a lot easier.
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: Marsh on December 15, 2013, 08:37:10 PM
Sorry to bump such a old topic but is this fully working?

I am considering creating the plugin, but it would be a waste of time if their was already a working copy. Would anyone be interested in something like this?
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: escpodgames on December 15, 2013, 08:43:12 PM
I have half implemented this but have yet to test it :S I hope it works. Otherwise a working version would be very helpful. Maybe testing this one first might be a good option?
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: jeanfabre on December 16, 2013, 06:07:05 AM
Hi,

 Yes, it is working ( at the time of writing it was at least).

I would also suggest giving this solution a go and expand/rewrite if required.

bye,

 Jean
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: JieAlan on July 18, 2014, 03:05:23 AM
does this packge has new version,this one can't work now?
unity 4.3.3, xcode 5.1
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: jeanfabre on July 18, 2014, 08:15:43 AM
Hi,

Prime31 assets are rock solid, so they definitly work. Can you paste the errors you get?

bye,

 Jean