Skip to content

Commit

Permalink
Unreviewed, reverting 272868@main.
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=267396

Introduced perf issue

Reverted changeset:

"Disable building XPC services when launching WebKit processes as extensions"
https://bugs.webkit.org/show_bug.cgi?id=267248
https://commits.webkit.org/272868@main

Canonical link: https://commits.webkit.org/272890@main
  • Loading branch information
webkit-commit-queue authored and pvollan committed Jan 11, 2024
1 parent f7d7301 commit 169d182
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 81 deletions.
2 changes: 1 addition & 1 deletion Source/WebKit/Configurations/BaseExtension.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_INSTRUMENT_FOR_OPTIMIZATION_PROFILING = NO;
INSTALL_PATH = $(WK_INSTALL_PATH_PREFIX)/System/Library/ExtensionKit/Extensions;
INSTALL_PATH = $(WEBKIT_FRAMEWORKS_DIR)/WebKit.framework/$(WK_FRAMEWORK_VERSION_PREFIX)Extensions;
SWIFT_OBJC_BRIDGING_HEADER = $(SWIFT_OBJC_BRIDGING_HEADER_$(USE_INTERNAL_SDK));
SWIFT_OBJC_BRIDGING_HEADER_ = ;
SWIFT_OBJC_BRIDGING_HEADER_YES = ;
Expand Down
19 changes: 1 addition & 18 deletions Source/WebKit/Configurations/BaseXPCService.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,11 @@ APP_ICON_Debug = WebKit.icns;
APP_ICON_Release = WebKit.icns;
APP_ICON_Production = ;

EXCLUDED_EMBEDDED = $(EXCLUDED_SOURCE_FILE_NAMES_$(CONFIGURATION)) *.xib MediaFormatReader.bundle
EXCLUDED_SOURCE_FILE_NAMES[sdk=embedded*] = $(EXCLUDED_EMBEDDED);
EXCLUDED_SOURCE_FILE_NAMES[sdk=embedded*] = $(EXCLUDED_SOURCE_FILE_NAMES_$(CONFIGURATION)) *.xib MediaFormatReader.bundle;
EXCLUDED_SOURCE_FILE_NAMES[sdk=macos*] = $(EXCLUDED_SOURCE_FILE_NAMES_$(CONFIGURATION)) $(EXCLUDED_SOURCE_FILE_NAMES_$(WK_PLATFORM_NAME));
EXCLUDED_SOURCE_FILE_NAMES_Production = WebKit.icns;
EXCLUDED_SOURCE_FILE_NAMES_maccatalyst = *.xib;

EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = *;
EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*17.0*] = $(EXCLUDED_EMBEDDED);
EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*17.1*] = $(EXCLUDED_EMBEDDED);
EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*17.2*] = $(EXCLUDED_EMBEDDED);
EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*17.3*] = $(EXCLUDED_EMBEDDED);
EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*18.0*] = $(EXCLUDED_EMBEDDED);

// Disable code signing on platform that are launching WebKit processes as extensions, since the bundle will be empty, then.
CS_IDENTITY = $(CODE_SIGN_IDENTITY);
CODE_SIGN_IDENTITY[sdk=iphone*] = ;
CODE_SIGN_IDENTITY[sdk=iphone*17.0*] = $(CS_IDENTITY);
CODE_SIGN_IDENTITY[sdk=iphone*17.1*] = $(CS_IDENTITY);
CODE_SIGN_IDENTITY[sdk=iphone*17.2*] = $(CS_IDENTITY);
CODE_SIGN_IDENTITY[sdk=iphone*17.3*] = $(CS_IDENTITY);
CODE_SIGN_IDENTITY[sdk=iphone*18.0*] = $(CS_IDENTITY);

WK_ERROR_WHEN_LINKING_WITH_STATIC_INITIALIZERS = -Xlinker -no_inits;
WK_NO_STATIC_INITIALIZERS = $(WK_NO_STATIC_INITIALIZERS_$(CONFIGURATION)_$(WK_ANY_SANITIZER_ENABLED)_$(ENABLE_LLVM_PROFILE_GENERATION));
WK_NO_STATIC_INITIALIZERS_Release__ = $(WK_ERROR_WHEN_LINKING_WITH_STATIC_INITIALIZERS);
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/Configurations/GPUExtension.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@

INFOPLIST_FILE = Shared/AuxiliaryProcessExtensions/GPUExtension-Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = GPUExtension;
PRODUCT_BUNDLE_IDENTIFIER = com.apple.WebKit.GPU;
PRODUCT_BUNDLE_IDENTIFIER = com.apple.WebKit.GPUExtension;
PRODUCT_BUNDLE_EXECUTABLE = GPUExtension;
PRODUCT_BUNDLE_NAME = GPUExtension;
11 changes: 1 addition & 10 deletions Source/WebKit/Configurations/GPUService.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,9 @@

PRODUCT_NAME = com.apple.WebKit.GPU;
PRODUCT_BUNDLE_IDENTIFIER = $(PRODUCT_NAME);

INFOPLIST_FILE_EMBEDDED = GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist;
INFOPLIST_FILE[sdk=embedded*] = $(INFOPLIST_FILE_EMBEDDED);
INFOPLIST_FILE[sdk=embedded*] = GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist;
INFOPLIST_FILE[sdk=macosx*] = GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist;

INFOPLIST_FILE[sdk=iphone*] = ;
INFOPLIST_FILE[sdk=iphone*17.0*] = $(INFOPLIST_FILE_EMBEDDED);
INFOPLIST_FILE[sdk=iphone*17.1*] = $(INFOPLIST_FILE_EMBEDDED);
INFOPLIST_FILE[sdk=iphone*17.2*] = $(INFOPLIST_FILE_EMBEDDED);
INFOPLIST_FILE[sdk=iphone*17.3*] = $(INFOPLIST_FILE_EMBEDDED);
INFOPLIST_FILE[sdk=iphone*18.0*] = $(INFOPLIST_FILE_EMBEDDED);

CLANG_INSTRUMENT_FOR_OPTIMIZATION_PROFILING = NO; // Disable PGO profile generation
OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_STAGED_FRAMEWORK_PATH) $(WK_RELOCATABLE_FRAMEWORKS_LDFLAGS) $(SOURCE_VERSION_LDFLAGS) $(PROFILE_GENERATE_OR_USE_LDFLAGS);

Expand Down
10 changes: 1 addition & 9 deletions Source/WebKit/Configurations/NetworkService.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,8 @@

PRODUCT_NAME = com.apple.WebKit.Networking;
PRODUCT_BUNDLE_IDENTIFIER = $(PRODUCT_NAME);

INFOPLIST_FILE_EMBEDDED = NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-iOS.plist;
INFOPLIST_FILE[sdk=embedded*] = $(INFOPLIST_FILE_EMBEDDED);
INFOPLIST_FILE[sdk=embedded*] = NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-iOS.plist;
INFOPLIST_FILE[sdk=macosx*] = NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-OSX.plist;
INFOPLIST_FILE[sdk=iphone*] = ;
INFOPLIST_FILE[sdk=iphone*17.0*] = $(INFOPLIST_FILE_EMBEDDED);
INFOPLIST_FILE[sdk=iphone*17.1*] = $(INFOPLIST_FILE_EMBEDDED);
INFOPLIST_FILE[sdk=iphone*17.2*] = $(INFOPLIST_FILE_EMBEDDED);
INFOPLIST_FILE[sdk=iphone*17.3*] = $(INFOPLIST_FILE_EMBEDDED);
INFOPLIST_FILE[sdk=iphone*18.0*] = $(INFOPLIST_FILE_EMBEDDED);

OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_STAGED_FRAMEWORK_PATH) $(WK_RELOCATABLE_FRAMEWORKS_LDFLAGS) $(SOURCE_VERSION_LDFLAGS) $(PROFILE_GENERATE_OR_USE_LDFLAGS);
OTHER_LDFLAGS[sdk=macosx*] = $(inherited) $(SOURCE_VERSION_LDFLAGS);
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/Configurations/NetworkingExtension.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@

INFOPLIST_FILE = Shared/AuxiliaryProcessExtensions/NetworkingExtension-Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = NetworkingExtension;
PRODUCT_BUNDLE_IDENTIFIER = com.apple.WebKit.Networking;
PRODUCT_BUNDLE_IDENTIFIER = com.apple.WebKit.NetworkingExtension;
PRODUCT_BUNDLE_EXECUTABLE = NetworkingExtension;
PRODUCT_BUNDLE_NAME = NetworkingExtension;
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@

INFOPLIST_FILE = Shared/AuxiliaryProcessExtensions/WebContentExtension-CaptivePortal-Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = WebContentCaptivePortalExtension;
PRODUCT_BUNDLE_IDENTIFIER = com.apple.WebKit.WebContent.CaptivePortal;
PRODUCT_BUNDLE_IDENTIFIER = com.apple.WebKit.WebContentExtension.CaptivePortal;
PRODUCT_BUNDLE_EXECUTABLE = WebContentCaptivePortalExtension;
PRODUCT_BUNDLE_NAME = WebContentCaptivePortalExtension;
2 changes: 1 addition & 1 deletion Source/WebKit/Configurations/WebContentExtension.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@

INFOPLIST_FILE = Shared/AuxiliaryProcessExtensions/WebContentExtension-Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = WebContentExtension;
PRODUCT_BUNDLE_IDENTIFIER = com.apple.WebKit.WebContent;
PRODUCT_BUNDLE_IDENTIFIER = com.apple.WebKit.WebContentExtension;
PRODUCT_BUNDLE_EXECUTABLE = WebContentExtension;
PRODUCT_BUNDLE_NAME = WebContentExtension;
10 changes: 1 addition & 9 deletions Source/WebKit/Configurations/WebContentService.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,8 @@ PRODUCT_NAME_Development = com.apple.WebKit.WebContent.Development;
PRODUCT_NAME_CaptivePortal = com.apple.WebKit.WebContent.CaptivePortal;

PRODUCT_BUNDLE_IDENTIFIER = $(PRODUCT_NAME);

INFOPLIST_FILE_EMBEDDED = WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist;
INFOPLIST_FILE[sdk=embedded*] = $(INFOPLIST_FILE_EMBEDDED);
INFOPLIST_FILE[sdk=embedded*] = WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist;
INFOPLIST_FILE[sdk=macosx*] = WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-OSX.plist;
INFOPLIST_FILE[sdk=iphone*] = ;
INFOPLIST_FILE[sdk=iphone*17.0*] = $(INFOPLIST_FILE_EMBEDDED);
INFOPLIST_FILE[sdk=iphone*17.1*] = $(INFOPLIST_FILE_EMBEDDED);
INFOPLIST_FILE[sdk=iphone*17.2*] = $(INFOPLIST_FILE_EMBEDDED);
INFOPLIST_FILE[sdk=iphone*17.3*] = $(INFOPLIST_FILE_EMBEDDED);
INFOPLIST_FILE[sdk=iphone*18.0*] = $(INFOPLIST_FILE_EMBEDDED);

WK_APPKIT_LDFLAGS = $(WK_APPKIT_LDFLAGS_$(WK_PLATFORM_NAME));
WK_APPKIT_LDFLAGS_macosx = -framework AppKit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ PROCESSED_INFOPLIST="${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}"
UNPROCESSED_INFOPLIST="${INFOPLIST_FILE}"
COPIED_INFOPLIST="${WEB_CONTENT_RESOURCES_PATH}/Info-WebContent.plist"
echo "Copying Info.plist from ${UNPROCESSED_INFOPLIST} to ${COPIED_INFOPLIST}"
if [ -e "${UNPROCESSED_INFOPLIST}" ]; then
ditto "${UNPROCESSED_INFOPLIST}" "${COPIED_INFOPLIST}"
fi
ditto "${UNPROCESSED_INFOPLIST}" "${COPIED_INFOPLIST}"

echo "Setting fixed entry values for ${COPIED_INFOPLIST}"
if [[ ${WK_PLATFORM_NAME} == "macosx" ]]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>EXAppExtensionAttributes</key>
<dict>
<key>EXExtensionPointIdentifier</key>
<string>com.apple.web-browser-engine.gpu</string>
<string>com.apple.webkit.gpu.extension</string>
</dict>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>EXAppExtensionAttributes</key>
<dict>
<key>EXExtensionPointIdentifier</key>
<string>com.apple.web-browser-engine.networking</string>
<string>com.apple.webkit.networking.extension</string>
</dict>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>EXAppExtensionAttributes</key>
<dict>
<key>EXExtensionPointIdentifier</key>
<string>com.apple.web-browser-engine.content</string>
<string>com.apple.webkit.webcontent.captiveportal.extension</string>
</dict>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>EXAppExtensionAttributes</key>
<dict>
<key>EXExtensionPointIdentifier</key>
<string>com.apple.web-browser-engine.content</string>
<string>com.apple.webkit.webcontent.extension</string>
</dict>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
Expand Down
3 changes: 0 additions & 3 deletions Source/WebKit/UIProcess/Launcher/ProcessLauncher.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ class ProcessLauncher : public ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr<P

#if USE(EXTENSIONKIT)
RetainPtr<_SEExtensionProcess> extensionProcess() const { return m_process; }
void setIsRetryingLaunch() { m_isRetryingLaunch = true; }
bool isRetryingLaunch() const { return m_isRetryingLaunch; }
#endif

private:
Expand All @@ -148,7 +146,6 @@ class ProcessLauncher : public ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr<P

#if USE(EXTENSIONKIT)
RetainPtr<_SEExtensionProcess> m_process;
bool m_isRetryingLaunch { false };
#endif

#if PLATFORM(WIN)
Expand Down
26 changes: 6 additions & 20 deletions Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -67,26 +67,26 @@
namespace WebKit {

#if USE(EXTENSIONKIT)
static std::pair<ASCIILiteral, RetainPtr<NSString>> serviceNameAndIdentifier(ProcessLauncher::ProcessType processType, ProcessLauncher::Client* client, bool isRetryingLaunch)
static std::pair<ASCIILiteral, RetainPtr<NSString>> serviceNameAndIdentifier(ProcessLauncher::ProcessType processType, ProcessLauncher::Client* client)
{
switch (processType) {
case ProcessLauncher::ProcessType::Web: {
if (client && client->shouldEnableLockdownMode())
return { "com.apple.WebKit.WebContent"_s, isRetryingLaunch ? @"com.apple.WebKit.WebContentExtension.CaptivePortal" : @"com.apple.WebKit.WebContent.CaptivePortal" };
return { "com.apple.WebKit.WebContent"_s, isRetryingLaunch ? @"com.apple.WebKit.WebContentExtension" : @"com.apple.WebKit.WebContent" };
return { "com.apple.WebKit.WebContent"_s, @"com.apple.WebKit.WebContentExtension.CaptivePortal" };
return { "com.apple.WebKit.WebContent"_s, @"com.apple.WebKit.WebContentExtension" };
}
case ProcessLauncher::ProcessType::Network:
return { "com.apple.WebKit.Networking"_s, isRetryingLaunch ? @"com.apple.WebKit.NetworkingExtension" : @"com.apple.WebKit.Networking" };
return { "com.apple.WebKit.Networking"_s, @"com.apple.WebKit.NetworkingExtension" };
#if ENABLE(GPU_PROCESS)
case ProcessLauncher::ProcessType::GPU:
return { "com.apple.WebKit.GPU"_s, isRetryingLaunch ? @"com.apple.WebKit.GPUExtension" : @"com.apple.WebKit.GPU" };
return { "com.apple.WebKit.GPU"_s, @"com.apple.WebKit.GPUExtension" };
#endif
}
}

static void launchWithExtensionKit(ProcessLauncher& processLauncher, ProcessLauncher::ProcessType processType, ProcessLauncher::Client* client, std::function<void(ThreadSafeWeakPtr<ProcessLauncher> weakProcessLauncher, _SEExtensionProcess* process, ASCIILiteral name, NSError* error)> handler)
{
auto [name, identifier] = serviceNameAndIdentifier(processType, client, processLauncher.isRetryingLaunch());
auto [name, identifier] = serviceNameAndIdentifier(processType, client);

auto configuration = adoptNS([alloc_SEServiceConfigurationInstance() initWithServiceIdentifier:identifier.get()]);
_SEServiceManager* manager = [get_SEServiceManagerClass() performSelector:@selector(sharedInstance)];
Expand Down Expand Up @@ -159,19 +159,6 @@ static void launchWithExtensionKit(ProcessLauncher& processLauncher, ProcessLaun
}
if (error) {
NSLog(@"Error launching process %@ error %@", process, error);
RELEASE_LOG_FAULT(Process, "Error launching process, description '%s', reason '%s'", String([error localizedDescription]).utf8().data(), String([error localizedFailureReason]).utf8().data());
#if PLATFORM(IOS)
// Fallback to legacy extension identifiers
// This fallback is temporary and should be removed when possible. See rdar://120793705.
callOnMainRunLoop([weakProcessLauncher = weakProcessLauncher] {
auto launcher = weakProcessLauncher.get();
if (!launcher || launcher->isRetryingLaunch())
return;
launcher->setIsRetryingLaunch();
launcher->launchProcess();
});
#else
// Fallback to XPC service launch
callOnMainRunLoop([weakProcessLauncher = weakProcessLauncher] {
auto launcher = weakProcessLauncher.get();
if (!launcher)
Expand All @@ -180,7 +167,6 @@ static void launchWithExtensionKit(ProcessLauncher& processLauncher, ProcessLaun
launcher->m_xpcConnection = adoptOSObject(xpc_connection_create(name, nullptr));
launcher->finishLaunchingProcess(name);
});
#endif
[process invalidate];
return;
}
Expand Down
19 changes: 19 additions & 0 deletions Source/WebKit/WebKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
buildConfigurationList = 1A50DB48110A3C27000D3FE5 /* Build configuration list for PBXAggregateTarget "Framework, XPC Services, Extensions, and daemons" */;
buildPhases = (
DDFA47222AA93C7F00C7C788 /* Check For Inappropriate Files In Framework */,
E3322DA32ACB68E2001194DA /* Copy extension (temporary workaround) */,
);
dependencies = (
5C400E6A29DB8AB500446F6F /* PBXTargetDependency */,
Expand Down Expand Up @@ -18013,6 +18014,24 @@
shellPath = /bin/sh;
shellScript = "echo \"Preprocessing sandbox\"\nScripts/generate-derived-sources.sh sandbox-profiles-ios\nmkdir -p ${DSTROOT}/${INSTALL_PATH}\ncp ${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit/com.apple.WebKit.adattributiond.sb ${DSTROOT}/${INSTALL_PATH}\ncp ${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit/com.apple.WebKit.webpushd.sb ${DSTROOT}/${INSTALL_PATH}\ncp ${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit/com.apple.WebKit.GPU.sb ${DSTROOT}/${INSTALL_PATH}\ncp ${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit/com.apple.WebKit.Networking.sb ${DSTROOT}/${INSTALL_PATH}\ncp ${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit/com.apple.WebKit.WebAuthn.sb ${DSTROOT}/${INSTALL_PATH}\ncp ${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit/com.apple.WebKit.WebContent.sb ${DSTROOT}/${INSTALL_PATH}\n";
};
E3322DA32ACB68E2001194DA /* Copy extension (temporary workaround) */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Copy extension (temporary workaround)";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [[ ${WK_PLATFORM_NAME} == \"macosx\" ]]; then\n exit\nfi\n\nEXTENSIONS_PATH=\"${BUILT_PRODUCTS_DIR}\"\nif [[ \"${DEPLOYMENT_LOCATION}\" == \"YES\" ]]; then\n EXTENSIONS_PATH+=\"/WebKit.framework/Extensions\"\nfi\n\nif [[ ! -e \"${EXTENSIONS_PATH}/NetworkingExtension.appex\" ]]; then\n exit\nfi\n\ncopyExtensions() {\n DESTINATION_PATH=$1\n DOMAIN=$2\n mkdir -p \"${DESTINATION_PATH}\"\n\n ditto \"${EXTENSIONS_PATH}/NetworkingExtension.appex\" \"${DESTINATION_PATH}/NetworkingExtension.appex\"\n ditto \"${EXTENSIONS_PATH}/GPUExtension.appex\" \"${DESTINATION_PATH}/GPUExtension.appex\"\n ditto \"${EXTENSIONS_PATH}/WebContentExtension.appex\" \"${DESTINATION_PATH}/WebContentExtension.appex\"\n ditto \"${EXTENSIONS_PATH}/WebContentCaptivePortalExtension.appex\" \"${DESTINATION_PATH}/WebContentCaptivePortalExtension.appex\"\n}\n\nupdateExtensions() {\n DESTINATION_PATH=$1\n DOMAIN=$2\n\n /usr/libexec/PlistBuddy -c \"Set :CFBundleIdentifier ${DOMAIN}.NetworkingExtension\" \"${DESTINATION_PATH}/NetworkingExtension.appex/Info.plist\"\n /usr/libexec/PlistBuddy -c \"Set :CFBundleIdentifier ${DOMAIN}.GPUExtension\" \"${DESTINATION_PATH}/GPUExtension.appex/Info.plist\"\n /usr/libexec/PlistBuddy -c \"Set :CFBundleIdentifier ${DOMAIN}.WebContentExtension\" \"${DESTINATION_PATH}/WebContentExtension.appex/Info.plist\"\n /usr/libexec/PlistBuddy -c \"Set :CFBundleIdentifier ${DOMAIN}.WebContentCaptivePortalExtension\" \"${DESTINATION_PATH}/WebContentCaptivePortalExtension.appex/Info.plist\"\n\n /usr/libexec/PlistBuddy -c \"Delete :EXAppExtensionAttributes:EXExtensionPointIdentifier dict\" \"${DESTINATION_PATH}/NetworkingExtension.appex/Info.plist\"\n /usr/libexec/PlistBuddy -c \"Delete :EXAppExtensionAttributes:EXExtensionPointIdentifier dict\" \"${DESTINATION_PATH}/GPUExtension.appex/Info.plist\"\n /usr/libexec/PlistBuddy -c \"Delete :EXAppExtensionAttributes:EXExtensionPointIdentifier dict\" \"${DESTINATION_PATH}/WebContentExtension.appex/Info.plist\"\n /usr/libexec/PlistBuddy -c \"Delete :EXAppExtensionAttributes:EXExtensionPointIdentifier dict\" \"${DESTINATION_PATH}/WebContentCaptivePortalExtension.appex/Info.plist\"\n\n /usr/libexec/PlistBuddy -c \"Add :EXAppExtensionAttributes:EXExtensionPointIdentifier string com.apple.web-browser-engine.networking\" \"${DESTINATION_PATH}/NetworkingExtension.appex/Info.plist\"\n /usr/libexec/PlistBuddy -c \"Add :EXAppExtensionAttributes:EXExtensionPointIdentifier string com.apple.web-browser-engine.gpu\" \"${DESTINATION_PATH}/GPUExtension.appex/Info.plist\"\n /usr/libexec/PlistBuddy -c \"Add :EXAppExtensionAttributes:EXExtensionPointIdentifier string com.apple.web-browser-engine.content\" \"${DESTINATION_PATH}/WebContentExtension.appex/Info.plist\"\n /usr/libexec/PlistBuddy -c \"Add :EXAppExtensionAttributes:EXExtensionPointIdentifier string com.apple.web-browser-engine.content\" \"${DESTINATION_PATH}/WebContentCaptivePortalExtension.appex/Info.plist\"\n}\n\nupdateExtensions \"${EXTENSIONS_PATH}\" \"com.apple.WebKit\"\n\nif [[ \"${DEPLOYMENT_LOCATION}\" == \"YES\" ]]; then\n copyExtensions \"${DSTROOT}/System/Library/ExtensionKit/Extensions\" \"com.apple.WebKit\"\nfi\n";
};
E352B54F2AB25EA8006F6B0D /* Process entitlements */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down

0 comments on commit 169d182

Please sign in to comment.