uservoice / uservoice-ios-sdk

UserVoice iOS SDK
https://www.uservoice.com/mobile/
Other
335 stars 218 forks source link

Custom data passed through the iOS SDK, doesn't reach UserVoice #244

Closed ctalbott closed 10 years ago

ctalbott commented 10 years ago

Passing custom data with the contact form appName custom field is created in the UserVoice account The custom field value is passed, but does not populate the field in UserVoice.

NSString *osVersionString = [NSString stringWithFormat:@"%0.2f",[ WSIUtil getOSVersion]];

config.customFields =

@{@"appName" : [WSIUtil getAppName],

@"info" : [WSIUtil buildInfo],

@"osVersion" : osVersionString};

[UserVoice initialize:config];

Here's a screen shot from the debugger with those fields filled in: screen_shot_2014-03-25_at_4 42 31_pm

dgdempster commented 10 years ago

Hi. Any updates on this?

austintaylor commented 10 years ago

@dgdempster I cannot reproduce this issue at all. I even sent a test ticket into your subdomain from our test app with the values shown above, and it worked perfectly.

Maybe you could step through -[UVTicket createWithMessage:...] on your end to see if the fields are still there? I wonder if you are inadvertently replacing the config or something. I'm pretty stumped.

dgdempster commented 10 years ago

Austin - thanks for looking at this.

1) I'm using presentUserVoiceModalViewControllerForParent, so the entire ticket creation is out of my hands, maybe that's part of the issue.

2) It would seem possible that the issue is totally on the server side - could you inject a "real" ticket into our accont using your test setup and I can see if the info shows up. See attached to see where I think it should be showing up. Maybe it's somewhere else? Or can you look in your DB and see if any of this info is attached to the ticket in the attached image?

thx,

DGD

On Mon, Jun 9, 2014 at 12:28 PM, Austin Taylor notifications@github.com wrote:

@dgdempster https://github.com/dgdempster I cannot reproduce this issue at all. I even sent a test ticket into your subdomain from our test app with the values shown above, and it worked perfectly.

Maybe you could step through -[UVTicket createWithMessage:...] on your end to see if the fields are still there? I wonder if you are inadvertently replacing the config or something. I'm pretty stumped.

— Reply to this email directly or view it on GitHub https://github.com/uservoice/uservoice-ios-sdk/issues/244#issuecomment-45511225 .

dgdempster commented 10 years ago

Note - possibly related...I see this comment in UserVoice.h, it's referencing a method name that doesn't exist, so I'm left wondering of all the choices below this comment whether it's the "andConfig" versions that are deprecated, or the other ones.

DGD

/**

On Mon, Jun 9, 2014 at 12:46 PM, Doug Dempster doug@granitecay.com wrote:

Austin - thanks for looking at this.

1) I'm using presentUserVoiceModalViewControllerForParent, so the entire ticket creation is out of my hands, maybe that's part of the issue.

2) It would seem possible that the issue is totally on the server side - could you inject a "real" ticket into our accont using your test setup and I can see if the info shows up. See attached to see where I think it should be showing up. Maybe it's somewhere else? Or can you look in your DB and see if any of this info is attached to the ticket in the attached image?

thx,

DGD

On Mon, Jun 9, 2014 at 12:28 PM, Austin Taylor notifications@github.com wrote:

@dgdempster https://github.com/dgdempster I cannot reproduce this issue at all. I even sent a test ticket into your subdomain from our test app with the values shown above, and it worked perfectly.

Maybe you could step through -[UVTicket createWithMessage:...] on your end to see if the fields are still there? I wonder if you are inadvertently replacing the config or something. I'm pretty stumped.

— Reply to this email directly or view it on GitHub https://github.com/uservoice/uservoice-ios-sdk/issues/244#issuecomment-45511225 .

austintaylor commented 10 years ago

You should be using -[UserVoice presentUserVoiceInterfaceForParentViewController:]. The methods at the bottom of the header are deprecated, although as you point out, the comment is confusing.

-[UserVocie initialize:config] should be called before calling presentUserVoiceInterfaceForParentViewController.

Here is the ticket I created using our test app: https://wsi-weather.uservoice.com/admin/tickets/24

dgdempster commented 10 years ago

Thanks, that kills the problem - I guess the deprecated method creates it's own copy of the config object and that's what was overriding the parameters.

Thanks for the assist!

DGD

On Mon, Jun 9, 2014 at 3:02 PM, Austin Taylor notifications@github.com wrote:

You should be using -[UserVoice presentUserVoiceInterfaceForParentViewController:]. The methods at the bottom of the header are deprecated, although as you point out, the comment is confusing.

-[UserVocie initialize:config] should be called before calling presentUserVoiceInterfaceForParentViewController.

Here is the ticket I created using our test app: https://wsi-weather.uservoice.com/admin/tickets/24

— Reply to this email directly or view it on GitHub https://github.com/uservoice/uservoice-ios-sdk/issues/244#issuecomment-45530088 .