Unity-Technologies / uaal-example

Other
736 stars 234 forks source link

No visible @interface for 'UnityFramework' declares the selector 'unloadApplication' #30

Open Danik711 opened 3 years ago

Danik711 commented 3 years ago

I followed the instructions step by step, but when I run the app I get the error above at the header.

The error happens at MainViewController.mm. May you please tell me what I am doing wrong here? Did I mess up with bundle identifiers or something else?

Thank you!

karlperemil commented 3 years ago

Same issue here

bk138 commented 2 years ago

This seems to be caused by the Unity version in use. I was using Unity 2019.3.0b4 as initially required by the project and found that the generated UnityFramework.h does not quite match what the native app's app controller references. In particular, unloadApplication has a different signature and quitApplication is simply not provided in UnityFramework.h.

A simple hack around this is to change https://github.com/Unity-Technologies/uaal-example/blob/master/NativeiOSApp/NativeiOSApp/MainViewController.mm#L247 to [UnityFrameworkLoad() unloadApplication:TRUE]; and comment out https://github.com/Unity-Technologies/uaal-example/blob/master/NativeiOSApp/NativeiOSApp/MainViewController.mm#L256