hzlov
June 24, 2014, 1:03pm
#1
I’m trying to use iosiap
that is added recently in plugin-x.
What I did with x-code is below.
added PluginProtocol ios project as sub-project.
added PluginIAP ios project as sub-project.
added libPluginProtocol.a
, libPluginIAP.a
to Link binary with libraries in Build Phases.
tried load by _inAppPurchase = dynamic_cast<ProtocolIAP*>(PluginManager::getInstance()->loadPlugin("PluginIAP"));
compiled successfully
But when run on device, _inAppPurchase is null.
Did i miss something or use wrong plugin name?
Daryl
July 7, 2014, 11:54am
#2
I’m want to use iosiap and googleplayiap plugin in my game
in iOS when i try loading the plugin
void WrapperClass::loadPluginIAP()
{
std::string pluginName;
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
pluginName = “IAPIOS”;
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
pluginName = “IAPGooglePlay”;
#endif
_pluginIAP=dynamic_cast<cocos2d::plugin::ProtocolIAP*> (cocos2d::plugin::PluginManager::getInstance()->loadPlugin(pluginName.c_str()));
}
i get the following message:
Plugin-x: Unable to load class ‘IAPIOS’. Did you add the -ObjC linker flag?
and in android
i modified the config.sh file in plugin/tools
#define plugins array
export ALL_PLUGINS=(“flurry” “umeng”
“alipay” “nd91” “IAPGooglePlay”
“admob”
“twitter” “weibo”
“qh360” “uc”)
but the published folder for IAPGooglePlay was empty
has any one got the IAP plugins working ?
hzlov
July 9, 2014, 3:09am
#3
@Daryl
try to use “googleplay” (folder name) instead of “IAPGooglePlay”.
Daryl
July 9, 2014, 5:13am
#4
thanks for your answer it worked but now there is only a for manifest file in the googleplay published folder
hzlov
July 11, 2014, 3:33am
#5
@Daryl
Because source code for IAPGooglePlay has some errors to compile.
You can see error messages while compiling.
Try just remove all other plugins but googleplay in config.sh and compile it.
See what console says.