Skip to content

[iOS] EntryPointNotFoundException in SendToFlutter in Unity Editor play mode. #51

@timbotimbo

Description

@timbotimbo

Is there an existing issue for this?

  • I have searched the existing issues

Unity version

Unity 2022.3 LTS & 6000.0 LTS & 6000.1

Common issues

  • I have checked the common issues

Flutter version

3.32.6

Description

If you launch play mode with the build target set to iOS, calling SendToFlutter.send will trigger the following error.

EntryPointNotFoundException: FlutterEmbedUnityIos_sendToFlutter assembly:<unknown assembly> type:<unknown type> member:(null)
SendToFlutter.Send (System.String data) (at Assets/FlutterEmbed/SendToFlutter/SendToFlutter.cs:21)
Image

Fix

Simply checking if we are in the Unity Editor fixes this:

-#if UNITY_IOS
+#if UNITY_IOS && !UNITY_EDITOR
            // Call an obj-C function name
            FlutterEmbedUnityIos_sendToFlutter(data);
#endif

Minimum reproducible example (MRE)

Just run the example Unity project in the Unity Editor, with build target iOS.
The AR check will immediately send a message to Flutter, which triggers this error,

Happens on both 2022.3.62 and 6000.1.11

What platforms are you seeing the problem on?

iOS

Devices

No response

Anything else?

No response

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions