1

I recently set out to build an iOS 8.0 Today Extension into an existing project but I'm having trouble getting started. Before adding the today extension I was able to open my project in Xcode 6 and run without any issues.

However, after I add the extension the compiler gives me the following error:

fatal error: 'Mantle.h' file not found Command /Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

More details:

  • Using Xcode 6 beta 3
  • Using CocoaPods (Mantle.h is from a pod)
  • Added today extension but I don't create scheme for it. I previously tried creating a scheme but that doesn't work either.
  • I've been trying to run using previous app target. I've also tried using the extension target but that fails to build with the same error.

Compile Error

I created a new project to see if I had the same issue but I'm not able to reproduce it. What does adding the extension change in my project that might be causing this? Note, this is an error in my existing files, not a new file I created for the extension. I have done nothing but add the extension to my project.

Andrew
  • 15,357
  • 6
  • 66
  • 101
AdamPro13
  • 7,232
  • 2
  • 30
  • 28
  • Make sure all of the necessary files (Ex. Mantle.h) are included in your extension target. You can add a file to a target by selecting the file in the left sidebar and using the file inspector in the right sidebar. – Andrew Jul 11 '14 at 04:11
  • Since Mantle is in the Pods project, I believe I can only add it to that target, not the extension target. – AdamPro13 Jul 16 '14 at 17:01
  • Hi @AdamPro13 did you solve the issue, please suggest me too... – sandy Aug 05 '14 at 12:35
  • Hi @AdamPro13 can you show us your podfile? I am getting duplicate symbol errors cause I'd like to use f.e. AFNetworking in both my main App but also in the Widget... any suggestions? Thanks – Georg Oct 07 '14 at 12:45

1 Answers1

0

The problem was that the .pch file was referencing files the extension didn't have access to. Creating a new .pch file fixed it.

AdamPro13
  • 7,232
  • 2
  • 30
  • 28