Skip to content

Add Support for ADP certificate with custom App Group#537

Merged
hugeBlack merged 8 commits intoLiveContainer:multitaskfrom
SoY0ung:multitask
May 30, 2025
Merged

Add Support for ADP certificate with custom App Group#537
hugeBlack merged 8 commits intoLiveContainer:multitaskfrom
SoY0ung:multitask

Conversation

@SoY0ung
Copy link
Copy Markdown
Contributor

@SoY0ung SoY0ung commented May 28, 2025

Achieve multitasking by moving data to custom app group for ADP certificate.

  • Detect App Group in entitlement file after trying SideStore/AltStore group id.
  • Add Store type: ADP, it enabled when detected custom app group.
  • Write cert data and password to group's user default in ADP method.
  • Add JITLess test for ADP method.
  • Allow converting app to Shared in ADP method

@SoY0ung
Copy link
Copy Markdown
Contributor Author

SoY0ung commented May 28, 2025

The Xcode project file seems to be messy.
I implement App Group detection by entitlement in LCSharedUtils.m, using the function getLCEntitlementXML() from LCMachOUtils.
So I changed the Target Membership of LCMachOUtils.m to LiveContainerSwiftUI and LiveContainerShared .
That's the change I made to the project file.

@hugeBlack
Copy link
Copy Markdown
Member

hugeBlack commented May 28, 2025

Thank you for your contribution! That looks good, I'll take a closer look later. But could you please revert your changes to the pbxproj file except the file move? We already have a Global.xcconfig to customize your team id. Also, can you cache the app group in UserDefaults so we don't have to analyze the executable at every launch, which also allows us to move these files back?

@SoY0ung
Copy link
Copy Markdown
Contributor Author

SoY0ung commented May 29, 2025

Thank you for your contribution! That looks good, I'll take a closer look later. But could you please revert your changes to the pbxproj file except the file move? We already have a Global.xcconfig to customize your team id.

Okay. I’ll make a commit later.

Also, can you cache the app group in UserDefaults so we don't have to analyze the executable at every launch,

Sure. I’ll cache app group in App’s UserDefaults. But if the install method is Unknown, it still analyze at every launch.

which also allows us to move these files back?

As I used function in LCMachOUtils.m, which only build for LiveContainerSwiftUI target. So I must add the Target Membership to build for LiveContainerShared as well unless not getting link error. Thus I think the file move cannot be optimized until using without LCMachOUtils.m.

@hugeBlack
Copy link
Copy Markdown
Member

I mean what I suppose is that the app group is cached to UserDefaults when the ADP cert is imported, so we don't need to call getLCEntitlementXML() in LiveContainerShared. As for LiveProcess, we can pass app group id as a parameter when calling beginExtensionRequestWithInputItems.

SoY0ung added 2 commits May 30, 2025 02:11
So we don't have to analyze executable every launch. SideStore/AltStore method is not affected.
@SoY0ung
Copy link
Copy Markdown
Contributor Author

SoY0ung commented May 29, 2025

Hi! I've reverted the changes to the pbxproj file except for the target membership modification.
Also, I cache the App Group as LCAppGroupID after the cert is imported.

So it reduces the number of calls to getLCEntitlementXML().
However, this function is still needed in LiveContainerShared for now to detect the ADP store type — so the pbxproj file does include the change related to target membership.

@SoY0ung
Copy link
Copy Markdown
Contributor Author

SoY0ung commented May 29, 2025

As for LiveProcess, we can pass app group id as a parameter when calling beginExtensionRequestWithInputItems.

Sorry, I’m not familiar with LiveProcess, so the changes related to it will need to be handled by you~ QAQ

@hugeBlack hugeBlack merged commit 2266f3d into LiveContainer:multitask May 30, 2025
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.

2 participants