Applovin and cocos2d IOS integration - ios

HI i'm trying to develop a function that uses APPLOVIN to show adds. i don't see any errors messages an nothing, The game starts normally but no add is shown
I imported the library
I think i'm doing all the correct steps:
1)Importing all libraries into the project
2)setting the KEY that APPLOVIN provides
3) set the -OgjC configuration key
4)Do all imports into the delegate class
5) load library
[ALSdk initializeSdk];
and
[ALInterstitialAd showOver:[[UIApplication sharedApplication] keyWindow]];
I did all the steps posted here: https://www.applovin.com/integration#iosIntegration
Is it any step that i need to perform in order to show an add?
I looked into some other posts and they use an banner object, but don't know how to integrate in COCOS2d. can someone provide some guidance on this please?
Thanks in Advance!!

Applovin Integration Steps :
Initialize
-(void)applicationDidBecomeActive:(UIApplication *)application
{
[ALSdk initializeSdk];
}
Show Ads :
-(void)showAplovinAds
{
[ALInterstitialAd showOver:[[UIApplication sharedApplication] keyWindow]];
}
Add SDK Key in info.plist

Related

How to remove isAdvertisingTrackingEnabled In Unity

We have App in ios. It was developed in unity. Yesterday apple informed that our app has been rejected because we have been used advertising in your app. But we did not used any advertisements in our app. This is the screen shot.
we have been searching in google. but we have not found any solutions. So any idea how to remove the Isadvertisingtrackingenabled in unity.
strong textThose who have received the above error. I have followed the below steps and our app got approved.
The answer is taken from this forum
https://forum.unity.com/threads/important-changes-for-ios-kids-apps-action-needed-by-developers.838939/.
all the credit goes to that person only. I am just posting for information purpose only.
To make the manual fix, please follow the instructions below:
Open the file DeviceSettings.mm within your Xcode project.
Find and remove the line #include
Find and completely remove the function “QueryASIdentifierManager”
Find the function “UnityAdvertisingIdentifier” and replace it with:
extern "C" const char* UnityAdvertisingIdentifier()
{
return NULL;
}
UnityAdvertisingTrackingEnabled()
find the unityadvertisingtrackingenabled and replace the code.
extern "C" int UnityAdvertisingTrackingEnabled()
{
return 0;
}
NOTE:
In Package manager . Unity Ads and Unity Analytics are enabled as default. So kindly disable the both. and then following the above steps. it will works fine for me.
after following the above steps mentioned by this above forum . you will receive one error. So to avoid the error.Kindly add
SystemConfiguration.framework.
in xcode FrameWork Path.
Then the error will solved and your app also got approved.
if you some one need any assistance i am ready to help you.

QuickBlox iOS SDK , Enabling Cloud Back-End Server AUTHKEY/APPLICATION ID TO APP DELEGATE

I have followed all the guidelines of how to set up the iOS SDK that QuickBlox provides. I added the SDK through cocoa pods, added the run script with the snippet code. example here! I came to a crossroad and got stuck in how to add the auth-key, app-id.. ect. To The app delegate?
This is how you set the values in AppDelegate for QuickBlox
First
import Quickblox
in your AppDelegate, then in didFinishLaunching add this
QBSettings.setApplicationID(yourAppId)
QBSettings.setAuthKey(yourAuthKey)
QBSettings.setAuthSecret(yourAuthSecret)
QBSettings.setAccountKey(yourAccountKey)

Unity integrated into native iOS app. App crashes when closing Unity part and trying to reopen it

After following this tutorial I managed to integrate a Unity app into a native iOS app. The problem I'm currently facing is when I try to go back from the Unity part to native iOS.
For Android I solved this by doing something like:
public void ReturnToNative()
{
#if UNITY_ANDROID
AndroidJavaClass jc = new AndroidJavaClass ("com.unity3d.player.UnityPlayer");
AndroidJavaObject jo = jc.GetStatic<AndroidJavaObject> ("currentActivity");
jo.Call ("goBack");
#endif
#if UNITY_IOS
Application.Quit();
#endif
}
The native Java method "goBack" basically stops and then finishes an activity that contains the Unity part.
I know that for iOS the solution is not an Application.Quit(), I should use an iOS Plugin.
So my question is, what should this plugin do? How could I make it work?
I know how to create plugins, but I don't know what this particular plugin should contain.
Any help / hint / direction / comment is greatly appreciated!!
PS. I'm using Unity 5.4.2 and Xcode 8.0. The Unity part uses the Google Cardboard SDK.
For using native plugins on iOS read the following info:
https://docs.unity3d.com/Manual/NativePlugins.html
https://docs.unity3d.com/Manual/PluginsForIOS.html
It's been a couple of months since this question, but in case anyone else runs into a similar issue, here's how I managed to resolve this.

Integrating Intercom into Swift iOS app

I am trying to use the Intercom iOS SDK in a Swift app that I am building. However, all their documentation is written in Objective-C. As I am just starting out I am not quite sure how to implement Intercom in my application.
I've added "pod 'Intercom'" to my Podfile and added the import statement to my bridging header.
The next step in setting up intercom in an iOS app is initializing it in my applications AppDelegate with the following code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Initialize Intercom
[Intercom setApiKey:#"<#ios_sdk-...#>" forAppId:#"<#your-app-id#>"];
}
And then using objective-c code in my swift view-controller like so:
- (void)successfulLogin {
...
// Registering with Intercom is easy. For best results, use a unique user_id if you have one.
[Intercom registerUserWithUserId:#"<#123456#>"];
}
How do I implement Objective-c code like this in my swift project?
I've searched around, as well as contacted Intercom's support, but am yet to find an answer.
Many thanks!
[Intercom setApiKey:#"<#ios_sdk-...#>" forAppId:#"<#your-app-id#>"];
becomes
Intercom.setApiKey("<#ios_sdk-...#>", forAppId:"<#your-app-id#>")
and
[Intercom registerUserWithUserId:#"<#123456#>"];
becomes
Intercom.registerUserWithUserId("<#123456#>")
I would suggest to look over Swift tutorials to see the syntax and learn how to migrate Objective-C code to Swift code properly.

How to provide Aviary Apikey and Secret to Cordova Plugin for iOS

I currently try to get the aviary sdk to run in combination with a cordova app under iOS.
After installing cordova (3.6.3-0.2.13) and the latest Aviary SDK (4.3.0) and the aviary plugin from https://github.com/m1is/AviaryCordovaPlugin I managed to get a simple example app to work with android.
When I try to build the exact same app for iOS with xcode(6.0.1) and i try to call the cordova.plugins.Aviary.show method, I get the following error in the xcode console:
WebKit discarded an uncaught exception in the
webView:decidePolicyForNavigationAction:request:frame:decisionListener:
delegate: You must provide your Aviary
API key before creating an instance of the AFPhotoEditorController.
Please see the Aviary SDK documentation for details.
I understand from reading the SDK documentation for iOS that aviary changed the apikey/secret setup to require it to put it in the code:
The API key and secret must be provided before instantiating an
instance of AFPhotoEditorController.
and here my problem arises: I do not have any idea on how to submit the apikey/secret to the SDK, all tries changing or adding stuff to the Aviary.m file were unsuccessful (probably since I have no knowledge of ObjectiveC.
So I wonder if anybody had the same problem and is able to point me to the right direction on how to setup the apikey and secret so my cordova app would run under iOS.
It looks like the plugin maintainer was focused on android and the iOS version is unfortunately not on the same standard. If you still have this issue you can solve it by manually editing the plugin's iOS code. Just locate the line self.aviary = [[AFPhotoEditorController alloc] initWithImage:image]; in Aviary.m and add the following few lines above it:
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[AFPhotoEditorController setAPIKey:#"YourAviaryAPIKey" secret:#"YourAviarySecret"];
});

Resources