├── .DS_Store
├── screenshots
└── documents.jpeg
├── SwiftyDocPicker
├── Assets.xcassets
│ ├── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── DocumentDelegate.swift
├── DocumentCell.swift
├── Document.swift
├── ViewController.swift
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Info.plist
├── AppDelegate.swift
├── Colors.swift
├── Extensions.swift
└── DocumentPicker.swift
├── SwiftyDocPicker.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── abe.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── xcuserdata
│ └── abe.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── project.pbxproj
└── README.md
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amangona/SwiftyDocPicker/HEAD/.DS_Store
--------------------------------------------------------------------------------
/screenshots/documents.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amangona/SwiftyDocPicker/HEAD/screenshots/documents.jpeg
--------------------------------------------------------------------------------
/SwiftyDocPicker/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/SwiftyDocPicker.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SwiftyDocPicker.xcodeproj/project.xcworkspace/xcuserdata/abe.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amangona/SwiftyDocPicker/HEAD/SwiftyDocPicker.xcodeproj/project.xcworkspace/xcuserdata/abe.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/SwiftyDocPicker.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/SwiftyDocPicker/DocumentDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DocumentDelegate.swift
3 | // SwiftyDocPicker
4 | //
5 | // Created by Abraham Mangona on 9/14/19.
6 | // Copyright © 2019 Abraham Mangona. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public enum SourceType: Int {
12 | case files
13 | case folder
14 | }
15 |
16 | protocol DocumentDelegate: class {
17 | func didPickDocuments(documents: [Document]?)
18 | }
19 |
--------------------------------------------------------------------------------
/SwiftyDocPicker.xcodeproj/xcuserdata/abe.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | SwiftyDocPicker.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/SwiftyDocPicker/DocumentCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DocumentCell.swift
3 | // SwiftyDocPicker
4 | //
5 | // Created by Abraham Mangona on 9/25/19.
6 | // Copyright © 2019 Abraham Mangona. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class DocumentCell: UICollectionViewCell {
12 |
13 | @IBOutlet weak var titleLabel: UILabel!
14 |
15 | override func awakeFromNib() {
16 | self.layer.cornerRadius = 8
17 | }
18 |
19 | func configure(document: Document) {
20 | self.titleLabel.text = document.fileURL.lastPathComponent
21 | self.setGradientBackgroundColor(colorOne: Colors().randomColors.first!, colorTwo: Colors().randomColors.last!)
22 |
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SwiftyDocPicker
2 | A very "Swifty" approach to picking documents. Document selection had never been easier.
3 |
4 | 
5 |
6 | ## Usage
7 | Its as simple as conforming to the DocumentDelegate
8 | ```swift
9 | class ViewController: UIViewController, DocumentDelegate {
10 | ```
11 | Initializing a DocumentPicker
12 | ```swift
13 | var documentPicker: DocumentPicker!
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 | documentPicker = DocumentPicker(presentationController: self, delegate: self)
18 | }
19 | ```
20 | Presenting the picker
21 | ```swift
22 | documentPicker.present(from: view)
23 | ```
24 | And responding to the delegate function
25 | ```swift
26 | func didPickDocuments(documents: [Document]) {
27 | // handle selected documents
28 | }
29 | ```
30 | Read more on [Medium](https://medium.com/@abrahammangona/a-swifty-way-to-pick-documents-59cad1988a8a)
31 |
--------------------------------------------------------------------------------
/SwiftyDocPicker/Document.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Document.swift
3 | // SwiftyDocPicker
4 | //
5 | // Created by Abraham Mangona on 9/14/19.
6 | // Copyright © 2019 Abraham Mangona. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class Document: UIDocument {
12 |
13 | var data: Data?
14 |
15 | override func contents(forType typeName: String) throws -> Any {
16 | guard let data = data else { return Data() }
17 |
18 | return try NSKeyedArchiver.archivedData(withRootObject: data, requiringSecureCoding: true)
19 | }
20 |
21 | override func load(fromContents contents: Any, ofType typeName: String?) throws {
22 |
23 | guard let data = contents as? Data else { return }
24 |
25 | self.data = data
26 | }
27 |
28 | }
29 |
30 | extension URL {
31 | var isDirectory: Bool! {
32 | return (try? resourceValues(forKeys: [.isDirectoryKey]))?.isDirectory
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/SwiftyDocPicker/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // SwiftyDocPicker
4 | //
5 | // Created by Abraham Mangona on 9/14/19.
6 | // Copyright © 2019 Abraham Mangona. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController, DocumentDelegate {
12 |
13 | var documentPicker: DocumentPicker!
14 |
15 | var documents = [Document]()
16 |
17 | @IBOutlet weak var collectionView: UICollectionView!
18 |
19 | override func viewDidLoad() {
20 | super.viewDidLoad()
21 |
22 | documentPicker = DocumentPicker(presentationController: self, delegate: self)
23 | }
24 |
25 | func didPickDocuments(documents: [Document]?) {
26 | documents?.forEach {
27 | self.documents.append($0)
28 | }
29 | collectionView.reloadData()
30 | }
31 |
32 |
33 | @IBAction func pickPressed(_ sender: Any) {
34 | documentPicker.present(from: view)
35 | }
36 |
37 | }
38 |
39 | extension ViewController: UICollectionViewDelegate, UICollectionViewDataSource {
40 |
41 | func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
42 | return documents.count
43 | }
44 |
45 | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
46 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "DocumentCell", for: indexPath) as! DocumentCell
47 | cell.configure(document: documents[indexPath.row])
48 | return cell
49 | }
50 |
51 |
52 |
53 | }
54 |
55 |
--------------------------------------------------------------------------------
/SwiftyDocPicker/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/SwiftyDocPicker/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/SwiftyDocPicker/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "20x20",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "20x20",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "29x29",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "29x29",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "40x40",
66 | "scale" : "1x"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "size" : "40x40",
71 | "scale" : "2x"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "size" : "76x76",
76 | "scale" : "1x"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "size" : "76x76",
81 | "scale" : "2x"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "size" : "83.5x83.5",
86 | "scale" : "2x"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "size" : "1024x1024",
91 | "scale" : "1x"
92 | }
93 | ],
94 | "info" : {
95 | "version" : 1,
96 | "author" : "xcode"
97 | }
98 | }
--------------------------------------------------------------------------------
/SwiftyDocPicker/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // SwiftyDocPicker
4 | //
5 | // Created by Abraham Mangona on 9/14/19.
6 | // Copyright © 2019 Abraham Mangona. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/SwiftyDocPicker/Colors.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Colors.swift
3 | // SwiftyDocPicker
4 | //
5 | // Created by Abraham Mangona on 9/25/19.
6 | // Copyright © 2019 Abraham Mangona. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import UIKit
11 |
12 | class Colors {
13 |
14 | let red = [#colorLiteral(red: 0.9654200673, green: 0.1590853035, blue: 0.2688751221, alpha: 1),#colorLiteral(red: 0.7559037805, green: 0.1139892414, blue: 0.1577021778, alpha: 1)]
15 | let orangeRed = [#colorLiteral(red: 0.9338900447, green: 0.4315618277, blue: 0.2564975619, alpha: 1),#colorLiteral(red: 0.8518816233, green: 0.1738803983, blue: 0.01849062555, alpha: 1)]
16 | let orange = [#colorLiteral(red: 0.9953531623, green: 0.54947716, blue: 0.1281470656, alpha: 1),#colorLiteral(red: 0.9409626126, green: 0.7209432721, blue: 0.1315650344, alpha: 1)]
17 | let yellow = [#colorLiteral(red: 0.9409626126, green: 0.7209432721, blue: 0.1315650344, alpha: 1),#colorLiteral(red: 0.8931249976, green: 0.5340107679, blue: 0.08877573162, alpha: 1)]
18 | let green = [#colorLiteral(red: 0.3796315193, green: 0.7958304286, blue: 0.2592983842, alpha: 1),#colorLiteral(red: 0.2060100436, green: 0.6006633639, blue: 0.09944178909, alpha: 1)]
19 | let greenBlue = [#colorLiteral(red: 0.2761503458, green: 0.824685812, blue: 0.7065336704, alpha: 1),#colorLiteral(red: 0, green: 0.6422213912, blue: 0.568986237, alpha: 1)]
20 | let kindaBlue = [#colorLiteral(red: 0.2494148612, green: 0.8105323911, blue: 0.8425348401, alpha: 1),#colorLiteral(red: 0, green: 0.6073564887, blue: 0.7661359906, alpha: 1)]
21 | let skyBlue = [#colorLiteral(red: 0.3045541644, green: 0.6749247313, blue: 0.9517192245, alpha: 1),#colorLiteral(red: 0.008423916064, green: 0.4699558616, blue: 0.882807076, alpha: 1)]
22 | let blue = [#colorLiteral(red: 0.1774400771, green: 0.466574192, blue: 0.8732826114, alpha: 1),#colorLiteral(red: 0.00491155684, green: 0.287129879, blue: 0.7411141396, alpha: 1)]
23 | let bluePurple = [#colorLiteral(red: 0.4613699913, green: 0.3118675947, blue: 0.8906354308, alpha: 1),#colorLiteral(red: 0.3018293083, green: 0.1458326578, blue: 0.7334778905, alpha: 1)]
24 | let purple = [#colorLiteral(red: 0.7080290914, green: 0.3073516488, blue: 0.8653779626, alpha: 1),#colorLiteral(red: 0.5031493902, green: 0.1100070402, blue: 0.6790940762, alpha: 1)]
25 | let pink = [#colorLiteral(red: 0.9495453238, green: 0.4185881019, blue: 0.6859942079, alpha: 1),#colorLiteral(red: 0.8123683333, green: 0.1657164991, blue: 0.5003474355, alpha: 1)]
26 |
27 | var colorsTable: [Int: [UIColor]] {
28 | return [0: red, 1: orangeRed, 2: orange, 3: yellow, 4: green, 5: greenBlue, 6: kindaBlue, 7: skyBlue, 8: blue, 9: bluePurple, 10: bluePurple, 11: purple, 12: pink]
29 | }
30 |
31 | var randomColors: [UIColor] {
32 | return colorsTable.values.randomElement()!
33 | }
34 |
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/SwiftyDocPicker/Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Extensions.swift
3 | // SwiftyDocPicker
4 | //
5 | // Created by Abraham Mangona on 9/25/19.
6 | // Copyright © 2019 Abraham Mangona. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import UIKit
11 |
12 | extension UIColor {
13 | func toHexString() -> String {
14 | var r:CGFloat = 0
15 | var g:CGFloat = 0
16 | var b:CGFloat = 0
17 | var a:CGFloat = 0
18 |
19 | getRed(&r, green: &g, blue: &b, alpha: &a)
20 |
21 | let rgb:Int = (Int)(r*255)<<16 | (Int)(g*255)<<8 | (Int)(b*255)<<0
22 |
23 | return String(format:"#%06x", rgb)
24 | }
25 | }
26 |
27 | extension UIView {
28 | func setGradientBackgroundColor(colorOne: UIColor, colorTwo: UIColor) {
29 | let gradientLayer = CAGradientLayer()
30 | gradientLayer.frame = bounds
31 | gradientLayer.colors = [colorOne.cgColor, colorTwo.cgColor]
32 | gradientLayer.locations = [0.0, 1.0]
33 | gradientLayer.endPoint = CGPoint(x: 1.0, y: 1.0)
34 | gradientLayer.startPoint = CGPoint(x: 0.0, y: 0.0)
35 |
36 | layer.insertSublayer(gradientLayer, at: 0)
37 | }
38 | }
39 |
40 | extension UIView {
41 |
42 | func anchor(top: NSLayoutYAxisAnchor?, left: NSLayoutXAxisAnchor?,
43 | bottom: NSLayoutYAxisAnchor?, right: NSLayoutXAxisAnchor?,
44 | paddingTop: CGFloat, paddingLeft: CGFloat, paddingBottom: CGFloat,
45 | paddingRight: CGFloat, width: CGFloat = 0, height: CGFloat = 0) {
46 |
47 | self.translatesAutoresizingMaskIntoConstraints = false
48 |
49 | if let top = top {
50 | self.topAnchor.constraint(equalTo: top, constant: paddingTop).isActive = true
51 | }
52 |
53 | if let left = left {
54 | self.leftAnchor.constraint(equalTo: left, constant: paddingLeft).isActive = true
55 | }
56 |
57 | if let bottom = bottom {
58 | self.bottomAnchor.constraint(equalTo: bottom, constant: paddingBottom).isActive = true
59 | }
60 |
61 | if let right = right {
62 | self.rightAnchor.constraint(equalTo: right, constant: -paddingRight).isActive = true
63 | }
64 |
65 | if width != 0 {
66 | self.widthAnchor.constraint(equalToConstant: width).isActive = true
67 | }
68 |
69 | if height != 0 {
70 | self.heightAnchor.constraint(equalToConstant: height).isActive = true
71 | }
72 | }
73 |
74 | var safeTopAnchor: NSLayoutYAxisAnchor {
75 | if #available(iOS 11.0, *) {
76 | return safeAreaLayoutGuide.topAnchor
77 | }
78 | return topAnchor
79 | }
80 |
81 | var safeLeftAnchor: NSLayoutXAxisAnchor {
82 | if #available(iOS 11.0, *) {
83 | return safeAreaLayoutGuide.leftAnchor
84 | }
85 | return leftAnchor
86 | }
87 |
88 | var safeBottomAnchor: NSLayoutYAxisAnchor {
89 | if #available(iOS 11.0, *) {
90 | return safeAreaLayoutGuide.bottomAnchor
91 | }
92 | return bottomAnchor
93 | }
94 |
95 | var safeRightAnchor: NSLayoutXAxisAnchor {
96 | if #available(iOS 11.0, *) {
97 | return safeAreaLayoutGuide.rightAnchor
98 | }
99 | return rightAnchor
100 | }
101 |
102 | }
103 |
--------------------------------------------------------------------------------
/SwiftyDocPicker/DocumentPicker.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DocumentPicker.swift
3 | // SwiftyDocPicker
4 | //
5 | // Created by Abraham Mangona on 9/14/19.
6 | // Copyright © 2019 Abraham Mangona. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import MobileCoreServices
11 |
12 | open class DocumentPicker: NSObject {
13 | private var pickerController: UIDocumentPickerViewController?
14 | private weak var presentationController: UIViewController?
15 | private weak var delegate: DocumentDelegate?
16 |
17 | private var folderURL: URL?
18 | private var sourceType: SourceType!
19 | private var documents = [Document]()
20 |
21 | init(presentationController: UIViewController, delegate: DocumentDelegate) {
22 | super.init()
23 |
24 | self.presentationController = presentationController
25 | self.delegate = delegate
26 |
27 | }
28 |
29 | public func folderAction(for type: SourceType, title: String) -> UIAlertAction? {
30 | return UIAlertAction(title: title, style: .default) { [unowned self] _ in
31 | self.pickerController = UIDocumentPickerViewController(documentTypes: [kUTTypeFolder as String], in: .open)
32 | self.pickerController!.delegate = self
33 | self.sourceType = type
34 | self.presentationController?.present(self.pickerController!, animated: true)
35 | }
36 | }
37 |
38 | public func fileAction(for type: SourceType, title: String) -> UIAlertAction? {
39 | return UIAlertAction(title: title, style: .default) { [unowned self] _ in
40 | self.pickerController = UIDocumentPickerViewController(documentTypes: [kUTTypeMovie as String, kUTTypeImage as String], in: .open)
41 | self.pickerController!.delegate = self
42 | self.pickerController!.allowsMultipleSelection = true
43 | self.sourceType = type
44 | self.presentationController?.present(self.pickerController!, animated: true)
45 | }
46 | }
47 |
48 | public func present(from sourceView: UIView) {
49 |
50 | let alertController = UIAlertController(title: "Select From", message: nil, preferredStyle: .actionSheet)
51 |
52 | if let action = self.fileAction(for: .files, title: "Files") {
53 | alertController.addAction(action)
54 | }
55 |
56 | if let action = self.folderAction(for: .folder, title: "Folder") {
57 | alertController.addAction(action)
58 | }
59 |
60 | alertController.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
61 |
62 | if UIDevice.current.userInterfaceIdiom == .pad {
63 | alertController.popoverPresentationController?.sourceView = sourceView
64 | alertController.popoverPresentationController?.sourceRect = sourceView.bounds
65 | alertController.popoverPresentationController?.permittedArrowDirections = [.down, .up]
66 | }
67 |
68 | self.presentationController?.present(alertController, animated: true)
69 |
70 | }
71 | }
72 |
73 | extension DocumentPicker: UIDocumentPickerDelegate{
74 |
75 | public func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) {
76 |
77 | guard let url = urls.first else {
78 | return
79 | }
80 | documentFromURL(pickedURL: url)
81 | delegate?.didPickDocuments(documents: documents)
82 | }
83 |
84 | public func documentPickerWasCancelled(_ controller: UIDocumentPickerViewController) {
85 | delegate?.didPickDocuments(documents: nil)
86 | }
87 |
88 | private func documentFromURL(pickedURL: URL) {
89 | let shouldStopAccessing = pickedURL.startAccessingSecurityScopedResource()
90 |
91 | defer {
92 | if shouldStopAccessing {
93 | pickedURL.stopAccessingSecurityScopedResource()
94 | }
95 | }
96 |
97 | NSFileCoordinator().coordinate(readingItemAt: pickedURL, error: NSErrorPointer.none) { (folderURL) in
98 |
99 | do {
100 | let keys: [URLResourceKey] = [.nameKey, .isDirectoryKey]
101 | let fileList = try FileManager.default.enumerator(at: pickedURL, includingPropertiesForKeys: keys)
102 |
103 | switch sourceType {
104 | case .files:
105 | let document = Document(fileURL: pickedURL)
106 | documents.append(document)
107 |
108 | case .folder:
109 | for case let fileURL as URL in fileList! {
110 | if !fileURL.isDirectory {
111 | let document = Document(fileURL: fileURL)
112 | documents.append(document)
113 | }
114 | }
115 | case .none:
116 | break
117 | }
118 |
119 | } catch let error {
120 | print("error: ", error.localizedDescription)
121 | }
122 |
123 | }
124 | }
125 |
126 | }
127 |
128 | extension DocumentPicker: UINavigationControllerDelegate {}
129 |
--------------------------------------------------------------------------------
/SwiftyDocPicker/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/SwiftyDocPicker.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 30AF748F232DE56A006D10C7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30AF748E232DE56A006D10C7 /* AppDelegate.swift */; };
11 | 30AF7493232DE56A006D10C7 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30AF7492232DE56A006D10C7 /* ViewController.swift */; };
12 | 30AF7496232DE56A006D10C7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 30AF7494232DE56A006D10C7 /* Main.storyboard */; };
13 | 30AF7498232DE56D006D10C7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 30AF7497232DE56D006D10C7 /* Assets.xcassets */; };
14 | 30AF749B232DE56D006D10C7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 30AF7499232DE56D006D10C7 /* LaunchScreen.storyboard */; };
15 | 30AF74A3232DE6B8006D10C7 /* DocumentDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30AF74A2232DE6B8006D10C7 /* DocumentDelegate.swift */; };
16 | 30AF74A5232DE6E5006D10C7 /* Document.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30AF74A4232DE6E5006D10C7 /* Document.swift */; };
17 | 30AF74A7232DE708006D10C7 /* DocumentPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30AF74A6232DE708006D10C7 /* DocumentPicker.swift */; };
18 | 30EBC563233BE10B001002D9 /* DocumentCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30EBC562233BE10B001002D9 /* DocumentCell.swift */; };
19 | 30EBC565233BF329001002D9 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30EBC564233BF329001002D9 /* Colors.swift */; };
20 | 30EBC567233BF3C6001002D9 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30EBC566233BF3C6001002D9 /* Extensions.swift */; };
21 | /* End PBXBuildFile section */
22 |
23 | /* Begin PBXFileReference section */
24 | 30AF748B232DE56A006D10C7 /* SwiftyDocPicker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftyDocPicker.app; sourceTree = BUILT_PRODUCTS_DIR; };
25 | 30AF748E232DE56A006D10C7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
26 | 30AF7492232DE56A006D10C7 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
27 | 30AF7495232DE56A006D10C7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
28 | 30AF7497232DE56D006D10C7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
29 | 30AF749A232DE56D006D10C7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
30 | 30AF749C232DE56D006D10C7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
31 | 30AF74A2232DE6B8006D10C7 /* DocumentDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocumentDelegate.swift; sourceTree = ""; };
32 | 30AF74A4232DE6E5006D10C7 /* Document.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Document.swift; sourceTree = ""; };
33 | 30AF74A6232DE708006D10C7 /* DocumentPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocumentPicker.swift; sourceTree = ""; };
34 | 30EBC562233BE10B001002D9 /* DocumentCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocumentCell.swift; sourceTree = ""; };
35 | 30EBC564233BF329001002D9 /* Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = ""; };
36 | 30EBC566233BF3C6001002D9 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; };
37 | /* End PBXFileReference section */
38 |
39 | /* Begin PBXFrameworksBuildPhase section */
40 | 30AF7488232DE56A006D10C7 /* Frameworks */ = {
41 | isa = PBXFrameworksBuildPhase;
42 | buildActionMask = 2147483647;
43 | files = (
44 | );
45 | runOnlyForDeploymentPostprocessing = 0;
46 | };
47 | /* End PBXFrameworksBuildPhase section */
48 |
49 | /* Begin PBXGroup section */
50 | 30AF7482232DE56A006D10C7 = {
51 | isa = PBXGroup;
52 | children = (
53 | 30AF748D232DE56A006D10C7 /* SwiftyDocPicker */,
54 | 30AF748C232DE56A006D10C7 /* Products */,
55 | );
56 | sourceTree = "";
57 | };
58 | 30AF748C232DE56A006D10C7 /* Products */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 30AF748B232DE56A006D10C7 /* SwiftyDocPicker.app */,
62 | );
63 | name = Products;
64 | sourceTree = "";
65 | };
66 | 30AF748D232DE56A006D10C7 /* SwiftyDocPicker */ = {
67 | isa = PBXGroup;
68 | children = (
69 | 30AF748E232DE56A006D10C7 /* AppDelegate.swift */,
70 | 30AF7492232DE56A006D10C7 /* ViewController.swift */,
71 | 30AF7494232DE56A006D10C7 /* Main.storyboard */,
72 | 30AF7497232DE56D006D10C7 /* Assets.xcassets */,
73 | 30AF7499232DE56D006D10C7 /* LaunchScreen.storyboard */,
74 | 30AF749C232DE56D006D10C7 /* Info.plist */,
75 | 30AF74A2232DE6B8006D10C7 /* DocumentDelegate.swift */,
76 | 30AF74A4232DE6E5006D10C7 /* Document.swift */,
77 | 30AF74A6232DE708006D10C7 /* DocumentPicker.swift */,
78 | 30EBC562233BE10B001002D9 /* DocumentCell.swift */,
79 | 30EBC564233BF329001002D9 /* Colors.swift */,
80 | 30EBC566233BF3C6001002D9 /* Extensions.swift */,
81 | );
82 | path = SwiftyDocPicker;
83 | sourceTree = "";
84 | };
85 | /* End PBXGroup section */
86 |
87 | /* Begin PBXNativeTarget section */
88 | 30AF748A232DE56A006D10C7 /* SwiftyDocPicker */ = {
89 | isa = PBXNativeTarget;
90 | buildConfigurationList = 30AF749F232DE56D006D10C7 /* Build configuration list for PBXNativeTarget "SwiftyDocPicker" */;
91 | buildPhases = (
92 | 30AF7487232DE56A006D10C7 /* Sources */,
93 | 30AF7488232DE56A006D10C7 /* Frameworks */,
94 | 30AF7489232DE56A006D10C7 /* Resources */,
95 | );
96 | buildRules = (
97 | );
98 | dependencies = (
99 | );
100 | name = SwiftyDocPicker;
101 | productName = SwiftyDocPicker;
102 | productReference = 30AF748B232DE56A006D10C7 /* SwiftyDocPicker.app */;
103 | productType = "com.apple.product-type.application";
104 | };
105 | /* End PBXNativeTarget section */
106 |
107 | /* Begin PBXProject section */
108 | 30AF7483232DE56A006D10C7 /* Project object */ = {
109 | isa = PBXProject;
110 | attributes = {
111 | LastSwiftUpdateCheck = 1100;
112 | LastUpgradeCheck = 1100;
113 | ORGANIZATIONNAME = "Abraham Mangona";
114 | TargetAttributes = {
115 | 30AF748A232DE56A006D10C7 = {
116 | CreatedOnToolsVersion = 11.0;
117 | };
118 | };
119 | };
120 | buildConfigurationList = 30AF7486232DE56A006D10C7 /* Build configuration list for PBXProject "SwiftyDocPicker" */;
121 | compatibilityVersion = "Xcode 9.3";
122 | developmentRegion = en;
123 | hasScannedForEncodings = 0;
124 | knownRegions = (
125 | en,
126 | Base,
127 | );
128 | mainGroup = 30AF7482232DE56A006D10C7;
129 | productRefGroup = 30AF748C232DE56A006D10C7 /* Products */;
130 | projectDirPath = "";
131 | projectRoot = "";
132 | targets = (
133 | 30AF748A232DE56A006D10C7 /* SwiftyDocPicker */,
134 | );
135 | };
136 | /* End PBXProject section */
137 |
138 | /* Begin PBXResourcesBuildPhase section */
139 | 30AF7489232DE56A006D10C7 /* Resources */ = {
140 | isa = PBXResourcesBuildPhase;
141 | buildActionMask = 2147483647;
142 | files = (
143 | 30AF749B232DE56D006D10C7 /* LaunchScreen.storyboard in Resources */,
144 | 30AF7498232DE56D006D10C7 /* Assets.xcassets in Resources */,
145 | 30AF7496232DE56A006D10C7 /* Main.storyboard in Resources */,
146 | );
147 | runOnlyForDeploymentPostprocessing = 0;
148 | };
149 | /* End PBXResourcesBuildPhase section */
150 |
151 | /* Begin PBXSourcesBuildPhase section */
152 | 30AF7487232DE56A006D10C7 /* Sources */ = {
153 | isa = PBXSourcesBuildPhase;
154 | buildActionMask = 2147483647;
155 | files = (
156 | 30EBC563233BE10B001002D9 /* DocumentCell.swift in Sources */,
157 | 30AF74A5232DE6E5006D10C7 /* Document.swift in Sources */,
158 | 30AF7493232DE56A006D10C7 /* ViewController.swift in Sources */,
159 | 30EBC567233BF3C6001002D9 /* Extensions.swift in Sources */,
160 | 30EBC565233BF329001002D9 /* Colors.swift in Sources */,
161 | 30AF74A3232DE6B8006D10C7 /* DocumentDelegate.swift in Sources */,
162 | 30AF74A7232DE708006D10C7 /* DocumentPicker.swift in Sources */,
163 | 30AF748F232DE56A006D10C7 /* AppDelegate.swift in Sources */,
164 | );
165 | runOnlyForDeploymentPostprocessing = 0;
166 | };
167 | /* End PBXSourcesBuildPhase section */
168 |
169 | /* Begin PBXVariantGroup section */
170 | 30AF7494232DE56A006D10C7 /* Main.storyboard */ = {
171 | isa = PBXVariantGroup;
172 | children = (
173 | 30AF7495232DE56A006D10C7 /* Base */,
174 | );
175 | name = Main.storyboard;
176 | sourceTree = "";
177 | };
178 | 30AF7499232DE56D006D10C7 /* LaunchScreen.storyboard */ = {
179 | isa = PBXVariantGroup;
180 | children = (
181 | 30AF749A232DE56D006D10C7 /* Base */,
182 | );
183 | name = LaunchScreen.storyboard;
184 | sourceTree = "";
185 | };
186 | /* End PBXVariantGroup section */
187 |
188 | /* Begin XCBuildConfiguration section */
189 | 30AF749D232DE56D006D10C7 /* Debug */ = {
190 | isa = XCBuildConfiguration;
191 | buildSettings = {
192 | ALWAYS_SEARCH_USER_PATHS = NO;
193 | CLANG_ANALYZER_NONNULL = YES;
194 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
195 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
196 | CLANG_CXX_LIBRARY = "libc++";
197 | CLANG_ENABLE_MODULES = YES;
198 | CLANG_ENABLE_OBJC_ARC = YES;
199 | CLANG_ENABLE_OBJC_WEAK = YES;
200 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
201 | CLANG_WARN_BOOL_CONVERSION = YES;
202 | CLANG_WARN_COMMA = YES;
203 | CLANG_WARN_CONSTANT_CONVERSION = YES;
204 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
205 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
206 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
207 | CLANG_WARN_EMPTY_BODY = YES;
208 | CLANG_WARN_ENUM_CONVERSION = YES;
209 | CLANG_WARN_INFINITE_RECURSION = YES;
210 | CLANG_WARN_INT_CONVERSION = YES;
211 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
212 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
213 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
214 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
215 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
216 | CLANG_WARN_STRICT_PROTOTYPES = YES;
217 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
218 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
219 | CLANG_WARN_UNREACHABLE_CODE = YES;
220 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
221 | COPY_PHASE_STRIP = NO;
222 | DEBUG_INFORMATION_FORMAT = dwarf;
223 | ENABLE_STRICT_OBJC_MSGSEND = YES;
224 | ENABLE_TESTABILITY = YES;
225 | GCC_C_LANGUAGE_STANDARD = gnu11;
226 | GCC_DYNAMIC_NO_PIC = NO;
227 | GCC_NO_COMMON_BLOCKS = YES;
228 | GCC_OPTIMIZATION_LEVEL = 0;
229 | GCC_PREPROCESSOR_DEFINITIONS = (
230 | "DEBUG=1",
231 | "$(inherited)",
232 | );
233 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
234 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
235 | GCC_WARN_UNDECLARED_SELECTOR = YES;
236 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
237 | GCC_WARN_UNUSED_FUNCTION = YES;
238 | GCC_WARN_UNUSED_VARIABLE = YES;
239 | IPHONEOS_DEPLOYMENT_TARGET = 13.0;
240 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
241 | MTL_FAST_MATH = YES;
242 | ONLY_ACTIVE_ARCH = YES;
243 | SDKROOT = iphoneos;
244 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
245 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
246 | };
247 | name = Debug;
248 | };
249 | 30AF749E232DE56D006D10C7 /* Release */ = {
250 | isa = XCBuildConfiguration;
251 | buildSettings = {
252 | ALWAYS_SEARCH_USER_PATHS = NO;
253 | CLANG_ANALYZER_NONNULL = YES;
254 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
255 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
256 | CLANG_CXX_LIBRARY = "libc++";
257 | CLANG_ENABLE_MODULES = YES;
258 | CLANG_ENABLE_OBJC_ARC = YES;
259 | CLANG_ENABLE_OBJC_WEAK = YES;
260 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
261 | CLANG_WARN_BOOL_CONVERSION = YES;
262 | CLANG_WARN_COMMA = YES;
263 | CLANG_WARN_CONSTANT_CONVERSION = YES;
264 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
265 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
266 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
267 | CLANG_WARN_EMPTY_BODY = YES;
268 | CLANG_WARN_ENUM_CONVERSION = YES;
269 | CLANG_WARN_INFINITE_RECURSION = YES;
270 | CLANG_WARN_INT_CONVERSION = YES;
271 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
272 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
273 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
274 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
275 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
276 | CLANG_WARN_STRICT_PROTOTYPES = YES;
277 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
278 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
279 | CLANG_WARN_UNREACHABLE_CODE = YES;
280 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
281 | COPY_PHASE_STRIP = NO;
282 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
283 | ENABLE_NS_ASSERTIONS = NO;
284 | ENABLE_STRICT_OBJC_MSGSEND = YES;
285 | GCC_C_LANGUAGE_STANDARD = gnu11;
286 | GCC_NO_COMMON_BLOCKS = YES;
287 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
288 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
289 | GCC_WARN_UNDECLARED_SELECTOR = YES;
290 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
291 | GCC_WARN_UNUSED_FUNCTION = YES;
292 | GCC_WARN_UNUSED_VARIABLE = YES;
293 | IPHONEOS_DEPLOYMENT_TARGET = 13.0;
294 | MTL_ENABLE_DEBUG_INFO = NO;
295 | MTL_FAST_MATH = YES;
296 | SDKROOT = iphoneos;
297 | SWIFT_COMPILATION_MODE = wholemodule;
298 | SWIFT_OPTIMIZATION_LEVEL = "-O";
299 | VALIDATE_PRODUCT = YES;
300 | };
301 | name = Release;
302 | };
303 | 30AF74A0232DE56D006D10C7 /* Debug */ = {
304 | isa = XCBuildConfiguration;
305 | buildSettings = {
306 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
307 | CODE_SIGN_STYLE = Automatic;
308 | DEVELOPMENT_TEAM = Q936V7ETN5;
309 | INFOPLIST_FILE = SwiftyDocPicker/Info.plist;
310 | LD_RUNPATH_SEARCH_PATHS = (
311 | "$(inherited)",
312 | "@executable_path/Frameworks",
313 | );
314 | PRODUCT_BUNDLE_IDENTIFIER = abe.SwiftyDocPicker;
315 | PRODUCT_NAME = "$(TARGET_NAME)";
316 | SWIFT_VERSION = 5.0;
317 | TARGETED_DEVICE_FAMILY = "1,2";
318 | };
319 | name = Debug;
320 | };
321 | 30AF74A1232DE56D006D10C7 /* Release */ = {
322 | isa = XCBuildConfiguration;
323 | buildSettings = {
324 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
325 | CODE_SIGN_STYLE = Automatic;
326 | DEVELOPMENT_TEAM = Q936V7ETN5;
327 | INFOPLIST_FILE = SwiftyDocPicker/Info.plist;
328 | LD_RUNPATH_SEARCH_PATHS = (
329 | "$(inherited)",
330 | "@executable_path/Frameworks",
331 | );
332 | PRODUCT_BUNDLE_IDENTIFIER = abe.SwiftyDocPicker;
333 | PRODUCT_NAME = "$(TARGET_NAME)";
334 | SWIFT_VERSION = 5.0;
335 | TARGETED_DEVICE_FAMILY = "1,2";
336 | };
337 | name = Release;
338 | };
339 | /* End XCBuildConfiguration section */
340 |
341 | /* Begin XCConfigurationList section */
342 | 30AF7486232DE56A006D10C7 /* Build configuration list for PBXProject "SwiftyDocPicker" */ = {
343 | isa = XCConfigurationList;
344 | buildConfigurations = (
345 | 30AF749D232DE56D006D10C7 /* Debug */,
346 | 30AF749E232DE56D006D10C7 /* Release */,
347 | );
348 | defaultConfigurationIsVisible = 0;
349 | defaultConfigurationName = Release;
350 | };
351 | 30AF749F232DE56D006D10C7 /* Build configuration list for PBXNativeTarget "SwiftyDocPicker" */ = {
352 | isa = XCConfigurationList;
353 | buildConfigurations = (
354 | 30AF74A0232DE56D006D10C7 /* Debug */,
355 | 30AF74A1232DE56D006D10C7 /* Release */,
356 | );
357 | defaultConfigurationIsVisible = 0;
358 | defaultConfigurationName = Release;
359 | };
360 | /* End XCConfigurationList section */
361 | };
362 | rootObject = 30AF7483232DE56A006D10C7 /* Project object */;
363 | }
364 |
--------------------------------------------------------------------------------