Dylib files not added to Xcode project

I have added a .dylib native dynamic library in Assets/Plugins/iOS/arm64/.
I checked these 2 toggles on that file:

  • Include platforms iOS
  • Add to Embedded Binaries

In the player settings I enabled Allow unsafe code.

When I build the project, the output folder contains my .dylib file in the Libraries/Plugins/iOS/arm64/ folder.

In order to be able to successfully build the project in Xcode, I need to add this .dylib file to the Frameworks folder and add it to the Copy Files build phase.
The problem is that I need to do this every time I make a build from Unity.

How can I solve this so that I don’t need to update the Xcode project every time I make a build?

Thanks,
Joep

Hi, this looks like bug Unity Issue Tracker - [iOS][AppleTV] .dylib plugin is not visible in the Xcode but is added in the project folder fixed in latest Unity 6

As workaround you can use build post process and PBXProject API to modify generated Xcode project anding missing dylib

1 Like