SHFriendlyNameObject Class Reference

Inherits from NSObject
Declared in SHFriendlyNameObject.h

Overview

Object for hosting friendly name, vc, xib for iphone and ipad. Refer to -(BOOL)shCustomActivityList:(NSArray *)arrayFriendlyNameObj;.

  friendlyName

The friendly name register and show on StreetHawk server when sending push notification. All platform should use same friendly name. Example: @“My favourite page”. This is mandatory, case sensitive, cannot be nil or empty, and length should be less than 150. It cannot contain “:” because “:” is used as separator for vc:<xib_iphone>:<xib_ipad>.

@property (nonatomic, strong) NSString *friendlyName

Declared In

SHFriendlyNameObject.h

  vc

The view controller class name, it must inherit from UIViewController. Example: @“MyViewController”. This is mandatory, case sensitive, cannot be nil or empty, otherwise fail to register.

@property (nonatomic, strong) NSString *vc

Declared In

SHFriendlyNameObject.h

  xib_iphone

The xib name for iPhone. Example: @“MyViewController_iPhone”. This is optional, case sensitive, used for create view controller for iPhone. If not run on iPhone, or xib name is same as class name, set nil.

@property (nonatomic, strong) NSString *xib_iphone

Declared In

SHFriendlyNameObject.h

  xib_ipad

The xib name for iPad. Example: @“MyViewController_iPad”. This is optional, case sensitive, used for create view controller for iPad. If not run on iPad, or xib name is same as class name, set nil.

@property (nonatomic, strong) NSString *xib_ipad

Declared In

SHFriendlyNameObject.h

+ findObjByFriendlyName:

Friendly objects are stored locally in NSUserDefaults. Server may send friendly name, need to get raw information to launch page. This method is to find matching SHFriendlyNameObject from local list.

+ (SHFriendlyNameObject *)findObjByFriendlyName:(NSString *)friendlyName

Parameters

friendlyName

Comparing friendly name.

Return Value

If find match friendly name locally, return the object; else return nil.

Declared In

SHFriendlyNameObject.h

+ tryFriendlyName:

Try to find friendly name according to vc, if not find matching friendly name return vc.

+ (NSString *)tryFriendlyName:(NSString *)vc

Parameters

vc

Pass in view controller name.

Return Value

If find matching friendly name, return friendly name; otherwise return same vc.

Declared In

SHFriendlyNameObject.h