Need help with InApp Purchase module

Monkey Targets Forums/iOS/Need help with InApp Purchase module

anawiki(Posted 2011) [#1]
Hi
I am a bit stuck with In App Purchase module. I found (it was recommended to me) a framework that handles IAP:

http://blog.mugunthkumar.com/coding/introducing-mkstorekit-–-version-3/

I am trying to wrap it, but without success. I merged MKStoreKit files into one cpp file that is imported into my module, but during compile time I get some errors that I don't know how to fix them:



You can download example app and full module from here:

http://www.anawiki.com/flash/iap-mod.zip

inapp.monkey is the file that tries to use iap.module. The zip contains original MKStoreKitV30 in subfolder.

Thanks!

If someone knows how to do this I can even sponsor finishing this module.

cheers
Roman


anawiki(Posted 2011) [#2]
OK, this shit below happens because Trans ignores #import <StoreKit/StoreKit.h>. After I manually added this framework to the project the code compiles right:

Undefined symbols:
"_OBJC_CLASS_$_SKPayment", referenced from:
objc-class-ref-to-SKPayment in main.o
"_OBJC_CLASS_$_SKPaymentQueue", referenced from:
objc-class-ref-to-SKPaymentQueue in main.o
"_OBJC_CLASS_$_SKProductsRequest", referenced from:
objc-class-ref-to-SKProductsRequest in main.o

(ok, maybe not the code above, some different, but it was returning same error)


Soap(Posted 2011) [#3]
How do you manually add it?
Edit: I see, you have to use xcode. Go to buildphases and add StoreKit to link with binary libraries.