Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
660 views
in Technique[技术] by (71.8m points)

ios - Errors after updating to Xcode 8: "No such module" and "target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT`build setting"

I'm getting No such module for Pods when I try to build the project. If I remove the code expecting this Pod, another 'No such module' comes up for another Pod, which means every Pod must be affected. When I type pod install I get the following messages:

[!] The X target overrides the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting defined in `X’. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.

[!] The `X` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `X'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.

I get each of these for both the debug and release versions of my app and the two tests, so 12 messages in total.

I have set Always Embed Swift Standard Libraries and EMBEDDED_CONTENT_CONTAINS_SWIFT to NO and YES both in my Build Settings and this did nothing. I also added the following code to my Podfile and it didn't work either:

post_install do |installer|
installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
        config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO'
    end
end
end
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
[!] The `X` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `X'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.

I had met this problem today. I solved it by

  1. Go to Project/Targets -> [Project Name] -> Build Settings.
  2. search "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES"
  3. click the right of Debug, and selected 'Other', input "$(inherited)"
  4. do same with 'Release' and install your pod

You can follow the image below.


enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...