Skip to content

Commit

Permalink
fix: Gnoboard (#174)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
D4ryl00 authored Sep 11, 2024
1 parent ff1fda7 commit 15d9089
Show file tree
Hide file tree
Showing 60 changed files with 27,988 additions and 14,839 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ cocoapods 1.15.2
java openjdk-17.0.2
yarn 1.22.19
golang 1.22.5
buf 1.30.1
buf 1.39.0
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ $(gen_sum): $(gen_src)
)

_api.generate.modules:
$(call check-program, yarn)
cd api; yarn
$(call check-program, npm)
cd api; npm install

_api.clean.modules:
cd api; rm -fr node_modules
Expand Down Expand Up @@ -188,8 +188,8 @@ asdf.install_tools: asdf.add_plugins
########################################
# Script to create a new app

yarn_basic_dependencies := @bufbuild/protobuf @connectrpc/connect @connectrpc/connect-web react-native-polyfill-globals react-native-url-polyfill [email protected] react-native-get-random-values text-encoding base-64 react-native-fetch-api
yarn_basic_dev_dependencies = @tsconfig/react-native babel-plugin-module-resolver
npm_basic_dependencies := @bufbuild/protobuf @connectrpc/connect @connectrpc/connect-web react-native-polyfill-globals react-native-url-polyfill [email protected] react-native-get-random-values text-encoding base-64 react-native-fetch-api
npm_basic_dev_dependencies = @tsconfig/react-native babel-plugin-module-resolver
OUTPUT_DIR := $(make_dir)/examples/js/react-native

new-app:
Expand All @@ -207,14 +207,14 @@ endif

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

Expand Down
8 changes: 0 additions & 8 deletions api/buf.yaml

This file was deleted.

Loading

0 comments on commit 15d9089

Please sign in to comment.