Skip to content

feat: app updates#200

Merged
claration merged 13 commits into
claration:mainfrom
castdrian:feat-updates
Dec 3, 2024
Merged

feat: app updates#200
claration merged 13 commits into
claration:mainfrom
castdrian:feat-updates

Conversation

@castdrian

Copy link
Copy Markdown
Contributor

this aims to close #166 by implementing update checking, prompting, notifying and performing the install flow
this is probably extremely messy, I apologise, frankly the codebase was way bigger than I expected and I've just kinda been waddling through an ocean blindfolded

screenshot

@claration

claration commented Nov 25, 2024

Copy link
Copy Markdown
Owner

Is there a reason why almost the entire project has been reformatted? There's around 10k lines changed

edit: swift format, which I'll just let that slide

@castdrian

Copy link
Copy Markdown
Contributor Author

Oh yeah I have an automation that runs swiftformat and commits it in every Xcode project, I can revert that though if you're not a fan of swiftformat, I'm more concerned with how bad my implementation is, first time I've encountered CoreData rather than a UserDefaults lib, I've only done swift for a couple years so this is probably not A grade quality 🥲

@claration

Copy link
Copy Markdown
Owner

So after reviewing some of, I'm gonna point out things that I've noticed

  • You've changed some of the design of the cells, which upon doing that removed the ability to see the source where the app has been imported. (Also making a seperate bundleid field makes the cells unnecessarily big)

  • You have also removed the ability to open the app within the sheet that appears when pressing on a cell, including the functionality to resign an app optionally with a different certificate.

  • While the updating functionality is pretty cool in my opinion, it shouldn't really consider if an app is installed because it's hard to tell if it actually is. For example, pressing install on a signed app may not install either by lack of entitlements, ssl cert expiring, dev cert expiring, and not being able to install with online method due to no hotspot.

  • Theres also a bug where it may crash upon launch due to presumably updating stuff on the incorrect thread, from my experience at least as it needed a few launches before it actually was successful.

@castdrian

Copy link
Copy Markdown
Contributor Author

ah fuck me, I'll see to restoring all of that to how it was and fix the threading

@castdrian

castdrian commented Nov 27, 2024

Copy link
Copy Markdown
Contributor Author

I believe I've addressed everything and provided a way cleaner approach this time, by nuking the branch back to main and then cherry picking the update functionality back into the signed apps cells instead and adjusting it to not just randomly break everything

App.Updates.from.Castdrian.mov

@claration

Copy link
Copy Markdown
Owner

I haven't gotten able to get app updates working outside of the mock sources, is there a reason for that?

@castdrian

Copy link
Copy Markdown
Contributor Author

I haven't gotten able to get app updates working outside of the mock sources, is there a reason for that?

did you run in release configuration or in debug configuration? if your scheme is set to debug it will always choose the mock source

@castdrian castdrian force-pushed the feat-updates branch 3 times, most recently from e4843e5 to f19c6f8 Compare December 2, 2024 19:40
@claration

claration commented Dec 2, 2024

Copy link
Copy Markdown
Owner

It's not choosing the mock source when it's using release mode so that's good, but it doesn't seem any different from what it was. When choosing debug the mock source works fine, and actually shows that it works to an extent but doesn't show the same in release.

I tried to actually test this by downloading an older version of feather and seeing if it updates.

@claration

Copy link
Copy Markdown
Owner

image

@castdrian

castdrian commented Dec 2, 2024

Copy link
Copy Markdown
Contributor Author

very funny thing there, apparently I was checking against the top level version field in release mode instead of iterating through the versions array, why do the altstore people have to define two similar keys ㅠㅠ

@claration

Copy link
Copy Markdown
Owner

People have two versions keys mainly for compatibility with older altstore versions and other apps that use the scheme

@claration

claration commented Dec 2, 2024

Copy link
Copy Markdown
Owner

The version array should be first priority as altstore uses that in their 2.0 release

@castdrian

castdrian commented Dec 2, 2024

Copy link
Copy Markdown
Contributor Author

this worked in both release and debug config, tested the same way you did with just feather itself, downloaded 1.1.2 relaunched, update prompt

  • edit, nevermind, apparently something off with the source url, it url encodes the source name instead of the url, apparently I can't catch a break

@castdrian

Copy link
Copy Markdown
Contributor Author

i pinky promise, I tested every step on both scheme configurations now it actually does fully accomplish the update flow

@claration

Copy link
Copy Markdown
Owner

"merging is blocked" nuh uh

@claration claration merged commit 33f89fc into claration:main Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle Updates

3 participants