iOS 库嵌套的调用问题
xukiki我把 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)
你需要把SDWebImage.framework添加到你的应用工程里面去
我就是想把常用的第三方库都放到我的库中,使用时只要引用我自己的那个库,而无需每次都把第三方库都一个个重新加一次。 我试过了静态库是可以的。
把 SDWebImage.framework用Cocoapod管理起来吧。它允许不同的库使用不同的配置。