mirror of
https://github.com/zhigang1992/facebook-ios-sdk.git
synced 2026-01-12 17:22:28 +08:00
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:
committed by
Facebook GitHub Bot
parent
fcf2a2551c
commit
5face70317
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBAEMKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
class TestInvocation: AEMInvocation {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
// swiftformat:disable indent
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
class TestAdvertiserIDProvider: NSObject, AdvertiserIDProviding {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
// swiftformat:disable indent
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
class TestClientTokenProvider: NSObject, ClientTokenProviding {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
class TestErrorConfiguration: NSObject, ErrorConfigurationProtocol {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
class TestEventLogger: NSObject, EventLogging {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
final class TestGraphRequestPiggybackManager: NSObject, GraphRequestPiggybackManaging {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
class TestPasteboard: NSObject, Pasteboard {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
class TestReactNativeView: UIView {
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
|
||||
// Hacky subclassing to get around init not being available.
|
||||
// Future work should update ServerConfigurationProvider to return
|
||||
// a true abstraction instead of a concrete ServerConfiguration and this
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import TestTools
|
||||
|
||||
@objcMembers
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
|
||||
struct SwizzleEvidence: Equatable {
|
||||
let selector: Selector
|
||||
let `class`: AnyClass
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
class TestTokenCache: NSObject, TokenCaching {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
@objcMembers
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
@objcMembers
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objc(FBSDKFriendFinderDialog)
|
||||
public class FriendFinderDialog: NSObject {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
@objc(FBSDKGamingGroupIntegration)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
@objc(FBSDKGamingImageUploader)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
@objcMembers
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
@objc(FBSDKGamingPayload)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
@objc(FBSDKGamingVideoUploader)
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#if !os(tvOS)
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
/**
|
||||
A model for an instant games switchAsync cross play request.
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
class TestAppEvents: AppEvents {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
class TestLoggerFactory: NSObject, LoggerCreating {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKLoginKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
class TestLoginCompleter: NSObject, LoginCompleting {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKLoginKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
class TestLoginCompleterFactory: NSObject, LoginCompleterFactoryProtocol {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
#if !os(tvOS)
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
#if !os(tvOS)
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import TestTools
|
||||
|
||||
@objcMembers
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
@objcMembers
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
import FacebookGamingServices
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
open class FBSDKContextDialogPresenter: NSObject {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
import FacebookGamingServices
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
/**
|
||||
A dialog to switch the current context through a web view
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
public class SampleUserProfiles: NSObject {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
public class TestAccessTokenWallet: NSObject, AccessTokenProviding, AccessTokenSetting, TokenStringProviding {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
public class TestAuthenticationTokenWallet: NSObject, AuthenticationTokenProviding, AuthenticationTokenSetting {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
@testable import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
public class TestGraphRequest: NSObject, GraphRequestProtocol {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
public class TestGraphRequestConnection: NSObject, GraphRequestConnecting {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
public class TestGraphRequestConnectionFactory: NSObject, GraphRequestConnectionFactoryProtocol {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
public class TestGraphRequestFactory: NSObject, GraphRequestFactoryProtocol {
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
import FBSDKCoreKit
|
||||
import FBSDKCoreKit_Basics
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
public class TestInternalUtility: NSObject,
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
public class TestKeychainStore: NSObject, KeychainStoreProtocol {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
public class TestKeychainStoreFactory: NSObject, KeychainStoreProviding {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
public class TestURLOpener: NSObject, URLOpener {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import FBSDKCoreKit
|
||||
import Foundation
|
||||
|
||||
@objcMembers
|
||||
public class TestWindowFinder: NSObject, WindowFinding {
|
||||
|
||||
Reference in New Issue
Block a user