OC

Knowledge OS
主帖 6 条回复

iOS 库嵌套的调用问题

xukiki xukiki · 2014年12月22日 · 阅读 5 · 更新于 2017年02月27日 · 无人欣赏。

我把 SDWebImage.framework 加入到我创建的 Cocoa Touch Framework 工程 XXCommonFramework里面,我在调用的应用工程里面加入XXCommonFramework,然后访问 SDWebImage.framework 的方法,结果报错,麻烦有知道怎么解决的指点下,万分感谢。

报错如下: ld: warning: embedded dylibs/frameworks only run on iOS 8 or later

Undefined symbols for architecture armv7:

"_kCGImagePropertyGIFDictionary", referenced from:

  +[UIImage(GIF) sd_animatedGIFWithData:] in SDWebImage(UIImage+GIF.o)

"_CGImageSourceCreateWithData", referenced from:

  +[UIImage(GIF) sd_animatedGIFWithData:] in SDWebImage(UIImage+GIF.o)

"_CGImageSourceCreateIncremental", referenced from:

  -[SDWebImageDownloaderOperation connection:didReceiveData:] in 

SDWebImage(SDWebImageDownloaderOperation.o)

"_kCGImagePropertyGIFDelayTime", referenced from:

  +[UIImage(GIF) sd_animatedGIFWithData:] in SDWebImage(UIImage+GIF.o)

"_CGImageSourceGetCount", referenced from:

  +[UIImage(GIF) sd_animatedGIFWithData:] in SDWebImage(UIImage+GIF.o)

"_CGImageSourceUpdateData", referenced from:

  -[SDWebImageDownloaderOperation connection:didReceiveData:] in 

SDWebImage(SDWebImageDownloaderOperation.o)

"_CGImageSourceCreateImageAtIndex", referenced from:

  -[SDWebImageDownloaderOperation connection:didReceiveData:] in SDWebImage(SDWebImageDownloaderOperation.o)

  +[UIImage(GIF) sd_animatedGIFWithData:] in SDWebImage(UIImage+GIF.o)

"_CGImageSourceCopyPropertiesAtIndex", referenced from:

  -[SDWebImageDownloaderOperation connection:didReceiveData:] in SDWebImage(SDWebImageDownloaderOperation.o)

  +[UIImage(GIF) sd_animatedGIFWithData:] in SDWebImage(UIImage+GIF.o)

"_kCGImagePropertyPixelWidth", referenced from:

  -[SDWebImageDownloaderOperation connection:didReceiveData:] in SDWebImage(SDWebImageDownloaderOperation.o)

"_kCGImagePropertyPixelHeight", referenced from:

  -[SDWebImageDownloaderOperation connection:didReceiveData:] in SDWebImage(SDWebImageDownloaderOperation.o)

回复

6 条
#1
qianshijia
2014年12月23日

你需要把SDWebImage.framework添加到你的应用工程里面去

#2
xukiki
2014年12月23日

我就是想把常用的第三方库都放到我的库中,使用时只要引用我自己的那个库,而无需每次都把第三方库都一个个重新加一次。 我试过了静态库是可以的。

#3
尼克徐
2014年12月23日

把 SDWebImage.framework用Cocoapod管理起来吧。它允许不同的库使用不同的配置。

#4
xukiki
2014年12月23日

3楼 @尼克徐 原先的问题我已经通过导入SDWebImage的源码方式搞定了。

感谢你,提供了另一种管理第三方库的方案。

#5
尘恍若梦
2017年02月27日

@xukiki 现在遇到差不多的问题,也是库嵌套库没法导源码,请问怎么解决。。。

Undefined symbols for architecture arm64: "OBJCCLASS$IFlySpeechUtility", referenced from: objc-class-ref in EcoRobotSDK(XXXX.o)

而且我的framework编译ok,再加一层外壳就编译不过。

登录 或者 注册