This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inputs: | |
| - opts: | |
| description: | | |
| Working directory of the step. | |
| You can leave it empty to don't change it. | |
| is_expand: true | |
| is_required: false | |
| title: Working directory | |
| workdir: $BITRISE_SOURCE_DIR | |
| - opts: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>method</key> | |
| <string>development</string> | |
| </dict> | |
| </plist> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tableView | |
| .rx_modelSelected(PasteboardItem) | |
| .subscribeNext { [weak self] element in | |
| self?.pasteViewModel.addItemsToPasteboard(element) | |
| }.addDisposableTo(disposeBag) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pasteViewModel.pasteboardItems() | |
| .bindTo(tableView.rx_itemsWithCellIdentifier("pasteCell", cellType: UITableViewCell.self)) { (row, element, cell) in | |
| switch element { | |
| case .Text(let string): | |
| cell.textLabel?.text = String(string) | |
| case .Image(let image): | |
| cell.imageView?.image = image | |
| }.addDisposableTo(disposeBag) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| observableString.subscribeNext { [weak self] string in | |
| if let item = string { | |
| self?.addItem(item) | |
| } | |
| }.addDisposableTo(disposeBag) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let observableString = pasteboard.rx_observe(String.self, "string") | |
| let observableImage = pasteboard.rx_observe(UIImage.self, "image") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let pasteboard = NSNotificationCenter.defaultCenter().rx_notification("UIPasteboardChangedNotification", object: nil) | |
| _ = pasteboard.map { [weak self] (notification: NSNotification) -> PasteboardItem? in | |
| if let pb = notification.object as? UIPasteboard { | |
| if let string = pb.valueForPasteboardType(kUTTypeUTF8PlainText as String) { | |
| return self?.pasteboardItem(string) | |
| } | |
| if let image = pb.valueForPasteboardType(kUTTypeImage as String) { | |
| return self?.pasteboardItem(image) | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .subscribeNext { [weak self] pasteboardItem in | |
| if let item = pasteboardItem { | |
| self?.addPasteboardItem(item) | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .addDisposableTo(disposeBag) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| #cgo CFLAGS: -mmacosx-version-min=10.7 -D__MAC_OS_X_VERSION_MAX_ALLOWED=1060 | |
| #cgo LDFLAGS: -framework CoreFoundation -framework Security | |
| #include <stdlib.h> | |
| #include <CoreFoundation/CoreFoundation.h> | |
| #include <Security/Security.h> | |
| */ |