Skip to content

Commit 2c61426

Browse files
committed
Link Aztec dynamically
1 parent a83cc00 commit 2c61426

File tree

3 files changed

+15
-132
lines changed

3 files changed

+15
-132
lines changed

Podfile

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -113,39 +113,6 @@ abstract_target 'Tools' do
113113
pod 'SwiftLint', swiftlint_version
114114
end
115115

116-
# Static Frameworks:
117-
# ============
118-
#
119-
# Make all pods that are not shared across multiple targets into static frameworks by overriding the static_framework? function to return true
120-
# Linking the shared frameworks statically would lead to duplicate symbols
121-
# A future version of CocoaPods may make this easier to do. See https://github.com/CocoaPods/CocoaPods/issues/7428
122-
shared_targets = %w[WordPressFlux]
123-
dyanmic_framework_pods = %w[WordPressFlux]
124-
# Statically linking Sentry results in a conflict with `NSDictionary.objectAtKeyPath`, but dynamically
125-
# linking it resolves this.
126-
dyanmic_framework_pods += %w[Sentry SentryPrivate]
127-
pre_install do |installer|
128-
static = []
129-
dynamic = []
130-
installer.pod_targets.each do |pod|
131-
use_dynamic_frameworks = false
132-
use_dynamic_frameworks = true if dyanmic_framework_pods.include? pod.name
133-
134-
# If this pod is a dependency of one of our shared targets, it must be linked dynamically
135-
use_dynamic_frameworks = true if pod.target_definitions.any? { |t| shared_targets.include? t.name }
136-
137-
if use_dynamic_frameworks
138-
dynamic << pod
139-
pod.instance_variable_set(:@build_type, Pod::BuildType.dynamic_framework)
140-
else
141-
static << pod
142-
pod.instance_variable_set(:@build_type, Pod::BuildType.static_framework)
143-
end
144-
end
145-
puts "Installing #{static.count} pods as static frameworks"
146-
puts "Installing #{dynamic.count} pods as dynamic frameworks"
147-
end
148-
149116
post_install do |installer|
150117
gutenberg_post_install(installer: installer)
151118

Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ SPEC CHECKSUMS:
4141
WordPress-Aztec-iOS: 3732c6d865a5c9f35788377bdeda8a80ea10d0a1
4242
WordPress-Editor-iOS: 453345420ced3d3ef20f0051b3df46ff10281e0c
4343

44-
PODFILE CHECKSUM: a4961466e64794b30d6f22f78c77e1f1882340a9
44+
PODFILE CHECKSUM: ef533e0690e7091ba9845d3ad3a50b8694799b85
4545

4646
COCOAPODS: 1.15.2

WordPress/WordPress.xcodeproj/project.pbxproj

Lines changed: 14 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -13294,7 +13294,7 @@
1329413294
path = Classes;
1329513295
sourceTree = "<group>";
1329613296
};
13297-
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
13297+
29B97314FDCFA39411CA2CEA = {
1329813298
isa = PBXGroup;
1329913299
children = (
1330013300
3F20FDF3276BF21000DA3CAD /* Packages */,
@@ -23177,7 +23177,6 @@
2317723177
7457666E202B558C00F42E40 /* Sources */,
2317823178
7457666F202B558C00F42E40 /* Frameworks */,
2317923179
74576670202B558C00F42E40 /* Resources */,
23180-
9D186898B0632AA1273C9DE2 /* [CP] Copy Pods Resources */,
2318123180
);
2318223181
buildRules = (
2318323182
);
@@ -23206,7 +23205,6 @@
2320623205
809620D128E540D700940A5D /* Sources */,
2320723206
8096211428E540D700940A5D /* Frameworks */,
2320823207
8096211628E540D700940A5D /* Resources */,
23209-
4C304224F0F810A17D96A402 /* [CP] Copy Pods Resources */,
2321023208
);
2321123209
buildRules = (
2321223210
);
@@ -23235,7 +23233,6 @@
2323523233
8096213228E55C9400940A5D /* Sources */,
2323623234
8096217528E55C9400940A5D /* Frameworks */,
2323723235
8096217728E55C9400940A5D /* Resources */,
23238-
D880C306E1943EA76DA53078 /* [CP] Copy Pods Resources */,
2323923236
);
2324023237
buildRules = (
2324123238
);
@@ -23304,7 +23301,6 @@
2330423301
932225A31C7CE50300443B02 /* Sources */,
2330523302
932225A41C7CE50300443B02 /* Frameworks */,
2330623303
932225A51C7CE50300443B02 /* Resources */,
23307-
83D79708413A3DA10638659F /* [CP] Copy Pods Resources */,
2330823304
);
2330923305
buildRules = (
2331023306
);
@@ -23653,7 +23649,7 @@
2365323649
bg,
2365423650
sk,
2365523651
);
23656-
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
23652+
mainGroup = 29B97314FDCFA39411CA2CEA;
2365723653
packageReferences = (
2365823654
3FF1442E266F3C2400138163 /* XCRemoteSwiftPackageReference "ScreenObject" */,
2365923655
3FC2C33B26C4CF0A00C6D98F /* XCRemoteSwiftPackageReference "XCUITestHelpers" */,
@@ -25077,11 +25073,15 @@
2507725073
);
2507825074
inputPaths = (
2507925075
"${PODS_ROOT}/Target Support Files/Pods-Apps-WordPress/Pods-Apps-WordPress-frameworks.sh",
25076+
"${BUILT_PRODUCTS_DIR}/WordPress-Aztec-iOS/Aztec.framework",
25077+
"${BUILT_PRODUCTS_DIR}/WordPress-Editor-iOS/WordPressEditor.framework",
2508025078
"${PODS_XCFRAMEWORKS_BUILD_DIR}/Gutenberg/Gutenberg.framework/Gutenberg",
2508125079
"${PODS_XCFRAMEWORKS_BUILD_DIR}/Gutenberg/hermes.framework/hermes",
2508225080
);
2508325081
name = "[CP] Embed Pods Frameworks";
2508425082
outputPaths = (
25083+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Aztec.framework",
25084+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WordPressEditor.framework",
2508525085
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Gutenberg.framework",
2508625086
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
2508725087
);
@@ -25130,26 +25130,6 @@
2513025130
shellScript = "$SRCROOT/../Scripts/BuildPhases/ConfigureSimulatorForUITesting.sh\n";
2513125131
showEnvVarsInLog = 0;
2513225132
};
25133-
4C304224F0F810A17D96A402 /* [CP] Copy Pods Resources */ = {
25134-
isa = PBXShellScriptBuildPhase;
25135-
buildActionMask = 2147483647;
25136-
files = (
25137-
);
25138-
inputPaths = (
25139-
"${PODS_ROOT}/Target Support Files/Pods-JetpackShareExtension/Pods-JetpackShareExtension-resources.sh",
25140-
"${PODS_CONFIGURATION_BUILD_DIR}/WordPress-Aztec-iOS/WordPress-Aztec-iOS.bundle",
25141-
"${PODS_ROOT}/WordPress-Editor-iOS/WordPressEditor/WordPressEditor/Assets/aztec.png",
25142-
);
25143-
name = "[CP] Copy Pods Resources";
25144-
outputPaths = (
25145-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/WordPress-Aztec-iOS.bundle",
25146-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/aztec.png",
25147-
);
25148-
runOnlyForDeploymentPostprocessing = 0;
25149-
shellPath = /bin/sh;
25150-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-JetpackShareExtension/Pods-JetpackShareExtension-resources.sh\"\n";
25151-
showEnvVarsInLog = 0;
25152-
};
2515325133
4F4D5C2BB6478A3E90ADC3C5 /* [CP] Check Pods Manifest.lock */ = {
2515425134
isa = PBXShellScriptBuildPhase;
2515525135
buildActionMask = 2147483647;
@@ -25222,68 +25202,24 @@
2522225202
shellPath = /bin/sh;
2522325203
shellScript = "#!/bin/sh\n\n# This script adds the version number to the icon of internal releases.\n\nexport PATH=/opt/local/bin/:/opt/local/sbin:$PATH:/usr/local/bin:\nif [ \"${CONFIGURATION}\" != \"Release-Internal\" ]; then\nexit 0;\nfi\n\nsh ../Scripts/BuildPhases/AddVersionToIcons.sh\n";
2522425204
};
25225-
83D79708413A3DA10638659F /* [CP] Copy Pods Resources */ = {
25226-
isa = PBXShellScriptBuildPhase;
25227-
buildActionMask = 2147483647;
25228-
files = (
25229-
);
25230-
inputPaths = (
25231-
"${PODS_ROOT}/Target Support Files/Pods-WordPressShareExtension/Pods-WordPressShareExtension-resources.sh",
25232-
"${PODS_CONFIGURATION_BUILD_DIR}/WordPress-Aztec-iOS/WordPress-Aztec-iOS.bundle",
25233-
"${PODS_ROOT}/WordPress-Editor-iOS/WordPressEditor/WordPressEditor/Assets/aztec.png",
25234-
);
25235-
name = "[CP] Copy Pods Resources";
25236-
outputPaths = (
25237-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/WordPress-Aztec-iOS.bundle",
25238-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/aztec.png",
25239-
);
25240-
runOnlyForDeploymentPostprocessing = 0;
25241-
shellPath = /bin/sh;
25242-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-WordPressShareExtension/Pods-WordPressShareExtension-resources.sh\"\n";
25243-
showEnvVarsInLog = 0;
25244-
};
2524525205
920B9A6DAD47189622A86A9C /* [CP] Copy Pods Resources */ = {
2524625206
isa = PBXShellScriptBuildPhase;
2524725207
buildActionMask = 2147483647;
2524825208
files = (
2524925209
);
2525025210
inputPaths = (
2525125211
"${PODS_ROOT}/Target Support Files/Pods-Apps-WordPress/Pods-Apps-WordPress-resources.sh",
25252-
"${PODS_CONFIGURATION_BUILD_DIR}/WordPress-Aztec-iOS/WordPress-Aztec-iOS.bundle",
25253-
"${PODS_ROOT}/WordPress-Editor-iOS/WordPressEditor/WordPressEditor/Assets/aztec.png",
2525425212
"${PODS_CONFIGURATION_BUILD_DIR}/AppCenter/AppCenterDistributeResources.bundle",
2525525213
);
2525625214
name = "[CP] Copy Pods Resources";
2525725215
outputPaths = (
25258-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/WordPress-Aztec-iOS.bundle",
25259-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/aztec.png",
2526025216
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AppCenterDistributeResources.bundle",
2526125217
);
2526225218
runOnlyForDeploymentPostprocessing = 0;
2526325219
shellPath = /bin/sh;
2526425220
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Apps-WordPress/Pods-Apps-WordPress-resources.sh\"\n";
2526525221
showEnvVarsInLog = 0;
2526625222
};
25267-
9D186898B0632AA1273C9DE2 /* [CP] Copy Pods Resources */ = {
25268-
isa = PBXShellScriptBuildPhase;
25269-
buildActionMask = 2147483647;
25270-
files = (
25271-
);
25272-
inputPaths = (
25273-
"${PODS_ROOT}/Target Support Files/Pods-WordPressDraftActionExtension/Pods-WordPressDraftActionExtension-resources.sh",
25274-
"${PODS_CONFIGURATION_BUILD_DIR}/WordPress-Aztec-iOS/WordPress-Aztec-iOS.bundle",
25275-
"${PODS_ROOT}/WordPress-Editor-iOS/WordPressEditor/WordPressEditor/Assets/aztec.png",
25276-
);
25277-
name = "[CP] Copy Pods Resources";
25278-
outputPaths = (
25279-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/WordPress-Aztec-iOS.bundle",
25280-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/aztec.png",
25281-
);
25282-
runOnlyForDeploymentPostprocessing = 0;
25283-
shellPath = /bin/sh;
25284-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-WordPressDraftActionExtension/Pods-WordPressDraftActionExtension-resources.sh\"\n";
25285-
showEnvVarsInLog = 0;
25286-
};
2528725223
A279580D198819F50031C6A3 /* ShellScript */ = {
2528825224
isa = PBXShellScriptBuildPhase;
2528925225
buildActionMask = 2147483647;
@@ -25298,26 +25234,6 @@
2529825234
shellScript = "# sh ../run-oclint.sh <optional: filename to lint>\nsh ../Scripts/run-oclint.sh";
2529925235
showEnvVarsInLog = 0;
2530025236
};
25301-
D880C306E1943EA76DA53078 /* [CP] Copy Pods Resources */ = {
25302-
isa = PBXShellScriptBuildPhase;
25303-
buildActionMask = 2147483647;
25304-
files = (
25305-
);
25306-
inputPaths = (
25307-
"${PODS_ROOT}/Target Support Files/Pods-JetpackDraftActionExtension/Pods-JetpackDraftActionExtension-resources.sh",
25308-
"${PODS_CONFIGURATION_BUILD_DIR}/WordPress-Aztec-iOS/WordPress-Aztec-iOS.bundle",
25309-
"${PODS_ROOT}/WordPress-Editor-iOS/WordPressEditor/WordPressEditor/Assets/aztec.png",
25310-
);
25311-
name = "[CP] Copy Pods Resources";
25312-
outputPaths = (
25313-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/WordPress-Aztec-iOS.bundle",
25314-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/aztec.png",
25315-
);
25316-
runOnlyForDeploymentPostprocessing = 0;
25317-
shellPath = /bin/sh;
25318-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-JetpackDraftActionExtension/Pods-JetpackDraftActionExtension-resources.sh\"\n";
25319-
showEnvVarsInLog = 0;
25320-
};
2532125237
E00F6488DE2D86BDC84FBB0B /* [CP] Check Pods Manifest.lock */ = {
2532225238
isa = PBXShellScriptBuildPhase;
2532325239
buildActionMask = 2147483647;
@@ -25360,11 +25276,11 @@
2536025276
files = (
2536125277
);
2536225278
inputPaths = (
25363-
$SRCROOT/../Scripts/BuildPhases/CopyGutenbergJS.inputs.xcfilelist,
25279+
"$SRCROOT/../Scripts/BuildPhases/CopyGutenbergJS.inputs.xcfilelist",
2536425280
);
2536525281
name = "Copy Gutenberg JS";
2536625282
outputFileListPaths = (
25367-
$SRCROOT/../Scripts/BuildPhases/CopyGutenbergJS.outputs.xcfilelist,
25283+
"$SRCROOT/../Scripts/BuildPhases/CopyGutenbergJS.outputs.xcfilelist",
2536825284
);
2536925285
outputPaths = (
2537025286
"",
@@ -25468,11 +25384,15 @@
2546825384
);
2546925385
inputPaths = (
2547025386
"${PODS_ROOT}/Target Support Files/Pods-Apps-Jetpack/Pods-Apps-Jetpack-frameworks.sh",
25387+
"${BUILT_PRODUCTS_DIR}/WordPress-Aztec-iOS/Aztec.framework",
25388+
"${BUILT_PRODUCTS_DIR}/WordPress-Editor-iOS/WordPressEditor.framework",
2547125389
"${PODS_XCFRAMEWORKS_BUILD_DIR}/Gutenberg/Gutenberg.framework/Gutenberg",
2547225390
"${PODS_XCFRAMEWORKS_BUILD_DIR}/Gutenberg/hermes.framework/hermes",
2547325391
);
2547425392
name = "[CP] Embed Pods Frameworks";
2547525393
outputPaths = (
25394+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Aztec.framework",
25395+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WordPressEditor.framework",
2547625396
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Gutenberg.framework",
2547725397
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
2547825398
);
@@ -25488,14 +25408,10 @@
2548825408
);
2548925409
inputPaths = (
2549025410
"${PODS_ROOT}/Target Support Files/Pods-Apps-Jetpack/Pods-Apps-Jetpack-resources.sh",
25491-
"${PODS_CONFIGURATION_BUILD_DIR}/WordPress-Aztec-iOS/WordPress-Aztec-iOS.bundle",
25492-
"${PODS_ROOT}/WordPress-Editor-iOS/WordPressEditor/WordPressEditor/Assets/aztec.png",
2549325411
"${PODS_CONFIGURATION_BUILD_DIR}/AppCenter/AppCenterDistributeResources.bundle",
2549425412
);
2549525413
name = "[CP] Copy Pods Resources";
2549625414
outputPaths = (
25497-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/WordPress-Aztec-iOS.bundle",
25498-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/aztec.png",
2549925415
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AppCenterDistributeResources.bundle",
2550025416
);
2550125417
runOnlyForDeploymentPostprocessing = 0;
@@ -25509,13 +25425,13 @@
2550925425
files = (
2551025426
);
2551125427
inputFileListPaths = (
25512-
$SRCROOT/../Scripts/BuildPhases/CopyGutenbergJS.inputs.xcfilelist,
25428+
"$SRCROOT/../Scripts/BuildPhases/CopyGutenbergJS.inputs.xcfilelist",
2551325429
);
2551425430
inputPaths = (
2551525431
);
2551625432
name = "Copy Gutenberg JS";
2551725433
outputFileListPaths = (
25518-
$SRCROOT/../Scripts/BuildPhases/CopyGutenbergJS.outputs.xcfilelist,
25434+
"$SRCROOT/../Scripts/BuildPhases/CopyGutenbergJS.outputs.xcfilelist",
2551925435
);
2552025436
outputPaths = (
2552125437
);

0 commit comments

Comments
 (0)