Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

Implement #693, fixed some suggestions from #883. #1443

Closed
wants to merge 8 commits into from

Conversation

pstasiak
Copy link
Contributor

Implement #693, fixed some suggestions from #883.

jeffkibuule and others added 7 commits February 13, 2016 23:23
- 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*
@pstasiak pstasiak changed the title Pstasiak develop Copying images and location to pasteboard. Feb 14, 2016
@jessesquires jessesquires changed the title Copying images and location to pasteboard. Implement #693, fixed some suggestions from #883. Feb 15, 2016
* @discussion You should return an object that is of a class type appropriate to the representation type,
* which typically is a UTI.
*/
- (id)copyableData;
Copy link
Owner

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;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure ;) Renamed.

@jessesquires jessesquires added this to the 8.0.0 milestone Feb 15, 2016
@@ -78,4 +78,24 @@
*/
- (NSUInteger)mediaHash;

@optional
Copy link
Owner

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@jessesquires
Copy link
Owner

Thanks @pstasiak ! This looks great! 😄 👍

  • Left a couple of comments
  • Can you update the PR to merge into release_8.0 instead of develop?

@jessesquires
Copy link
Owner

Oh, also -- if you could squash these commits into a single commit, that would be awesome!

@pstasiak
Copy link
Contributor Author

Can you update the PR to merge into release_8.0 instead of develop?
Oh, also -- if you could squash these commits into a single commit, that would be awesome!

PR with applied changes: #1447
I think we can close this PR in favor of #1447.

@jessesquires jessesquires removed this from the 8.0.0 milestone Feb 15, 2016
@jessesquires
Copy link
Owner

Awesome! Thanks @pstasiak !

@jeffkibuule
Copy link

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.

@jessesquires
Copy link
Owner

Thanks @jeffkibuule ! 😄

We didn't merge your code, but we did merge your ideas. 😄

@jeffkibuule
Copy link

@jessesquires

Awesome, open idea contribution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants