iOS SDK object to represent a place I am building an iOS SDK to be consumed by apps. I am building an object that represents a physical place. The interface looks like so:

@interface RDPlace : NSObject

@property (nonatomic, strong, readonly) NSString *city;

@property (nonatomic, strong, readonly) NSString *country;

@property (nonatomic, strong, readonly) NSString *address;

@property (nonatomic, strong, readonly) NSString *zip;

@end


This is all working fine, but now I am attempting to make this work outside of the US. I found out that some places (Hong Kong was the one that prompted this discovery) don't have a zip code. I'm wondering what the best value to put in this SDK is. I believe I have 3 options:


RDPlaces with no zip have the property set to nil
RDPlaces with no zip have the property set to NSNull
RDPlaces with no zip have the property set to @"" (empty string)


What is the most friendly for consumers of this object, and how would one annotate this for swift?
You're trying to solve a solved problem.

Just use CLPlacemark out of Core Location.  It has already solved all the problems you've brought up in your question: how to handle international addresses, what all the necessary fields are, how to handle missing fields, and how to interop with Swift.

Worse case scenario, if CLPlacemark isn't quite what you need, you can either subclass it or model your place object closely around this object.