集成支付宝出现warning:AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework

警告信息

warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDIDAES.o) unable to open object file: No such file or directory
warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDIDBaseUtils.o) unable to open object file: No such file or directory
warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(AidRequester.o) unable to open object file: No such file or directory
warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(AidManager.o) unable to open object file: No such file or directory
warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDIDIntUtils.o) unable to open object file: No such file or directory
warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDIDStringUtils.o) unable to open object file: No such file or directory
warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDIDTypeConvert.o) unable to open object file: No such file or directory
warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDIDMain.o) unable to open object file: No such file or directory
warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDIDOpenUDID.o) unable to open object file: No such file or directory
warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDIDHelper.o) unable to open object file: No such file or directory
warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(AidStorage.o) unable to open object file: No such file or directory
warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDevice.o) unable to open object file: No such file or directory
warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDIDKeychainItemWrapper.o) unable to open object file: No such file or directory
warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDIDPersistentConf.o) unable to open object file: No such file or directory
warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDIDPersistentFile.o) unable to open object file: No such file or directory
warning: (x86_64) /Users/shanjia.gxd/work_space/tmp/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDIDGTMBase64.o) unable to open object file: No such file or directory

解决办法

  1. Go to Build Settings -> Build Options -> Debug Information Format

  2. Change the Debug setting from “DWARF with dSYM File” to “DWARF”

  3. Leave the Release setting at “DWARF with dSYM File”

AlipaySDK.framework 是先 build 的静态 lib ,然后转成的 framework ,但是在 build 静态 lib 时 CLANG_ENABLE_MODULES 没有被设置成 disabled 。

参考原文:http://www.cocoachina.com/bbs/3g/read.php?tid=332174

===================

2017.8.5更新

现在打包的时候又出现这样的警告:

warning: (armv7) /Users/tommy/Desktop/Project/AliPay/SourceTree/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDevice.o) unable to open object file: No such file or directory

warning: (armv64) /Users/tommy/Desktop/Project/AliPay/SourceTree/ios-msdk-git/AlipaySDK4Standard/AlipaySDK/Library/UTDID.framework/UTDID(UTDevice.o) unable to open object file: No such file or directory

解决办法: Change the Release setting from “DWARF with dSYM File” to “DWARF”

2017.8.24更新

使用2017.8.5更新里的方案是有些问题的,Debug Information Format的release 模式改为DWARF后,在打包的时候不会生成.dSYM文件,这就造成了你无法追踪定位线上BUG

所以目前只能先忍受这些警告了

参考原文:https://stackoverflow.com/questions/35159244/xcode-there-are-no-dsyms-available-for-download

2018.10.8更新

今天更新支付宝SDK时,看了下SDK带的Demo工程里设置情况,

Build Settings -> Build Options -> Debug Information Format

Debug 模式下设置成DWARF

Release 模式下设置成 DWARF with dSYM File

可解决上面遇到的警告问题