Skip to content

Conversation

@timbotimbo
Copy link
Collaborator

Related issue

Fixes #1

Description

This automates the 2 manual steps that need to be done after each ios export.

  • Add the linker flags -Wl,-U,_FlutterEmbedUnityIos_sendToFlutter
  • Set the Data folder target membership to UnityFramework

I tested a fresh export using Unity 2022.3.21f1 and was able to run the example project on an iPad using Xcode 15.
Besides generic Xcode stuff like setting the signing id, the only manual step was to to add Unity-iPhone to Runner.

I wasn't able to append an existing ios export, as the export dialog always cleared the destination folder.
Therefore I haven't tested if this runs into any issues on an already edited Xcode project.

@CristovoXDGM
Copy link

@timbotimbo Merge this, this is a so requested feature from people hahaha, also, i would like to know if you guys faced any issue with memory leak with unity on ios ?, i`m currently facing this problem and it is cause the app to crash

@CristovoXDGM
Copy link

@learntoflutter can you help with that ?

@jamesncl
Copy link
Collaborator

This looks great @timbotimbo thanks for your contribution. I'm on holiday at the moment, so since this is non urgent I'll look to merge this when I get home. I'll need to take some time to understand how I need to update the README and how this impacts existing projects (I'll test this one one of my own projects)

@jamesncl
Copy link
Collaborator

@CristovoXDGM memory leaks are a common problem in Unity, I would suggest troubleshooting your Unity project first independently of Flutter using this guide. If after that you think there is a memory leak issue with flutter_embed_unity please raise a separate issue with a minimal reproducible example and I will investigate

@CristovoXDGM
Copy link

the current project that i`m using is the example ones from yours, i just added a 2d assets and remove it and send backa. message to flutter, this should not be a problem for AR @jamesncl

@CristovoXDGM
Copy link

i also use the pauseUnity method when i`m not using unity

@jamesncl jamesncl merged commit c442c33 into learntoflutter:main Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Xcode project needs modifying after every Unity export

3 participants