Skip to content

Instantly share code, notes, and snippets.

@adarshmishra
adarshmishra / 0_reuse_code.js
Created Aug 30, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View Launch one to one chat with userDetail
ALUserService * userService = [ALUserService new ];
[userService getUserDetail:userId withCompletion:^(ALContact *contact) {
ALChatManager * chatManager = [[ALChatManager alloc] init];
[chatManager launchChatForUserWithDisplayName:userId withGroupId:nil
andwithDisplayName:nil andFromViewController:self];
}];
View Launch Group of two in Objective-C
-(void)launchGroupOfTwoWithClientId:(NSString*)clientGroupId
withMetaData:(NSMutableDictionary*)metadata
andWithUser:(NSString *)userId
andFromViewController:(UIViewController *)viewController
{
ALChannelService * channelService = [[ALChannelService alloc] init];
ALChannel *alChannel = [channelService fetchChannelWithClientChannelKey:clientGroupId];
if (alChannel){
You can’t perform that action at this time.