From 011a46ce2d04678fa92398159b05f33ab0fd8331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 16 Oct 2018 11:40:24 +0200 Subject: [PATCH] [RN] Don't bundle fonts we don't use --- android/sdk/build.gradle | 3 +-- ios/sdk/sdk.xcodeproj/project.pbxproj | 19 +++++++++++++++++++ ios/sdk/src/Info.plist | 1 - 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle index dfefe933f..b6d9d2b5e 100644 --- a/android/sdk/build.gradle +++ b/android/sdk/build.gradle @@ -114,11 +114,10 @@ android.libraryVariants.all { def variant -> def assetsDir = variant.mergeAssets.outputDir variant.mergeAssets.doLast { - // Bundle fonts in react-native-vector-icons + // Bundle fonts // copy { from("${projectDir}/../../fonts/jitsi.ttf") - from("${projectDir}/../../node_modules/react-native-vector-icons/Fonts/") into("${assetsDir}/fonts") } diff --git a/ios/sdk/sdk.xcodeproj/project.pbxproj b/ios/sdk/sdk.xcodeproj/project.pbxproj index 2108d2a3d..1aa5def58 100644 --- a/ios/sdk/sdk.xcodeproj/project.pbxproj +++ b/ios/sdk/sdk.xcodeproj/project.pbxproj @@ -285,6 +285,7 @@ 0BD906E31EC0C00300C8C18E /* Resources */, 0BCA49651EC4B77500B793EE /* Package React bundle */, C7BC10B338C94EEB98048E64 /* [CP] Copy Pods Resources */, + 0B64F7BE2175DFEA005009CD /* Remove unneeded fonts */, ); buildRules = ( ); @@ -350,6 +351,24 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 0B64F7BE2175DFEA005009CD /* Remove unneeded fonts */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Remove unneeded fonts"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# We need to manually do this because react-native-vecotr-icons lists fonts as resources in the Pod spec file\n# so they are automatically added.\n\nshopt -s extglob\n\nrm -f ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/!(jitsi).ttf\n"; + }; 0BCA49651EC4B77500B793EE /* Package React bundle */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/ios/sdk/src/Info.plist b/ios/sdk/src/Info.plist index eae764135..0b9c0fb0f 100644 --- a/ios/sdk/src/Info.plist +++ b/ios/sdk/src/Info.plist @@ -20,7 +20,6 @@ $(CURRENT_PROJECT_VERSION) JitsiMeetFonts - FontAwesome.ttf jitsi.ttf LSApplicationQueriesSchemes