Files
facebook-ios-sdk/FBSDKGamingServicesKit/FacebookGamingServices/GamingImageUploaderConfiguration.swift
Jawwad Ahmad 5face70317 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
2022-01-26 18:23:28 -08:00

37 lines
1.0 KiB
Swift

/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*/
import Foundation
import UIKit
@objcMembers
@objc(FBSDKGamingImageUploaderConfiguration)
public class GamingImageUploaderConfiguration: NSObject {
public private(set) var image: UIImage
public private(set) var caption: String?
public private(set) var shouldLaunchMediaDialog: Bool
/**
A model for Gaming image upload content to be shared.
@param image the image that will be shared.
@param caption and optional caption that will appear along side the image on Facebook.
@param shouldLaunchMediaDialog whether or not to open the media dialog on Facebook when the upload completes.
*/
public init(
image: UIImage,
caption: String?,
shouldLaunchMediaDialog: Bool
) {
self.image = image
self.caption = caption
self.shouldLaunchMediaDialog = shouldLaunchMediaDialog
}
}