Skip to content

Commit

Permalink
Generate assets for XCFramework in its folder and add to project (#6067)
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio authored and Siobhan committed Aug 17, 2023
1 parent 4cf8461 commit de9a09f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ steps:
echo "--- :arrow_up: Upload iOS bundle artifact"
buildkite-agent artifact upload bundle/ios/App.js
tar -czvf ios-assets.tar.gz -C ios-xcframework/Gutenberg/Resources assets/
buildkite-agent artifact upload ios-assets.tar.gz
- label: "Build Android RN Aztec & Publish to S3"
key: "publish-react-native-aztec-android"
plugins:
Expand Down
3 changes: 3 additions & 0 deletions .buildkite/publish-react-native-ios-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

echo "--- :arrow_down: Download iOS JS bundle"
buildkite-agent artifact download bundle/ios/App.js .
buildkite-agent artifact download ios-assets.tar.gz .
mkdir -p ios-xcframework/Gutenberg/Resources
tar -xzvf ios-assets.tar.gz -C ios-xcframework/Gutenberg/Resources/

echo '--- :node: Setup node_modules for RNReanimated'
echo '--- :node: 1. Install nvm'
Expand Down
2 changes: 2 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Unreleased
---
* [**] Fixed images not rendering in Help section on iOS [https://github.com/wordpress-mobile/gutenberg-mobile/pull/6067]
* [**] Fixes font customization not getting updated on iOS [https://github.com/wordpress-mobile/gutenberg-mobile/pull/6036]

1.101.0
---
Expand Down
3 changes: 3 additions & 0 deletions ios-xcframework/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ build
# This file takes precedence over .xcode.env.
# Developers can use it to set a custom value without having to update .xcode.env after every `pod install`
.xcode.env.local

# This folder is generated at build-time by the `bundle:ios:text` command from the package.json
Gutenberg/Resources/assets/
4 changes: 4 additions & 0 deletions ios-xcframework/XCFrameworkScaffold.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
3F12364D29F6B21300AF54A4 /* editor-behavior-overrides.js in Resources */ = {isa = PBXBuildFile; fileRef = 3F12364429F6B21300AF54A4 /* editor-behavior-overrides.js */; };
3F12364E29F6B21300AF54A4 /* local-storage-overrides.json in Resources */ = {isa = PBXBuildFile; fileRef = 3F12364529F6B21300AF54A4 /* local-storage-overrides.json */; };
3F12365029F6B23300AF54A4 /* supported-blocks.json in Resources */ = {isa = PBXBuildFile; fileRef = 3F12364F29F6B23300AF54A4 /* supported-blocks.json */; };
3F8D0D482A8CB297008A5891 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = 3F8D0D472A8CB297008A5891 /* assets */; };
3FA0C5812A1C8C9700600A9A /* App.js in Resources */ = {isa = PBXBuildFile; fileRef = 3FA0C5802A1C8C9700600A9A /* App.js */; };
3FC7862B2A53047D00A0DDAF /* hermes.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3FC7862A2A53047D00A0DDAF /* hermes.xcframework */; };
3FE06AC329F3F61300F752AD /* Gutenberg.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FE06AC229F3F61300F752AD /* Gutenberg.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -56,6 +57,7 @@
3F12364429F6B21300AF54A4 /* editor-behavior-overrides.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "editor-behavior-overrides.js"; path = "../../../gutenberg/packages/react-native-bridge/common/gutenberg-web-single-block/editor-behavior-overrides.js"; sourceTree = "<group>"; };
3F12364529F6B21300AF54A4 /* local-storage-overrides.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = "local-storage-overrides.json"; path = "../../../gutenberg/packages/react-native-bridge/common/gutenberg-web-single-block/local-storage-overrides.json"; sourceTree = "<group>"; };
3F12364F29F6B23300AF54A4 /* supported-blocks.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = "supported-blocks.json"; path = "../../../src/block-support/supported-blocks.json"; sourceTree = "<group>"; };
3F8D0D472A8CB297008A5891 /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = assets; path = Gutenberg/Resources/assets; sourceTree = "<group>"; };
3FA0C5802A1C8C9700600A9A /* App.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = App.js; path = ../../../bundle/ios/App.js; sourceTree = "<group>"; };
3FC7862A2A53047D00A0DDAF /* hermes.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = hermes.xcframework; path = "Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework"; sourceTree = "<group>"; };
3FE06ABF29F3F61300F752AD /* Gutenberg.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Gutenberg.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -105,6 +107,7 @@
3FE06AB329F3F46B00F752AD = {
isa = PBXGroup;
children = (
3F8D0D472A8CB297008A5891 /* assets */,
3FE06AC729F3F6DA00F752AD /* Config */,
3FE06AC129F3F61300F752AD /* Gutenberg */,
3FE06AC029F3F61300F752AD /* Products */,
Expand Down Expand Up @@ -242,6 +245,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3F8D0D482A8CB297008A5891 /* assets in Resources */,
3FE06AD329F3F6DA00F752AD /* Project-Debug.xcconfig in Resources */,
3F12364E29F6B21300AF54A4 /* local-storage-overrides.json in Resources */,
3FE06ACE29F3F6DA00F752AD /* Gutenberg-Debug.xcconfig in Resources */,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"bundle:android:text": "mkdir -p bundle/android && npm run rn-bundle -- --platform android --dev false --entry-file ./index.js --assets-dest ./bundle/android --bundle-output ./bundle/android/App.text.js --sourcemap-output ./bundle/android/App.text.js.map",
"bundle:android:bytecode": "./gutenberg/node_modules/react-native/sdks/hermesc/`node -e \"const platform=require('os').platform();console.log(platform === 'darwin' ? 'osx-bin' : (platform === 'linux' ? 'linux64-bin' : (platform === 'win32' ? 'win64-bin' : 'unsupported-os')));\"`/hermesc -emit-binary -O -out bundle/android/App.js bundle/android/App.text.js -output-source-map",
"bundle:ios": "npm run bundle:ios:text && npm run bundle:ios:bytecode",
"bundle:ios:text": "mkdir -p bundle/ios && npm run rn-bundle -- --platform ios --dev false --entry-file ./index.js --assets-dest ./bundle/ios --bundle-output ./bundle/ios/App.text.js --sourcemap-output ./bundle/ios/App.text.js.map",
"bundle:ios:text": "mkdir -p bundle/ios && npm run rn-bundle -- --platform ios --dev false --entry-file ./index.js --assets-dest ./ios-xcframework/Gutenberg/Resources --bundle-output ./bundle/ios/App.text.js --sourcemap-output ./bundle/ios/App.text.js.map",
"bundle:ios:bytecode": "./gutenberg/node_modules/react-native/sdks/hermesc/`node -e \"const platform=require('os').platform();console.log(platform === 'darwin' ? 'osx-bin' : (platform === 'linux' ? 'linux64-bin' : (platform === 'win32' ? 'win64-bin' : 'unsupported-os')));\"`/hermesc -emit-binary -O -out bundle/ios/App.js bundle/ios/App.text.js -output-source-map",
"prewpandroid": "rm -Rf $TMPDIR/gbmobile-wpandroidfakernroot && mkdir $TMPDIR/gbmobile-wpandroidfakernroot && ln -s $(cd \"$(dirname \"../../../\")\"; pwd) $TMPDIR/gbmobile-wpandroidfakernroot/android",
"wpandroid": "cd gutenberg && react-native run-android --root $TMPDIR/gbmobile-wpandroidfakernroot --variant wasabiDebug --appIdSuffix beta --appFolder WordPress --main-activity=ui.WPLaunchActivity",
Expand Down

0 comments on commit de9a09f

Please sign in to comment.