- Home /
iOS plugin using .a is ignored when compiling Xcode project generated by Unity?
So, I'm learning all about writing plugins for Unity using various tutorials online and the Live Training video on YouTube. I've successfully had my very simple plugin work by placing the .mm and .h files directly into the Assets/plugins/iOS directory. So, I thought I'd go ahead and try something only slightly more complicated and reworked my plugin into a .a file. The .a file is, again, sitting in the Assets/plugins/iOS directory, I build my Unity project, and the Xcode project is generated. I hook up my device and build the project, but I'm met with the following:
ld: warning: ignoring file /path/to/my/plugin/libUnityPlugin.a, file was built for archive which is not the architecture being linked (armv7)
So, I went ahead and compared the build settings of my plugin Xcode project with the build settings (in particular, the Architectures portion)
of the Xcode project that was generated by Unity. They're the same:
Unity's Xcode Project
Plugin's Xcode Project
I've tried fiddling with the Architecture settings of my plugin a few times and tried again, but I'm still getting similar compile errors. Any ideas on how to remedy? Thanks in advance for any help!
Answer by fagtr0n · Mar 06, 2016 at 11:32 AM
Hey dood. It's an architecture issue. You gotta compile the .a as a binary for the simulator, for the simulator. Or for arm for your device. Or universal, for both. Here's a tute:
https://www.raywenderlich.com/41377/creating-a-static-library-in-ios-tutorial
It might not solve your whole problem but it will probably help.
Good luck dog,
J
Your answer

Follow this Question
Related Questions
How do I remove plugin for iOS builds only 1 Answer
Low-level native plugin on iOS 1 Answer
iOS Launch Options 0 Answers
How to not compile un-used scripts ? 1 Answer
CVOpenGLESTextureCache texture from native plugin (iOS) 0 Answers