Do I have to know Cocos2d to bridge Obj-C to C++?

Hi guyz, been looking for a IAP purchase tutorial for cocos2d-xv2.2.5 but so far the tutz are all quite ambiguous and not that conducive to learning at all. So Im taking the long, hard road. Do I hve to learn cocos2d?

You don’t have to learn cocos2d-iphone to use IAP purchase.

There are at least 3 frameworks I know of that integrate IAP:

@Fradow

thnx, which one do you use? Im trying SOOMLA for now

@reyanthonyrenacia I didn’t test Soomla and PluginX, because I am the main developer behind FenneX and developed it for my needs.

On a theorical thought, FenneX probably isn’t the easiest to integrate, since it’s not very modular (you’d have to copy/paste a few files here and there). I heard Soomla is a bit hard to integrate a few times (though again, I didn’t try it myself).

PluginX is probably your best bet. Cocos2d-x developers are active in it’s development, and there is some documentation for integration in your project.

Let us know which one you choosed and how it went.

P.S.: IAP will probably be next on the list of samples I’ll do. Don’t hold your breath on it though, it may take a few weeks.

Wohoow, you must be really good then :smile: !
Im giving up on SOOMLA for now . . the promised “easy one-liners” are not really easy at all. If Im going to learn SOOMLA the hardway, I might as well learn the real thing, like bridging Obj-C to C++ and do other stuffs.

1 Like

No I’m not really good, my job require it :slight_smile:

If you are determined to go the hard way, you might find inspiration in FenneX code. To get you started:

You might want to look at an Objective-C tutorial to have detailed steps about the other things around pure code (adding StoreKit framework, the iTunes Connect setup, etc…)

ok, but wait? this opus magnus of yours works only on version 3?? Coz im trying to migrate to v3.x just to be met with an error: maybe you’re familiar with it? here’s a screenshot

Oh right you said you were on V2. There is a cocosV2.2 branch on FenneX (no longer maintained, but working well so far for my 4 applications on the AppStore and Play Store).

Here are the correct links:

As far as I remember, there is no modification between V2 and V3 for in-apps.

Your screenshot is missing details on the error. It seems to come from libcurl, which is not related to in-apps.

Ok I’ll be learning your stuff, hope you have the patience to guide me through just in case, yeh? Im willing to do my part as far as reading goes :smile:

Can I apply there at your company in the near future?? :smiley:

Before asking questions, as I said, you should look at an up-to-date Objective-C tutorial about IAP. This one seems good: http://www.raywenderlich.com/21081/introduction-to-in-app-purchases-in-ios-6-tutorial (raywenderlich is always a good bet, and it’s recent enough). You can skip the parts about interface, and most of the Objective-C part should be similar to FenneX implementation.

You can see this old post about my company: Auticiel is hiring a full-time developer in Paris, France