Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f87a64c
Updated .gitignore
wibosco Sep 9, 2026
286a45f
Added secret file to store api key
wibosco Sep 9, 2026
f8313d4
Switched from Imgur to TheCatAPI
wibosco Sep 9, 2026
95c2fdc
Introduced services
wibosco Sep 9, 2026
c54a8fe
Extracted view model
wibosco Sep 9, 2026
0ad10a0
Adjusted access
wibosco Sep 9, 2026
8ebb3e6
Session downloads, coalesces and reports on downloads in a thread saf…
wibosco Sep 10, 2026
a236288
Added session protocol
wibosco Sep 11, 2026
244e707
Simplified tests
wibosco Sep 11, 2026
842c70b
Added DispatchSource to recieve memory warnings rather than via UIKit
wibosco Sep 11, 2026
a5abd9a
Moved more functionality into to make its purpose more understandable
wibosco Sep 11, 2026
ad7d072
Made Download a class to simplify interactions with it
wibosco Sep 11, 2026
920373f
Renamed and simplified a number of types
wibosco Sep 12, 2026
3f112fe
Simplified networking stack
wibosco Sep 12, 2026
88c7d97
Added previous and next buttons
wibosco Sep 12, 2026
37c5400
Generate Secrets.xcconfig as part of build script
wibosco Sep 13, 2026
53bfda7
Using a switch to better handle all paths
wibosco Sep 15, 2026
bbf79cc
Simplified Downloader by removing state
wibosco Sep 16, 2026
4709fe8
Switched from to
wibosco Sep 23, 2026
b52b2ae
Simplfied DefaultMemoryPressureMonitor
wibosco Sep 23, 2026
cb8aab3
Added better error handling for a completed download
wibosco Sep 24, 2026
204f45e
Removed unneeded init
wibosco Sep 24, 2026
c9c2518
Removed unneeded cancelled check
wibosco Sep 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:

steps:
- uses: actions/checkout@v6
- name: Create Secrets.xcconfig
run: echo "CAT_API_KEY = ${{ secrets.CAT_API_KEY }}" > Secrets.xcconfig
- name: List available Xcode versions
run: ls /Applications | grep Xcode
- name: Show current version of Xcode
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ xcuserdata/
timeline.xctimeline
playground.xcworkspace

##Config
Secrets.xcconfig

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
Expand Down
410 changes: 226 additions & 184 deletions PausableDownloads-Example.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1130"
LastUpgradeVersion = "2660"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
31 changes: 1 addition & 30 deletions PausableDownloads-Example/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,10 @@

import UIKit

@UIApplicationMain
@main
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

func applicationWillResignActive(_ application: UIApplication) {
// 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.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}

func applicationDidEnterBackground(_ application: UIApplication) {
// 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.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(_ application: UIApplication) {
// 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.
}

func applicationDidBecomeActive(_ application: UIApplication) {
// 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.
}

func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


}

23 changes: 21 additions & 2 deletions PausableDownloads-Example/Application/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,36 @@
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CatAPIKey</key>
<string>$(CAT_API_KEY)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
Expand Down
13 changes: 13 additions & 0 deletions PausableDownloads-Example/Application/SceneDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// SceneDelegate.swift
// PausableDownloads-Example
//
// Created by William Boles on 16/09/2026.
// Copyright © 2026 William Boles. All rights reserved.
//

import UIKit

final class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading