IOS异步图片加载SDWebImage的使用时遇到file not found和Symbol Not Found: _objc_storeStrong

在尝试使用SDWebImage进行iOS异步图片加载时,遇到了'UIImageView+WebCache.h file not found'和'Symbol Not Found: _objc_storeStrong'的错误。解决方法是正确导入头文件#import<SDWebImage/UIImageView+WebCache.h>,以及在非ARC项目中设置Other Linker Flags添加-fobjc-arc。

今天用到IOS异步图片加载,找到网上大家说的SDWebImage,参考以前大家写的一些博客,搞了半天都没有搞定,哎,其实github上的readme已经写得很清楚了,只是自己没有看仔细。

说下我遇到的问题吧:首先我下载了SDWebImage.framework,然后拖到了工程中,然后:

#import "UIImageView+WebCache.h"

死活import不进啊,提示"UIImageView+WebCache.h file not found"

然后在网上找各种方法search header path什么的都不管用,就是不行,结果仔细一看,最新版本的SDWebImage需要import的不是上面那一句了,需要:

#import<SDWebImage/UIImageView+WebCache.h>

然后build,一切OK。

另外一个问题就是:

Symbol Not Found: _objc_storeStrong

是因为我在no arc项目中引用了arc 的SDWebImage,更改一下: Build Settings->Other Linker Flags 添加 -fobjc-arc.

其它有关SDWebImage使用和下载请到:SDWebImage   具体用法看最新的readMe.


xcode手动导入包报错:Undefined symbol: _APMAnalyticsConfiguration Undefined symbol: _APMAppMeasurementOriginFirebase Undefined symbol: _APMConsentSettings3P Undefined symbol: _APMFormattedEventName Undefined symbol: _APMFormattedUserPropertyName Undefined symbol: _APMIsAnalyticsCollectionDeactivated Undefined symbol: _APMIsAnalyticsCollectionEnabled Undefined symbol: _APMIsValidTransactionDeviceVerification Undefined symbol: _APMMonitorLogTagOptionKey Undefined symbol: _APMUserDataFieldEmailAddress Undefined symbol: _APMUserDataFieldHashedEmailAddress Undefined symbol: _APMUserDataFieldHashedPhoneNumber Undefined symbol: _APMUserDataFieldPhoneNumber Undefined symbol: _OBJC_CLASS_$_APMAdExposureReporter Undefined symbol: _OBJC_CLASS_$_APMAnalytics Undefined symbol: _OBJC_CLASS_$_APMConditionalUserProperty Undefined symbol: _OBJC_CLASS_$_APMConditionalUserPropertyController Undefined symbol: _OBJC_CLASS_$_APMEvent Undefined symbol: _OBJC_CLASS_$_APMIdentifiers Undefined symbol: _OBJC_CLASS_$_APMIdentity Undefined symbol: _OBJC_CLASS_$_APMMeasurement Undefined symbol: _OBJC_CLASS_$_APMScreenViewReporter Undefined symbol: _OBJC_CLASS_$_APMUserAttribute Undefined symbol: _OBJC_CLASS_$_APMValue Undefined symbol: _OBJC_CLASS_$_MTGAdChoicesView Undefined symbol: _OBJC_CLASS_$_MTGBannerAdView Undefined symbol: _OBJC_CLASS_$_MTGBidNativeAdManager Undefined symbol: _OBJC_CLASS_$_MTGBidRewardAdManager Undefined symbol: _OBJC_CLASS_$_MTGBiddingSDK Undefined symbol: _OBJC_CLASS_$_MTGMediaView Undefined symbol: _OBJC_CLASS_$_MTGNewInterstitialAdManager Undefined symbol: _OBJC_CLASS_$_MTGNewInterstitialBidAdManager Undefined symbol: _OBJC_CLASS_$_MTGRewardAdManager Undefined symbol: _OBJC_CLASS_$_MTGSDK Undefined symbol: _OBJC_CLASS_$_MTGSplashAD Undefined symbol: _OBJC_METACLASS_$_APMAdExposureReporter Undefined symbol: _OBJC_METACLASS_$_APMConditionalUserProperty Undefined symbol: _OBJC_METACLASS_$_APMConditionalUserPropertyController Undefined symbol: _OBJC_METACLASS_$_APMEvent Undefined symbol: _OBJC_METACLASS_$_APMIdentifiers Undefined symbol: _OBJC_METACLASS_$_APMMeasurement Undefined symbol: _OBJC_METACLASS_$_APMScreenViewReporter Undefined symbol: _OBJC_METACLASS_$_APMUserAttribute Undefined symbol: _OBJC_METACLASS_$_APMValue
最新发布
07-27
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值