y***@163.com
y***@163.com
  • 发布:2019-03-05 19:07
  • 更新:2019-07-29 22:51
  • 阅读:1628

【报Bug】ios离线打包个推时报错

分类:5+ SDK

使用的是最新版的sdk和xcode
已经按照Feature-IOS.xls的要求把需要的库,framwork加进了项目中,报以下错误:

Ld /Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Products/Debug-iphonesimulator/BlwitApp.app/BlwitApp normal x86_64 (in target: BlwitApp)
cd /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp
export IPHONEOS_DEPLOYMENT_TARGET=10.0
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk -L/Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Products/Debug-iphonesimulator -L/Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libs -L/Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp -L/Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp -F/Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Products/Debug-iphonesimulator -F/Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp -F/Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp -filelist /Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Intermediates.noindex/BlwitApp.build/Debug-iphonesimulator/BlwitApp.build/Objects-normal/x86_64/BlwitApp.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=10.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Intermediates.noindex/BlwitApp.build/Debug-iphonesimulator/BlwitApp.build/Objects-normal/x86_64/BlwitApp_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -ObjC -llibPGInvocation -llibStorage -llibUI -llibNavigator -llibNativeUI -llibNativeObj -lGeTuiPush -lGeTuiSdk -llibPush -lGtExtensionSdk -Xlinker -sectcreate -Xlinker TEXT -Xlinker entitlements -Xlinker /Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Intermediates.noindex/BlwitApp.build/Debug-iphonesimulator/BlwitApp.build/BlwitApp.app-Simulated.xcent -lsqlite3.0 -lz -framework GTSDK -framework Security -framework CoreBluetooth -framework CoreLocation -framework AddressBook -framework AssetsLibrary -framework AVFoundation -lsqlite3.0 -lz -lxml2 -lc++ -weak_framework UserNotifications -framework StoreKit -framework CoreText -framework ImageIO -framework QuickLook -framework UIKit -framework CoreGraphics -framework CoreFoundation -framework Foundation -framework CFNetwork -framework QuartzCore -framework storage -framework AudioToolbox -framework MediaPlayer -framework SystemConfiguration -framework MobileCoreServices -framework CoreTelephony -framework WebKit -framework JavaScriptCore -llibPush -lGeTuiPush -llibNativeObj -llibNativeUI -llibNavigator -llibStorage -llibPGInvocation -lcoreSupport -llibPDRCore -llibUI -Xlinker -dependency_info -Xlinker /Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Intermediates.noindex/BlwitApp.build/Debug-iphonesimulator/BlwitApp.build/Objects-normal/x86_64/BlwitApp_dependency_info.dat -o /Users/bluewit-mac/Library/Developer/Xcode/DerivedData/BlwitApp-fqxhyvcneqwakzhahfcfnvolhyiv/Build/Products/Debug-iphonesimulator/BlwitApp.app/BlwitApp

ld: library not found for -lGeTuiSdk
clang: error: linker command failed with exit code 1 (use -v to see invocation)

希望官方人员能解决一下问题,谢谢!

2019-03-05 19:07 负责人:无 分享
已邀请:
CLP

CLP

GeTuiSdk.a这个库你确定加进去了吗? ld: library not found for -lGeTuiSdk 这个提示的是没加进去

  • y***@163.com (作者)

    您好 我看了一下最新sdk里并没有您说的这个库,这是我添加的库和framwork:

    liblibPush.a

    libGeTuiPush.a

    ibz.dylib

    libsqlite3.0.dylib

    CoreBluetooth.framework

    AVFoundation.framework

    CoreTelephony.framework

    Security.framework

    SystemConfiguration.framework

    MobileCoreServices.framework

    JavaScriptCore.framework

    CoreLocation.framework

    GTSDK.framework

    然后刚刚试了一下如果不加

    -llibPush

    -lGeTuiPush

    -lGeTuiSdk

    -lGtExtensionSdk

    在other linker flags里,可以在模拟器上编译并运行,但是Archive的话编译会报错,请问一下这是什么原因呢?

    2019-03-06 11:14

  • y***@163.com (作者)

    这是Archive编译报的错误:

    ld: warning: ld: warning: ignoring file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libz.dylib, missing required architecture arm64 in file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libz.dylib (2 slices)ignoring file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libsqlite3.0.dylib, missing required architecture arm64 in file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libsqlite3.0.dylib (3 slices)


    ld: warning: arm64 function not 4-byte aligned: _ffi_call_SYSV from /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libs/liblibPGInvocation.a(sysv_arm64.o)

    ld: warning: arm64 function not 4-byte aligned: _ffi_closure_SYSV from /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libs/liblibPGInvocation.a(sysv_arm64.o)

    Undefined symbols for architecture arm64:

    "_gzopen", referenced from:

    +[GTXGzipTool compress:outFilePath:error:] in GTSDK(GTXGzipTool.o)

    "_gzwrite", referenced from:

    +[GTXGzipTool compress:outFilePath:error:] in GTSDK(GTXGzipTool.o)

    "_get_crc_table", referenced from:

    _unzOpenCurrentFile3ZBQ in libcoreSupport.a(unzip.o)

    _zipOpenNewFileInZip3 in libcoreSupport.a(zip.o)

    "_inflate", referenced from:

    +[WXOMTAHelper GUnzip:Out:] in libWeChatSDK.a(MTAHelper.o)

    +[GtSdkDataUtils toGZipDecompressData:] in GTSDK(GtSdkDataUtils.o)

    +[GtGbdDataUtils toGZipDecompressData:] in GTSDK(GtGbdDataUtils.o)

    _unzReadCurrentFileZBQ in libcoreSupport.a(unzip.o)

    "_deflate", referenced from:

    +[WXOMTAHelper GZip:Out:] in libWeChatSDK.a(MTAHelper.o)

    +[GtSdkDataUtils toGZipCompressData:] in GTSDK(GtSdkDataUtils.o)

    +[GtGbdDataUtils toGZipCompressData:] in GTSDK(GtGbdDataUtils.o)

    +[GTXGzipTool compress:] in GTSDK(GTXGzipTool.o)

    +[NSData(AES) compressData:] in liblibPDRCore.a(PDRToolSystemEx.o)

    _zipWriteInFileInZip in libcoreSupport.a(zip.o)

    _zipCloseFileInZipRaw in libcoreSupport.a(zip.o)

    ...

    "_crc32", referenced from:

    -[ZipArchive addFileToZip:newname:] in libcoreSupport.a(ZipArchive.o)

    _unzReadCurrentFileZBQ in libcoreSupport.a(unzip.o)

    _zipWriteInFileInZip in libcoreSupport.a(zip.o)

    "_gzclose", referenced from:

    +[GTXGzipTool compress:outFilePath:error:] in GTSDK(GTXGzipTool.o)

    "_inflateEnd", referenced from:

    +[WXOMTAHelper GUnzip:Out:] in libWeChatSDK.a(MTAHelper.o)

    +[GtSdkDataUtils toGZipDecompressData:] in GTSDK(GtSdkDataUtils.o)

    +[GtGbdDataUtils toGZipDecompressData:] in GTSDK(GtGbdDataUtils.o)

    _unzCloseCurrentFileZBQ in libcoreSupport.a(unzip.o)

    "deflateInit2", referenced from:

    +[WXOMTAHelper GZip:Out:] in libWeChatSDK.a(MTAHelper.o)

    +[GtSdkDataUtils toGZipCompressData:] in GTSDK(GtSdkDataUtils.o)

    +[GtGbdDataUtils toGZipCompressData:] in GTSDK(GtGbdDataUtils.o)

    +[GTXGzipTool compress:] in GTSDK(GTXGzipTool.o)

    +[NSData(AES) compressData:] in liblibPDRCore.a(PDRToolSystemEx.o)

    _zipOpenNewFileInZip3 in libcoreSupport.a(zip.o)

    "inflateInit2", referenced from:

    +[WXOMTAHelper GUnzip:Out:] in libWeChatSDK.a(MTAHelper.o)

    +[GtSdkDataUtils toGZipDecompressData:] in GTSDK(GtSdkDataUtils.o)

    +[GtGbdDataUtils toGZipDecompressData:] in GTSDK(GtGbdDataUtils.o)

    _unzOpenCurrentFile3ZBQ in libcoreSupport.a(unzip.o)

    "_deflateEnd", referenced from:

    +[WXOMTAHelper GZip:Out:] in libWeChatSDK.a(MTAHelper.o)

    +[GtSdkDataUtils toGZipCompressData:] in GTSDK(GtSdkDataUtils.o)

    +[GtGbdDataUtils toGZipCompressData:] in GTSDK(GtGbdDataUtils.o)

    +[GTXGzipTool compress:] in GTSDK(GTXGzipTool.o)

    +[NSData(AES) compressData:] in liblibPDRCore.a(PDRToolSystemEx.o)

    _zipCloseFileInZipRaw in libcoreSupport.a(zip.o)

    ld: symbol(s) not found for architecture arm64

    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    2019-03-06 11:18

CLP

CLP

-lGeTuiSdk
-lGtExtensionSdk 这2个可以去掉了,之前个推的sdk是.a的,现在是framew。所以要去掉

  • y***@163.com (作者)

    现在去掉这两个之后在模拟器上编译运行不会报错了 ,但是Achive编译依然会报上面的这个错误,请问这个该怎么解决呢

    2019-03-06 13:05

CLP

CLP

真机能跑起来吗?

  • y***@163.com (作者)

    真机也不行,我把推送和分享的库去掉之后依然报错:

    ld: warning: ld: warning: ignoring file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libresolv.dylib, missing required architecture arm64 in file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libresolv.dylib (2 slices)ignoring file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libxml2.dylib, missing required architecture arm64 in file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libxml2.dylib (2 slices)


    ld: warning: ignoring file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libsqlite3.0.dylib, missing required architecture arm64 in file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libsqlite3.0.dylib (3 slices)

    ld: warning: ignoring file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libz.dylib, missing required architecture arm64 in file /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libz.dylib (2 slices)

    ld: warning: arm64 function not 4-byte aligned: _ffi_call_SYSV from /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libs/liblibPGInvocation.a(sysv_arm64.o)

    ld: warning: arm64 function not 4-byte aligned: _ffi_closure_SYSV from /Users/bluewit-mac/Desktop/App_project/BlwitApp/BlwitApp/BlwitApp/libs/liblibPGInvocation.a(sysv_arm64.o)

    Undefined symbols for architecture arm64:

    "_inflate", referenced from:

    _unzReadCurrentFileZBQ in libcoreSupport.a(unzip.o)

    "_get_crc_table", referenced from:

    _unzOpenCurrentFile3ZBQ in libcoreSupport.a(unzip.o)

    _zipOpenNewFileInZip3 in libcoreSupport.a(zip.o)

    "_deflate", referenced from:

    +[NSData(AES) compressData:] in liblibPDRCore.a(PDRToolSystemEx.o)

    _zipWriteInFileInZip in libcoreSupport.a(zip.o)

    _zipCloseFileInZipRaw in libcoreSupport.a(zip.o)

    "_crc32", referenced from:

    -[ZipArchive addFileToZip:newname:] in libcoreSupport.a(ZipArchive.o)

    _unzReadCurrentFileZBQ in libcoreSupport.a(unzip.o)

    _zipWriteInFileInZip in libcoreSupport.a(zip.o)

    "_inflateEnd", referenced from:

    _unzCloseCurrentFileZBQ in libcoreSupport.a(unzip.o)

    "deflateInit2", referenced from:

    +[NSData(AES) compressData:] in liblibPDRCore.a(PDRToolSystemEx.o)

    _zipOpenNewFileInZip3 in libcoreSupport.a(zip.o)

    "inflateInit2", referenced from:

    _unzOpenCurrentFile3ZBQ in libcoreSupport.a(unzip.o)

    "_deflateEnd", referenced from:

    +[NSData(AES) compressData:] in liblibPDRCore.a(PDRToolSystemEx.o)

    _zipCloseFileInZipRaw in libcoreSupport.a(zip.o)

    ld: symbol(s) not found for architecture arm64

    clang: error: linker command failed with exit code 1 (use -v to see invocation)


    另外我能加一下您qq或者微信吗 这样沟通起来方便一点

    2019-03-06 14:44

CLP

CLP

真机跑不起来,Archive肯定不行啊, libcoreSupport.a 看看这个库加没加,你把你qq发下吧

  • y***@163.com (作者)

    问题解决了,好像是因为之前添加推送模块时加的.dylib文件与之前加的.tbd文件冲突导致的 另外我想问一下Distribute App时选择iOS App Store-> export -> 然后选择distribute的证书和描述文件 最后显示结果是Certificate: Unknown

    Profile: None

    并且导出来的ipa文件用pp助手安装时显示设备未越狱呢,难道使用distribute的证书和描述文件导出来的ipa文件必须要通过app store的审核,在app store上下载安装才行吗? 我的qq:624791592

    2019-03-06 16:11

CLP

CLP

你把iOS基础的东西先理解清楚,archive的,企业证书的才能装手机上

  • y***@163.com (作者)

    好的清楚了, 另外我想提个小建议就是你们更新SDK的时候尽量更新一下文档,这段时间弄ios和android打包因为文档的问题遇到的坑太多了。。。

    2019-03-06 18:28

2***@qq.com

2***@qq.com

想问一下,楼主怎么配置可以接收到个推推送过来的小心?我的离线打包后接收不到

该问题目前已经被锁定, 无法添加新回复