iOS -Cannot synthesize weak prop

2019-09-30  本文已影响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

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

上一篇 下一篇

猜你喜欢

热点阅读