-
Notifications
You must be signed in to change notification settings - Fork 218
Added support for including attachments in tickets #138
base: master
Are you sure you want to change the base?
Conversation
I'm hesitant to add a dependency on MobileCoreServices just for this. Seems strange for UV to be messing with the file system in general. Why not just have clients pass in the name, content type, and base64 data? Actually what would be even simpler would be to have a callback on that lets you modify the NSMutableDictionary before we make the request. |
The reasons why I did not implement it in either of the two alternative ways you explain is ease of use of the SDK. When using this functionality, the developer starts with a path to a file. Then he needs to determine the content type and do the encoding. Because this is a step that needs to be done always, it makes sense to encapsulate it inside the SDK. I do not like the idea of the callback that much. The key advantage of the SDK is that the developer does not need to know the UserVoice REST API at all. Using a callback would eliminate this advantage, as the developer would need to learn the API to use it. But I also understand that including the MobileCoreServices is totally unnecessary for the developers that do not use this feature. I will give this some more thought to see if I come up with a better solution. (And if not, I can just use my own fork in my projects.) |
How about adding a compiler flag that needs to be set for this feature to be enabled? This way it would be available for those that want to include MobileCoreServices, but would not be included by default. |
I agree that in general users of the SDK shouldn't have to know the UserVoice API. But it seems like this is a pretty unusual use case, which would justify someone looking at API docs, etc. I mean if I had several people asking for this then it would make sense to include it. It just seems like a significant amount of code to add if you are the only person who is going to use it. (I have a number of people complaining about the size of the library.) |
Just for the record, I would like this functionality as well. |
Wouldn't the use of a compiler flag to prevent including this code eliminate the issue of added size? Or is it more of a question of the size of the source code than that of the compiled files? |
A compiler flag wouldn't work very nicely with our static lib distribution scheme. I'm thinking about moving to a cocoapods / source distribution model such that it would be easier for people to select the components they need. Once I figure that out I'll revisit this. I think I want to leave it as a fork for now. |
Here is a link to the UserVoice page for this feature |
This pull request also addresses the following issue #152 |
Is there any way to use this repository? (I need this functionality) - I cloned it and tried to build it, but got stucked with a compiler error: /Users/Fede/RubyProjects/Payango/uservoice-iphone-sdk/Classes/UVTicket.m:135:23: error: implicit declaration of function 'UTTypeCreatePreferredIdentifierForTag' |
You need to include the MobileCoreServices framework. (It is mentioned in the comments above) |
That worked, thanks! I get another error. In line 28 of UVBaseTicketViewController.m, there's @implementation UVBaseTicketViewController. That seems to force to implement a couple of methods that are missing
This could be related to the XCode version I'm using? /Users/Fede/RubyProjects/Payango/uservoice-iphone-sdk/Classes/UVBaseTicketViewController.m:28:17: error: method 'tableView:numberOfRowsInSection:' in protocol not /Users/Fede/RubyProjects/Payango/uservoice-iphone-sdk/Classes/UVBaseTicketViewController.h:16:12: note: required for direct or indirect protocol |
This is a feature that would be very useful for us as well. Is there any change this will get merged into V3 of the user voice module any time soon? Otherwise, I might try to create a lightweight version of this. |
I'd also like this feature. Letting users add attachments is something we get complaints about in our app from time to time. |
You could use this to pre-add attachment to a contact us message.
Issues with doing this : It does not visually indicate the user of the attached log to the message |
No description provided.