[PR #1517] [MERGED] Auto re-sign app on launch #1873

Closed
opened 2026-03-03 19:09:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/PlayCover/PlayCover/pull/1517
Author: @XuYicong
Created: 6/16/2024
Status: Merged
Merged: 8/13/2024
Merged by: @Depal1

Base: developHead: develop


📝 Commits (5)

  • 7a0b0e8 check Info.plist signature on launch
  • 476fc9e Added PlayApp view state persistence (#1)
  • d37aae0 FIxed progress view UI
  • d38378f Included PlayAppVM.swift in project file
  • 2af5192 Merge branch 'develop' of github.com:PlayCover/PlayCover into develop

📊 Changes

5 files changed (+140 additions, -77 deletions)

View changed files

📝 PlayCover.xcodeproj/project.pbxproj (+4 -0)
📝 PlayCover/Model/PlayApp.swift (+6 -4)
PlayCover/ViewModel/PlayAppVM.swift (+22 -0)
📝 PlayCover/Views/App Views/PlayAppView.swift (+60 -49)
📝 PlayCover/Views/Sidebar Views/AppLibraryView.swift (+48 -24)

📄 Description

When running codesign -dv on some game, its signature info would be displayed. If the Info.plist has bad signature, a line would be Info.plist=not bound. If it's good, the line would be like Info.plist entries=56. In this way we can quickly check for a signature failure that would lead to an OSStatus-67030 error and cause a crash. So we can re-sign the app if such case is detected.

The shell command part is working perfectly, but I have some problems regarding SwiftUI and need help.

Now that it would auto re-sign app on launch, a launch could take a long time. Therefore, a progress view is needed to give the user some feedback.
截屏2024-06-17 03 40 04
截屏2024-06-17 03 40 23

This works perfectly with a showStartingProgress variable, but when isList is changed during starting, showStartingProgress is reset to false.

I then decide to rely on app.isStarting and update showStartingProgress from it, but something I don't understand happens: app.isStarting also resets to false. This not only lead to the not showing of the progress view when switching between List view and Grid view, but also makes the app can be launched multiple times during launching. This seems an existing issue, but it was not severe because launch time was short. But now it becomes severe, I don't know why it would reset and don't know how to fix it.

Edit: Thanks to @Wind-Explorer the above issue is fixed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/PlayCover/PlayCover/pull/1517 **Author:** [@XuYicong](https://github.com/XuYicong) **Created:** 6/16/2024 **Status:** ✅ Merged **Merged:** 8/13/2024 **Merged by:** [@Depal1](https://github.com/Depal1) **Base:** `develop` ← **Head:** `develop` --- ### 📝 Commits (5) - [`7a0b0e8`](https://github.com/PlayCover/PlayCover/commit/7a0b0e8518d98e04bddf398c6d14f761987f3dd1) check Info.plist signature on launch - [`476fc9e`](https://github.com/PlayCover/PlayCover/commit/476fc9e1913522a6dca3d223a76c3a0ef4936196) Added PlayApp view state persistence (#1) - [`d37aae0`](https://github.com/PlayCover/PlayCover/commit/d37aae0c4c841720d20bbdd32415a1ffef750e6a) FIxed progress view UI - [`d38378f`](https://github.com/PlayCover/PlayCover/commit/d38378f46b6cc29ffa9be32ef054cd143482c7ab) Included PlayAppVM.swift in project file - [`2af5192`](https://github.com/PlayCover/PlayCover/commit/2af5192d6a81a1d6320f8d13e6f8f7f76e4c8cc1) Merge branch 'develop' of github.com:PlayCover/PlayCover into develop ### 📊 Changes **5 files changed** (+140 additions, -77 deletions) <details> <summary>View changed files</summary> 📝 `PlayCover.xcodeproj/project.pbxproj` (+4 -0) 📝 `PlayCover/Model/PlayApp.swift` (+6 -4) ➕ `PlayCover/ViewModel/PlayAppVM.swift` (+22 -0) 📝 `PlayCover/Views/App Views/PlayAppView.swift` (+60 -49) 📝 `PlayCover/Views/Sidebar Views/AppLibraryView.swift` (+48 -24) </details> ### 📄 Description When running `codesign -dv` on some game, its signature info would be displayed. If the `Info.plist` has bad signature, a line would be `Info.plist=not bound`. If it's good, the line would be like `Info.plist entries=56`. In this way we can quickly check for a signature failure that would lead to an `OSStatus-67030` error and cause a crash. So we can re-sign the app if such case is detected. The shell command part is working perfectly, but I have some problems regarding SwiftUI and need help. Now that it would auto re-sign app on launch, a launch could take a long time. Therefore, a progress view is needed to give the user some feedback. <img width="1012" alt="截屏2024-06-17 03 40 04" src="https://github.com/PlayCover/PlayCover/assets/16048758/e5cfe050-1d5a-41ca-a2bb-41c477905736"> <img width="1012" alt="截屏2024-06-17 03 40 23" src="https://github.com/PlayCover/PlayCover/assets/16048758/5f753d92-285d-4be4-bf7d-d71ba678df60"> This works perfectly with a `showStartingProgress` variable, but when `isList` is changed during starting, `showStartingProgress` is reset to `false`. I then decide to rely on `app.isStarting` and update `showStartingProgress` from it, but something I don't understand happens: `app.isStarting` also resets to `false`. This not only lead to the not showing of the progress view when switching between List view and Grid view, but also makes the app can be launched multiple times during launching. This seems an existing issue, but it was not severe because launch time was short. But now it becomes severe, I don't know why it would reset and don't know how to fix it. Edit: Thanks to @Wind-Explorer the above issue is fixed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 19:09:24 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PlayCover#1873
No description provided.