更新了Xcode15之后立肘,出現(xiàn)了很多bug坑填,懷疑人生啊
一澜搅、WebKit錯(cuò)誤
在相應(yīng)的podspec文件中添加
s.platform = :ios, '13.0'
或者
在相應(yīng)SDK Build Phases -> Compile Sources 刪除 -DOS_OBJECT_USE_OBJC=0
二、Assertion failed
Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits"), function operator(), file Layout.cpp, line 5758.
此錯(cuò)誤信息看的一臉懵逼声离,找了好多答案告訴你OTHER_LDFLAGS中添加 “-ld64” 但是在自己項(xiàng)目中添加是沒有任何用的章办,最后發(fā)現(xiàn)在對應(yīng)報(bào)錯(cuò)的SDK中添加可以解決這個(gè)問題 如下
#podfile里添加
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
if target.name == "alipay_kit_ios"
config.build_settings['OTHER_LDFLAGS'] = "-ld64 #{config.build_settings['OTHER_LDFLAGS']}"
end
end
end
end
三锉走、duplicate symbols
華為OBS.Framework在升級前運(yùn)行正常,升級后提示富豪重復(fù)藕届。自己與自己重復(fù)挪蹭,無語了很久
duplicate symbol '_OBJC_IVAR_$_OBSInternalUploadFileRequest._websiteRedirectLocation' in:
/Users/**/**/OBS.framework/OBS[arm64][65](OBSUploadFileModel.o)
/Users/**/**/OBS.framework/OBS[arm64][65](OBSUploadFileModel.o)
duplicate symbol '_OBJC_IVAR_$_OBSCORSResponse._accessControlMaxAge' in:
/Users/**/**/OBS.framework/OBS[arm64][96](OBSServiceBaseModel.o)
/Users/**/**/OBS.framework/OBS[arm64][96](OBSServiceBaseModel.o)
ld: 1639 duplicate symbols
clang: error: linker command failed with exit code 1 (use -v to see invocation)
一次突然的靈感,把Other Linker Flags 中關(guān)于OBS.framework的信息刪除了休偶,再次運(yùn)行梁厉,正常!Lざ怠词顾!
四、iconv2.4.0"not found
ld: library not found for -liconv.2.4.0
clang: error: linker command failed with exit code 1 (use -v to see invocation)
網(wǎng)上很多答案告訴你OTHER_LDFLAGS中添加 “-ld64”
這個(gè)方法之前對我有用碱妆,后不知什么原因突然失效了肉盹。檢查發(fā)現(xiàn)Pods-*.debug 與release 中有 "liconv.2.4.0" -l
手動(dòng)刪除掉運(yùn)行正常。
次方法也只是暫時(shí)解決疹尾,再下次pod install 的時(shí)候上忍,還會重置,需要重新刪除操作纳本。目前也沒發(fā)現(xiàn)有好的方法窍蓝,若有好的建議請告知,相互學(xué)習(xí)繁成!