5

I am using Slack with SupportKit v2.9.0. I want to be able to retrieve messages and media files from other users in other channels.

(BOOL) application:(UIApplication *)application 
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    // Override point for customization after application launch.
    [SupportKit initWithSettings:
    [SKTSettings settingsWithAppToken:@"eknlh3uw8lrdveknlh3uw8lrdvs49xj29fqahcs49xj29fqahc"]];
    [SupportKit setUserFirstName:@"Han" lastName:@"Solo"];

    return YES;
} 

I am calling SupportKit in my app with:

[SupportKit show];

When the view loads I am able to send and retrieve messages but the name of the user doesn't appear. I would also like to fetch messages from other users of my app into this same conversation.

Update:

I have made the following change

(void) viewDidLoad {
    [super viewDidLoad];

    [SKTUser currentUser].firstName = @"Doctor";
    [SKTUser currentUser].lastName = @"Who";
    [[SKTUser currentUser] addProperties:@{ @"nickname" : @"Lil Big Daddy Slim", @"weight" : @650, @"premiumUser" : @YES }];

    [SupportKit show];

}

This is what I see in my email: enter image description here

and this in my app: enter image description here

But I am still unable to see the name of the user appear in the conversation.

Andrew Lavers
  • 8,023
  • 1
  • 33
  • 50
Sport
  • 8,570
  • 6
  • 46
  • 65
  • The image on the right is what the user sends to you. It will show up Slack immediately as the user posts the image from your app. The conversation history will be preloaded whenever the user re-opens your app. You don't need to exclusively pull the messages from Slack. Unless I have your question wrong? – codehitman Jul 22 '15 at 14:06
  • Do you mean that you want to be able to pull media files that you upload to Slack? Along with user information into the App? – codehitman Jul 22 '15 at 14:19
  • yes , i want to fetch conversation between user – Sport Jul 23 '15 at 05:46

2 Answers2

2

To set the user name and profile you can use

[SKTUser currentUser].firstName = @"Doctor";
[SKTUser currentUser].lastName = @"Who";
[[SKTUser currentUser] addProperties:@{ @"nickname" : @"Lil Big Daddy Slim", @"weight" : @650, @"premiumUser" : @YES }];

See this doc for more details http://docs.supportkit.io/#identifying-your-users

Note that SupportKit conversations are meant to be between an app user and an app maker. Having conversation between two app users is not something that is supported at the moment.

jpjoyal
  • 146
  • 3
  • can you see my issue after your instruction i have changed .but i am not able to do conversation – Sport Jul 23 '15 at 07:01
0

SupportKit cannot be used as a chat client between App users, if that's what you mean. I think what you might be looking for is something along the lines of ChatSecure. However, that won't let you as an App Maker contribute to the conversation between users.

codehitman
  • 1,148
  • 11
  • 33