FBSDKLocation.h 929 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) Meta Platforms, Inc. and affiliates.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the license found in the
  6. * LICENSE file in the root directory of this source tree.
  7. */
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. NS_SWIFT_NAME(Location)
  11. @interface FBSDKLocation : NSObject <NSCopying, NSObject, NSSecureCoding>
  12. /// Location id
  13. @property (nonatomic, readonly, strong) NSString *id;
  14. /// Location name
  15. @property (nonatomic, readonly, strong) NSString *name;
  16. - (instancetype)init NS_UNAVAILABLE;
  17. + (instancetype)new NS_UNAVAILABLE;
  18. /**
  19. Returns a Location object from a dinctionary containing valid location information.
  20. @param dictionary The dictionary containing raw location
  21. Valid location will consist of "id" and "name" strings.
  22. */
  23. + (nullable instancetype)locationFromDictionary:(NSDictionary<NSString *, NSString *> *)dictionary;
  24. @end
  25. NS_ASSUME_NONNULL_END