为了支持libgdx游戏引擎的推广,本人会定期编写IOS SDK绑定,并且分享给大家.
用法:
<libs> <lib>z</lib> <lib>data/libs/libMobClickGameLibrary.a</lib> </libs>
exportedSymbols
代码:
<libs> <lib>z</lib> <lib>data/libs/libMobClickGameLibrary.a</lib> </libs> <frameworks> <framework>UIKit</framework> <framework>OpenGLES</framework> <framework>QuartzCore</framework> <framework>CoreGraphics</framework> <framework>OpenAL</framework> <framework>AudioToolbox</framework> <framework>AVFoundation</framework> </frameworks> <exportedSymbols> <symbol>MobClickSocialType*</symbol> </exportedSymbols> </config>
@Override public boolean didFinishLaunching(UIApplication application, UIApplicationLaunchOptions launchOptions) { MobClick.startWithAppkey("your key", ReportPolicy.BATCH, "ios"); MobClickGameAnalytics.pay(100, 1, 200); MobClickGameAnalytics.buy("xxoo", 1, 100); MobClickGameAnalytics.use("xxoo", 1, 100); MobClickGameAnalytics.startLevel("1"); MobClickGameAnalytics.finishLevel("1"); MobClickGameAnalytics.failLevel("1"); final NSDictionary<NSString, NSString> dic = new NSDictionary<NSString, NSString>(); dic.setAssociatedObject(new NSString("1"), new NSString("1")); dic.setAssociatedObject(new NSString("2"), new NSString("2")); MobClickSocialWeibo weibo = new MobClickSocialWeibo(MobClickSocialWeibo.MobClickSocialTypeSina(), "xxxxxxxooooo", "12345", dic); List<MobClickSocialWeibo> weibos = new ArrayList<MobClickSocialWeibo>(); weibos.add(weibo); MobClickSocialAnalytics.postWeiboCounts(weibos, "your key", "测试", null); return super.didFinishLaunching(application, launchOptions); }
下载地址:https://github.com/tianqiujie/robovm-ios-bindings