Skip to content

Commit 15d9089

Browse files
authoredSep 11, 2024
fix: Gnoboard (#174)
This PR fixes the example app gnoboard with the latest changes in gnonative: - update to Expo 51 to be compatible with Xcode 15.3 or above. - use the Buf'registry gnonative API instead of getting locally in the parent directories (it was too hacky and not stable enough). It also has the advantage that new applications can use the GnoNativeApi file which is in the expo folder, allowing us to only maintain one file for the typescript API. Note: the app will continue to use `@bufbuild/protobuf` v1.7.2 instead of the v2 because `@connectrpc/connect` and `@connectrpc/connect-web` are only available on version v1... and not v2 yet. --------- Signed-off-by: D4ryl00 <d4ryl00@gmail.com>
1 parent ff1fda7 commit 15d9089

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+27988
-14839
lines changed
 

‎.tool-versions

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ cocoapods 1.15.2
44
java openjdk-17.0.2
55
yarn 1.22.19
66
golang 1.22.5
7-
buf 1.30.1
7+
buf 1.39.0

‎Makefile

+9-9
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ $(gen_sum): $(gen_src)
104104
)
105105

106106
_api.generate.modules:
107-
$(call check-program, yarn)
108-
cd api; yarn
107+
$(call check-program, npm)
108+
cd api; npm install
109109

110110
_api.clean.modules:
111111
cd api; rm -fr node_modules
@@ -188,8 +188,8 @@ asdf.install_tools: asdf.add_plugins
188188
########################################
189189
# Script to create a new app
190190

191-
yarn_basic_dependencies := @bufbuild/protobuf @connectrpc/connect @connectrpc/connect-web react-native-polyfill-globals react-native-url-polyfill web-streams-polyfill@3.2.1 react-native-get-random-values text-encoding base-64 react-native-fetch-api
192-
yarn_basic_dev_dependencies = @tsconfig/react-native babel-plugin-module-resolver
191+
npm_basic_dependencies := @bufbuild/protobuf @connectrpc/connect @connectrpc/connect-web react-native-polyfill-globals react-native-url-polyfill web-streams-polyfill@3.2.1 react-native-get-random-values text-encoding base-64 react-native-fetch-api
192+
npm_basic_dev_dependencies = @tsconfig/react-native babel-plugin-module-resolver
193193
OUTPUT_DIR := $(make_dir)/examples/js/react-native
194194

195195
new-app:
@@ -207,14 +207,14 @@ endif
207207

208208
# creates a new react native app using Expo script. Also creates ios and android folders
209209
new-react-native-app:
210-
$(call check-program, yarn)
210+
$(call check-program, npx)
211211
@mkdir -p $(OUTPUT_DIR)
212212
@echo "creating a new gno awesome project at: $(OUTPUT_DIR)"
213-
cd $(OUTPUT_DIR) && yarn create expo $(APP_NAME) --template expo-template-blank-typescript
213+
cd $(OUTPUT_DIR) && npx create-expo-app@latest $(APP_NAME) --template expo-template-blank-typescript
214214
@echo "Creating ios and android folders"
215-
cd $(OUTPUT_DIR)/$(APP_NAME) && yarn expo prebuild
216-
@echo "Installing yarn dependencies"
217-
cd $(OUTPUT_DIR)/$(APP_NAME) && yarn add ${yarn_basic_dependencies} && yarn add -D ${yarn_basic_dev_dependencies}
215+
cd $(OUTPUT_DIR)/$(APP_NAME) && npm expo prebuild
216+
@echo "Installing npm dependencies"
217+
cd $(OUTPUT_DIR)/$(APP_NAME) && npm install ${npm_basic_dependencies} && npm install -D ${npm_basic_dev_dependencies}
218218
@echo "Building GnoCore.xcframework for the new app"
219219
$(MAKE) build.ios APP_NAME=$(APP_NAME) APP_OUTPUT_DIR=$(OUTPUT_DIR)/$(APP_NAME)
220220

0 commit comments

Comments
 (0)