I am trying to integrate Applovin Ad into my project. But I get a crash when trying to integrate
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM al_isValidString]: unrecognized selector sent to instance 0x28116aa30'
Below is my code:
ALSdk.shared()!.mediationProvider = ALMediationProviderMAX ALSdk.shared()!.initializeSdk(completionHandler: { _ in })
I tried creating new project and it works. But on my project still Crash. My project integrates admob, iron ads and applovin
I found the error at this line
ALSdk.shared()!.mediationProvider = ALMediationProviderMAX
I use Cocoapods to install
pod 'AppLovinSDK'
It creates 2 paths to that file. But when I click on it, it still only points to 1 file
See this photo to know more
That makes xcode not know which file's func to use. And generate the above error. Hope this helps everyone
Related
Checklist
[x] I've updated to the latest released version of the SDK
[x] I've searched for existing GitHub issues
[x] I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
[ ] I've read the Code of Conduct - HTTP ERROR 406
[x] This issue is not security related and can safely be disclosed publicly on GitHub
Environment
Unity Editor Version: 2020.3.4f1
Unity SDK Version: 11
Installation Platform & Verison: [iOS] version 14.5+
Installed Appsflyer, Applovin MAX ( without facebook adapter )
XCODE 12.5 (12E262)
MacOS big sur ver.11.4
Trying to get working ios build for iphone/ipad with working facebook sdk, mainly for install tracking.
Build is successfully built and installed. However this error occurs and build crashes/black screens.
2021-06-21 18:24:13.793878+0300 FishWave[908:235948] +[NSDate al_timeIntervalNow]: unrecognized selector sent to class 0x1fc9ea2b0
2021-06-21 18:24:13.795191+0300 FishWave[908:235948] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSDate al_timeIntervalNow]: unrecognized selector sent to class 0x1fc9ea2b0'
*** First throw call stack:
(0x19a4be754 0x1aef857a8 0x19a3c676c 0x19a4c12ac 0x19a4c35b0 0x106262ae4 0x1aef6e660 0x102ffe480 0x103011a70 0x10300f960 0x10300fa2c 0x10300286c 0x10300af70 0x19a0f2f60 0x19a411d00 0x19a3e0ae8 0x19b752930 0x102f2fd38 0x102f2fde0 0x19a0edcf8)
libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSDate al_timeIntervalNow]: unrecognized selector sent to class 0x1fc9ea2b0'
terminating with uncaught exception of type NSException
(lldb)
Steps to Reproduce
Build project from Unity.
Open in XCODE , sign profile.
Build directly to iphone 12 by usb cable.
Code Sample
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Facebook.Unity;
public class FacebookService : MonoBehaviour, IMonoService
{
void Awake()
{
if (!FB.IsInitialized)
{
// Initialize the Facebook SDK
FB.Init(InitCallback, OnHideUnity);
}
else
{
// Already initialized, signal an app activation App Event
FB.ActivateApp();
}
}
private void InitCallback()
{
if (FB.IsInitialized)
{
// Signal an app activation App Event
FB.ActivateApp();
// Continue with Facebook SDK
// ...
}
else
Debug.Log("Failed to Initialize the Facebook SDK");
}
private void OnHideUnity(bool isGameShown)
{
//Time.timeScale = !isGameShown ? 0 : 1;
}
}
Please update to the External Dependency Manager to minimum version 1.2.164.
Open the iOS Resolver Settings (Assets > External Dependency Manager > iOS Resolver > Settings) and make sure you uncheck Add use_frameworks! to Podfile and Always add the main target to Podfile as in the attached screenshot.
Alternatively, update the Podfile manually as in the Context section above then run pod install --repo-update to make sure the Podfile changes are applied to the project.
Note: The Facebook SDK Unity Plugin adds use_frameworks! to the Podfile here so this line may need to be removed to avoid manually removing it every time.
I've added firebase app invites in my swift based iOS application. I have followed this complete instructions however, it has been crashing on invite.open() line while showing invite dialog.
The error is:
Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '*** setObjectForKey: object cannot be nil (key: GINInviteResources.bundle)'.
Did anyone managed to make it work?
After digging for 2 days what I found was FirebaseInvites.framework seems to have resource dependancies for GINInviteResources.bundle and GPPACLPickerResources.bundle.
Somehow, pod was not including it in to my project.(Still could not find why) but adding this two dependencies manually in to my target worked like a charm.
PS: Adding this answer to save someone's effort.
Right, I too faced this.
Download framework SDK zip from https://firebase.google.com/docs/ios/setup and get those bundles from \Invites\Resources\..
My Swift App uses the FXForms Cocoa Pod
It's an OBJ-C framework I'm using with my Swift app. Everything compiled fine before last Xcode update. Now I am getting this error:
"
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MyApp.MyFile extraFields]: unrecognized selector sent to instance
"
at the line below of FxForms.m file;
[fields addObjectsFromArray:[form extraFields] ?: #[]];
Any ideas?
Thanks for any help,
It turns out that extraFields method should be implemented. on view controllers that uses FxForms
Edit: This is not a duplicate of any other question on SO - which I already researched. I understand what an "unrecognized selector sent to class" error message means and how to troubleshoot them. This error is unique to Amazon Web Services SDK for iOS and its frameworks, nothing that I wrote or could troubleshoot as suggested by #Hot Licks.
I have been working on this issue for some time. In the process of debugging and authentication starting to work, Cognito Sync began to fail.
My code:
AWSCognito *syncClient = [AWSCognito defaultCognito];
fails with the error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[AWSEndpoint endpointWithRegion:service:]: unrecognized selector sent to class
The headers used:
#import <AWSiOSSDKv2/AWSCore.h>
#import <AWSCognitoSync/Cognito.h>
I am using SDK 2.0.17.
This code worked while users were unauthenticated. Once authentication started working, I get this error. I also upgraded from SDK 2.0.8 to 2.0.17 during the authentication debug process. Any ideas out there?
It seems like you have upgraded AWSiOSSDKv2.framework to 2.0.17, but AWSCognitoSync.framework is still 2.0.8. Please make sure to use the same version for both frameworks.
I am trying to convert my ios app(XYZ) into framework(XYZ.framework) so that it can be included in other ios applications. Went through below links and able to develop a framework.
LINK1:LINK1
LINK2:LINK2
But when i include my framework in other apps and try to compile for first time , xcode is throwing error "Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'executeFetchRequest:error: A fetch request must have an entity.". I followed below steps and get rid of this error.
STEP1: Added XYZ.framework in other app and compiled for first time, but xcode gave error mentioned above.
STEP2: Added XYZ.momd(by drag and drop) along with XYZ.framework in other application. Compiled it and Xcode didn't throw any error.
STEP3: Removed XYZ.momd from other application and compiled it. Xcode didn't throw any error!!!!
Should i give XYZ.momd along with XYZ.framework while distributing XYZ.framework, so that XYZ.momd can be included in other applications? I googled, but didn't get how to add momd inside framework and include it in other applications.