Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

xcode 6.2 compiling issues. #36

Closed
eicca opened this issue Jun 22, 2014 · 3 comments
Closed

xcode 6.2 compiling issues. #36

eicca opened this issue Jun 22, 2014 · 3 comments

Comments

@eicca
Copy link

eicca commented Jun 22, 2014

Hello.

I'm using xcode beta and I'm trying to use MASShortcut within a swift project.

After importing MASShortcut in bridging header file I'm getting the following error during compilation:

<unknown>:0: error: /path/to/project/Pods/Headers/MASShortcut/MASShortcut.h:49: expected a type

And this is a MASShortcut.h:49:

+ (MASShortcut *)shortcutWithEvent:(NSEvent *)anEvent;

Maybe NSEvent is not in the carbon anymore?

I solved the issue by adding #import <Cocoa/Cocoa.h> on top of the MASShortcut.h, but I'm unsure if it's a proper solution. Also, if the problem is related to api changes, maybe it'd be a good idea to add the fix to the library as well.

Thanks.

@shpakovski
Copy link
Collaborator

Hi, thank you for the problem report. I assume NSEvent is declared in Cocoa.h, but the bridging header does not import this file. Could you please try to move the line #import <Cocoa/Cocoa.h> into the file ...-Bridging-Header.h or something like this? Sorry for the late reply.

@eicca
Copy link
Author

eicca commented Jun 25, 2014

Thanks, this works perfectly. Sorry for the trivial question ;)

@eicca eicca closed this as completed Jun 25, 2014
@shpakovski
Copy link
Collaborator

No problem, glad it helped! :)

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

2 participants