Skip to content

Commit

Permalink
Fix conflicts
Browse files Browse the repository at this point in the history
commit 7e9357a
Author: Weblate (bot) <hosted@weblate.org>
Date:   Sat Mar 11 16:12:45 2023 +0100

    Translations update from Hosted Weblate (PlayCover#847)

    * Translated using Weblate (Russian)

    Currently translated at 84.2% (198 of 235 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/ru/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Indonesian)

    Currently translated at 68.9% (162 of 235 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/id/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Japanese)

    Currently translated at 92.3% (217 of 235 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/ja/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Korean)

    Currently translated at 86.3% (203 of 235 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/ko/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Persian)

    Currently translated at 86.3% (203 of 235 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/fa/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Romanian)

    Currently translated at 68.9% (162 of 235 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/ro/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Danish)

    Currently translated at 45.1% (106 of 235 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/da/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Chinese (Traditional))

    Currently translated at 99.1% (233 of 235 strings)

    Translated using Weblate (Chinese (Traditional))

    Currently translated at 97.0% (228 of 235 strings)

    Update translation files

    Updated by "Cleanup translation files" hook in Weblate.

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Co-authored-by: rootmelo92118 <rootmelo92118@gmail.com>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/zh_Hant/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Turkish)

    Currently translated at 87.2% (205 of 235 strings)

    Update translation files

    Updated by "Cleanup translation files" hook in Weblate.

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/tr/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Hindi)

    Currently translated at 85.1% (200 of 235 strings)

    Update translation files

    Updated by "Cleanup translation files" hook in Weblate.

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/hi/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Portuguese (Brazil))

    Currently translated at 97.0% (228 of 235 strings)

    Update translation files

    Updated by "Cleanup translation files" hook in Weblate.

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/pt_BR/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Spanish)

    Currently translated at 100.0% (235 of 235 strings)

    Translated using Weblate (Spanish)

    Currently translated at 97.0% (228 of 235 strings)

    Update translation files

    Updated by "Cleanup translation files" hook in Weblate.

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Co-authored-by: gallegonovato <fran-carro@hotmail.es>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/es/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (German)

    Currently translated at 100.0% (235 of 235 strings)

    Translated using Weblate (German)

    Currently translated at 97.0% (228 of 235 strings)

    Update translation files

    Updated by "Cleanup translation files" hook in Weblate.

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Co-authored-by: SkyrilHD <skyrilhd@gmail.com>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/de/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Vietnamese)

    Currently translated at 93.6% (220 of 235 strings)

    Update translation files

    Updated by "Cleanup translation files" hook in Weblate.

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/vi/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Chinese (Simplified))

    Currently translated at 100.0% (235 of 235 strings)

    Translated using Weblate (Chinese (Simplified))

    Currently translated at 99.1% (233 of 235 strings)

    Translated using Weblate (Chinese (Simplified))

    Currently translated at 98.7% (232 of 235 strings)

    Translated using Weblate (Chinese (Simplified))

    Currently translated at 100.0% (232 of 232 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Co-authored-by: rootmelo92118 <rootmelo92118@gmail.com>
    Co-authored-by: weng weng <carlchina@gmail.com>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/zh_Hans/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (French)

    Currently translated at 93.6% (220 of 235 strings)

    Update translation files

    Updated by "Cleanup translation files" hook in Weblate.

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/fr/
    Translation: PlayCover/PlayCover

    ---------

    Co-authored-by: rootmelo92118 <rootmelo92118@gmail.com>
    Co-authored-by: gallegonovato <fran-carro@hotmail.es>
    Co-authored-by: SkyrilHD <skyrilhd@gmail.com>
    Co-authored-by: weng weng <carlchina@gmail.com>

commit c49f1fc
Author: OHaiiBuzzle <23693150+ohaiibuzzle@users.noreply.github.com>
Date:   Sat Mar 11 22:11:08 2023 +0700

    feat: starts app asynchronously (PlayCover#856)

    * feat: starts app asynchronously

    * fix: add a lock to app startup to prevent starting the same app twice

commit df96821
Author: Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com>
Date:   Sat Mar 11 15:03:40 2023 +0000

    Add `force_unwrapping` rule to SwiftLint (PlayCover#753)

    * Remove force unwraps

    * Remove UIF

    * Fixes

    * Merge fixes

    * SwiftLint

    * Fixes

    * Fix errors

    * Fix typo

    * Remove unnecessary function

    * Cleanup shell

    Still got a couple things to fix up

    * Fix lldb

    * Fix put IPA back

commit c42cc67
Author: Weblate (bot) <hosted@weblate.org>
Date:   Tue Mar 7 16:44:50 2023 +0100

    Translations update from Hosted Weblate (PlayCover#844)

    * Translated using Weblate (Russian)

    Currently translated at 85.3% (198 of 232 strings)

    Update translation files

    Updated by "Cleanup translation files" hook in Weblate.

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/ru/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Indonesian)

    Currently translated at 69.8% (162 of 232 strings)

    Update translation files

    Updated by "Cleanup translation files" hook in Weblate.

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/id/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Japanese)

    Currently translated at 93.5% (217 of 232 strings)

    Update translation files

    Updated by "Cleanup translation files" hook in Weblate.

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/ja/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Korean)

    Currently translated at 87.5% (203 of 232 strings)

    Update translation files

    Updated by "Cleanup translation files" hook in Weblate.

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/ko/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Persian)

    Currently translated at 87.5% (203 of 232 strings)

    Update translation files

    Updated by "Cleanup translation files" hook in Weblate.

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/fa/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Romanian)

    Currently translated at 69.8% (162 of 232 strings)

    Update translation files

    Updated by "Cleanup translation files" hook in Weblate.

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/ro/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Danish)

    Currently translated at 45.6% (106 of 232 strings)

    Translated using Weblate (Danish)

    Currently translated at 0.0% (0 of 232 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Bastian Inuk Christensen <bastian@inuk.blog>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/da/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Chinese (Traditional))

    Currently translated at 98.2% (228 of 232 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/zh_Hant/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Turkish)

    Currently translated at 88.3% (205 of 232 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/tr/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Hindi)

    Currently translated at 86.2% (200 of 232 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/hi/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Portuguese (Brazil))

    Currently translated at 98.2% (228 of 232 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/pt_BR/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Spanish)

    Currently translated at 98.2% (228 of 232 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/es/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (German)

    Currently translated at 98.2% (228 of 232 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/de/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Vietnamese)

    Currently translated at 94.8% (220 of 232 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/vi/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (Chinese (Simplified))

    Currently translated at 98.2% (228 of 232 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/zh_Hans/
    Translation: PlayCover/PlayCover

    * Translated using Weblate (French)

    Currently translated at 94.8% (220 of 232 strings)

    Co-authored-by: Anonymous <noreply@weblate.org>
    Co-authored-by: Hosted Weblate <hosted@weblate.org>
    Translate-URL: https://hosted.weblate.org/projects/playcover/playcover/fr/
    Translation: PlayCover/PlayCover

    ---------

    Co-authored-by: Bastian Inuk Christensen <bastian@inuk.blog>

commit 70dafc0
Author: TheMoonThatRises <58153205+TheMoonThatRises@users.noreply.github.com>
Date:   Tue Mar 7 00:06:22 2023 -0700

    HTTP code check (PlayCover#839)

    * feat: IPA library http code check

    * feat: less laggy IPA library loading images

    * fix swiftlint

commit b6a60c8
Author: OHaiiBuzzle <23693150+ohaiibuzzle@users.noreply.github.com>
Date:   Tue Mar 7 13:50:38 2023 +0700

    feat: allow injection of introspection libraries (fix some apps) (PlayCover#846)

commit 6d0b873
Author: Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com>
Date:   Mon Mar 6 15:07:27 2023 +0000

    Remove Catalan, add Danish (PlayCover#843)

commit eca78b7
Author: OHaiiBuzzle <23693150+ohaiibuzzle@users.noreply.github.com>
Date:   Mon Mar 6 22:06:57 2023 +0700

    feat: adding an alternate window fix mode for apps that are able to handle display by themselves (PlayCover#842)

commit 9240be7
Author: Depal1 <47154119+Depal1@users.noreply.github.com>
Date:   Sat Mar 4 08:47:45 2023 -0600

    revert alphabetic sort in IPA Library

    IPA Library alphabetic sort is reverted, until an user defined sorting scheme is introduced later.

commit 9888c2c
Author: Depal1 <47154119+Depal1@users.noreply.github.com>
Date:   Sat Mar 4 08:39:41 2023 -0600

    Review (PlayCover#803) Spanish strings

    Review of Spanish localizations introduced in https://github.com/PlayCover/PlayCover/pull/803/files#diff-1e0ed8a0a66db1bc3fffc7012feaaec1a269306487272a9ada72e941d0b2ea82.
  • Loading branch information
IsaacMarovitz committed Mar 11, 2023
1 parent f6ff252 commit 54c31f1
Show file tree
Hide file tree
Showing 46 changed files with 680 additions and 554 deletions.
4 changes: 2 additions & 2 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
disabled_rules:
- inclusive_language
opt_in_rules:
- force_unwrapping

excluded:
- Carthage
Expand Down
18 changes: 3 additions & 15 deletions PlayCover.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
532644DE26E79E56002EA34D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 532644E026E79E56002EA34D /* Localizable.strings */; };
53D9DAF326C1849D0071959E /* PlayCoverError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53D9DAF226C1849D0071959E /* PlayCoverError.swift */; };
53F3802826EB6F6B00D6B525 /* NotifyService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53F3802726EB6F6B00D6B525 /* NotifyService.swift */; };
53F4D29E26C43C040020167C /* UserIntentFlow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53F4D29D26C43C040020167C /* UserIntentFlow.swift */; };
53F4D2A026C43C690020167C /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53F4D29F26C43C690020167C /* Log.swift */; };
53F50C4926E3CA42007AD2D3 /* AppLibraryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53F50C4826E3CA42007AD2D3 /* AppLibraryView.swift */; };
68E48B952957046D00C39879 /* DownloadManager in Frameworks */ = {isa = PBXBuildFile; productRef = 68E48B942957046D00C39879 /* DownloadManager */; };
Expand Down Expand Up @@ -108,7 +107,6 @@
53E3311126F574B600217197 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Localizable.strings; sourceTree = "<group>"; };
53F3802526EB6CEA00D6B525 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = "<group>"; };
53F3802726EB6F6B00D6B525 /* NotifyService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotifyService.swift; sourceTree = "<group>"; };
53F4D29D26C43C040020167C /* UserIntentFlow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserIntentFlow.swift; sourceTree = "<group>"; };
53F4D29F26C43C690020167C /* Log.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Log.swift; sourceTree = "<group>"; };
53F50C4826E3CA42007AD2D3 /* AppLibraryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLibraryView.swift; sourceTree = "<group>"; };
6854C5E528D53C9500CE28A0 /* fa */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fa; path = fa.lproj/Localizable.strings; sourceTree = "<group>"; };
Expand All @@ -133,7 +131,7 @@
6E692F1D290B349F0090D9EC /* ro */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ro; path = ro.lproj/Localizable.strings; sourceTree = "<group>"; };
6E7CA16428B4D02900216CD8 /* ITunesResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ITunesResponse.swift; sourceTree = "<group>"; };
6E7CA16628B4EEAE00216CD8 /* Keymapping.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Keymapping.swift; sourceTree = "<group>"; };
6E8001382974FE3400E53461 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Localizable.strings; sourceTree = "<group>"; };
6EA4A34B29B61CE9005F4679 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Localizable.strings; sourceTree = "<group>"; };
6EB4B57328C93E0600630890 /* LegacySettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LegacySettings.swift; sourceTree = "<group>"; };
6EC228A028B14A0600D7D73A /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Localizable.strings"; sourceTree = "<group>"; };
6ECB1D0D29798DFA00CD92AA /* DataExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataExtensions.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -275,14 +273,6 @@
path = Model;
sourceTree = "<group>";
};
53F4D29C26C43BED0020167C /* IntentFlow */ = {
isa = PBXGroup;
children = (
53F4D29D26C43C040020167C /* UserIntentFlow.swift */,
);
path = IntentFlow;
sourceTree = "<group>";
};
53F5E73B26C1C566005AED1D /* AppInstaller */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -403,7 +393,6 @@
AA970FD228793A310099A5D0 /* PlayCoverRelease.entitlements */,
53D9DAF226C1849D0071959E /* PlayCoverError.swift */,
53F3802626EB6F5600D6B525 /* Services */,
53F4D29C26C43BED0020167C /* IntentFlow */,
53F4D29926C43A390020167C /* Model */,
53F5E74126C1D369005AED1D /* Utils */,
53F5E73E26C1C654005AED1D /* ViewModel */,
Expand Down Expand Up @@ -508,7 +497,7 @@
tr,
ro,
hi,
ca,
da,
);
mainGroup = 8783CFEE26B8C52D00171041;
packageReferences = (
Expand Down Expand Up @@ -659,7 +648,6 @@
6E5C68BA289865C8008EC11B /* MainView.swift in Sources */,
28361D6028927CAC00B35EDB /* SaveGenshinUserData.swift in Sources */,
B1419FB628BA82EE000CB69F /* DiscordActivity.swift in Sources */,
53F4D29E26C43C040020167C /* UserIntentFlow.swift in Sources */,
6E66B0BF289DE6240099B907 /* StoreVM.swift in Sources */,
B6603E1328E2257800DEFA3F /* Uninstaller.swift in Sources */,
B6ABDA2A2971EEF700A46E80 /* ProgressVM.swift in Sources */,
Expand Down Expand Up @@ -718,7 +706,7 @@
6E692F1C290B34890090D9EC /* tr */,
6E692F1D290B349F0090D9EC /* ro */,
68C79E67296741580041DBC9 /* hi */,
6E8001382974FE3400E53461 /* ca */,
6EA4A34B29B61CE9005F4679 /* da */,
);
name = Localizable.strings;
sourceTree = "<group>";
Expand Down
53 changes: 27 additions & 26 deletions PlayCover/AppInstaller/Downloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,15 @@ class DownloadApp {
let downloader = DownloadManager.shared

func start() {
if !NetworkVM.isConnectedToNetwork() { return }
if installVM.inProgress {
Log.shared.error(PlayCoverError.waitInstallation)
} else {
if let warningMessage = warning {
if let warningMessage = warning, let app = app {
let alert = NSAlert()
alert.messageText = NSLocalizedString(warningMessage, comment: "")
alert.informativeText = String(
format: NSLocalizedString("ipaLibrary.alert.download", comment: ""),
arguments: [app!.name]
arguments: [app.name]
)
alert.alertStyle = .warning
alert.addButton(withTitle: NSLocalizedString("button.Yes", comment: ""))
Expand All @@ -58,7 +57,7 @@ class DownloadApp {

if let url = url, url.isFileURL {
proceedInstall(url, deleteIPA: false)
} else {
} else if NetworkVM.urlAccessible(url: url, popup: true) {
proceedDownload()
}
}
Expand Down Expand Up @@ -110,29 +109,32 @@ class DownloadApp {
in: .userDomainMask,
appropriateFor: URL(fileURLWithPath: "/Users"),
create: true)
downloader.addDownload(url: url!,
destinationURL: tmpDir!,
onProgress: { progress in
// progress is a Float
self.downloadVM.progress = Double(progress)
}, onCompletion: { error, fileURL in
self.downloadVM.next(.integrity, 0.7, 0.95)

guard error == nil else {
self.downloadVM.next(.failed, 0.95, 1.0)
self.downloadVM.storeAppData = nil
return Log.shared.error(error!)
}

self.verifyChecksum(checksum: self.downloadVM.storeAppData?.checksum, file: fileURL) { completing in
self.downloadVM.next(completing ? .finish : .failed, 0.95, 1.0)
if completing {
Task { @MainActor in
self.proceedInstall(fileURL)
if let tmpDir = tmpDir, let url = url {
downloader.addDownload(url: url,
destinationURL: tmpDir,
onProgress: { progress in
// progress is a Float
self.downloadVM.progress = Double(progress)
}, onCompletion: { error, fileURL in
self.downloadVM.next(.integrity, 0.7, 0.95)

if let error = error {
self.downloadVM.next(.failed, 0.95, 1.0)
self.downloadVM.storeAppData = nil
return Log.shared.error(error)
}

self.verifyChecksum(checksum: self.downloadVM.storeAppData?.checksum, file: fileURL) { completing in
self.downloadVM.next(completing ? .finish : .failed, 0.95, 1.0)
if completing {
Task { @MainActor in
self.proceedInstall(fileURL)
}
}
}
}
})
})
}
} catch {
self.downloadVM.next(.failed, 0.95, 1.0)

Expand All @@ -145,8 +147,7 @@ class DownloadApp {

private func proceedInstall(_ url: URL?, deleteIPA: Bool = true) {
if let url = url {
uif.ipaUrl = url
Installer.install(ipaUrl: uif.ipaUrl!, export: false, returnCompletion: { _ in
Installer.install(ipaUrl: url, export: false, returnCompletion: { _ in
Task { @MainActor in
if deleteIPA {
FileManager.default.delete(at: url)
Expand Down
15 changes: 0 additions & 15 deletions PlayCover/IntentFlow/UserIntentFlow.swift

This file was deleted.

31 changes: 12 additions & 19 deletions PlayCover/Model/AppInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public class AppInfo {

var minimumOSVersion: String {
get {
self[string: "MinimumOSVersion"]!
self[string: "MinimumOSVersion"] ?? ""
}
set {
self[string: "MinimumOSVersion"] = newValue
Expand All @@ -133,30 +133,30 @@ public class AppInfo {

var bundleName: String {
if self[string: "CFBundleName"] == nil || self[string: "CFBundleName"] == "" {
return self[string: "CFBundleDisplayName"]!
return self[string: "CFBundleDisplayName"] ?? ""
} else {
return self[string: "CFBundleName"]!
return self[string: "CFBundleName"] ?? ""
}
}

var displayName: String {
if self[string: "CFBundleDisplayName"] == nil || self[string: "CFBundleDisplayName"] == "" {
return self[string: "CFBundleName"]!
return self[string: "CFBundleName"] ?? ""
} else {
return self[string: "CFBundleDisplayName"]!
return self[string: "CFBundleDisplayName"] ?? ""
}
}

var bundleIdentifier: String {
self[string: "CFBundleIdentifier"]!
self[string: "CFBundleIdentifier"] ?? ""
}

var executableName: String {
self[string: "CFBundleExecutable"]!
self[string: "CFBundleExecutable"] ?? ""
}

var bundleVersion: String {
self[string: "CFBundleShortVersionString"]!
self[string: "CFBundleShortVersionString"] ?? ""
}

var primaryIconName: String {
Expand Down Expand Up @@ -186,18 +186,11 @@ public class AppInfo {
return "AppIcon"
}

var supportsTrueScreenSizeOnMac: Bool {
get {
self[bool: "UISupportsTrueScreenSizeOnMac"]!
}
set {
self[bool: "UISupportsTrueScreenSizeOnMac"] = newValue
}
}

func assert(minimumVersion: Double) {
if Double(minimumOSVersion)! > 11.0 {
minimumOSVersion = Int(minimumVersion).description
if let double = Double(minimumOSVersion) {
if double > 11.0 {
minimumOSVersion = Int(minimumVersion).description
}
}
}
}
4 changes: 4 additions & 0 deletions PlayCover/Model/AppSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ struct AppSettingsData: Codable {
var playChainDebugging = false
var inverseScreenValues = false
var metalHUD = false
var windowFixMethod = 0
var injectIntrospection = false

init() {}

Expand All @@ -50,6 +52,8 @@ struct AppSettingsData: Codable {
playChainDebugging = try container.decodeIfPresent(Bool.self, forKey: .playChainDebugging) ?? false
inverseScreenValues = try container.decodeIfPresent(Bool.self, forKey: .inverseScreenValues) ?? false
metalHUD = try container.decodeIfPresent(Bool.self, forKey: .metalHUD) ?? false
windowFixMethod = try container.decodeIfPresent(Int.self, forKey: .windowFixMethod) ?? 0
injectIntrospection = try container.decodeIfPresent(Bool.self, forKey: .injectIntrospection) ?? false
}
}

Expand Down
31 changes: 18 additions & 13 deletions PlayCover/Model/ITunesResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,24 @@ struct ITunesResponse: Codable {
}

func getITunesData(_ itunesLookup: String) async -> ITunesResponse? {
if !NetworkVM.isConnectedToNetwork() { return nil }
guard let url = URL(string: itunesLookup) else { return nil }

do {
let (data, _) = try await URLSession.shared.data(for: URLRequest(url: url))
let decoder = JSONDecoder()
let jsonResult: ITunesResponse = try decoder.decode(ITunesResponse.self, from: data)
if jsonResult.resultCount > 0 {
return jsonResult
}
} catch {
print("Error getting iTunes data from URL: \(itunesLookup): \(error)")
guard NetworkVM.isConnectedToNetwork(), let url = URL(string: itunesLookup) else {
return nil
}

return nil
return await withCheckedContinuation { continuation in
URLSession.shared.dataTask(with: URLRequest(url: url)) { data, _, error in
do {
if error == nil, let data = data {
let decoder = JSONDecoder()
let jsonResult: ITunesResponse = try decoder.decode(ITunesResponse.self, from: data)
continuation.resume(returning: jsonResult.resultCount > 0 ? jsonResult : nil)
return
}
} catch {
print("Error getting iTunes data from URL: \(itunesLookup): \(error)")
}

continuation.resume(returning: nil)
}.resume()
}
}
Loading

0 comments on commit 54c31f1

Please sign in to comment.