Add "import Foundation" to any class that is using @objc

Summary:
This is to prevent the following error that was seen in D33750740 (8044535803)
```
objc attribute used without importing module 'Foundation'
```

Found the files with:
```
git ls-files '*.swift' | xargs ack -l 'objc' | xargs ack -L 'import (Foundation|XCTest)'
```

Note: In D33783526 (4610b07bda) a custom SwiftLint rule was added to detect this but it only works if there aren't any other imports.

Reviewed By: samodom

Differential Revision: D33803396

fbshipit-source-id: 575d7798a77aac30384f8f44c1d45f97d60fe8f7
This commit is contained in:
Jawwad Ahmad
2022-01-26 17:46:15 -08:00
committed by Facebook GitHub Bot
parent fcf2a2551c
commit 5face70317
45 changed files with 47 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
import FacebookGamingServices
import FBSDKCoreKit
import Foundation
@objcMembers
open class FBSDKContextDialogPresenter: NSObject {

View File

@@ -8,6 +8,7 @@
import FacebookGamingServices
import FBSDKCoreKit
import Foundation
/**
A dialog to switch the current context through a web view