BBURLManager is a singleton which provides its delegate with the ability to customize how the application deals with certain types of URLs.
The types of URLs which you can intercept and provide a customized experience include:
http, https, and other web links included in chats and posts
File attachments in chats and posts (such as PDF, XLS and other non-image attachments)
Forced update AppStore URLs
BBURLManagerDelegate is easy. All the methods of
BBURLManagerDelegate are optional, and if they are not implemented, the app will handle the situation in a default manner, which typically involves opening the URL/Attachment inside the application. See
BBURLManagerDelegate for the full list of methods.
@interface BBURLManager : NSObject+ (instancetype)sharedInstance;@property (nonatomic, weak) id <BBURLManagerDelegate> urlManagerDelegate;@end
BBURLManagerDelegate can be set or cleared at anytime.
You should not call BBURLManager alloc init to get a copy of the BBURLManager. Instead use BBURLManager sharedInstance.
Returns the shared instance of BBURLManager. Using your own copy of BBURLManager may seem to work, but many features of the app will not behave correctly.
@property (nonatomic, weak) id <BBURLManagerDelegate> urlManagerDelegate;
delegate Instantiate a class that implements one or more of the methods of the
BBURLManagerDelegate and set it on the shared instance of the BBURLManager.