Xkcd iPhone app

Related tags

SwiftUI App xkcd
Overview

This is the repo behind http://bit.ly/xkcdapp, an iOS xkcd reader.

The code started as a learning project back on iOS 2.0 and has been through a lot since then! Just fair warning. :)

Thoughts on the App Store

This is released under an MIT license, in case any of the code here is useful to you. However, out of respect for the users of the App Store (who already must choose from lots of xkcd apps), I would ask that you not submit new xkcd apps based on this one, but instead contribute back code. I know the code base is not as clean as it could be...but it's also not as bad as it could be!

Contact

The best way to discuss, contribute, etc. is via GitHub Issues and Pull Requests. But if you want to reach me about this project, I am available at [email protected].

Comments
  • Cleaning Up

    Cleaning Up

    Resolved iOS7 deprecations and 64-bit warnings. Removing old changes I made that make no sense with the new iOS7 APIs. Converting some syntax to its "Modern Objective-C" equivalent.

    opened by paulrehkugler 15
  • Explain xkcd

    Explain xkcd

    It seems I was nearer finishing than I thought. I've tested this with spot checks and I can't see any show-stopping issues. Not sure I've got the Core Data stuff working properly as I'm quite new to Core Data. It looks like the explanation for each comic isn't persisting properly, but perhaps you know more and could get it persisting properly. If there are changes that you want to make, can you let me know what they were so I can learn from it? Cheers!

    opened by ghost 15
  • Fix EXIF Zoom Issue, Some Cleanup, Local Notification Support

    Fix EXIF Zoom Issue, Some Cleanup, Local Notification Support

    Sorry about the gratuitous commits in here. I tried to match your code style as much as I could; let me know if I am doing anything irritating.

    The EXIF data was actually really easy to ignore: use a CGImageRef and get it's width and height. That uses the bitmap width and height (exif agnostic). I added a category to UIImage with the property exifAgnosticSize, and updated size accessors where I thought necessary. I may have missed one or two, but everything seems to be working.

    I did some cleanup for readability while I was throwing out ivars. Nothing much to see here.

    Added local notifications that fire MWF at 2:00 AM EST. This required a new (somewhat messy) category on NSDate. It adds a property for nextMondayWednesdayOrFriday, which returns 2:00 AM EST of the the next Monday, Wednesday, or Friday (whichever is soonest). The next notification gets scheduled when the user leaves the app; if you don't visit after the last notification, it will stay out of your hair. I could set a repeatInterval on these and only set up notifications once, but I like this approach better.

    If anything's unclear, let me know.

    opened by paulrehkugler 9
  • Make not ugly in iOS 7

    Make not ugly in iOS 7

    Includes new assets, new overall look-and-feel, launch images, replacing the system action icon in the top left (up arrow doesn't make sense when at the top of the screen), etc.

    opened by josharian 6
  • Download all / Delete all crash in iOS 6

    Download all / Delete all crash in iOS 6

    2012-10-12 20:43:52.239 xkcd[8113:907] Store path: /var/mobile/Applications/9EFA3B99-3422-4C64-B24B-BDA58C8ED53B/Documents/comics.sqlite 2012-10-12 20:43:52.823 xkcd[8113:907] Scroll error 2012-10-12 20:43:52.864 xkcd[8113:907] Starting synchronization of downloaded images 2012-10-12 20:43:52.869 xkcd[8113:907] Synchronized downloaded images: 0 images 2012-10-12 20:44:59.956 xkcd[8113:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'keypath downloaded not found in entity ' *** First throw call stack: (0x37b782a3 0x35e8897f 0x39487597 0x394872bd 0x39486ed5 0x3948664f 0x39486119 0x39485531 0x39483e2b 0x35039 0x3a447 0x33121 0x30f61 0x3d101 0x3900ab01 0x38e5eabb 0x38ed38d7 0x357c5bd9 0x368684b7 0x3686d1bd 0x37b4bf3b 0x37abeebd 0x37abed49 0x37ffb2eb 0x38e9d301 0x2d101 0x3c5a9b20) libc++abi.dylib: terminate called throwing an exception

    opened by leberwurstsaft 5
  • App Won’t Update Past 1248

    App Won’t Update Past 1248

    Some users cannot access comics more recent than 1248. As far as I can tell, https://xkcd.com/1248/info.0.json and https://xkcd.com/1249/info.0.json both have well-formed JSON, so this may be a local issue with the app.

    opened by paulrehkugler 3
  • Fix ugliness of switching to another comic

    Fix ugliness of switching to another comic

    I have been working on integrating Explain XKCD into the app and it's looking good ... but for now, here's a little pull request for something I encountered whilst I was working on that.

    opened by ghost 3
  • Comic image 76 doesn't scroll correctly

    Comic image 76 doesn't scroll correctly

    Reported by Pete (thanks, Pete!):

    Viewing comic #76, for some reason I can't zoom out to see the full width of the comic or scroll all the way to the right. I can hold it in place with my finger, but as soon as I let go it snaps back.

    Reproduced locally with an iPhone 5 running iOS 6.1.3.

    opened by josharian 3
  • Rotation disabling broken?

    Rotation disabling broken?

    Reported by Tyler:

    I'm not sure if this is user error on my part or just a bug, but ever since one of your updates(it was 2-3 updates ago if I can remember), I haven't been able to disable the rotation in the settings.
    Oh, and I've tried restarting my phone with rotation enabled and disabled to see if that would fix it somehow... It didn't.
    
    opened by josharian 3
  • Handle linked-to large images

    Handle linked-to large images

    We just display the small image right now. Main challenge is detecting that there is a linked-to image (wasn't a good hint in the API last I checked).

    opened by josharian 3
  • High-resolution images

    High-resolution images

    Fix for #68. I did my best to add high-resolution image support in a way that a) didn't require huge changes to how the app works and b) minimizes requests to xkcd servers.

    Unfortunately there is no way (that I could find) to determine the high-resolution image URL to use. Some comics use the default img URL, some use the img but with _large at the end (those are usually the ones that the xkcd.com comic image is a link to a larger version), and almost every comic >= 1084 has a _2x version (the only ones without _2x are some of the ones that use _large).

    So my change will, on loading the image, attempt _large, then attempt _2x, then fall back to the default image URL. However, to minimize requests, I have hardcoded known comics that are _large up to current date, so it doesn't have to check for the vast majority that aren't. This doesn't need to be updated -- future comics not included in the hardcoded part will just always check for _large first. Sorry it's so ugly, but I'm not sure there's a better way to do it, since the xkcd API is so useless for high-res images.

    Also comics 256 and 273 are special -- their default image URL has _small at the end, but the link is to one with no suffix. I just hard-coded these URLs. It will still fall back to the default URL if my hard-coded URL fails.

    Additionally, since the 2x comics are bigger, I modified the view controller to zoom out to 0.5 when loading comics >= 1084. That way, they don't show up super big on screen by default. (While doing this, I also fixed the "Open Zoomed Out" feature, which did not seem to be working originally.)

    opened by azsn 2
  • Bug: Can't fully scroll comic into view

    Bug: Can't fully scroll comic into view

    I received this bug report from a user:

    The app used to let you scroll a comic until the bottom of the comic was even with the bottom toolbar. Now, the comic stops at the bottom edge of the screen, so the bottom toolbar can cover up the bottom of comics that are taller or roughly the same size as my phone screen.

    I also am having this issue, specifically for comics 2328 and 2326 (among others).

    opened by paulrehkugler 1
  • Only Cycle Through Downloaded Comics When Offline

    Only Cycle Through Downloaded Comics When Offline

    The app will randomize to some comics that aren’t downloaded when offline. Ideally, if the app can detect that the user isn’t connected to the internet, it shouldn’t randomly choose a comic that is not stored locally on the device.

    opened by paulrehkugler 0
  • Feature Request: Push Notifications

    Feature Request: Push Notifications

    The ability to have Push Notifications so that when your waiting for the next most recent comic, you get notified when it's available.

    Feature to also autodelete/download a set list of most recent comics too.

    opened by wilsteady 0
  • Prettier comic list <--> comic image transition?

    Prettier comic list <--> comic image transition?

    Per iOS 7 and general trend towards more in-place feeling transitions. Maybe render an expandable thumbnail in the comic list? Change the ui more fundamentally?

    opened by josharian 0
Releases(3.6)
Owner
Paul Rehkugler
Paul Rehkugler
A xkcd client written in SwiftUI.

xkcd A xkcd client written in SwiftUI. Architechture: Tried to use MVVM but with CoreData... If you know, you know. Features: Supports Dark/Light mode

Sina Rabiei 10 Oct 21, 2022
A simple health assistant app built in Swift5 for iPhone 📱

Health-Habit-Assistant A simple habit forming app build for iPhone in Swift 5 (iOS 11+) (This Project is designed to be used in China 4C Computer Comp

Masayuki Inamori 381 Dec 27, 2022
iCome Out is an open source project of an unofficial Pornub app for iPhone and iPad

iCome Out is an open source project of an unofficial Pornub app for iPhone and iPad, written in Swift with some cool features Getting Started Prerequi

Anon 3 Dec 1, 2022
iPhone App for identifying resistors.

IDResistors Download on the App Store! IDResistors is a simple app for identifing the values smd and through hole resistors. It's developed using Swif

Marc Rummel 10 Oct 18, 2022
Reading List is an iOS app for iPhone and iPad which helps users track and catalog the books they read

Reading List Reading List is an iOS app for iPhone and iPad which helps users track and catalog the books they read. Reading List v2 As of version 2.0

Andrew Bennet 281 Jan 15, 2022
OctoPod is a free open source iPhone/iPad app for OctoPrint

OctoPod OctoPod is a free open source iPhone/iPad app for OctoPrint. Build Instructions Download Xcode You will need to install Swift 5.0 and Xcode 11

Gaston Dombiak 193 Dec 30, 2022
null 1 Jan 27, 2022
Aquarium Life is an iPhone app for management of Home Aquariums

Aquarium life Aquarium Life is an iPhone app for management of Home Aquariums. The app was launched on Apple App Store in 2021 but removed after my me

Sahil Satralkar 3 Apr 11, 2022
SafeTimer es una app para iPhone y Apple Watch que te ayuda a controlar el tiempo que has usado una mascarilla.

SafeTimer es una app para iPhone y Apple Watch que te ayuda a controlar el tiempo que has usado una mascarilla.

Chubby Apps 13 Sep 20, 2022
A simple To-do list app build for iPhone, iPad and Apple Watch in Swift

A simple To-do list app build for iPhone, iPad and Apple Watch in Swift

Radu Ursache 186 Dec 28, 2022
Trivia about Animal Crossing: New Horizons. My first iOS (iPhone) app.

ACNH-trivia-iOS-app Trivia about Animal Crossing: New Horizons. This is my first iOS (iPhone) app. I am excited to start my journey as an iOS develope

Katie Saramutina 2 Apr 14, 2022
An iPhone Simulator "Wrapper" for SwiftUI Apps on macOS

SwiftUIPhone Run a SwiftUI app (or any SwiftUI view) in an iPhone Simulator "wrapper", directly on macOS! To be clear, this is not an iPhone Simulator

Justin Kaufman 7 May 20, 2022
iCloud Drive is Apple's essential connection between all your devices, Mac, iPhone, iPad, even your Windows PC.

iCloud Drive is Apple's essential connection between all your devices, Mac, iPhone, iPad, even your Windows PC.While the cost of storage seems expensive in comparison to other online storage services, its advantage is that it works natively across all your devices.

MindInventory 12 Jul 29, 2022
iOS Trakt Client - Keep track of your favorite TV shows and movies on your iPhone. (Under development)

CouchTracker Keep track of your favorite movies and tv shows on your iPhone Setup for development You will need Xcode 11.2.1 Swift 5.1.2 Run the follo

Pietro Caselani 42 Apr 19, 2022
Swift iPhone and iPad Client for Polls API, using Hyperdrive API client

Polls Client This is a Swift iPhone and iPad client for the Polls API - a simple application allowing users to view polls and vote in them. Polls is a

Apiary 34 Jul 15, 2022
In this mini app covered the concepts like basics of SwiftUI and Navigations and Animations and List with CRUD functions and MVVM and App Launch and App icons adding and also applied persistence using UserDefaults Concept.

TodoList In this application used the concepts from the beginner level project of SwiftUI_Evolve_1 The following concepts covered in this mini app Swi

Sivaram Yadav 2 Dec 4, 2021
Todo is an iOS App written in Swift. This app is used for an online video training course. This app demonstrates how to use UITableViewController.

Todo Todo is an iOS App written in Swift. This app is used for an online video training course. This app demonstrates how to use UITableViewController

Jake Lin 273 Dec 29, 2022
Porting the example app from our Advanced iOS App Architecture book from UIKit to SwiftUI.

SwiftUI example app: Koober We're porting the example app from our Advanced iOS App Architecture book from UIKit to SwiftUI and we are sharing the cod

raywenderlich 55 Dec 19, 2022
Quotes App is quotes browsing app which is built with Quotable Free API completely in SwiftUI.

Quotes App is quotes browsing app which is built with Quotable Free API completely in SwiftUI. You can watch the whole journey of building this

Dheeraj Kumar Sharma 32 Nov 22, 2022