1

I have a project based on Objective-C. I have created bridging headers for Swift and can successfully call Objective-C files there. However I can not import AppDelegate.h in the new Swift file. Here what I try:

import Foundation
import UIKit
#import "AppDelegate.h";

it returns error:

Expected identifier in import declaration

How to import that?

Cœur
  • 34,719
  • 24
  • 185
  • 251
birdcage
  • 2,578
  • 4
  • 31
  • 55
  • 2
    Did you check [How do I call Objective-C code from Swift?](https://stackoverflow.com/q/24002369/1187415) – Martin R Jan 23 '20 at 16:08

1 Answers1

0

You don't need to import any Obj-C files/headers in Swift. All Swift types will be able to see all Obj-C files that were added to the bridging header.

Dávid Pásztor
  • 45,571
  • 9
  • 73
  • 100