2

In Xcode 8 I'm having trouble importing any Swift 2.3 or 3 framework that was added with Cocoapods into my project.

There is a public umbrella.h file, but for some reason Xcode can't find the framework when I try to @import it.

As an example, create any Objective-C project, use the following Podfile, pod install, and then try the @import. It asks me to update the code to swift 2.3 or 3 even if that code is already Swift 2.3 or Swift 3 code. I've cleaned and tried to rebuild as well.

platform :ios, '8.0'
use_frameworks!

target 'testingFrameworks' do
  pod 'SwiftyJSON'
end

Did I miss a step?

1
  • You called pod install after you modified the Podfile, right? Commented Sep 15, 2016 at 3:12

1 Answer 1

1

I used socketIO and was having the same problem. My solution to this is:

  1. Close project.
  2. Delete pod files, delivered files, pod framework, workspace file (clean up project)
  3. pod install
  4. Reopen workspace, upgrade swift syntax if xcode ask for, build a few times.

You might need to fix something for the new swift.

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

7 Comments

This was in a new project with Swift 3 code. Even if no Swift 3 upgrades need to happen the Framework added with Cocoapods into my Obj-C project is not found when using @import FrameworkName;
oh, so your main project is using swift? Mine use Objective-C and I don't know much about swift, so pardon me. But probably the problem is with the building system :/
No, sorry. My main project or any new Objective-C project is having this error. I just tried a new Objective-C project with SocketIO's Swift3 version. Everything upgrades but the module still cannot be found. s14.postimg.io/qxee39a6p/Socket_IOModule_Missing.png
'Defines Module' is set to yes for both can sometimes remove the error but it returns.
But have you tried my solution? Anw, it seems like a very common issue for xcode 8
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.