Playmaker Forum

Playmaker Updates & Downloads => Share New Actions => Topic started by: jeanfabre on October 30, 2012, 11:09:11 PM

Title: Prime31 IOS StoreKit with PlayMaker
Post by: jeanfabre on October 30, 2012, 11:09:11 PM
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, 08: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, 01: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, 04: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, 09: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, 08: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 07, 2013, 11:57:37 PM
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, 08: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, 11:27:17 AM
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, 12: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, 04: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, 08: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, 09:19:30 AM
 :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, 11:52:56 AM
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, 09:06:02 AM
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 13, 2013, 11:17:29 PM
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, 02: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, 02: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, 02: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, 03:37:43 AM
Awesome, thanks for the links too :)
Title: Re: Prime31 IOS StoreKit with PlayMaker
Post by: escpodgames on October 23, 2013, 09:04:47 PM
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 23, 2013, 10:20:55 PM
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 23, 2013, 10:46:39 PM
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 23, 2013, 10:58:09 PM
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, 12: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, 06: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, 06: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, 04: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, 12: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, 05:15:43 AM
Hi,

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

bye,

 Jean