I'm developing Today Widget Extension for an app with deployment target earlier than iOS 8.0. In apple Extension Programming Guide they recommended to use embedded framework to share code between app extension and its containing app.
You can create an embedded framework to share code between your app extension and its containing app.
In the end of this guide they explain how to deploy a containing app to older versions of iOS 8.0 by using dlopen
command.
After I have added the framework target the project doesn't build successfully. It's always failed with the following errors :
- Lipo Error : /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: PATH_TO_BUILD/armv7/APP_NAME (No such file or directory)
- Apple Mach-O Linker Error : ld: embedded dylibs/frameworks are only supported on iOS 8.0 and later (@rpath/FRAMEWORK_NAME) for architecture armv7
(Error 2 repeats with arm64 architecture)
What I'm doing wrong ?
Is there another way to share code between app extension and its containing app ?
If someone know about the dlopen
solution, please input with a "How to" tutorial (examples are welcome).