Search code examples
iosobjective-cxcodeunity-game-enginevungle-ads

NSInvalidArgumentException using Vungle when Unity app starts


I built a Unity project using Vungle ads and when I build the project for iOS and try to run I get a NSInvalidArgumentException in a Vungle Network Manager call. Does anybody know how to solve this?

This is the error:

Uncaught exception: NSInvalidArgumentException: -[VNGNetworkManager configOperationWithBackgroundInit:complete:]: unrecognized selector sent to instance 0x129ee6110

Solution

  • Turns out it was a bug with the Vungle lib.

    Adding GameController.framework to General -> Linked Frameworks and Libraries and -ObjC flag to Build Settings -> Linking -> Other linker flags fixed the problem.