美文网首页
iOS -Cannot synthesize weak prop

iOS -Cannot synthesize weak prop

作者: 阿栋先森 | 来源:发表于2019-09-30 11:40 被阅读0次

遇到此问题 大概率是arc 问题

*方法1:项目配置文件->BuildPhrases->ComplieSources,找到出现问题的资源库文件(比如weak修饰符所在的文件),双击Complie Files中的该文件,在空白行中写入-fobjc-arc

*方法2:项目->TARGETS->IOS->BuildSettings->AppleLLVM7,1-Language-ObjectiveC->WeakReferencesinManual Retain Release改为YES

如果之上方法还不行就更改podfile

##################加入代码##################

    post_install do |installer|

        installer.pods_project.targets.each do |target|

            target.build_configurations.each do |config|

                config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] ='8.0'

            end

        end

    end

##################加入代码##################

相关文章

网友评论

      本文标题:iOS -Cannot synthesize weak prop

      本文链接:https://www.haomeiwen.com/subject/wwmcpctx.html