             return completion(urls: [])
         }
 
+        let URLTypeIdentifier = kUTTypeURL as String
+
+        let group = dispatch_group_create()
+
+        for extensionItem in extensionItems {
+            for attachment in extensionItem.attachments as! [NSItemProvider] {
+                if attachment.hasItemConformingToTypeIdentifier(URLTypeIdentifier) {
+
+                    dispatch_group_enter(group)
+
+                    attachment.loadItemForTypeIdentifier(URLTypeIdentifier, options: nil) { secureCoding, error in
+
+                        if let url = secureCoding as? NSURL {
+                            urls.append(url)
+                        }
+
+                        dispatch_group_leave(group)
+                    }
+                }
+            }
+        }
+        
+        dispatch_group_notify(group, dispatch_get_main_queue()) {
+            completion(urls: urls)
+        }
+    }
+
+    private func imagesFromExtensionContext(extensionContext: NSExtensionContext, completion: (images: [UIImage]) -> Void) {
+
+        var images: [UIImage] = []
+
+        guard let extensionItems = extensionContext.inputItems as? [NSExtensionItem] else {
+            return completion(images: [])
+        }
+
         let imageTypeIdentifier = kUTTypeImage as String
 
         let group = dispatch_group_create()

                self?.extensionContext?.completeRequestReturningItems([], completionHandler: nil)
            }
        }
    }

    override func configurationItems() -> [AnyObject]! {

        }
        
        dispatch_group_notify(group, dispatch_get_main_queue()) {
            completion(images: images)
        }
    }
