├── .gitignore ├── DiskSpaceProvider ├── ViewModels │ └── ContentViewModel.swift └── Views │ ├── BarView.swift │ ├── ContentView.swift │ ├── StatRowView.swift │ └── StatSectionView.swift ├── Package.swift ├── README.md ├── Sources └── DiskSpaceProvider │ └── DiskSpaceProvider.swift ├── SwiftUIExample └── DiskSpaceProviderExampleApp │ ├── DiskSpaceProviderExampleApp.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── swiftpm │ │ │ └── Package.resolved │ └── xcuserdata │ │ └── amitsamat.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist │ └── DiskSpaceProviderExampleApp │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── DiskSpaceProviderExampleAppApp.swift │ └── Preview Content │ └── Preview Assets.xcassets │ └── Contents.json ├── iphonestorage.png ├── purge.PNG └── storage.PNG /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | /*.xcodeproj 5 | xcuserdata/ 6 | DerivedData/ 7 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata 8 | -------------------------------------------------------------------------------- /DiskSpaceProvider/ViewModels/ContentViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentViewModel.swift 3 | // DiskSpaceProvider 4 | // 5 | // Created by Amit Samant on 08/02/22. 6 | // 7 | 8 | import Foundation 9 | import CoreGraphics 10 | import DiskSpaceProvider 11 | 12 | @dynamicMemberLookup 13 | class ContentViewModel { 14 | 15 | struct DiskStat { 16 | struct DiskUsageStat { 17 | let barRatio: CGFloat 18 | let usedStorage: String 19 | let availableStorage: String 20 | } 21 | 22 | let importantUsageStat: DiskUsageStat 23 | let opportunisticUsageStat: DiskUsageStat 24 | let inaccurateApiUsageState: DiskUsageStat 25 | let purgeableStorage: String 26 | let totalStorage: String 27 | } 28 | 29 | let diskSpaceProvider: DiskSpaceProvider = .init() 30 | let byteFormatter: ByteCountFormatter = { 31 | let formatter = ByteCountFormatter() 32 | formatter.allowedUnits = .useAll 33 | formatter.countStyle = .decimal 34 | return formatter 35 | }() 36 | 37 | let diskStat: DiskStat 38 | 39 | subscript(dynamicMember member: KeyPath) -> T { 40 | get { return diskStat[keyPath: member] } 41 | } 42 | 43 | init() { 44 | self.diskStat = Self.mapDiskState( 45 | fromProvider: diskSpaceProvider, 46 | byteFormatter: byteFormatter 47 | ) 48 | } 49 | 50 | private static func mapDiskState(fromProvider diskSpaceProvider: DiskSpaceProvider, byteFormatter: ByteCountFormatter) -> DiskStat { 51 | let totalDiskSizeInBytes = (try? diskSpaceProvider.getTotalDiskSpace()) ?? 0 52 | let formattedTotalDiskSizeInBytes = byteFormatter.string(fromByteCount: totalDiskSizeInBytes) 53 | 54 | let importantUsageFreeSizeInBytes = (try? diskSpaceProvider.getFreeDiskSpace(forUsageType: .importantUsage)) ?? 0 55 | let importantUsageUsedSizeinBytes = totalDiskSizeInBytes - importantUsageFreeSizeInBytes 56 | let importantUsageRatio = CGFloat(importantUsageFreeSizeInBytes)/CGFloat(totalDiskSizeInBytes) 57 | let formattedImportantUsageFreeSize = byteFormatter.string(fromByteCount: importantUsageFreeSizeInBytes) 58 | let formattedImportantUsageUsedSize = byteFormatter.string(fromByteCount: importantUsageUsedSizeinBytes) 59 | 60 | let opportunisticUsageFreeSizeInBytes = (try? diskSpaceProvider.getFreeDiskSpace(forUsageType: .opportunisticUsage)) ?? 0 61 | let opportunisticUsageUsedSizeInBytes = totalDiskSizeInBytes - opportunisticUsageFreeSizeInBytes 62 | let opportunisticUsageRatio = CGFloat(opportunisticUsageFreeSizeInBytes)/CGFloat(totalDiskSizeInBytes) 63 | let formattedOpportunisticUsageFreeSize = byteFormatter.string(fromByteCount: opportunisticUsageFreeSizeInBytes) 64 | let formattedOpportunisticUsageUsedSize = byteFormatter.string(fromByteCount: opportunisticUsageUsedSizeInBytes) 65 | 66 | let inaccurateApiFreeSizeInBytes = (try? diskSpaceProvider.getFreeDiskSpace()) ?? 0 67 | let inaccurateApiUsedSizeInBytes = totalDiskSizeInBytes - inaccurateApiFreeSizeInBytes 68 | let inaccurateApiRatio = CGFloat(inaccurateApiUsedSizeInBytes)/CGFloat(totalDiskSizeInBytes) 69 | let formattedInaccurateApiFreeSize = byteFormatter.string(fromByteCount: inaccurateApiFreeSizeInBytes) 70 | let formattedInaccuarteApiUsedSize = byteFormatter.string(fromByteCount: inaccurateApiUsedSizeInBytes) 71 | 72 | let purgeableSizeInBytes = importantUsageFreeSizeInBytes - opportunisticUsageFreeSizeInBytes 73 | let formattedPurgeableSizeInBytes = byteFormatter.string(fromByteCount: purgeableSizeInBytes) 74 | 75 | 76 | let diskState: DiskStat = .init( 77 | importantUsageStat: .init( 78 | barRatio: importantUsageRatio, 79 | usedStorage: formattedImportantUsageUsedSize, 80 | availableStorage: formattedImportantUsageFreeSize 81 | ), 82 | opportunisticUsageStat: .init( 83 | barRatio: opportunisticUsageRatio, 84 | usedStorage: formattedOpportunisticUsageUsedSize, 85 | availableStorage: formattedOpportunisticUsageFreeSize 86 | ), 87 | inaccurateApiUsageState: .init( 88 | barRatio: inaccurateApiRatio, 89 | usedStorage: formattedInaccuarteApiUsedSize, 90 | availableStorage: formattedInaccurateApiFreeSize 91 | ), 92 | purgeableStorage: formattedPurgeableSizeInBytes, 93 | totalStorage: formattedTotalDiskSizeInBytes 94 | ) 95 | return diskState 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /DiskSpaceProvider/Views/BarView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BarView.swift 3 | // DiskSpaceProvider 4 | // 5 | // Created by Amit Samant on 08/02/22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct BarView: View { 11 | let filledProportion: CGFloat 12 | var body: some View { 13 | GeometryReader { geo in 14 | HStack(spacing:0) { 15 | Color.accentColor.frame(width: geo.size.width * filledProportion) 16 | Color.green 17 | .saturation(0.5) 18 | .frame(width: geo.size.width * (1 - filledProportion)) 19 | } 20 | } 21 | .frame(height: 16) 22 | .cornerRadius(3) 23 | } 24 | } 25 | 26 | struct BarView_Previews: PreviewProvider { 27 | static var previews: some View { 28 | BarView(filledProportion: 0.8) 29 | .padding() 30 | .previewLayout(.sizeThatFits) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /DiskSpaceProvider/Views/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // DiskSpaceProvider 4 | // 5 | // Created by Amit Samant on 08/02/22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | 12 | let viewModel = ContentViewModel() 13 | 14 | var body: some View { 15 | NavigationView { 16 | List { 17 | StatSectionView( 18 | title: "Important Usage", 19 | stat: viewModel.importantUsageStat, 20 | totalStorage: viewModel.totalStorage 21 | ) 22 | StatSectionView( 23 | title: "Opportunistic Usage", 24 | stat: viewModel.diskStat.opportunisticUsageStat, 25 | totalStorage: viewModel.totalStorage 26 | ) 27 | StatSectionView( 28 | title: "Inaccurate iOS 11 prior API Storage Usage", 29 | stat: viewModel.diskStat.inaccurateApiUsageState, 30 | totalStorage: viewModel.totalStorage 31 | ) 32 | StatRowView(title: "Purgeable storage", formattedValue: viewModel.purgeableStorage) 33 | .font(.headline) 34 | StatRowView(title: "Total storage", formattedValue: viewModel.totalStorage) 35 | .font(.headline) 36 | 37 | } 38 | .navigationTitle("Storage") 39 | } 40 | } 41 | } 42 | 43 | struct ContentView_Previews: PreviewProvider { 44 | static var previews: some View { 45 | ContentView() 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /DiskSpaceProvider/Views/StatRowView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StatRowView.swift 3 | // DiskSpaceProvider 4 | // 5 | // Created by Amit Samant on 08/02/22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct StatRowView: View { 11 | 12 | let title: String 13 | let formattedValue: String 14 | 15 | var body: some View { 16 | HStack { 17 | Text(title) 18 | Spacer() 19 | Text(formattedValue) 20 | .font(.body) 21 | .foregroundColor(.secondary) 22 | } 23 | } 24 | } 25 | 26 | struct StatRowView_Previews: PreviewProvider { 27 | static var previews: some View { 28 | StatRowView(title: "Used storage", formattedValue: "100 MB") 29 | .padding() 30 | .previewLayout(.sizeThatFits) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /DiskSpaceProvider/Views/StatSectionView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StatSectionView.swift 3 | // DiskSpaceProvider 4 | // 5 | // Created by Amit Samant on 08/02/22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct StatSectionView: View { 11 | 12 | let title: String 13 | let stat: ContentViewModel.DiskStat.DiskUsageStat 14 | let totalStorage: String 15 | 16 | var body: some View { 17 | Section(title) { 18 | VStack(alignment: .trailing, spacing: 2) { 19 | Text("\(stat.usedStorage) of \(totalStorage) Used") 20 | .font(.caption) 21 | .foregroundColor(.secondary) 22 | BarView(filledProportion: stat.barRatio) 23 | } 24 | .padding(.vertical, 4) 25 | StatRowView(title: "Used storage", formattedValue: stat.usedStorage) 26 | StatRowView(title: "Available storage", formattedValue: stat.availableStorage) 27 | } 28 | } 29 | } 30 | 31 | struct StatSectionView_Previews: PreviewProvider { 32 | static var previews: some View { 33 | List { 34 | StatSectionView( 35 | title: "Important usage", 36 | stat: .init( 37 | barRatio: 0.7, 38 | usedStorage: "41.6 GB", 39 | availableStorage: "22 GB" 40 | ), 41 | totalStorage: "64 GB" 42 | ) 43 | } 44 | .padding(.vertical) 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.5 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "DiskSpaceProvider", 8 | platforms: [.iOS(.v9), .macOS(.v10_10)], 9 | products: [ 10 | // Products define the executables and libraries a package produces, and make them visible to other packages. 11 | .library( 12 | name: "DiskSpaceProvider", 13 | targets: ["DiskSpaceProvider"]), 14 | ], 15 | targets: [ 16 | // Targets are the basic building blocks of a package. A target can define a module or a test suite. 17 | // Targets can depend on other targets in this package, and on products in packages this package depends on. 18 | .target( 19 | name: "DiskSpaceProvider", 20 | dependencies: []), 21 | ] 22 | ) 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DiskSpaceProvider 2 | 3 | A micro librrary provinding simple API's to check Disk's Storage Capacity 4 | 5 | ## Installation 6 | 7 | DiskSpaceProvider api is available through Swift Package Manager 8 | 9 | add this url to File -> Swift Packages -> Add new Dependecy 10 | 11 | ``` 12 | https://github.com/DominatorVbN/DiskSpaceProvider.git 13 | ``` 14 | 15 | add the following as a dependency to your Package.swift: 16 | 17 | ```swift 18 | .package(url: "https://github.com/DominatorVbN/DiskSpaceProvider.git", .upToNextMajor(from: "0.0.3")) 19 | ``` 20 | 21 | ## Usage 22 | 23 | Create a instance of `DiskSpaceProvider` 24 | 25 | ```swift 26 | import DiskSpaceProvider 27 | 28 | let diskSpaceProvider = DiskSpaceProvider() 29 | ``` 30 | 31 | Getting the total disk storage: 32 | 33 | ```swift 34 | let totalDiskSpaceInBytes: Int64 = diskSpaceProvider.getTotalDiskSpace() 35 | ``` 36 | 37 | Gettting available disk size using iOS 11+ API 38 | 39 | * Importance Usage 40 | 41 | ``` swift 42 | do { 43 | let importantUsageFreeSizeInBytes: Int64 = try diskSpaceProvider.getFreeDiskSpace(forUsageType: .importantUsage) 44 | } catch { 45 | debugPrint(error) 46 | } 47 | ``` 48 | 49 | * Opportunistic Usage 50 | 51 | ``` swift 52 | do { 53 | let opportunisticUsageFreeSizeInBytes: Int64 = try diskSpaceProvider.getFreeDiskSpace(forUsageType: .opportunisticUsage) 54 | } catch { 55 | debugPrint(error) 56 | } 57 | ``` 58 | 59 | Gettting available disk size using prior iOS 11 API 60 | 61 | ``` swift 62 | do { 63 | let freeSizeInBytes: Int64 = try diskSpaceProvider.getFreeDiskSpace() 64 | } catch { 65 | debugPrint(error) 66 | } 67 | ``` 68 | 69 | > **Warning:** 70 | > Using FileManager API result inaccurate size, this should only be used in case URL API is not available that is below iOS 11 71 | 72 | ## Demo App 73 | 74 | You can run the demo app by opening XCProj file located at `DiskSpaceProvider/SwiftUIExample/DiskSpaceProviderExampleApp/DiskSpaceProviderExampleApp.xcodeproj` 75 | 76 | |Disk Size|Total and Purgeable Size|iPhone Storage| 77 | |---|---|---| 78 | |![Importance Usage, Opportunistic Usage, Older Api Usage](storage.PNG "Importance Usage, Opportunistic Usage, Older Api Usage")|![Total size, Purgeable size](purge.PNG "Total size, Purgeable size")|![iPhoneStorage](iphonestorage.png "iPhoneStorage")| 79 | 80 | # Learnings while creating this library 81 | 82 | ## Accessing total disk size of the device 83 | 84 | ```swift 85 | let homeDirectoryPath = NSHomeDirectory() as String 86 | let systemAttributes = try FileManager.default.attributesOfFileSystem(forPath: homeDirectoryPath) 87 | let spaceInBytes = (systemAttributes[FileAttributeKey.systemSize] as? NSNumber)?.int64Value 88 | ``` 89 | 90 | For getting the total disk size of device `Foundation` framework contains `attributesOfFileSystem(forPath:)` function in `FileManager` class which returns a dictionary that describes the attributes of the mounted file system on which a given path (home) resides which is the only disk of iOS/iPadOS Devices, in that dictionary we can find the disk total size, using `FileAttributeKey.systemSize` key this contains a numberic value which then can be typecasted to `NSNumber` and `.int64Value` property of `NSNumber` can be used to get the byte size. 91 | 92 | ## Accessing used disk size of the device 93 | 94 | We have 2 APIs to access the used disk size in iOS 95 | 96 | - Using FileManager API 97 | - Using URL API 98 | 99 | > **Warning:** 100 | > Using FileManager API result inaccurate size, this should only be used in case URL API is not available that is below iOS 11 101 | 102 | ### Using FileManager API 103 | 104 | ```swift 105 | let homeDirectoryPath = NSHomeDirectory() as String 106 | let systemAttributes = try FileManager.default.attributesOfFileSystem(forPath: homeDirectoryPath) 107 | let freeSpaceInBytes = (systemAttributes[FileAttributeKey.systemFreeSize] as? NSNumber)?.int64Value 108 | ``` 109 | 110 | The implementation is pretty similar to accessing the used disk size of the device, the only this that is changed is the FileAttributeKey rather than using `systemSize` key which corresponds to the total size of disk we used `systemFreeSize` which corresponds to disk available size the value is determined by statfs() which can be sometimes inaccurate for iOS file systems. 111 | 112 | > This works fine for macOS though 113 | 114 | ### Using URL API 115 | 116 | URL class provides us a method `resourceValues(forKeys:)` which accepts `URLResourceKey`, in iOS 11 and above we two keys which corresponds to free/available storage, used to check disk availability according to the importance of file we want to store on disk 117 | - `URLResourceKey.volumeAvailableCapacityForImportantUsageKey`: corresponds to the volume’s available capacity in bytes for storing important resources, this yeild exact values as what we see in iPhone Storage Setting page. 118 | - `URLResourceKey.volumeAvailableCapacityForOpportunisticUsageKey`: corresponds to the volume’s available capacity in bytes for storing nonessential resources. 119 | 120 | 121 | #### Important Usage 122 | 123 | ```swift 124 | let homeDirectoryUrl = URL(fileURLWithPath: NSHomeDirectory() as String) 125 | let resourceKey = URLResourceKey.volumeAvailableCapacityForImportantUsageKey 126 | let resourceValues = try homeDirectoryUrl.resourceValues(forKeys: [resourceKey]) 127 | let usedSizeInBytes = resourceValues.volumeAvailableCapacityForImportantUsage 128 | ``` 129 | 130 | #### Opportunistic Usage 131 | 132 | ```swift 133 | let homeDirectoryUrl = URL(fileURLWithPath: NSHomeDirectory() as String) 134 | let resourceKey = URLResourceKey.volumeAvailableCapacityForOpportunisticUsageKey 135 | let resourceValues = try homeDirectoryUrl.resourceValues(forKeys: [resourceKey]) 136 | let usedSizeInBytes = resourceValues.volumeAvailableCapacityForOpportunisticUsage 137 | ``` 138 | 139 | For getting the free space we create a URL to the home directory and fetch the resourceValues for the URL, using the required URLResourceKey, then we access corresponding size value, `URLResourceValues` contains `volumeAvailableCapacityForImportantUsage` and `volumeAvailableCapacityForOpportunisticUsage` property whose value gets fetched according to passed URLResourceKey, otherwise returns nil, both of the properties are Int64 and represents the size in bytes. 140 | -------------------------------------------------------------------------------- /Sources/DiskSpaceProvider/DiskSpaceProvider.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DiskSpaceProvider.swift 3 | // DiskSpaceProvider 4 | // 5 | // Created by Amit Samant on 08/02/22. 6 | // 7 | 8 | import Foundation 9 | 10 | /// Utility class to get device disk space 11 | public class DiskSpaceProvider { 12 | 13 | /// Usage of disk storage to calculate space against 14 | @available(iOS 11.0, macOS 10.13, *) 15 | public enum UsageType { 16 | case importantUsage 17 | case opportunisticUsage 18 | } 19 | 20 | private let homeDirectoryPath = NSHomeDirectory() as String 21 | private let homeDirectoryUrl = URL(fileURLWithPath: NSHomeDirectory() as String) 22 | 23 | public init() {} 24 | 25 | /// Get total disk space in bytes 26 | /// - Returns: returns total disk space in bytes 27 | public func getTotalDiskSpace() throws -> Int64 { 28 | let systemAttributes = try FileManager.default.attributesOfFileSystem(forPath: homeDirectoryPath) 29 | let space = (systemAttributes[FileAttributeKey.systemSize] as? NSNumber)?.int64Value 30 | return space ?? 0 31 | } 32 | 33 | /// Fetch the available according to provided usage tyep 34 | /// - Parameter usageType: usage type of disk space 35 | /// - Returns: returns size 36 | @available(iOS 11.0, macOS 10.13, *) 37 | public func getFreeDiskSpace(forUsageType usageType: UsageType) throws -> Int64 { 38 | let size: Int64? 39 | switch usageType { 40 | case .importantUsage: 41 | let resourceKey = URLResourceKey.volumeAvailableCapacityForImportantUsageKey 42 | let resourceValues = try homeDirectoryUrl.resourceValues(forKeys: [resourceKey]) 43 | size = resourceValues.volumeAvailableCapacityForImportantUsage 44 | case .opportunisticUsage: 45 | let resourceKey = URLResourceKey.volumeAvailableCapacityForOpportunisticUsageKey 46 | let resourceValues = try homeDirectoryUrl.resourceValues(forKeys: [resourceKey]) 47 | size = resourceValues.volumeAvailableCapacityForOpportunisticUsage 48 | } 49 | return size ?? 0 50 | } 51 | 52 | /// Get free disk space irrelevent to usage type iOS 11 prior API 53 | /// - Returns: returns size 54 | public func getFreeDiskSpace() throws -> Int64 { 55 | let systemAttributes = try FileManager.default.attributesOfFileSystem(forPath: homeDirectoryPath) 56 | let freeSpace = (systemAttributes[FileAttributeKey.systemFreeSize] as? NSNumber)?.int64Value 57 | return freeSpace ?? 0 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /SwiftUIExample/DiskSpaceProviderExampleApp/DiskSpaceProviderExampleApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 55; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1986ED5027CDFCF400096E66 /* DiskSpaceProviderExampleAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1986ED4F27CDFCF400096E66 /* DiskSpaceProviderExampleAppApp.swift */; }; 11 | 1986ED5427CDFCF500096E66 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1986ED5327CDFCF500096E66 /* Assets.xcassets */; }; 12 | 1986ED5727CDFCF500096E66 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1986ED5627CDFCF500096E66 /* Preview Assets.xcassets */; }; 13 | 1986ED7827CE000900096E66 /* StatRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1986ED7427CE000900096E66 /* StatRowView.swift */; }; 14 | 1986ED7927CE000900096E66 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1986ED7527CE000900096E66 /* ContentView.swift */; }; 15 | 1986ED7A27CE000900096E66 /* StatSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1986ED7627CE000900096E66 /* StatSectionView.swift */; }; 16 | 1986ED7B27CE000900096E66 /* BarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1986ED7727CE000900096E66 /* BarView.swift */; }; 17 | 1986ED7D27CE001A00096E66 /* ContentViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1986ED7C27CE001900096E66 /* ContentViewModel.swift */; }; 18 | 1986ED8627CE022E00096E66 /* DiskSpaceProvider in Frameworks */ = {isa = PBXBuildFile; productRef = 1986ED8527CE022E00096E66 /* DiskSpaceProvider */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | 1986ED4C27CDFCF400096E66 /* DiskSpaceProviderExampleApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DiskSpaceProviderExampleApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | 1986ED4F27CDFCF400096E66 /* DiskSpaceProviderExampleAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiskSpaceProviderExampleAppApp.swift; sourceTree = ""; }; 24 | 1986ED5327CDFCF500096E66 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 25 | 1986ED5627CDFCF500096E66 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 26 | 1986ED7427CE000900096E66 /* StatRowView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StatRowView.swift; sourceTree = ""; }; 27 | 1986ED7527CE000900096E66 /* ContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 28 | 1986ED7627CE000900096E66 /* StatSectionView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StatSectionView.swift; sourceTree = ""; }; 29 | 1986ED7727CE000900096E66 /* BarView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BarView.swift; sourceTree = ""; }; 30 | 1986ED7C27CE001900096E66 /* ContentViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentViewModel.swift; sourceTree = ""; }; 31 | /* End PBXFileReference section */ 32 | 33 | /* Begin PBXFrameworksBuildPhase section */ 34 | 1986ED4927CDFCF400096E66 /* Frameworks */ = { 35 | isa = PBXFrameworksBuildPhase; 36 | buildActionMask = 2147483647; 37 | files = ( 38 | 1986ED8627CE022E00096E66 /* DiskSpaceProvider in Frameworks */, 39 | ); 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXFrameworksBuildPhase section */ 43 | 44 | /* Begin PBXGroup section */ 45 | 1986ED4327CDFCF400096E66 = { 46 | isa = PBXGroup; 47 | children = ( 48 | 1986ED4E27CDFCF400096E66 /* DiskSpaceProviderExampleApp */, 49 | 1986ED4D27CDFCF400096E66 /* Products */, 50 | ); 51 | sourceTree = ""; 52 | }; 53 | 1986ED4D27CDFCF400096E66 /* Products */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 1986ED4C27CDFCF400096E66 /* DiskSpaceProviderExampleApp.app */, 57 | ); 58 | name = Products; 59 | sourceTree = ""; 60 | }; 61 | 1986ED4E27CDFCF400096E66 /* DiskSpaceProviderExampleApp */ = { 62 | isa = PBXGroup; 63 | children = ( 64 | 1986ED5D27CDFD1700096E66 /* ViewModels */, 65 | 1986ED5F27CDFD1700096E66 /* Views */, 66 | 1986ED4F27CDFCF400096E66 /* DiskSpaceProviderExampleAppApp.swift */, 67 | 1986ED5327CDFCF500096E66 /* Assets.xcassets */, 68 | 1986ED5527CDFCF500096E66 /* Preview Content */, 69 | ); 70 | path = DiskSpaceProviderExampleApp; 71 | sourceTree = ""; 72 | }; 73 | 1986ED5527CDFCF500096E66 /* Preview Content */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 1986ED5627CDFCF500096E66 /* Preview Assets.xcassets */, 77 | ); 78 | path = "Preview Content"; 79 | sourceTree = ""; 80 | }; 81 | 1986ED5D27CDFD1700096E66 /* ViewModels */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 1986ED7C27CE001900096E66 /* ContentViewModel.swift */, 85 | ); 86 | name = ViewModels; 87 | path = ../../../DiskSpaceProvider/ViewModels; 88 | sourceTree = ""; 89 | }; 90 | 1986ED5F27CDFD1700096E66 /* Views */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 1986ED7727CE000900096E66 /* BarView.swift */, 94 | 1986ED7527CE000900096E66 /* ContentView.swift */, 95 | 1986ED7427CE000900096E66 /* StatRowView.swift */, 96 | 1986ED7627CE000900096E66 /* StatSectionView.swift */, 97 | ); 98 | name = Views; 99 | path = ../../../DiskSpaceProvider/Views; 100 | sourceTree = ""; 101 | }; 102 | /* End PBXGroup section */ 103 | 104 | /* Begin PBXNativeTarget section */ 105 | 1986ED4B27CDFCF400096E66 /* DiskSpaceProviderExampleApp */ = { 106 | isa = PBXNativeTarget; 107 | buildConfigurationList = 1986ED5A27CDFCF500096E66 /* Build configuration list for PBXNativeTarget "DiskSpaceProviderExampleApp" */; 108 | buildPhases = ( 109 | 1986ED4827CDFCF400096E66 /* Sources */, 110 | 1986ED4927CDFCF400096E66 /* Frameworks */, 111 | 1986ED4A27CDFCF400096E66 /* Resources */, 112 | ); 113 | buildRules = ( 114 | ); 115 | dependencies = ( 116 | ); 117 | name = DiskSpaceProviderExampleApp; 118 | packageProductDependencies = ( 119 | 1986ED8527CE022E00096E66 /* DiskSpaceProvider */, 120 | ); 121 | productName = DiskSpaceProviderExampleApp; 122 | productReference = 1986ED4C27CDFCF400096E66 /* DiskSpaceProviderExampleApp.app */; 123 | productType = "com.apple.product-type.application"; 124 | }; 125 | /* End PBXNativeTarget section */ 126 | 127 | /* Begin PBXProject section */ 128 | 1986ED4427CDFCF400096E66 /* Project object */ = { 129 | isa = PBXProject; 130 | attributes = { 131 | BuildIndependentTargetsInParallel = 1; 132 | LastSwiftUpdateCheck = 1320; 133 | LastUpgradeCheck = 1320; 134 | TargetAttributes = { 135 | 1986ED4B27CDFCF400096E66 = { 136 | CreatedOnToolsVersion = 13.2.1; 137 | }; 138 | }; 139 | }; 140 | buildConfigurationList = 1986ED4727CDFCF400096E66 /* Build configuration list for PBXProject "DiskSpaceProviderExampleApp" */; 141 | compatibilityVersion = "Xcode 13.0"; 142 | developmentRegion = en; 143 | hasScannedForEncodings = 0; 144 | knownRegions = ( 145 | en, 146 | Base, 147 | ); 148 | mainGroup = 1986ED4327CDFCF400096E66; 149 | packageReferences = ( 150 | 1986ED8427CE022E00096E66 /* XCRemoteSwiftPackageReference "DiskSpaceProvider" */, 151 | ); 152 | productRefGroup = 1986ED4D27CDFCF400096E66 /* Products */; 153 | projectDirPath = ""; 154 | projectRoot = ""; 155 | targets = ( 156 | 1986ED4B27CDFCF400096E66 /* DiskSpaceProviderExampleApp */, 157 | ); 158 | }; 159 | /* End PBXProject section */ 160 | 161 | /* Begin PBXResourcesBuildPhase section */ 162 | 1986ED4A27CDFCF400096E66 /* Resources */ = { 163 | isa = PBXResourcesBuildPhase; 164 | buildActionMask = 2147483647; 165 | files = ( 166 | 1986ED5727CDFCF500096E66 /* Preview Assets.xcassets in Resources */, 167 | 1986ED5427CDFCF500096E66 /* Assets.xcassets in Resources */, 168 | ); 169 | runOnlyForDeploymentPostprocessing = 0; 170 | }; 171 | /* End PBXResourcesBuildPhase section */ 172 | 173 | /* Begin PBXSourcesBuildPhase section */ 174 | 1986ED4827CDFCF400096E66 /* Sources */ = { 175 | isa = PBXSourcesBuildPhase; 176 | buildActionMask = 2147483647; 177 | files = ( 178 | 1986ED7B27CE000900096E66 /* BarView.swift in Sources */, 179 | 1986ED7A27CE000900096E66 /* StatSectionView.swift in Sources */, 180 | 1986ED7D27CE001A00096E66 /* ContentViewModel.swift in Sources */, 181 | 1986ED5027CDFCF400096E66 /* DiskSpaceProviderExampleAppApp.swift in Sources */, 182 | 1986ED7927CE000900096E66 /* ContentView.swift in Sources */, 183 | 1986ED7827CE000900096E66 /* StatRowView.swift in Sources */, 184 | ); 185 | runOnlyForDeploymentPostprocessing = 0; 186 | }; 187 | /* End PBXSourcesBuildPhase section */ 188 | 189 | /* Begin XCBuildConfiguration section */ 190 | 1986ED5827CDFCF500096E66 /* Debug */ = { 191 | isa = XCBuildConfiguration; 192 | buildSettings = { 193 | ALWAYS_SEARCH_USER_PATHS = NO; 194 | CLANG_ANALYZER_NONNULL = YES; 195 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 196 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 197 | CLANG_CXX_LIBRARY = "libc++"; 198 | CLANG_ENABLE_MODULES = YES; 199 | CLANG_ENABLE_OBJC_ARC = YES; 200 | CLANG_ENABLE_OBJC_WEAK = YES; 201 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 202 | CLANG_WARN_BOOL_CONVERSION = YES; 203 | CLANG_WARN_COMMA = YES; 204 | CLANG_WARN_CONSTANT_CONVERSION = YES; 205 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 206 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 207 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 208 | CLANG_WARN_EMPTY_BODY = YES; 209 | CLANG_WARN_ENUM_CONVERSION = YES; 210 | CLANG_WARN_INFINITE_RECURSION = YES; 211 | CLANG_WARN_INT_CONVERSION = YES; 212 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 213 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 214 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 215 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 216 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 217 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 218 | CLANG_WARN_STRICT_PROTOTYPES = YES; 219 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 220 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 221 | CLANG_WARN_UNREACHABLE_CODE = YES; 222 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 223 | COPY_PHASE_STRIP = NO; 224 | DEBUG_INFORMATION_FORMAT = dwarf; 225 | ENABLE_STRICT_OBJC_MSGSEND = YES; 226 | ENABLE_TESTABILITY = YES; 227 | GCC_C_LANGUAGE_STANDARD = gnu11; 228 | GCC_DYNAMIC_NO_PIC = NO; 229 | GCC_NO_COMMON_BLOCKS = YES; 230 | GCC_OPTIMIZATION_LEVEL = 0; 231 | GCC_PREPROCESSOR_DEFINITIONS = ( 232 | "DEBUG=1", 233 | "$(inherited)", 234 | ); 235 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 236 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 237 | GCC_WARN_UNDECLARED_SELECTOR = YES; 238 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 239 | GCC_WARN_UNUSED_FUNCTION = YES; 240 | GCC_WARN_UNUSED_VARIABLE = YES; 241 | IPHONEOS_DEPLOYMENT_TARGET = 15.2; 242 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 243 | MTL_FAST_MATH = YES; 244 | ONLY_ACTIVE_ARCH = YES; 245 | SDKROOT = iphoneos; 246 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 247 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 248 | }; 249 | name = Debug; 250 | }; 251 | 1986ED5927CDFCF500096E66 /* Release */ = { 252 | isa = XCBuildConfiguration; 253 | buildSettings = { 254 | ALWAYS_SEARCH_USER_PATHS = NO; 255 | CLANG_ANALYZER_NONNULL = YES; 256 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 257 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 258 | CLANG_CXX_LIBRARY = "libc++"; 259 | CLANG_ENABLE_MODULES = YES; 260 | CLANG_ENABLE_OBJC_ARC = YES; 261 | CLANG_ENABLE_OBJC_WEAK = YES; 262 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 263 | CLANG_WARN_BOOL_CONVERSION = YES; 264 | CLANG_WARN_COMMA = YES; 265 | CLANG_WARN_CONSTANT_CONVERSION = YES; 266 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 267 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 268 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 269 | CLANG_WARN_EMPTY_BODY = YES; 270 | CLANG_WARN_ENUM_CONVERSION = YES; 271 | CLANG_WARN_INFINITE_RECURSION = YES; 272 | CLANG_WARN_INT_CONVERSION = YES; 273 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 274 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 275 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 276 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 277 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 279 | CLANG_WARN_STRICT_PROTOTYPES = YES; 280 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 281 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 282 | CLANG_WARN_UNREACHABLE_CODE = YES; 283 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 284 | COPY_PHASE_STRIP = NO; 285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 286 | ENABLE_NS_ASSERTIONS = NO; 287 | ENABLE_STRICT_OBJC_MSGSEND = YES; 288 | GCC_C_LANGUAGE_STANDARD = gnu11; 289 | GCC_NO_COMMON_BLOCKS = YES; 290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 292 | GCC_WARN_UNDECLARED_SELECTOR = YES; 293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 294 | GCC_WARN_UNUSED_FUNCTION = YES; 295 | GCC_WARN_UNUSED_VARIABLE = YES; 296 | IPHONEOS_DEPLOYMENT_TARGET = 15.2; 297 | MTL_ENABLE_DEBUG_INFO = NO; 298 | MTL_FAST_MATH = YES; 299 | SDKROOT = iphoneos; 300 | SWIFT_COMPILATION_MODE = wholemodule; 301 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 302 | VALIDATE_PRODUCT = YES; 303 | }; 304 | name = Release; 305 | }; 306 | 1986ED5B27CDFCF500096E66 /* Debug */ = { 307 | isa = XCBuildConfiguration; 308 | buildSettings = { 309 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 310 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 311 | CODE_SIGN_STYLE = Automatic; 312 | CURRENT_PROJECT_VERSION = 1; 313 | DEVELOPMENT_ASSET_PATHS = "\"DiskSpaceProviderExampleApp/Preview Content\""; 314 | DEVELOPMENT_TEAM = QR8D9G9JQK; 315 | ENABLE_PREVIEWS = YES; 316 | GENERATE_INFOPLIST_FILE = YES; 317 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 318 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 319 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 320 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 321 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 322 | LD_RUNPATH_SEARCH_PATHS = ( 323 | "$(inherited)", 324 | "@executable_path/Frameworks", 325 | ); 326 | MARKETING_VERSION = 1.0; 327 | PRODUCT_BUNDLE_IDENTIFIER = in.amitsamant.DiskSpaceProviderExampleApp; 328 | PRODUCT_NAME = "$(TARGET_NAME)"; 329 | SWIFT_EMIT_LOC_STRINGS = YES; 330 | SWIFT_VERSION = 5.0; 331 | TARGETED_DEVICE_FAMILY = "1,2"; 332 | }; 333 | name = Debug; 334 | }; 335 | 1986ED5C27CDFCF500096E66 /* Release */ = { 336 | isa = XCBuildConfiguration; 337 | buildSettings = { 338 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 339 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 340 | CODE_SIGN_STYLE = Automatic; 341 | CURRENT_PROJECT_VERSION = 1; 342 | DEVELOPMENT_ASSET_PATHS = "\"DiskSpaceProviderExampleApp/Preview Content\""; 343 | DEVELOPMENT_TEAM = QR8D9G9JQK; 344 | ENABLE_PREVIEWS = YES; 345 | GENERATE_INFOPLIST_FILE = YES; 346 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 347 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 348 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 349 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 350 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 351 | LD_RUNPATH_SEARCH_PATHS = ( 352 | "$(inherited)", 353 | "@executable_path/Frameworks", 354 | ); 355 | MARKETING_VERSION = 1.0; 356 | PRODUCT_BUNDLE_IDENTIFIER = in.amitsamant.DiskSpaceProviderExampleApp; 357 | PRODUCT_NAME = "$(TARGET_NAME)"; 358 | SWIFT_EMIT_LOC_STRINGS = YES; 359 | SWIFT_VERSION = 5.0; 360 | TARGETED_DEVICE_FAMILY = "1,2"; 361 | }; 362 | name = Release; 363 | }; 364 | /* End XCBuildConfiguration section */ 365 | 366 | /* Begin XCConfigurationList section */ 367 | 1986ED4727CDFCF400096E66 /* Build configuration list for PBXProject "DiskSpaceProviderExampleApp" */ = { 368 | isa = XCConfigurationList; 369 | buildConfigurations = ( 370 | 1986ED5827CDFCF500096E66 /* Debug */, 371 | 1986ED5927CDFCF500096E66 /* Release */, 372 | ); 373 | defaultConfigurationIsVisible = 0; 374 | defaultConfigurationName = Release; 375 | }; 376 | 1986ED5A27CDFCF500096E66 /* Build configuration list for PBXNativeTarget "DiskSpaceProviderExampleApp" */ = { 377 | isa = XCConfigurationList; 378 | buildConfigurations = ( 379 | 1986ED5B27CDFCF500096E66 /* Debug */, 380 | 1986ED5C27CDFCF500096E66 /* Release */, 381 | ); 382 | defaultConfigurationIsVisible = 0; 383 | defaultConfigurationName = Release; 384 | }; 385 | /* End XCConfigurationList section */ 386 | 387 | /* Begin XCRemoteSwiftPackageReference section */ 388 | 1986ED8427CE022E00096E66 /* XCRemoteSwiftPackageReference "DiskSpaceProvider" */ = { 389 | isa = XCRemoteSwiftPackageReference; 390 | repositoryURL = "https://github.com/DominatorVbN/DiskSpaceProvider"; 391 | requirement = { 392 | kind = upToNextMajorVersion; 393 | minimumVersion = 0.0.3; 394 | }; 395 | }; 396 | /* End XCRemoteSwiftPackageReference section */ 397 | 398 | /* Begin XCSwiftPackageProductDependency section */ 399 | 1986ED8527CE022E00096E66 /* DiskSpaceProvider */ = { 400 | isa = XCSwiftPackageProductDependency; 401 | package = 1986ED8427CE022E00096E66 /* XCRemoteSwiftPackageReference "DiskSpaceProvider" */; 402 | productName = DiskSpaceProvider; 403 | }; 404 | /* End XCSwiftPackageProductDependency section */ 405 | }; 406 | rootObject = 1986ED4427CDFCF400096E66 /* Project object */; 407 | } 408 | -------------------------------------------------------------------------------- /SwiftUIExample/DiskSpaceProviderExampleApp/DiskSpaceProviderExampleApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftUIExample/DiskSpaceProviderExampleApp/DiskSpaceProviderExampleApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SwiftUIExample/DiskSpaceProviderExampleApp/DiskSpaceProviderExampleApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "DiskSpaceProvider", 6 | "repositoryURL": "https://github.com/DominatorVbN/DiskSpaceProvider", 7 | "state": { 8 | "branch": null, 9 | "revision": "57e0c32eefe4258a65e6cd15c39730cea9777e11", 10 | "version": "0.0.2" 11 | } 12 | } 13 | ] 14 | }, 15 | "version": 1 16 | } 17 | -------------------------------------------------------------------------------- /SwiftUIExample/DiskSpaceProviderExampleApp/DiskSpaceProviderExampleApp.xcodeproj/xcuserdata/amitsamat.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | DiskSpaceProviderExampleApp.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /SwiftUIExample/DiskSpaceProviderExampleApp/DiskSpaceProviderExampleApp/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SwiftUIExample/DiskSpaceProviderExampleApp/DiskSpaceProviderExampleApp/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /SwiftUIExample/DiskSpaceProviderExampleApp/DiskSpaceProviderExampleApp/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /SwiftUIExample/DiskSpaceProviderExampleApp/DiskSpaceProviderExampleApp/DiskSpaceProviderExampleAppApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DiskSpaceProviderExampleAppApp.swift 3 | // DiskSpaceProviderExampleApp 4 | // 5 | // Created by Amit Samant on 01/03/22. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct DiskSpaceProviderExampleAppApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SwiftUIExample/DiskSpaceProviderExampleApp/DiskSpaceProviderExampleApp/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /iphonestorage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominatorVbN/DiskSpaceProvider/4d073541a8a0709b3279fba8717bac4da84b5475/iphonestorage.png -------------------------------------------------------------------------------- /purge.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominatorVbN/DiskSpaceProvider/4d073541a8a0709b3279fba8717bac4da84b5475/purge.PNG -------------------------------------------------------------------------------- /storage.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominatorVbN/DiskSpaceProvider/4d073541a8a0709b3279fba8717bac4da84b5475/storage.PNG --------------------------------------------------------------------------------