CoreDragon is a drag'n'drop library for iOS applications

Related tags

Guides CoreDragon
Overview

CoreDragon

DEPRECATED: Please use Apple's Drag'n'drop APIs introduced in iOS 11 instead.

cocoapods license
Twitter email

CoreDragon is a drag'n'drop library for iOS applications. Instead of using context menus, modal view controllers, share sheets and other "indirect manipulation" ways of moving data around, it's much more intuitive to just grab the thing you want to move, and drop it on the place where you want to move it to.

CoreDragon uses similar concepts as the drag'n' drop APIs on MacOS, and modifies them to work better in a world with view controllers. It works within a single application, and on modern iPads, between applications that are running in split screen mode.

CoreDragon was originally called SPDragNDrop, and was a Hackweek experiment written by me during the December 2012 Hackweek at Spotify. Since I really loved the idea and would hate for the code+idea to just rot away, Spotify allowed me to release the code under Apache 2.0 before my employment there ended.

See a demo introduction with two sample applications that show you the full feature set of CoreDragon over at https://www.youtube.com/watch?v=AQ7B2x-LHnQ.

Installation

  1. Add pod 'CoreDragon' to your Podfile
  2. Run pod install
  3. Add #import from your bridging header, prefix header, or wherever you want to use drag'n'drop features

Getting Started

Installation

By default, CoreDragon uses a long-press-and-drag gesture to start and perform dragging. To install this default gesture, call enableLongPressDraggingInWindow: from your Application Delegate like so:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
	[[DragonController sharedController] enableLongPressDraggingInWindow:self.window];
    return YES;
}

Registering things that can be dragged

When you have a view that you would like to allow your users to drag, you can register it with -[DragonController registerDragSource:delegate:]. You would probably call it from a view controller's viewDidLoad, setting the view controller as the delegate. Whenever a dragging operation is initiated from this view, it is up to your view controller to provide the data for the object being dragged by putting it on a pasteboard:

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    [[DragonController sharedController] registerDragSource:label1 delegate:self];
}

- (void)beginDragOperation:(id)drag fromView:(UIView *)draggable
{
	// Required: Provide the data to be dragged by adding it to the dragging info's pasteboard:
	[drag.pasteboard setValue:text forPasteboardType:(NSString*)kUTTypePlainText];
	
	// By default, the item being dragged is represented by a screenshot of the draggable view.
	// Optionally, you can set 'title', 'subtitle' and 'draggingIcon' on the dragging info
	// to give it a pretty icon.
	NSString *text = [(UILabel*)draggable text];
    drag.title = text;
    drag.draggingIcon = [UIImage imageNamed:@"testimage"];
}

Drag sources are automatically unregistered when they are deinited.

Registering drop targets

Now that the user is holding an object with their finger, they will need somewhere to drop it. You can register drop targets in a very similar manner to drag sources. The delegate protocol for drop targets has several methods:

  • For accepting the dragged data (required)
  • For indicating that it does or does not support being dragged to
  • For springloading (hovering over the drop target to navigate into it, like hovering an icon in Finder while dragging)
  • For customizing the visualization of the drop target based on where the user's finger is pointing (to support custom highlighting in a table view, etc).

A simple drop target could look like so:

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    [[DragonController sharedController] registerDropTarget:label2 delegate:self];
}

// Ensure that we only receive drops for plain text
- (BOOL)dropTarget:(UIView *)droppable canAcceptDrag:(id)drag
{
	return [drag.pasteboard containsPasteboardTypes:@[(NSString*)kUTTypePlainText]];
}

// When some plain text is dropped on this target, set the label's text to the incoming text.
- (void)dropTarget:(UIView *)droppable acceptDrag:(id)drag atPoint:(CGPoint)p
{
	[(UITextView*)droppable setText:[drag.pasteboard valueForPasteboardType:(NSString*)kUTTypePlainText]];
}

Examples

DragonFrame

A "photo frame" app with the simplest possible drag and drop support. Has a single image view which accepts drops on one tab, and another tab with a few example photos.

Features:

  • Registering drag sources (example photos)
  • Registering drop targets (the photo frame)
  • Two-handed navigation: Grab a photo with one hand, and tap the tab bar to navigate to the photo frame.

DragonPhotos

This is a photo organizer app with folder support, demoing all features of CoreDragon.

Photos are laid out in a collection view in a user-defined order. Dropping a photo onto another photo creates a folder. Photos can be imported from the camera roll, or dragged to the application.

Features:

  • Registering drag sources (photos and folders)
  • Registering drop targets (folders and the view controller's root view)
  • Multiple dragging representations.
    • Image data is put on pasteboard to support dragging images to other applications.
    • Database reference is put on pasteboard to support reordering and reorganizing photos within the application.
  • Custom highlighting. It is possible to re-order objects within a folder by drag-and-drop, with an indicator showing the new location for an item as a custom highlight view.
  • Spring-loading. By hovering an object over a folder, the hovered folder view controller is opened, so that you can continue organizing within it.
  • Two-handed navigation. Instead of spring-loading, you can grab an object with one hand, and then tap in the application with your other hand to navigate to the location in the application where you want to drop the object.

dragonphotos

DragonChat

TO BE IMPLEMENTED

A fake chat app with demo conversations, where you can attach photos to the conversation by dragging them from DragonPhotos. The purpose of this app is to show a real-world use case of drag&drop.

License

Apache 2.0

Background

I've always loved multitouch. In addition, I love working spatially with windows and drag&drop. Neither concept has gained much traction on iPad, and not even exploring those concepts means missing out.

At Spotify, I got my windows by copying Loren Brichter's stacked panes navigation. Finally, I had tactile, direct manipulation navigation. However, all contextual operations were still performed in modes. If you wanted to share a track with a friend, you'd go into the context menu mode for your track by long-pressing it, then the sharing mode by choosing an option in a table, then the friend selection mode... To me, it would be so much more natural to just grab the track, and drag it onto the icon representing my friend. Suddenly you'd be able to remove all these modes, and have direct manipulation of your objects.

I met my hero Bret Victor at WWDC 2012, and we talked for a while about drag & drop on iPad, and he added a very important point I hadn't thought about for many years: with multitouch, you can pick something up with one hand, and navigate with the other. This concept had already blown my mind once back in 2005, when TactaPad released a few amazing concept movies and then never showed themselves again.

So during Hackweek December 2012, I mocked up drag&drop inside the Spotify iPad app. It worked really well. You could pick up a track with your right hand, tap the tab bar with your left hand, navigate around the UI a bit either by tapping on items with your left hand or springloading with your right, and dropping your item when you were done.

Unfortunately, the idea never got any traction within the company and the branch died. That was over a year ago, and the code is now uncompileable. (Yes, when your build system breaks with every point update of Xcode, code really does rot.) Thus, the only screenshot I have is of the trivial demo app in this repo. Hopefully it is inspiring enough that you now feel the immediate need to use the code or the concept in your own app! Hooray!

After WWDC 2015, when split-screen multitasking was introduced, I started working on inter-app drag'n'drop. Here's what it looked like on 20150831, and further progress on 20151129.

Inter-app drag'n'drop was released beginning of 2016, with a demo movie on YouTube (moved over from lookback).

Comments
  • When there are multiple Windows, drag and drop no longer works.

    When there are multiple Windows, drag and drop no longer works.

    When there are multiple windows, CoreDragon does try to loop though them but upon not finding a source on the first window it will return nil, the fix is as simple as making sure to only return a source when looping through the windows if there actually is one, otherwise carry on looping:

    - (SPDragSource*)sourceUnderLocation:(CGPoint)locationInWindow
    {
        for(UIWindow *window in [UIApplication sharedApplication].windows) {
            UIView *view = [window hitTest:locationInWindow withEvent:nil];
            SPDragSource *source = nil;
            do {
                source = objc_getAssociatedObject(view, kDragSourceKey);
                if (source)
                    break;
                view = [view superview];
            } while(view);
    
    // FIX STARTS HERE
            if (source) 
                return source;
        }
        return nil;
    }
    
    bug 
    opened by jcampbell05 5
  • always report

    always report "clang: error: linker command failed with exit code 1 (use -v to see invocation)" during build

    after pod install, I open the DragonFrame and DragonPhotos project in the XCODE 7, then build failed, the error is as following:

    duplicate symbol OBJC_IVAR$_AsyncSocket.theContext in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncWritePacket.timeout in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncReadPacket.timeout in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncReadPacket.startOffset in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_CLASS$_AsyncSocket in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_METACLASS$_AsyncSocket in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_CLASS$_AsyncSpecialPacket in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_METACLASS$_AsyncSpecialPacket in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_CLASS$_AsyncWritePacket in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_METACLASS$_AsyncWritePacket in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_CLASS$_AsyncReadPacket in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_METACLASS$_AsyncReadPacket in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSpecialPacket.tlsSettings in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theFlags in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theRunLoopModes in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncReadPacket.bufferOwner in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theConnectTimer in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theWriteTimer in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theReadTimer in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncWritePacket.buffer in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncReadPacket.buffer in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.partialReadBuffer in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theRunLoop in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol _AsyncSocketException in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol _AsyncSocketErrorDomain in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncReadPacket.term in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theWriteStream in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theReadStream in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncReadPacket.maxLength in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncReadPacket.originalBufferLength in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncReadPacket.readLength in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncWritePacket.tag in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncReadPacket.tag in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theWriteQueue in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theReadQueue in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theCurrentWrite in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theDelegate in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncWritePacket.bytesDone in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncReadPacket.bytesDone in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theCurrentRead in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theUserData in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theNativeSocket6 in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theSocket6 in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theSource6 in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theNativeSocket4 in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theSocket4 in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) duplicate symbol OBJC_IVAR$_AsyncSocket.theSource4 in: /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCerfing.a(AsyncSocket.o) /Users/samye/Library/Developer/Xcode/DerivedData/DragonPhotos-hjhzmyhvtsyagxfeorhhsjmjhxig/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a(AsyncSocket.o) ld: 47 duplicate symbols for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

    P1 
    opened by samye1976 4
  • always return nil when call objc_getAssociatedObject(view, kDragSourceKey)

    always return nil when call objc_getAssociatedObject(view, kDragSourceKey)

    if I long press the image, the lldb debug says "Cancelling drag operation because no item was put on pasteboard", and further lock to the method "- (SPDragSource*)sourceUnderLocation:(CGPoint)locationInWindow" in DragonController.m when calling "source = objc_getAssociatedObject(view, kDragSourceKey);" which always return nil to source.

    and I did notice that view and kDragSourceKey have value.

    your suggestion is appreciated

    opened by samye1976 3
  • Fix CocoaAsyncSocket dependency

    Fix CocoaAsyncSocket dependency

    The Runtime based "AsyncSocket" class has been removed from CAS. We need to hard-code a dependency for CocoaAyncSocket in Cerfing to 7.4.1 for CoreDragon to build.

    opened by nevyn 2
  • Expose more highlighting methods

    Expose more highlighting methods

    This diff allows the user to request a recalculation of drop targets in case the available drop targets on the screen change during the drag. (e.g. when a table view is scrolling)

    It also exposes the ability to redraw a highlight associated with the view managed by Core Dragon.

    cc @nevyn

    opened by bogo 1
  • Dragging started/stopped notifications have copy-paste error

    Dragging started/stopped notifications have copy-paste error

    +/// Sent when a drag operation starts.
     +static NSString *const DragonDragOperationStartedNotificationName = @"eu.thirdcog.dragon.dragStarted";
     +/// Sent when a drag operation stops.
     +static NSString *const DragonDragOperationStoppedNotificationName = @"eu.thirdcog.dragon.dragStarted";
    

    Thanks to @andrebraga for finding it!

    opened by nevyn 1
  • logo :P

    logo :P

    https://www.fiverr.com/alinadesigns/create-a-high-quality-logo-in-just-24-hours?context=advanced_search&context_type=rating&context_referrer=search_gigs&source=guest-hp&pos=16&funnel=5129d158-d103-43bd-9cf4-1e682afcd2ee

    opened by nevyn 0
  • Xcode 8 PBXcp error:

    Xcode 8 PBXcp error: "Couldn't create directory ... not a directory"

    I recently inherited a project that contained CoreDragon 0.1.1 (and MeshPipe 0.1.3) via CocoaPods.

    After updating pods to the latest version (CoreDragon 0.1.3) and migrating to Xcode 8/Swift 3, I saw this error upon building the project: coredragonerror1

    Deleting both of the Copy...Public Header build phases in the MeshPipe Target made the build errors go away, but with this new error in DragonController.m: 'MeshPipe/CerfingMeshPipeTransport/CerfingMeshPipe.h' file not found

    ...Which I fixed by doing this: coredragonerror3

    Not sure if there's something unique about my setup. I did use "pod install" to remove CoreDragon (and its 4 submodules) and re-add it a number of times before I came to the above solution.

    opened by weien 4
  • Improve performance of setItems

    Improve performance of setItems

    I'm setting the metadata for the drag as an additional pasteboard item. This means the data is sent twice to pasteboard, which is a slow and synchronous operation.

    By subclassing UIPasteboard and doing the metadata addition in the original setItems call, performance can be doubled.

    opened by nevyn 0
  • Support for the new drag and drop in uitableview and uicollectionview

    Support for the new drag and drop in uitableview and uicollectionview

    Is there support for the new APIs Apple released for drag and drop with UITableView and UICollectionView ?

    If not how do you think we could add support ?

    enhancement 
    opened by jcampbell05 4
This library is a UIView that is capable of Picture-in-Picture (PiP) in iOS.

>> 日本語 UIPiPView This library is a UIView that is capable of Picture-in-Picture (PiP) in iOS. Using this library, information that is updated in real

Akihiro Urushihara 128 Jan 4, 2023
DCL Private Library

DCLPrivateLibrary Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements Installation

null 0 Nov 28, 2021
SwiftUI module library for adding seasons theme animations to your app

HolidayThemes SwiftUI module library for adding seasons theme animations to your app. Requirements iOS 13.0+ Xcode 12.0+ Installation Swift Package Ma

null 2 Mar 7, 2022
SmartString - A powerful and small library that will allow the creation of complex String Styles

SmartString A powerful and small library that will allow the creation of complex

Valerio 7 Oct 26, 2022
Swift library of lightweight interfaces for prototyping, bridged to JS

Prototope Prototope is a lightweight, high-performance prototyping framework. Its goals are: making simple things very easy making complex things poss

Khan Academy 230 Jun 29, 2022
⚛️ A Reactive Data-Binding and Dependency Injection Library for SwiftUI x Concurrency.

SwiftUI Atom Properties A Reactive Data-Binding and Dependency Injection Library for SwiftUI x Concurrency ?? API Reference Introduction Examples Gett

Ryo Aoyama 199 Dec 17, 2022
Swift Client library to interact with Supabase Functions.

functions-swift Swift Client library to interact with Supabase Functions. Usage let client = FunctionsClient( url: URL(string: "https://project-id.s

Supabase Community 3 Dec 1, 2022
This is an iOS Safari Extension Sample that adds a "Develop menu" to Safari on iOS to allow you to analyze websites.

Develop Menu for Mobile Safari This is an iOS Safari Extension that adds a "Develop menu" to Safari on iOS to allow you to analyze websites. This is a

Watanabe Toshinori 1 Dec 7, 2022
List of awesome iOS & Swift stuff!!

Awesome iOS Developer Feel free to fork this repository and pull requests!! ?? Content Coding Convention Swift Lint Design Pattern Adaptor Delegation

Jungpyo Hong 666 Jan 8, 2023
An assignment for ios Dev intern position

iOS Assignment An assignment for ios Dev intern position Design Process A UI design for the project is made in FIGMA. Link here Figma Sneek Peek Descr

Divyam Solanki 11 Apr 28, 2022
SwiftUI iOS component for Step Indications.

StepperView SwiftUI iOS component for Step Indications Table of Contents Features Documentation Installation CocoaPods Carthage Swift Package Manager

Badarinath Venkatnarayansetty 851 Dec 29, 2022
This is a course project for CodePath Professional iOS Development class.

Parstagram - Part I This is an Instagram clone with a custom Parse backend that allows a user to post photos and view a global photos feed. Time spent

Mingkai Chen 0 Oct 13, 2021
Mini-application iOS native avec Xcode et Swift exploitant l'architecture MVVM et le framework Combine d'Apple pour la mise en place de la programmation réactive fonctionnelle, le tout avec UIKit.

iOS (Swift 5): Test MVVM avec Combine et UIKit L'architecture MVVM et la programmation réactive fonctionnelle sont très utlisées dans le développement

Koussaïla BEN MAMAR 2 Nov 5, 2022
iOS native app demo with Xcode and Swift using MVVM architecture and Apple's Combine framework for functional reactive programming, all with UIKit

iOS (Swift 5): MVVM test with Combine and UIKit MVVM and functional reactive programming (FRP) are very used in iOS development inside companies. Here

Koussaïla BEN MAMAR 2 Dec 31, 2021
USC's ITP342 iOS Development Swift Final Project

READMEBlogs USC's ITP342 iOS Development Swift Final Project NOTE: You'll need to attach your own Firebase to the app LINK TO APP ZIP FILE: https://dr

Connie Xu 0 Dec 8, 2021
USC's ITP342 iOS Development Swift Final Project

READMEBlogs USC's ITP342 iOS Development Swift Final Project NOTE: You'll need to attach your own Firebase to the app LINK TO APP ZIP FILE: https://dr

Connie Xu 0 Dec 8, 2021
Create a simple MVVM-C iOS architecture with Swift for starters

iOS-Architecture-MVVM MVVM+Coordinators IOS Architecture Tutorial By Bobby Pehtr

Mehrdad Ahmadian 0 Dec 30, 2021
NewsAppMVVM - A Swift iOS App created to practice MVVM Design Pattern

NewsAppMVVM A Swift iOS App created to practice MVVM Design Pattern. This app re

Jorge Roberto 1 Jan 3, 2022