Skip to content

Missing import in Swift projects #786

Closed
davidlawson opened this Issue Jun 7, 2014 · 3 comments

2 participants

@davidlawson

There is a missing #import <Foundation/Foundation.h> in the MagicalRecord header files, causing issues when this is not in a .pch file (as is the case with most Obj-C projects).

This means I have to put this in my bridging header file:

#include <Foundation/Foundation.h>
#import <MagicalRecord/CoreData+MagicalRecord.h>
@tonyarnold

I haven't even started looking at MagicalRecord with Swift yet — would you mind putting together a PR to fix this? Otherwise it'll be the end of next week before I can fix it.

@tonyarnold tonyarnold added the Bug label Jun 21, 2014
@tonyarnold tonyarnold added this to the 2.3.0 milestone Jun 21, 2014
@tonyarnold tonyarnold self-assigned this Jun 21, 2014
@tonyarnold

Can you give me the output when you compile without adding #import <Foundation/Foundation.h> (check yours — don't use #include with frameworks)? That'll give me a headstart.

@davidlawson
<unknown>:0: warning: ../Pods/Headers/MagicalRecord/CoreData+MagicalRecord.h:3: MagicalRecord requires blocks
@tonyarnold tonyarnold closed this in d18e74f Jul 3, 2014
@naqi naqi added a commit to naqi/MagicalRecord that referenced this issue Apr 7, 2016
@tonyarnold tonyarnold Ensure that Foundation.framework is imported before checking `NS_BLOC…
…KS_AVAILABLE`

Fixes #786
d538288
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.