Hi. I integrated the RevMob Unity plugin. Everything works great on Android.
This is what i have done:
1. Followed the steps here: http://sdk.revmobmobileadnetwork.com/unity.html
2. Created an iOS app from the RevMob dashboard
3. Added StoreKit and AdSupport in Xcode
4. Builded the app to my iPad
This is my Banner code attached to my 'Main Camera' GameObject:
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
public class Banner : MonoBehaviour {
RevMobBanner banner;
private static readonly Dictionary REVMOB_APP_IDS = new Dictionary() {
{ "Android", "54403a75c578b8d206df9a1e"},
{ "IOS", "545df9e20b8e19d3794a57d3" }
};
private RevMob revmob;
void Awake() {
revmob = RevMob.Start(REVMOB_APP_IDS, "Main Camera");
}
// Use this for initialization
void Start () {
#if UNITY_ANDROID
banner = revmob.CreateBanner(RevMob.Position.BOTTOM, 0, 0, Screen.width, Screen.height / 10);
banner.Show();
#elif UNITY_IPHONE
banner = revmob.CreateBanner(0, 0, Screen.width, Screen.height / 10, null, null);
banner.Show();
#endif
}
// Update is called once per frame
void Update () {
}
}
Best Regards.
↧