Closed bleedsy closed 6 years ago
Hello @bleedsy
I didn't manage to recreate the issue exactly, but I notice when I include recognizers that are not built with enabled-features.cmake, I got a similar error (which is expected).
I included features from your post, simply run ./create-custom-build.sh script, select dynamic build and include framework and bundle in the project. On purpose I include USDLCombinedRecognizer (instead USDL) and got this error:
But once I put correct USDLRecognizer, I manage to build the app without the issues.
Can you please explain in a bit more details how did you build framework? Did you use the script from a terminal or you build it from the project?
You also have an interesting warning in the screenshot. Are you linking simulator build in device app?
Regards
Hi @culoi
Building for device and simulator works but archiving does not. Did you try to build for the generic device or archive?
The steps I took to create the dynamic library were:
./create-custom-build.sh
I used the all
library. This is the output when I ran the file
command:
Release/all/MicroBlink.framework/MicroBlink: Mach-O universal binary with 2 architectures: [x86_64: Mach-O 64-bit dynamically linked shared library x86_64] [arm64]
Release/all/MicroBlink.framework/MicroBlink (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
Release/all/MicroBlink.framework/MicroBlink (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
armv7
is missing. If I create a static library, armv7 is there. Can you share your output?
Thanks
Looks like the output is the same:
MicroBlink: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64] [arm64]
MicroBlink (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
MicroBlink (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
Please try this method to add arm7 in dynamic build: add this line to CMakeLists.txt: set( CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "8.0" )
under this text in 15th line: set( CMAKE_XCODE_ATTRIBUTE_BITCODE_GENERATION_MODE[variant=Release] "bitcode" ) and build again.
It was building architectures with default installed XCode and SDK, and in this case was Xcode 9 with base SDK iOS 11. You will get all architectures without armv7s because Apple removed it completely.
With above fix you should get output like this:
MicroBlink: Mach-O universal binary with 4 architectures: [i386:Mach-O dynamically linked shared library i386] [arm64]
MicroBlink (for architecture i386): Mach-O dynamically linked shared library i386
MicroBlink (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
MicroBlink (for architecture armv7): Mach-O dynamically linked shared library arm_v7
MicroBlink (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
We will fix this in next release.
Regards
Ah got it. Makes sense. This fixed it. Thank you for your help!
I created a custom dynamic framework from v2.16.1 per the instructions with the following features:
I am able to successfully build the app but run into linker errors when trying to archive.