TBXML in an iOS 8 extension fails to build

1.4k Views Asked by At

In my iOS app I use TBXML for xml processing, it's not officially updated but it still working fine for me.

I'm trying to create a Today extension for iOS 8 and when I add TBXML as a Compile Source I get the following:

TBXML.h TBXML.h

Before adding the extension, I didn't have any build issue with TBXML.

Any ideas of how can I resolve this?

Thanks

2

There are 2 best solutions below

2
On BEST ANSWER

Fixed by adding #import <Foundation/Foundation.h> at the beggining of TBXML.h.

Seems that when working with extension, this file is not imported or is imported later

0
On

I always want to know WHY. Why would it work before without the include of foundation and not now? What changed? So I dug a little deeper and found the answer: Prefix headers. Xcode 5 must had automatically added a prefix header as a convenience or something. And the new one doesn't. That old prefix header automatically included Foundation, Availability, and UIKit.

Who knows why they changed it. Maybe it has something to do with swift.

A more detailed answer is at: Unknown type name 'NSError' and others