美文网首页自媒体
swift 开发过程中遇到的疑难杂症

swift 开发过程中遇到的疑难杂症

作者: jobs_chen | 来源:发表于2021-06-25 16:37 被阅读0次
  1. pod ‘GoogleSignIn' , 工程编译过程中遇到一个问题:Cannot find protocol declaration for 'GIDSignInDelegate',
    解决方案:在桥接文件 Project-Bridging-Header.h 中导入头文件
#import <GoogleSignIn/GoogleSignIn.h>

原因在于库是OC代码,需要通过桥接swift编译器才能找到对应的类文件

  1. target overrides theSWIFT_OPTIMIZATION_LEVELbuild setting defined in,
image.png
解决办法:project->target->build setting-> 搜索 关键词,点击选项,选other 填写$(inherited)
参考文章:https://segmentfault.com/a/1190000037439936###,步骤相当清晰。
  1. Xcode 代码提示没有了
    环境:xcode12.1 macos11.4

    解决办法: image.png
    在Xcode->Window->Projects选中你的项目 xxx.xcworkspace
  2. 库不兼容,需要证书签名 xcode 12.4 macos 11.4

dyld: Library not loaded: /usr/local/opt/glew/lib/libGLEW.2.2.dylib
  Referenced from: /Users/book/Library/Developer/Xcode/DerivedData/opengl_-_2021.07.19-dtqpjvlknxgamgandafumvxkobbe/Build/Products/Debug/opengl - 2021.07.19
  Reason: no suitable image found.  Did find:
    /usr/local/opt/glew/lib/libGLEW.2.2.dylib: code signature in (/usr/local/opt/glew/lib/libGLEW.2.2.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
image.png

相关文章

网友评论

    本文标题:swift 开发过程中遇到的疑难杂症

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