I am trying to create a wrapper (bundle) for an OS X framework. In Unity, I'm getting the following error:
Couldn't open Assets/Affdex/Plugins/affdex-native.bundle/Contents/MacOS/affdex-native, error: dlopen(Assets/Affdex/Plugins/affdex-native.bundle/Contents/MacOS/affdex-native, 2): Library not loaded: affdex-native.framework/Versions/2.1.0./affdex-native
Referenced from: /Users/foresthandford/git/unity/UnityPlugin/Assets/Affdex/Plugins/affdex-native.bundle/Contents/MacOS/affdex-native
Reason: image not found
From my searches on this forum, "image not found" often means there is either no binary or an inappropriate binary. The bundle has a universal binary:
ForestsMacbook:Plugins foresthandford$ file affdex-native.bundle/Contents/MacOS/affdex-native
affdex-native.bundle/Contents/MacOS/affdex-native: Mach-O universal binary with 2 architectures
affdex-native.bundle/Contents/MacOS/affdex-native (for architecture x86_64): Mach-O 64-bit bundle x86_64
affdex-native.bundle/Contents/MacOS/affdex-native (for architecture i386): Mach-O bundle i386
The versioning from the framework seems, however, to be incorrect:
ForestsMacbook:Plugins foresthandford$ otool -L affdex-native.bundle/Contents/MacOS/affdex-native
affdex-native.bundle/Contents/MacOS/affdex-native:
affdex-native.framework/Versions/2.1.0./affdex-native (compatibility version 0.0.0, current version 0.0.0)
Currently the framework appears as part of the binary within the bundle. I've heard a suggestion that the framework may need to exist as files separate from the binary (ie: not just compiled into the binary).
1. Is framework inclusion really the issue?
2. If it is, how do I fix it?
3. Does someone have an example XCode project I could look at (I found several OS X plugins in GitHub but none included the .xcodeproj file)?
The closest related question I could find was http://answers.unity3d.com/questions/49150/building-osx-bundles-for-unity-extensions-with-ext.html#comment-1122489 , but it doesn't show how the framework was included. This is my first foray into XCode and I might be missing something obvious.
↧