Search code examples
objective-cimportswift-package-manager

Cant import AppKit in ObjC-module of SwiftPM


I tried to import AppKit in a Header of an Module of a Swift-Packet with this code:

#import <AppKit/AppKit.h>

But the compiler threw this error:

fatal error: 'AppKit/AppKit.h' file not found

Should I specify it somehow as dependency in the Package.swift file of the Package?

Thanks in advance

Michael


Solution

  • I just resolved this issue by linking with this Framework in Xcode. I don't know how to specify that in the Package.swift file, but for know it works.

    Regards