Bug Description
My target is build simple IOS app using with fetch any example api url, use gea store for fetched data and render store data tsx template.
I developed and build for web. It's working well. But IOS build is crashed. I tried remove features step by step but still have issues on IOS build.
I tried some solution. When you replace fetchResponse.json() to fetchResponse.text() and parse JSON different way and it's building. But still have issues.
Steps to Reproduce
- Create a new gea:
gea create simple-app
- Choose:
Blank application
- Choose:
Web browser
- Use my source code below
- Change package.json ios target from false to true.
- Set icons to package.json file.
- Install apple package.
npm i @geastack/apple
- Build app:
npx gea build --target ios
Expected Behavior
CLI should build without error and When I run app on IOS device should be run without error.
Actual Behavior
While building IOS app CLI is crash and have error:
generate-gea-embedded-assets: 1 asset(s) -> dist/ios/.generated/e-demo-web/gea_embedded_assets_generated.cpp
compile: --plugin /node_modules/@geastack/geatsc-plugin-gea/dist/index.js: using built-in "gea" adapter for the legacy package
compile: no certificate; 1 capability refusal(s), 0 diagnostic(s)
certify fn|decl|f0|28: host-invocation:gea::host::FetchResponse.json: the target manifest registers no host-invocation "gea::host::FetchResponse.json"
command failed (1): node --max-old-space-size=32768 /node_modules/@geastack/compiler/dist/cli.js compile-module-graph /dist/ios/.generated/e-demo-web/module-graph/gea-module-graph.json --out-dir /dist/ios/.generated/e-demo-web --plugin /node_modules/@geastack/geatsc-plugin-gea/dist/index.js --plugin-option gea.ir=/dist/ios/.generated/e-demo-web/dist/gea-ir.json --plugin-option gea.microtasks-namespace=gea::framework::app::generated --entry /dist/ios/.generated/e-demo-web/gea-embedded-compat-src/src/index.tsx --module-graph-stage hybrid
My Source Code
import { Component } from '@geastack/core'
type Item = {
userId: number,
id: number,
title: string,
completed: boolean,
};
const fetchTodos = async () => {
const fetchResponse = await fetch('https://jsonplaceholder.typicode.com/todos');
const data = (await fetchResponse.json()) as Item[];
}
export class App extends Component {
template() {
fetchTodos();
return (
<div>
Fetch Demo
</div>
)
}
}
Bug Description
My target is build simple IOS app using with fetch any example api url, use gea store for fetched data and render store data tsx template.
I developed and build for web. It's working well. But IOS build is crashed. I tried remove features step by step but still have issues on IOS build.
I tried some solution. When you replace
fetchResponse.json()tofetchResponse.text()and parse JSON different way and it's building. But still have issues.Steps to Reproduce
gea create simple-appBlank applicationWeb browsernpm i @geastack/applenpx gea build --target iosExpected Behavior
CLI should build without error and When I run app on IOS device should be run without error.
Actual Behavior
While building IOS app CLI is crash and have error:
My Source Code