2

I want to use this method. https://developer.apple.com/reference/corelocation/clplacemark/2132103-placemarkwithlocation?language=objc#declarations

I imported CoreLocation but I still get "No known class method" error and I also don't see it defined anywhere in CLPlacemark.h.

+ (instancetype)placemarkWithLocation:(CLLocation *)location 
                                 name:(NSString *)name 
                        postalAddress:(CNPostalAddress *)postalAddress;
Berry Blue
  • 15,330
  • 18
  • 62
  • 113

1 Answers1

2

As per documentation,

App extensions built with the Intents framework can use this method to create a placemark from existing location and address data. For example, an app that offers a ride service might create a new placemark when resolving a user’s pickup or drop-off location. The returned placemark contains only the data that you provide.

So you need to import Intents framework:

@import Intents;
The Mach System
  • 6,703
  • 3
  • 16
  • 20