iOS build is including Mac OSX .bundle files into Xcode Project

When building an iOS build, Unity is including Mac OSX .bundle files into the Xcode project. These bundle files are sitting in the root of the Plugins folder, not in the Plugins/iOS/ folder. Is there a reason why files from the root Plugins/ folder are being included in iOS-only builds?

When I try to archive the IPA from Xcode, it then throws errors saying that the .bundles aren’t codesigned. I’m able to delete the .bundle files from the Xcode project to get the IPA, but would like to avoid having to do this every time I make an iOS build.

Here’s my project folder structure:

Assets/
Plugins/
iOS/
WebView.bundle

Thanks for any help.

I think I found it. Not sure how I missed this documentation before, but Unity 5 changed the way Plugins are handled. Looks like you manually edit each plugin to tell it which platform it’s supposed to be used for.

This bug doesn’t appear to be limited to the Assets/Plugins folder.

We are using the Audiokinetic Wwise engine which our copy includes an AkSoundEngine.bundle in Assets/Plugins. It is actually only referenced by .cs files in Assets/Wwise/Deployment/API/Generated/Mac. As a test to keep this x86/x86_64 bundle out of our iOS build (as it is around 7.3MB) I moved it to Assets/Wwise/Deployment/API/Generated/Mac and it still ends up in our iOS build. Instead of being in Frameworks/Plugins like it was prior to this move it is in Frameworks/Wwise/Deployment/API/Generated/Mac.

Our version.txt for Wwise has the following:

Wwise Unity Integration Version Info:

Stable Version (SVN): 1648

Based on Wwise SDK: 2014.1.3 Build 5219

Unity Integration Version: 5

Installed Platforms: Windows Mac iOS Android