[PR #153] [MERGED] Migrate LiveContainerUI to SwiftUI, Support for Multiple LiveContainer, SideJIT/JITStreamer Support, Better Open in App Support, Impelement #112 #1068

Closed
opened 2026-03-03 15:38:23 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/LiveContainer/LiveContainer/pull/153
Author: @hugeBlack
Created: 9/7/2024
Status: Merged
Merged: 9/20/2024
Merged by: @khanhduytran0

Base: mainHead: main


📝 Commits (10+)

  • b4d4575 swift ui proof of conecpt
  • 33089d3 install, uninstall, run
  • 690d45f Create folder until app launch
  • efa48dd data &tweak folder choosing
  • 19e7a47 user can now input url scheme
  • 81a3bb6 allow open url by universal links
  • 48a3085 apps can be signed again if signature is invalid
  • 7065585 Settings & JitLess setup
  • bd2f05a substitute async for all semaphores
  • cbc1af0 tweak view

📊 Changes

60 files changed (+7463 additions, -75 deletions)

View changed files

📝 .gitignore (+3 -0)
📝 LCSharedUtils.h (+9 -1)
📝 LCSharedUtils.m (+251 -7)
LiveContainerSwiftUI/Assets.xcassets/AccentColor.colorset/Contents.json (+20 -0)
LiveContainerSwiftUI/Assets.xcassets/AppBannerBG.colorset/Contents.json (+38 -0)
LiveContainerSwiftUI/Assets.xcassets/AppIcon.appiconset/Contents.json (+13 -0)
LiveContainerSwiftUI/Assets.xcassets/BadgeColor.colorset/Contents.json (+20 -0)
LiveContainerSwiftUI/Assets.xcassets/Contents.json (+6 -0)
LiveContainerSwiftUI/Assets.xcassets/FontColor.colorset/Contents.json (+20 -0)
LiveContainerSwiftUI/Assets.xcassets/GitHub.imageset/Contents.json (+22 -0)
📝 LiveContainerSwiftUI/Assets.xcassets/GitHub.imageset/GitHub@2x.png (+0 -0)
📝 LiveContainerSwiftUI/Assets.xcassets/GitHub.imageset/GitHub@3x.png (+0 -0)
LiveContainerSwiftUI/Assets.xcassets/JITBadgeColor.colorset/Contents.json (+20 -0)
LiveContainerSwiftUI/Assets.xcassets/Twitter.imageset/Contents.json (+22 -0)
📝 LiveContainerSwiftUI/Assets.xcassets/Twitter.imageset/Twitter@2x.png (+0 -0)
📝 LiveContainerSwiftUI/Assets.xcassets/Twitter.imageset/Twitter@3x.png (+0 -0)
LiveContainerSwiftUI/LCAppBanner.swift (+321 -0)
LiveContainerSwiftUI/LCAppListView.swift (+533 -0)
LiveContainerSwiftUI/LCAppModel.swift (+136 -0)
LiveContainerSwiftUI/LCAppSettingsView.swift (+413 -0)

...and 40 more files

📄 Description

Switch UI to SwiftUI

I migrated most of features to an AltStore-like UI written in SwiftUI.

LiveContainerSwiftUI looks like this:
IMG_4706

Support for Multiple LiveContainer

Free development accounts can install 3 apps, so now we can install 1 SideStore and 2 LiveContainers, so people can run 2 apps at the same time. App and their data, Keychains and most NSUserDefaults can be shared between these 2 LiveContainers. If user open a app via URL Scheme or from My Apps screen, the LiveContainer that last ran that app will be switched to.

App's data and tweaks are stored in SideStore's or AltStore's app group. If a Shared App is launched, its data will be temporarily moved to the LiveContainer's document folder to prevent crash in background because of holding a file lock in the App Group folder. It data will be moved back in last launch of LiveContainer.

Apps can't be modified when in Shared state. The second LiveContainer cannot install or manage apps.

NSUserDefaults are handled differently. Since it won't accept plists that moved to Library/Preferences after app launch, we have to manually read the plists and set it in NSUserDefaults. This solves #149

Better Open in App Support

It turns out that some apps don't rely on URL Schemes and use Universal Links instead. So in the new LiveContainerSwiftUI, the web page's apple-app-site-association will be checked and we will launch apps based on it. Then, a NSUserActivity will be created with these URLs and passed to UIActivityContinuationManager, so apps will open these URLs they support.

Impelement #112

Flutter apps share the bundle name of Runner.app, so I use bundle identifier as app bundle's name during install to avoid conflicts. Also, users can select which bundle to replace if there are multiple bundles with the same bundle identifier.


🔄 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/LiveContainer/LiveContainer/pull/153 **Author:** [@hugeBlack](https://github.com/hugeBlack) **Created:** 9/7/2024 **Status:** ✅ Merged **Merged:** 9/20/2024 **Merged by:** [@khanhduytran0](https://github.com/khanhduytran0) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (10+) - [`b4d4575`](https://github.com/LiveContainer/LiveContainer/commit/b4d457503e0d1aee1d21dd69b6113a35e6b89014) swift ui proof of conecpt - [`33089d3`](https://github.com/LiveContainer/LiveContainer/commit/33089d313908575afbadbf957506d1b8bb905f6d) install, uninstall, run - [`690d45f`](https://github.com/LiveContainer/LiveContainer/commit/690d45f18b4571873b1cd4efe10581f5f29cf754) Create folder until app launch - [`efa48dd`](https://github.com/LiveContainer/LiveContainer/commit/efa48ddcc195fe2fdeaec61669e7961a677d6ee1) data &tweak folder choosing - [`19e7a47`](https://github.com/LiveContainer/LiveContainer/commit/19e7a47b651e892acae8e0f3e7607964ede7713f) user can now input url scheme - [`81a3bb6`](https://github.com/LiveContainer/LiveContainer/commit/81a3bb692b8912bfe4a6f41d5b4e4e669e7d3801) allow open url by universal links - [`48a3085`](https://github.com/LiveContainer/LiveContainer/commit/48a308525c04a85b4d12b141f2bf2effd1d62a3b) apps can be signed again if signature is invalid - [`7065585`](https://github.com/LiveContainer/LiveContainer/commit/7065585578da1aabbeb070b973caebb9181b68e3) Settings & JitLess setup - [`bd2f05a`](https://github.com/LiveContainer/LiveContainer/commit/bd2f05a00725b98ec44ba0b2e65e4f70577f2470) substitute async for all semaphores - [`cbc1af0`](https://github.com/LiveContainer/LiveContainer/commit/cbc1af0056df09af288e185ce518dc7b0791804c) tweak view ### 📊 Changes **60 files changed** (+7463 additions, -75 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+3 -0) 📝 `LCSharedUtils.h` (+9 -1) 📝 `LCSharedUtils.m` (+251 -7) ➕ `LiveContainerSwiftUI/Assets.xcassets/AccentColor.colorset/Contents.json` (+20 -0) ➕ `LiveContainerSwiftUI/Assets.xcassets/AppBannerBG.colorset/Contents.json` (+38 -0) ➕ `LiveContainerSwiftUI/Assets.xcassets/AppIcon.appiconset/Contents.json` (+13 -0) ➕ `LiveContainerSwiftUI/Assets.xcassets/BadgeColor.colorset/Contents.json` (+20 -0) ➕ `LiveContainerSwiftUI/Assets.xcassets/Contents.json` (+6 -0) ➕ `LiveContainerSwiftUI/Assets.xcassets/FontColor.colorset/Contents.json` (+20 -0) ➕ `LiveContainerSwiftUI/Assets.xcassets/GitHub.imageset/Contents.json` (+22 -0) 📝 `LiveContainerSwiftUI/Assets.xcassets/GitHub.imageset/GitHub@2x.png` (+0 -0) 📝 `LiveContainerSwiftUI/Assets.xcassets/GitHub.imageset/GitHub@3x.png` (+0 -0) ➕ `LiveContainerSwiftUI/Assets.xcassets/JITBadgeColor.colorset/Contents.json` (+20 -0) ➕ `LiveContainerSwiftUI/Assets.xcassets/Twitter.imageset/Contents.json` (+22 -0) 📝 `LiveContainerSwiftUI/Assets.xcassets/Twitter.imageset/Twitter@2x.png` (+0 -0) 📝 `LiveContainerSwiftUI/Assets.xcassets/Twitter.imageset/Twitter@3x.png` (+0 -0) ➕ `LiveContainerSwiftUI/LCAppBanner.swift` (+321 -0) ➕ `LiveContainerSwiftUI/LCAppListView.swift` (+533 -0) ➕ `LiveContainerSwiftUI/LCAppModel.swift` (+136 -0) ➕ `LiveContainerSwiftUI/LCAppSettingsView.swift` (+413 -0) _...and 40 more files_ </details> ### 📄 Description ## Switch UI to SwiftUI I migrated most of features to an AltStore-like UI written in SwiftUI. LiveContainerSwiftUI looks like this: <img width="200" alt="IMG_4706" src="https://github.com/user-attachments/assets/690c2120-8b4a-4c5f-a12f-7236e47681ea"> ## Support for Multiple LiveContainer Free development accounts can install 3 apps, so now we can install 1 SideStore and 2 LiveContainers, so people can run 2 apps at the same time. App and their data, Keychains and *most* NSUserDefaults can be shared between these 2 LiveContainers. If user open a app via URL Scheme or from My Apps screen, the LiveContainer that last ran that app will be switched to. App's data and tweaks are stored in SideStore's or AltStore's app group. If a Shared App is launched, its data will be temporarily moved to the LiveContainer's document folder to prevent crash in background because of holding a file lock in the App Group folder. It data will be moved back in last launch of LiveContainer. Apps can't be modified when in Shared state. The second LiveContainer cannot install or manage apps. `NSUserDefaults` are handled differently. Since it won't accept plists that moved to Library/Preferences after app launch, we have to manually read the plists and set it in `NSUserDefaults`. This solves #149 ## Better Open in App Support It turns out that some apps don't rely on URL Schemes and use Universal Links instead. So in the new LiveContainerSwiftUI, the web page's `apple-app-site-association` will be checked and we will launch apps based on it. Then, a `NSUserActivity` will be created with these URLs and passed to `UIActivityContinuationManager`, so apps will open these URLs they support. ## Impelement #112 Flutter apps share the bundle name of `Runner.app`, so I use bundle identifier as app bundle's name during install to avoid conflicts. Also, users can select which bundle to replace if there are multiple bundles with the same bundle identifier. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 15:38:23 +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/LiveContainer#1068
No description provided.