10

I recently upgraded to Xcode 8 and an existing project to Swift 3. After having a variety of issues with Cocoapods, I decided to start over from scratch. After running pod deintegrate and deleting Podfile, Podfile.lock, and [Project].xcworkspace, I had a blank slate as far as Cocoapods was concerned.

I then took the following actions:

  1. Opened a terminal at the project location and ran pod init, then pod install (using the stub Podfile that pod init creates).

    This appeared to be successful, but came with the following two warnings:

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

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

At this point, opening Xcode and building the project gives the "No such module" error, which is entirely expected.

Following the instructions at this question solves this problem and rerunning pod install is a success.

  1. Closed Xcode, added the modules I'm using to the Podfile (see below), the ran pod install again. According to the terminal output, this is successful.

  2. Opened Xcode and built the project. I again receive the "No such module" error, specifically No such module 'ReactiveCocoa'

    I have confirmed that the same problem occurs with SnapKit, Hue, KMPlaceholderTextView, KeychainSwift, and Siren, depending on the order of the import statements. For some reason, none of the Google modules are affected by this problem.

My Podfile:

# Uncomment the next line to define a global platform for your project # platform :ios, '9.0' target 'Xena' do # Comment the next line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for Xena pod 'ReactiveCocoa', :git => 'https://github.com/ReactiveCocoa/ReactiveCocoa.git' pod 'SnapKit', '~> 3.0.2' pod 'Hue', '~> 2.0.1' pod 'KMPlaceholderTextView', '~> 1.3.0' pod 'GooglePlacePicker' pod 'GooglePlaces' pod 'GoogleMaps' pod 'KeychainSwift', '~> 7.0' pod 'Siren' target 'XenaTests' do inherit! :search_paths # Pods for testing end target 'XenaUITests' do inherit! :search_paths # Pods for testing end end 
4
  • @AnniS Can you provide more details? I'm not sure what you mean Commented Nov 15, 2016 at 7:46
  • make sure you had followed all the steps mentioned in the github.com/ReactiveCocoa/ReactiveCocoa Commented Nov 15, 2016 at 8:24
  • 1
    I have, especially given that the steps that are relevant to me are, in total, "add this line to your Podfile", which I have. Commented Nov 16, 2016 at 2:47
  • 1
    I'm having the same problem. Did you find any solution? I have tried everything. The same project works fine on another computer. Commented Aug 11, 2017 at 5:49

3 Answers 3

21

Make sure you are opening .xcworkspace and not .xcodeproj file.

You may further look into this post.

Also under : Target > General > Linked Frameworks and Libraries Make sure your frameworks are there. Even Pods_Xena.framework is there

Sign up to request clarification or add additional context in comments.

7 Comments

Yep, I always use .xcworkspace. Under Linked Frameworks and Libraries I have two entries: CoreData.framework and Pods_Xena.framework
Add other frameworks as well, You might have to drag them there. This is the reason they are not working. I had the same issue.
I've now added all of them, and I still have the same error
Even added "ReactiveCocoa" ?
Yep, ReactiveCocoa included. I have deleted Derived Data (just to be sure), cleaned the build folder, and rebuilt, to the same effect.
|
8

Try:

Xcode ->Preferences ->Location ->DerivedData

open the folder DerivedData and move it to Trash

Comments

0

Uncomment the next line to define a global platform for your project

platform :iOS, '9.0' 

Uncommenting the second line in your pod file will help you.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.