Appodeal - all ads in one module.

Monkey Targets Forums/iOS/Appodeal - all ads in one module.

Alex(Posted 2015) [#1]
Hello everyone!

Have you noticed Ads has been grouped by aggregators, so you don't need to load them manually? Also, they choose current ad by highest rank and display it.

http://www.appodeal.com/
I want to use Appodeal in my game. But It seems I have not enough skills to create a module out of it (

UPD: solved thanks to York!

Here's the module:
http://white-zebra.com/uploads/appodeal.zip

How to use:
Global appodealMonkey:AdAppodeal

Method OnCreate()
	...
	appodealMonkey = AdAppodeal.GetAppodeal()
	appodealMonkey.Init("APP_ID")
	...
End

...
appodealMonkey.ShowVideoAd()
appodealMonkey.ShowInterstitial()
...



diana_app(Posted 2015) [#2]
Hi Alex,

My name is Diana. I am from Appodeal Publisher Success Team. I would like to help you.
First of all let me please ask you: 1. have you downloaded our latest iOS SDK? http://www.appodeal.com/sdk/choose_framework
2. Have you contacted our support about the issue?

If you have any questions feel free to contact me. We are always there for you!

Cheers,
Diana B.
Publisher Success team
Appodeal Inc


Alex(Posted 2015) [#3]
Thank you for the reply, Diana!
Yes, I've send the request to Appodeal and received mail from ticket@.... But nothing is there so far.
I dowloaded new SDK.

The issue is I have to call all Appodeal functions outside of ViewController class. So I'm creating a new extended class instead of inserting functions in ViewController like in Appodeal tutorial.

Here's my new code.
#import <Appodeal/Appodeal.h>

@interface AppodealMonkey : UIViewController

+(void) appodealMonkeyInitWithID:(NSString *)theID;
+(void) appodealMonkeyShowVideoAd;
+(void) appodealMonkeyShowInterstitial;

@end

@implementation AppodealMonkey

+(void) appodealMonkeyInitWithID:(NSString *)theID{
    [Appodeal initializeWithApiKey:theID];
}
+(void) appodealMonkeyShowVideoAd{
    [Appodeal showAd:AppodealShowStyleInterstitial rootViewController:self];
}
+(void) appodealMonkeyShowInterstitial{
    [Appodeal showAd:AppodealShowStyleVideo rootViewController:self];
}

@end

void AppodealInitialize(String theIDn){
    NSString * theIDNum = theIDn.ToNSString();
    [AppodealMonkey appodealMonkeyInitWithID:theIDNum];
}

void AppodealShowVideo(){
    [AppodealMonkey appodealMonkeyShowVideoAd];
}

void AppodealShowInterstitial(){
    [AppodealMonkey appodealMonkeyShowInterstitial];
}


Here's what i get when I try to show video in game.

2015-08-19 14:50:54.837 MonkeyGame[682:27502] SourceKit Logger: log level set to none
2015-08-19 14:50:55.195 MonkeyGame[682:27502] SourceKit Logger: log level set to none
2015-08-19 14:50:57.136 MonkeyGame[682:27502] wv ===== ==== ==== ==== ==== ==== === <UIWebView: 0x15718fe0; frame = (0 0; 320 480); opaque = NO; autoresize = LM+W+RM+TM+H+BM; layer = <CALayer: 0x156ed950>>
2015-08-19 14:50:57.139 MonkeyGame[682:27502] SKMRAIDInterstitial MRAIDViewDelegate mraidViewAdReady:
2015-08-19 14:50:57.144 MonkeyGame[682:27502] wv ===== ==== ==== ==== ==== ==== === <SKMRAIDView: 0x16e69ab0; frame = (0 0; 320 480); gestureRecognizers = <NSArray: 0x15726d90>; layer = <CALayer: 0x16e67550>>
2015-08-19 14:50:57.750 MonkeyGame[682:27502] wv ===== ==== ==== ==== ==== ==== === <UIWebView: 0x15603e40; frame = (0 0; 320 480); opaque = NO; autoresize = LM+W+RM+TM+H+BM; layer = <CALayer: 0x15601ee0>>
2015-08-19 14:50:57.755 MonkeyGame[682:27502] SKMRAIDInterstitial MRAIDViewDelegate mraidViewAdReady:
2015-08-19 14:50:57.757 MonkeyGame[682:27502] wv ===== ==== ==== ==== ==== ==== === <SKMRAIDView: 0x16e673d0; frame = (0 0; 320 480); gestureRecognizers = <NSArray: 0x156f89c0>; layer = <CALayer: 0x1563e880>>
2015-08-19 14:51:05.434 MonkeyGame[682:27502] SourceKit Logger: log level set to none
2015-08-19 14:51:05.463 MonkeyGame[682:27502] SKMRAIDInterstitial MRAIDViewDelegate mraidViewWillExpand:
2015-08-19 14:51:05.474 MonkeyGame[682:27502] +[AppodealMonkey presentModalViewController:animated:]: unrecognized selector sent to class 0x821580
2015-08-19 14:51:05.777 MonkeyGame[682:27502] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[AppodealMonkey presentModalViewController:animated:]: unrecognized selector sent to class 0x821580'
*** First throw call stack:
(0x2578a0d7 0x33c1cc77 0x2578f4b9 0x2578d479 0x256bc708 0x1d058f 0x1c3bd5 0x1c4acf 0x1c4d19 0x1c5193 0x1c645d 0x1b7a51 0xffc1d 0xffccf 0x129023 0x11f1c5 0x102f57 0x102b89 0x10569f 0xf5b71 0xf8437 0xf97c9 0x10a5f83 0x2884cb67 0x2884c9cf 0x2d649c03 0x26704d0d 0x2573f335 0x2574f82b 0x2574f7c7 0x2574dde9 0x256996d1 0x256994e3 0x2d05e1a9 0x28e4b445 0x176d53 0x341eaaaf)
libc++abi.dylib: terminating with uncaught exception of type NSException



York(Posted 2015) [#4]
Hey,

I would do this like we did it with admob.

appodeal.monkey

#IF TARGET="ios" THEN 

Import "native/appodeal.ios.cpp"

#ENDIF 

Extern

Class AdAppodeal Extends Null = "BBAppodeal"
	
	Function GetAppodeal:AdAppodeal()
		
	Method Init:Void(_id:String)
	Method ShowVideoAd:Void()
	Method ShowInterstitial:Void()
	
	
End Class



appodeal.ios.cpp

#import <AppodealAds/Appodeal.h>

class BBAppodeal{

	static BBAppodeal *_appodeal;
	
public:

	BBAppodeal();
	
	static BBAppodeal *GetAppodeal();
	
	void Init(String _id );
	void ShowVideo();
	void ShowInterstitial();
	
};


BBAppodeal *BBAppodeal::_appodeal;

BBAppodeal::BBAppodeal(){
}

BBAppodeal *BBAppodeal::GetAppodeal(){
	if( !_appodeal ) _appodeal=new BBAppodeal();
	return _appodeal;
}

void BBAppodeal::Init(String _id ){
	NSString* appID = _id.ToNSString();
    [Appodeal initWithAppId:appID];
}

void BBAppodeal::ShowVideo() {
	
	BBMonkeyAppDelegate *getDelegate=(BBMonkeyAppDelegate*)[[UIApplication sharedApplication] delegate];
	[Appodeal showAd:AppodealShowStyleInterstitial rootViewController:(UIViewController*)getDelegate->viewController];
	
}

void BBAppodeal::ShowInterstistial() {

	BBMonkeyAppDelegate *getDelegate=(BBMonkeyAppDelegate*)[[UIApplication sharedApplication] delegate];
	[Appodeal showAd:AppodealShowStyleVideo rootViewController:(UIViewController*)getDelegate->viewController];
	
}



I haven´t test it, but I think this basic should work. It´s not nice, but you can modify it...


Alex(Posted 2015) [#5]
Thanks a lot, York!

I've made this into a module, here it is:
http://white-zebra.com/uploads/appodeal.zip

Also, I've added it at the start of the topic with tutorial.
Good luck!


diana_app(Posted 2015) [#6]
Hi Alex and York,

Alex, Could you please let me know your account name at appodeal or ticket number? Unfortunately I am not a developer myself and I can only help with asking our support. But I need more information to do so. Officially we don't support Monkey-X but if there is something we can help with we will do so.

York, thank you. Hopefully your MOnkey-x code will work fine.

Cheers,

Diana B.
Publisher Success Team
Appodeal Inc.


Alex(Posted 2015) [#7]
Thank you Diana,
York's code works as a charm!


Snader(Posted 2015) [#8]
Any change to support Android as well?


diana_app(Posted 2015) [#9]
Hi guys,

Snader, sorry but we don't support Monkey-X for now. If something is changed I will definitely update information here.
Do you have some particular issues? Please let me know and I will try to help.

Cheers,
Diana B.


Snader(Posted 2015) [#10]
Hi Diana,

The York's code wraps the IOS sdk to be used with Monkey-X; I did see this page http://www.appodeal.com/sdk/choose_framework and it shows that Android is supported. Since I am not able to wrap the Android sdk to be used with Monkey-X, I was hoping to see someone else from this community trying to get this done.


Kind regards,

Sander


Ferdi(Posted 2015) [#11]
Appodeal support is very helpful. Anything that support natively (obj-c or java), Monkey-X support it. Sorry I can't really support this, I need to finish my game.

IOS version 0.4.2, and Android version 1.12.8. And make sure the Android SDK is in the directory modules/native/appodeal-android-sdk-1.12.8 and IOS SDK is in the directory modules/native/appodeal-ios-sdk-0.4.2

I only did it for video ads, but I am sure you can extrapolate and do it for banner and interstitial.

Anyway Here's my glue code for Appodeal:

File: modules/appodeal/appodeal.monkey



Sometime other library already include google play service, so I just have to omit this monkey file.

File: modules/appodeal/googleps.monkey



File: modules/appodeal/native/appodeal.android.java



File: modules/appodeal/native/appodeal.ios.cpp



File:banana_appodeal.monkey



Hope it helps.


Ferdi(Posted 2015) [#12]
Hi Diana

In IOS, is there a function like in Android that disable location?

In Android there is this function:

Appodeal.disableLocationPermissionCheck();


But in IOS, I can't find it. I don't feel comfortable asking my customer where they are in the world.

Thanks.


diana_app(Posted 2015) [#13]
Hi Ferdi,

Thank you for the question. We are releasing a new SDK for iOS by the end of this week. We are going to include the option of disabling the location.
For now for iOS 7 and above it is asked automatically if the user wants to use GEO. He should answer no. So please wait for a new iOS SDK where we are going to solve this question..

Hope my answer was helpful. Please let me know if you have any other questions.

Cheers,
Diana B.
Publisher Success Team
Appodeal Inc


Ferdi(Posted 2015) [#14]
Thanks Diana, I will look into it once the new iOS SDK is released.


diana_app(Posted 2015) [#15]
Hi @Ferdi

Just wanted to update about our new iOS SDK ver 0.4.5
It's available here: http://www.appodeal.com/sdk/choose_framework

Cheers,
Diana B.
Appodeal inc.


Ferdi(Posted 2015) [#16]
Hi Diana, thanks for the function. I have managed to get 0.4.5 working, but it did not solve my problem. Sorry I did not explain it better.

I am on IOS 8.4.1.

In the "Location Services" menu. You can get into it from Settings (main menu) -> Privacy (hand icon) -> Location Services. In this menu, turn off location services. Here is a picture with the red box showing location services is off.



Now if I go to an app that has Appodeal initialize I will see the following message:



Now if hit "Cancel" and I hit the "Home button" and go back to my app again, it will display that message again.

Is it possible to get rid of this message? I feel it is very bad user experience.

Thank you for your time.

Ferdi


diana_app(Posted 2015) [#17]
Hi Ferdi,

Have you tried this:
disableLocationPermissionCheck

Cheers,
Diana B.
Appodeal Inc.


Ferdi(Posted 2015) [#18]
Hi Diana

Yes, this is how I initialised Appodeal IOS SDK v 0.4.5:

BBAppodeal * BBAppodeal::GetAppodeal(String appKey)
{
	if ( ! _appodeal ) _appodeal = new BBAppodeal();

	//[Appodeal initWithAppId:@"APPODEAL_APP_KEY"];
	[Appodeal initializeWithApiKey:appKey.ToNSString() types:AppodealAdTypeVideo];
	[Appodeal setAutocache:YES types:AppodealAdTypeVideo];
	[Appodeal disableLocationPermissionCheck];
	[Appodeal setDebugEnabled:YES];

	[Appodeal setVideoDelegate:[[AppodealDelegateGlue alloc] init]];

	return _appodeal;
}


Did I get the sequence incorrect?

Or may be I called disableLocationPermissionCheck incorrectly?

Thanks

Ferdi


diana_app(Posted 2015) [#19]
He Ferdi,

I will check back with our support :)

Cheers,
Diana B.
Appodeal Inc


diana_app(Posted 2015) [#20]
Hi Ferdi,

Is that the test mode? Not production? [Appodeal setDebugEnabled:YES];

Thank you,
Diana


Ferdi(Posted 2015) [#21]
Yes I am in test mode - always. Can I try in production mode? I don't want to get banned. I won't click on anything. =)

I also noticed that my current build the ads stop working after several ads. All the ads shown are test ads from unityads. And the only way I can get more ads is by reseting my app. Is this because I am in test mode?

Thanks


diana_app(Posted 2015) [#22]
Hi Ferdi,

I will again contact our support:) Sorry not a tech girl myself, mediating the requests to support :)

Cheers,
Diana B.
Appodeal Inc


Xaron(Posted 2015) [#23]
Hey Diana, thanks for your continuous support, cпасибо! :)
And thanks Ferdi to pointing this out. Will use Appodeal for my next projects as well.


Ferdi(Posted 2015) [#24]
Hi Diana, thanks for all the support.

Is it possible to ask one of the developer whether Appodeal iOS SDK uses/import "AdColony.framework"?


diana_app(Posted 2015) [#25]
Hi @Ferdi

Or may be I called disableLocationPermissionCheck incorrectly?
Answer: If you don't see any alert during compilation it means that you call the method correctly.

Yes I am in test mode - always. Can I try in production mode?
Answer: It's better to stay in test mode if you are testing your app yourself.

I also noticed that my current build the ads stop working after several ads. All the ads shown are test ads from unityads. And the only way I can get more ads is by reseting my app. Is this because I am in test mode?
Answer: It;s ok. You are in a test mode and all ad networks are not yet activated. Once you are in production mode ads will be filled automatically.

Hope I helped :)

Cheers,

Diana
Appodeal Inc


diana_app(Posted 2015) [#26]
hi @Xaron,

You are very welcome:) Bitter schön :) Looking for great results together.

Diana
Appodeal Inc


Xaron(Posted 2015) [#27]
Hehe, thanks Diana. Bitter schön is more like bitter sweat. :D So you mean bitteschön. ;)

Cheers!


Ferdi(Posted 2015) [#28]
Thank you very much for the answer Diana.


diana_app(Posted 2015) [#29]
@Xaron ahaha, I used to learn Deutsch a long long time ago!
Hope you enjoy using Appodeal :)

@Ferdi you are very welcome.

Cheers,
Diana B.
Appodeal Inc


rIKmAN(Posted 2016) [#30]
Sorry to drag up an old thread, but I was wondering how Appodeal was performing for the guys that are using it?

What types of ads are you using?
How are they performing?
Are you happy with the service?


maverick69(Posted 2016) [#31]
@rikim: On Google Play it outperforms my ad networks I had before. In December I had an ECPM of $3.44 which is quite nice for Android. On January it was a little bit lower.

I also implemented it now in my iOS Apps. But it crashes when you're using it with Monkey. So you have to patch Monkey to fix this crash:

http://www.monkey-x.com/Community/posts.php?topic=10388


secondgear(Posted 2016) [#32]
@maverick69: What ads are you using: banners or interstitial? $3.44 quite nice indeed.


maverick69(Posted 2016) [#33]
I use mainly interstatial in most of my apps. In some apps I use also banners. I have not enough data to share with, but my first app updates are live with appodeal ads on ios and ecpm seems to be a lot highter than on Android ;)


rIKmAN(Posted 2016) [#34]
Thanks for the info Mavericks, nice eCPM, and sorry for the late reply.

Are you using the official module from the appodeal site?
I ask as it only seems to support Android, and the iOS version is greyed out when you choose Monkey from here: http://www.appodeal.com/sdk/choose_framework


maverick69(Posted 2016) [#35]
Appodeal Wrapper: https://bitbucket.org/joemanaco/fairlight/src/87bb50fbf42f9d16cb1aa53beb1b70910bf3f437/src/ads/appodeal/?at=master

Use it with fairlight, here ist the AdProvider if you'd like to: https://bitbucket.org/joemanaco/fairlight/src/87bb50fbf42f9d16cb1aa53beb1b70910bf3f437/src/ads/admobprovider.monkey?at=master&fileviewer=file-view-default

WIKI-Page: https://bitbucket.org/joemanaco/fairlight/wiki/Ads

I use monkey-wizard (https://github.com/JochenHeizmann/monkey-wizard) to add it to my xcode projecte generated by monkey using:
monkey-wizard IosAppodeal XCODE_PROJECT_FOLDER


DeadFall(Posted March) [#36]
Official example isn't compiling on latest Monkey version anyone check to see the cause or what needs to be changed?

https://s3.eu-central-1.amazonaws.com/appodeal-monkeyx/Android/Appodeal_MonkeyX_Android_1.14.14.zip

Edit: Nevermind found the issue, needed to copy the provided res folder into the build/android/res one.


Soap(Posted March) [#37]
It's easy to miss, but there is more updated example and sdk implementation here https://github.com/appodeal/appodeal-monkeyx-demo
The files in that zip are old.