-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use quran.app backend instead of Apple on-demand resources
- Loading branch information
1 parent
56a300a
commit 9422b57
Showing
30 changed files
with
768 additions
and
279 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
.swiftpm/xcode/xcshareddata/xcschemes/ReadingService.xcscheme
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1430" | ||
version = "1.7"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "ReadingService" | ||
BuildableName = "ReadingService" | ||
BlueprintName = "ReadingService" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
shouldAutocreateTestPlan = "YES"> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "ReadingService" | ||
BuildableName = "ReadingService" | ||
BlueprintName = "ReadingService" | ||
ReferencedContainer = "container:"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// Zipper.swift | ||
// | ||
// | ||
// Created by Mohamed Afifi on 2023-11-22. | ||
// | ||
|
||
import Foundation | ||
import Zip | ||
|
||
public protocol Zipper { | ||
func unzipFile(_ zipFile: URL, destination: URL, overwrite: Bool, password: String?) throws | ||
} | ||
|
||
public struct DefaultZipper: Zipper { | ||
// MARK: Lifecycle | ||
|
||
public init() { } | ||
|
||
// MARK: Public | ||
|
||
public func unzipFile(_ zipFile: URL, destination: URL, overwrite: Bool, password: String?) throws { | ||
try Zip.unzipFile(zipFile, destination: destination, overwrite: overwrite, password: password) | ||
} | ||
} |
46 changes: 0 additions & 46 deletions
46
Core/SystemDependenciesFake/BundleResourceRequestFake.swift
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// ZipperFake.swift | ||
// | ||
// | ||
// Created by Mohamed Afifi on 2023-11-22. | ||
// | ||
|
||
import Foundation | ||
import SystemDependencies | ||
|
||
public final class ZipperFake: Zipper { | ||
// MARK: Lifecycle | ||
|
||
public init(fileManager: FileSystem) { | ||
self.fileManager = fileManager | ||
} | ||
|
||
// MARK: Public | ||
|
||
public var failures: [Error] = [] | ||
public var unzippedFiles: [URL] = [] | ||
|
||
public func unzipFile(_ zipFile: URL, destination: URL, overwrite: Bool, password: String?) throws { | ||
if let failure = failures.first { | ||
failures.remove(at: 0) | ||
throw failure | ||
} | ||
|
||
for file in zipContents(zipFile) { | ||
try fileManager.writeToFile(at: file, content: "unzipped") | ||
} | ||
unzippedFiles.append(zipFile) | ||
} | ||
|
||
public func zipContents(_ zipFile: URL) -> Set<URL> { | ||
let directory = zipFile.deletingPathExtension() | ||
return [ | ||
directory.appendingPathComponent("text.txt"), | ||
directory.appendingPathComponent("database.db"), | ||
directory.appendingPathComponent("image.png"), | ||
] | ||
} | ||
|
||
// MARK: Private | ||
|
||
private let fileManager: FileSystem | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.