I have made an iOS plug-in that uses Accelerate framework.
When I build and run, Unity launches Xcode which fails with “Missing symbol…” errors.
Of course this can be fixed by manually adding the Accelerate framework to the target each time from within Xcode. But this makes for a hopeless build cycle.
Someone has posted exactly the same question here but he doesn’t come into detail of how he solves it.
He does however mention PostprocessBuildPlayer
I have found a PostprocessBuildPlayer script by Akisute that claims to do exactly what I want.
I created a file: Assets/Editor/PostprocessBuildPlayer into which I pasted Akisute’s script, modifying the necessary line to include Accelerate framework:
:
:
#
# Add System frameworks required to build
#
projpath = buildpath + "/Unity-iPhone.xcodeproj"
proj = Xcodeproj::Project.new(projpath)
#add_system_frameworks_to_project(proj, ["StoreKit", "Security", "CoreText", "MessageUI"], :required)
#add_system_frameworks_to_project(proj, ["Twitter", "Social"], :optional)
add_system_frameworks_to_project(proj, ["Accelerate"], :required)
proj.save_as(projpath)
Unfortunately it doesn’t work. Xcode appears to fail in exactly the same manner as it did before I tried the script.
Can anyone help me towards getting this working? I’m quite surprised I can’t find any literature on the inter-webs; surely this must be quite a common task…
EDIT: applying Google translate to the author’s website, I notice a note saying I should first run
sudo gem install xcodeproj
from the terminal. However, if I do this it hangs the terminal session.
EDIT: After installing / updating a ton of stuff; homebrew, Xcode commandline tools, Ruby (and God knows what else), I successfully installed that above program. still no luck. I look in the editor.log. the ruby script prints some stuff to the console, e.g.:
puts "PostprocessBuildPlayer running on build directory: " + buildpath