I want to use libcaldav with following dependency. I have built libcaldav.0.dylib while other dependencies were installed with port or brew on MAC
otool -L ~/lib/libcaldav.0.dylib
~/lib/libcaldav.0.dylib:
~/lib/libcaldav.0.dylib (compatibility version 1.0.0, current version 1.6.0)
/opt/local/lib/libcurl.4.dylib (compatibility version 8.0.0, current version 8.0.0)
/opt/local/lib/libgnutls.28.dylib (compatibility version 70.0.0, current version 70.1.0)
/opt/local/lib/libgthread-2.0.0.dylib (compatibility version 4201.0.0, current version 4201.0.0)
/opt/local/lib/libglib-2.0.0.dylib (compatibility version 4201.0.0, current version 4201.0.0)
/opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.2.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
I tried adding those files to Xcode ios app using
- Link binary with libraries -> Xcode build phase
- Other linker flags -> Build Settings
- Setting appropriate search paths
However, I get following warning and error
ld: building for iOS Simulator, but linking against dylib built for MacOSX file '/lib/libcaldav.0.dylib' for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Enviroment
- Xcode = 6.1
- supported Platform = iOS
- valid architecture = arm64, armv7 and armv7s
libcaldav source
https://github.com/fd00/yacp/tree/master/libcaldav
Please help me as I have been struggling. Please give me pointers what needs to be done.