MppPhone

Objective-C

@interface MppPhone : NSObject
/**
 * @name MppPhone properties
 */

/**
 * Country code.
 */
@property (nonatomic, copy, readonly, nonnull) NSString *countryCode;

/**
 * Phone number
 */
@property (nonatomic, copy, readonly, nonnull) NSString *phoneNumber;


/**
 * @name MppPhone methods
 */

/**
 * Creates phone object.
 *
 * @param countryCode   Country code
 * @param phoneNumber   Phone number
 */
+ (instancetype _Nullable)phoneWithCountryCode:(NSString *_Nonnull)countryCode phoneNumber:(NSString *_Nonnull)phoneNumber;

/**
 * Creates phone object from dictionary.
 */
- (NSDictionary *_Nonnull)toDictionary;

@end

Swift

class MppPhone : NSObject

Undocumented

MppPhone properties

  • Country code.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nonnull) NSString *countryCode;

    Swift

    var countryCode: String { get }
  • Phone number

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nonnull) NSString *phoneNumber;

    Swift

    var phoneNumber: String { get }

MppPhone methods

  • Creates phone object.

    Declaration

    Objective-C

    + (instancetype _Nullable)phoneWithCountryCode:(NSString *_Nonnull)countryCode
                                       phoneNumber:(NSString *_Nonnull)phoneNumber;

    Swift

    convenience init?(countryCode: String, phoneNumber: String)

    Parameters

    countryCode

    Country code

    phoneNumber

    Phone number

  • Creates phone object from dictionary.

    Declaration

    Objective-C

    - (NSDictionary *_Nonnull)toDictionary;

    Swift

    func toDictionary() -> [AnyHashable : Any]