Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

Ensure the iOS framework is found by my iOS static library code

$
0
0
I'm building an iOS static library (i.e. a .a file) which I include in the Assets/Plugins/iOS folder of my Unity project so that the Mono C# scripts attached to my Unity scene objects can call functions in the iOS static library. The static library makes calls into a Swift framework. It is not a standard Apple framework, but one I wrote. This is fairly straightforward, I just need to `@import` the framework in the Objective-C .m file where the framework is used. But to include the framework in the Xcode project built by Unity for iOS I need to add the framework file to that Assets/Plugins/iOS folder of my Unity project. This presents a problem. In the Xcode project that Unity writes as part of the build process it puts my static library, the .a file, into `Libraries/Plugins/iOS` and it puts the framework file into `Frameworks/Plugins/iOS` and it nests them that way in the Xcode project structure itself: ![Screenshot of xcode][1] When I run the project it crashes when my static library code tries to access the framework: >dyld: Library not loaded: >@rpath/IOSPluginTestFramework.framework/IOSPluginTestFramework >Referenced from: /var/containers/Bundle/Application/C62F676F-CC52-414F-B996-D46C82ECC29A/ProductName.app/ProductName > Reason: image not found >(lldb) How do I get Unity to ensure the framework is found by my static library code? [1]: http://i.stack.imgur.com/bqqpFm.png

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>