1、最近解决集成的问题。Pod方面的,主要问题是静态库传递。后来也自己建了一个库,来进行测试,命令是可用并且能解决该冲突的。
可参考:
✨Prevent Transitive Dependency Errors in Swift Project with Vendored Frameworks
✨CocoaPods use_framework! 导入成功
pod install和pod update背后那点事
CocoaPods 集成私有库
Podfile中的 use_frameworks!
The 'Pods-project name' target has transitive dependencies that include static binaries 的解决方案
✨Cocoapods制作pod时,依赖百度地图SDK的一些问题
2、使用百度地图旧版进行排查问题时,会需要libstdc++.6.0.9.tbd这个库
按此文章进行解决:
Xcode10更新报错:library not found for -lstdc++.6.0.9
Xcode10: -lstdc++.6.0.9 not found
3、使用百度地图SDK来排查问题时,也了解了百度SDKPodSpec文件的内容。
4.4.0
{
"name": "BaiduMapKit",
"version": "4.4.0",
"summary": "百度地图iOS SDK(CocoaPods百度地图官方库)",
"description": "百度地图iOS SDK:百度地图官方CocoaPods.\n百度地图iOS SDK是一套基于iOS 7.0及以上版本设备的应用程序接口,不仅提供展示地图的基本接口,还提供POI检索、路径规划、地图标注、离线地图、步骑行导航等丰富的LBS能力。",
"homepage": "http://developer.baidu.com/map/index.php?title=iossdk",
"license": {
"type": "MIT",
"file": "LICENSE"
},
"authors": {
"baidu map sdk": "[email protected]"
},
"platforms": {
"ios": "7.0"
},
"source": {
"git": "https://github.com/BaiduLBS/BaiduMapKit.git",
"tag": "4.4.0"
},
"resources": "BaiduMapKit/*.framework/*.bundle",
"vendored_frameworks": "BaiduMapKit/*.framework",
"vendored_libraries": "BaiduMapKit/thirdlibs/*.a",
"frameworks": [
"CoreLocation",
"QuartzCore",
"OpenGLES",
"SystemConfiguration",
"CoreGraphics",
"Security",
"CoreTelephony",
"MobileCoreServices"
],
"libraries": [
"sqlite3.0",
"c++"
],
"requires_arc": true
}
3.2.0
{
"name": "BaiduMapKit",
"version": "3.2",
"summary": "百度地图iOS SDK(CocoaPods百度地图官方库)",
"description": "百度地图iOS SDK:百度地图官方CocoaPods.\n百度地图iOS SDK是一套基于iOS 5.0及以上版本设备的应用程序接口,不仅提供展示地图的基本接口,还提供POI检索、路径规划、地图标注、离线地图、定位、周边雷达等丰富的LBS能力",
"homepage": "http://developer.baidu.com/map/index.php?title=iossdk",
"license": {
"type": "MIT",
"file": "LICENSE"
},
"authors": {
"baidu map sdk": "[email protected]"
},
"platforms": {
"ios": "5.0"
},
"source": {
"git": "https://github.com/BaiduLBS/BaiduMapKit.git",
"tag": "3.2"
},
"source_files": "BaiduMapKit/*.framework/Headers/*.h",
"public_header_files": "BaiduMapKit/*.framework/Headers/*.h",
"resources": "BaiduMapKit/BaiduMapAPI_Map.framework/Resources/mapapi.bundle",
"vendored_frameworks": "BaiduMapKit/*.framework",
"vendored_libraries": "BaiduMapKit/thirdlibs/*.a",
"frameworks": [
"CoreLocation",
"QuartzCore",
"OpenGLES",
"SystemConfiguration",
"CoreGraphics",
"Security",
"CoreTelephony"
],
"libraries": [
"sqlite3.0",
"stdc++.6.0.9"
],
"requires_arc": true
}
4、需要学习下Podfile的一些特殊命令
abstract_target 'XXX' do
githubSource = ''
source githubS
pod ' ', ' ', :source => githubS
以及source指定
5、
(1)Architectures
我的Xcode版本是9 这个默认设置的意思是标准的架构应该是最少包含x86_64和arm64
(2)Build Active Architecture Only
设置为Yes的时候,只编译当前的架构版本
设置为NO的时候,会编译支持的所以版本
Xcode的默认设置是Debug为YES是为了在Debug调试的时候编译更快,Release为NO
(3)Valid Architectures
有效的架构,默认设置是armv7 armv7s arm64,实际编译出来的架构是取Architectures和Valid Architectures的交集。
具体的framework制作上面有贴的动态图就不讲了,下面说一下怎么合并模拟器版本和真机版本
• armv7|armv7s|arm64都是ARM处理器的指令集
• i386|x86_64 是Mac处理器的指令集
它们分别用在这些设备上
arm64:iPhone6s | iphone6s plus|iPhone6| iPhone6 plus|iPhone5S | iPad Air| iPad mini2(iPad mini with Retina Display)
armv7s:iPhone5|iPhone5C|iPad4(iPad with Retina Display)
armv7:iPhone4|iPhone4S|iPad|iPad2|iPad3(The New iPad)|iPad mini|iPod Touch 3G|iPod Touch4
模拟器32位处理器测试需要i386架构,
模拟器64位处理器测试需要x86_64架构,
真机32位处理器需要armv7,或者armv7s架构,
真机64位处理器需要arm64架构。