When using Cocoapods, pod Install will only add dependent library support for the first target of the Xcode project by default. If you want to add all target increments, you can follow the steps below
1. Edit the Podfile file
The first of all target uses the same third-party dependency configuration
Platform:ios, ' 7.0 '
#CocoaPod Domestic Mirror
SOURCE ' Https://git.oschina.net/shannon/jiecao-specs-mirror.git '
#这里是公共的 pod configuration file path declaration
Pod ' putaolib ',:p ath = './. /.. /putaolib/putaolib.podspec ',: Exclusive = True #指定配置文件
Link_with 'TargetName1 ', 'TargetName2 '
Libraries that are common #多个 Target
Pod ' Mknetworkkit '
.....
The second different target uses different third-party dependency configurations
Platform:ios, ' 7.0 '
#CocoaPod Domestic Mirror
SOURCE ' Https://git.oschina.net/shannon/jiecao-specs-mirror.git '
#这里是公共的 pod configuration file path declaration
Pod ' putaolib ',:p ath = './. /.. /putaolib/putaolib.podspec ',: Exclusive = True #指定配置文件
Target:targetname1 do
Pod ' Mknetworkkit '
......
End
Target:targetname2 do
Pod ' Mknetworkkit '
Pod ' Mbprogresshud '
Pod ' Iqkeyboardmanager '
Pod ' Kiwi '
End
2. After saving, re-run pod install
3. Open the project, for each target, build setting four places, add $ (inherited).
Other Link Flags
Library Search Paths
Header Search Paths
Framework Search Paths
4. Recompile
The third step is optional, pod install if the yellow Word hint, then execute
Configure Podfile multiple target within a project