card.io-iOS-SDK
card.io-iOS-SDK copied to clipboard
Unable to build with existing OpenCV framework
I'm building an app that already uses the iOS OpenCV 2 framework to perform some image processing. When I add the Card.io iOS SDK I get a load of build errors that look like clashes with its own OpenCV implementation. If I remove the original OpenCV framework the app builds fine but none of the image processing code works.
Any thoughts on how I can get this building and running?
@dgoldman-ebay spent a bunch of time making this work correctly automatically with some linker tricks. I wonder whether the recent bitcode change from @bluk broke this. Speculation: Since we no longer get to strip out known unused symbols, we get not just stupidly large downloads but symbols which @dgoldman-ebay's targeted fix list does not include.
@AdamSwinden if you try one release back, does it work?
Oh, and if the problem is a lack of stripping, we should be able to use the whitelist put together by Dave to manually strip things ourselves.
Grumble grumble bitcode grumble
Looks like you were right @josharian. Using 5.1.1 fixes the issue.
Apparently, one of the magic linker flags that enables the limited exported symbols in libCardIO.a
was the GENERATE_MASTER_OBJECT_FILE
flag. It seems to have some trouble with Bitcode if it's enabled. However, for the latest release, the libCardIO.a is split from the other OpenCV libraries to help with the size of the individual files. Does that help?