fix(shared): resolve the app group identifier at runtime - #30
Open
Nyvernn wants to merge 1 commit into
Open
Conversation
Collaborator
|
我对这个的实现方式保持怀疑,不是所有构建方式都有 provisioning file 的,并且这个修改会破坏 macOS 上的行为 |
Contributor
Author
研究了下。 主要看要不要支持下这种重签(AltStore、SideStore等),如果只管TrollStore,那这个PR可以关了。 然后实现方面,读profile是ok的,几KB,类似的重签都得改名,改名就有profile 最后macOS确实要加个#if os(iOS) 排除下就好 |
Collaborator
|
你可以尝试验证一下 AltStore、SideStore 在有 Apple Developer 的情况下能否签名出 Network Extension 正常工作的结果。我之前测试应该是不行。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a build that has been re-signed (TrollStore, a re-signing service, an ad-hoc
signature), the app group is renamed rather than removed: the app and the extension
still share one, but it is no longer
group.cn.easytier.containerURL(forSecurityApplicationGroupIdentifier:)then returns nil, and everythingbuilt on it fails independently and silently while the tunnel itself keeps working:
UserDefaults(suiteName:)is nil, so the app cannot hand the extension its configThis reads the identifier from
Entitlements -> com.apple.security.application-groupsin
embedded.mobileprovisionand takes the first entry that actually has a container,falling back to the compiled-in one. A normally signed build takes the first branch and
is unaffected.
APP_GROUP_SOURCEandAPP_GROUP_AVAILABLEare exposed so a bug report can state whichidentifier was in use and where it came from.