Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Operation missing in generated -Swift.h file #39

Closed
niklassaers opened this issue Jan 18, 2016 · 1 comment
Closed

Operation missing in generated -Swift.h file #39

niklassaers opened this issue Jan 18, 2016 · 1 comment

Comments

@niklassaers
Copy link

Hi,

in my project I used PSOperations, and I have subclassed Operation like so:
class NetworkBlockOperation : Operation { .... }
where I override execute()

I use PSOperations through CocoaPods,

When I compile, my -Swift.h file contains:

SWIFT_CLASS("_TtC8MyProject21NetworkBlockOperation")
@interface NetworkBlockOperation : Operation
- (void)execute;
@end

but Operation is not defined in that file, so I get a "Cannot find interface declaration for 'Operation'" build error. My subclass contains import PSOperations, and Operation descends from NSOperation. Is there anything more I need to declare to have it compile the ObjC header? I don't really use it in ObjC, so if there is anything I can do to not have it appear in the header file, that would also solve my issue.

Cheers

Nik

@niklassaers
Copy link
Author

In the same -Swift.h file is:

#if defined(__has_feature) && __has_feature(modules)
...
@import PSOperations;
...
#endif

Turns out __has_feature(modules) returns false. So this is not a PSOperations problem at all.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant