-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Implement #693, fixed some suggestions from #883. #1443
Conversation
- Created new optional protocol method `copyableMediaItem` on `JSQMessageMediaData` indicating ability to represent media item in form that can be copied to UIPasteboard. Returns `NSDictionary` representation of item with new constants to access items. - Implement ability to copy `JSQLocationMediaItem` as NSURL linking to Google Maps (lat/lng) - Implement ability to copy `JSQPhotoMediaItem` as NSData copyable to other apps (JPEG representation) - Update `JSQMessageViewController` to allow copying of items that implement optional `copyableMediaItem` method on `JSQMessageMediaData`. - Added `MobileCoreServices` framework needed for UTTypes constants. - Added tests for new `copyableMediaItem` functionality for both `JSQLocationMediaItem` and `JSQPhotoMediaItem` I also tried to add the same copy functionality to `JSQVideoMediaItem` but am scratching my head as to what the correct UTType is. The file itself is perfectly intact when emailed and file extension is re-added so it's something else... *smh*
* @discussion You should return an object that is of a class type appropriate to the representation type, | ||
* which typically is a UTI. | ||
*/ | ||
- (id)copyableData; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's name these new methods:
- (NSString *)mediaDataType;
- (id)mediaData;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure ;) Renamed.
@@ -78,4 +78,24 @@ | |||
*/ | |||
- (NSUInteger)mediaHash; | |||
|
|||
@optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd like to target this feature for the 8.0 release, so we can make a breaking change and have this be non-optional instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
Thanks @pstasiak ! This looks great! 😄 👍
|
Oh, also -- if you could squash these commits into a single commit, that would be awesome! |
Awesome! Thanks @pstasiak ! |
Ha, it only took a year to get done. Yay open source! Apologies I couldn't be the one to do this myself, but I'm glad I laid the foundation. |
Thanks @jeffkibuule ! 😄 We didn't merge your code, but we did merge your ideas. 😄 |
Awesome, open idea contribution! |
Implement #693, fixed some suggestions from #883.