cocoapods introduction of tripartite library history

Pod is not used in an existing project, create a new demo GPB error when importing files manually protobuf can not find, directly pod import no similar mistakes, so the introduction of pod in project engineering to integrate protobuf

platform :ios, '8.0'
use_frameworks!

source 'https://github.com/CocoaPods/Specs.git'
target 'Project' do
  pod 'Protobuf'
end

Run pod install directly installed successfully, there has been an exclamation point ❗️, and compile the project fails, framework not found Protobuf

[!] The `CarShare [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-CarShare/Pods-CarShare.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The `CarShare [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-CarShare/Pods-CarShare.release.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

Try to eliminate the exclamation point ❗️

  • Target -> building settings search for "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", value type is bool, click on the other, the value after running into $ (inherited) pod update / pod install still appear exclamation point ❗️
  • Framework Search Paths in Search Path in the Build Setting in the Header Search Paths added $(inherited). Engineering is already a
  • Under Other Linker Flags at the Build Setting of Linking also like to add $(inherited) ----感叹号❗️ disappear, but the project still fails to compile framework not found Protobuf

Then solve the problem of the framework not found. A number of methods to search

  1. Target-> BuildSetting-> Library Search Path add to $(PROJECT_DIR)/a relative path begins
  2. Other Linker Flag find and remove unnecessary header files
  3. In product- "edit scheme in -" build inside the library to add all of the pods
  4. Delete pod of four files, re-create
  5. In the official website of cocoapods Troubleshooting to find a solution
  6. Change pods- "project-" architectures- "build active architecture only have to NO,

1. Use a relative path is invalid; 2.Other Linker Flag there are no extra files; 3 Add the pods library in scheme did not try; 4. Delete pod re-add invalid; 5. 6. solve the problem.

After I put the project to roll back to before the introduction of pod, then pod install, but still there will be an exclamation point ❗️ project compiles successfully, run the process again, without any problems, okay pod gave me a joke, adding in the other linker flags  $(inherited) 消除 感叹号❗️ ,pod有时候就爱开玩笑,回头尝试一下Carthage will there be a similar problem

 

 

 

 

 

Published 39 original articles · won praise 8 · views 30000 +

Guess you like

Origin blog.csdn.net/jancywen/article/details/100691067