美文网首页
framework tips

framework tips

作者: bigCatloveFish | 来源:发表于2018-06-09 16:59 被阅读176次
lipo: -remove's specified would result in an empty fat file

1.bitcode的问题。设置成no
2.架构问题。换真机运行一下。

  Reason: image not found

Target ->Build Phases -> Link Binary With Libraries 添加图中所提示的framework,并且将其默认状态更改为“Optional”就可以了

Missing submodule  '*****.*****'

stackoverflow

unrecognized selector sent to instance

引入framework时,使用分类的方法。apple文档

 symbol(s) not found for architecture arm64

当你导入framework出现这个错误 并且你确信 你的framework 支持 arm64的时候 你可以检查一下 你导入的framework依赖的系统的库文件 是否都导入。

制作动态库的过程中引入静态库时可能出现
"__mh_execute_header", referenced from:
 symbol(s) not found for architecture arm64

绝招在 Other Linker Flags: -undefined dynamic_lookup

Undefined symbols for architecture arm64:
  "_dns_parse_resource_record", referenced from:
      -[JPUSHSRVResolver processRecord:length:] in libjcore-ios-1.1.5.a(JPUSHSRVResolver.o)
  "_dns_free_resource_record", referenced from:
      -[JPUSHSRVResolver processRecord:length:] in libjcore-ios-1.1.5.a(JPUSHSRVResolver.o)
  "_OBJC_CLASS_$_BaiduMobStat", referenced from:
      objc-class-ref in Statistics.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

极光推送 添加 libresolv.tbd

 include of non-modular header inside framework module

设置 Allow Non-modular Includes in Framework Modeules 为YES,这个并不是一种真正意义上的解决方案。其实这种情况的出现 一般是 swift 在导入oc写的framework的时候出现的。当oc的framework 中的.h文件 导入framework中没有的.h文件 的时候 会出现这个问题。
swift_module->module_A->module_B。model_A的.h文件中 引入module_B的.h文件。这种情况下 我们现在的解决方案是将module _B的.h文件 在post_install的时候 拷贝到 module_A中。客观的讲,在.h中不适合引入 无关的头文件。即是相关。也应该用@class的形式。

cocoapod   clang: error: no such file or directory: ‘Masonry’

这个可能是 cocoapod的一个 bug。查一下buildSetting 里面的otheer link 看看 是否 报错的这个framework 上面 有两个-framework。

diff: /Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.

出现这个问题 我的建议是你删除当前的target,新建一个target。能解决这个问题。还有一种特殊的方法是。在Build Phases 里面找到 Manifest.lock 替换下面的语句。

diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
diff "${SRCROOT}/Podfile.lock" "${SRCROOT}/Pods/Manifest.lock" > /dev/null

相关文章

网友评论

      本文标题:framework tips

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