Closed brunokiafuka closed 2 years ago
โบ Planning build
โบ Executing expo-constants Pods/EXConstants ยป [CP-User] Generate app.config for prebuilt Constants.manifest
โบ Executing expostarterkit ยป Start Packager on http://localhost:8081
โบ Linking expostarterkit ยป expostarterkit
โ Undefined symbols for architecture x86_64
โโ Symbol: VROARDeclarativeSession::addARImageTarget(std::__1::shared_ptr<VROARImageTarget>)
โโ Referenced from: ___41-[VRTARImageMarker getARTargetShouldAdd:]_block_invoke_2 in libViroReact.a(VRTARImageMarker.o)
โ ld: symbol(s) not found for architecture x86_64
โ clang: error: linker command failed with exit code 1 (use -v to see invocation)
โบ 3 error(s), and 0 warning(s)
Failed to build iOS project. "xcodebuild" exited with error code 65.
I've checked out the PR, and done the following steps to no success. @brunokiafuka am I doing this correctly?
Set up viro with PR code
gh repo clone ViroCommunity/viro
cd viro
gh pr checkout 88
yarn install
yarn build
Starter kit
expo init expo-starter-kit
or yarn install
if using my repoyarn add ../viro
expo run:ios
Its entirely possible that enabling bitcode in #78 caused this to change your behavior - Charles mentioned that you enable it.
https://github.com/robertjcolley/expo-viro-starter-kit is what I've done
Looks great! @brunokiafuka is there any changes to our build script we need to make to make sure any plugin changes are built and placed in dist? or should the
build
command take care of this?
the current build should command take care of it.
I'm still getting this error:
โบ Linking expostarterkit ยป expostarterkit
โ Undefined symbols for architecture x86_64
โโ Symbol: VROARDeclarativeSession::addARImageTarget(std::__1::shared_ptr<VROARImageTarget>)
โโ Referenced from: ___41-[VRTARImageMarker getARTargetShouldAdd:]_block_invoke_2 in libViroReact.a(VRTARImageMarker.o)
โ ld: symbol(s) not found for architecture x86_64
โ clang: error: linker command failed with exit code 1 (use -v to see invocation)
โบ 3 error(s), and 0 warning(s)
Failed to build iOS project. "xcodebuild" exited with error code 65.
This is after the expo run:ios
command. After this, I wondered if this was something that would never work because it is trying to build viro for the simulator, so I then did:
expo run:ios
cd ios
(this is the generated ios folder from expo run:ios)pod install
xed .
More descriptive errors from xcode:
Undefined symbol: VROARDeclarativeSession::addARImageTarget(std::__1::shared_ptr
I see that its for x86_64 arch - I'm wondering if that has anything to do with it. I'll keep poking around with the build config and see if I can get it to work on my phone. Also is there another way to generate this ios folder with expo instead of doing expo run:ios
?
I'm still getting this error:
โบ Linking expostarterkit ยป expostarterkit โ Undefined symbols for architecture x86_64 โโ Symbol: VROARDeclarativeSession::addARImageTarget(std::__1::shared_ptr<VROARImageTarget>) โโ Referenced from: ___41-[VRTARImageMarker getARTargetShouldAdd:]_block_invoke_2 in libViroReact.a(VRTARImageMarker.o) โ ld: symbol(s) not found for architecture x86_64 โ clang: error: linker command failed with exit code 1 (use -v to see invocation) โบ 3 error(s), and 0 warning(s) Failed to build iOS project. "xcodebuild" exited with error code 65.
This is after the
expo run:ios
command. After this, I wondered if this was something that would never work because it is trying to build viro for the simulator, so I then did:
expo run:ios
cd ios
(this is the generated ios folder from expo run:ios)pod install
xed .
- build with xcode, my phone as the target
More descriptive errors from xcode:
More Errors I see that its for x86_64 arch - I'm wondering if that has anything to do with it. I'll keep poking around with the build config and see if I can get it to work on my phone. Also is there another way to generate this ios folder with expo instead of doing
expo run:ios
?
-x86_64 is simulator on Intel machines
Which is what I assumed. Still got the issue when my iPhone 11 was the build target, which I think is arm-based.
@robertjcolley you can try:
expo prebuild --clean -p ios --no-install
to generate the native files, expo run:ios
.I'll try cloning your starter kit then re-test the plugins using it. Did you run yarn add ../viro
to install the latest plugin version?
Yes I did
@brunokiafuka I was able to get the app to build to my phone using the expo project! I had to update the metro.config.js like this to resolve extra assets included (.obj files, etc.) in my project. I've pushed changes to my expo-starter-kit with my working iOS project generated by the expo prebuild
command
// metro.config.js
// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require("expo/metro-config");
module.exports = (async () => {
const {
resolver: { assetExts },
} = await getDefaultConfig(__dirname);
return {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
resolver: {
assetExts: [
...assetExts,
"obj",
"mtl",
"mp3",
"JPG",
"vrx",
"hdr",
"gltf",
"glb",
"bin",
"arobject",
"gif",
],
},
};
})();
expo prebuild --clean -p ios --no-install
cd ios && xed . && pod install
However, a new issue is that the app is now crashing when I mount any viro components.
@brunokiafuka @doranteseduardo how do we want to handle item 6 of the plugin for expo?
https://github.com/ViroCommunity/viro/blob/main/readmes/INSTALL_ANDROID.md
right now, it looks like AR is the only thing supported with a minimal set of permssions/features. Should we enable VR by default as well? Should we have a guide to adding a plugin which enables VR in expo on android?
That part is made by the plug-in itself.
Edit: A package for each XR option seems the most feasible but I'm unsure if it's the best approach.
That part is made by the plug-in itself.
Edit: A package for each XR option seems the most feasible but I'm unsure if it's the best approach.
We can pass the option as a plug-in prop abs then edit it accordingly.
That part is made by the plug-in itself.
Edit: A package for each XR option seems the most feasible but I'm unsure if it's the best approach.
We can pass the option as a plug-in prop abs then edit it accordingly.
I think that makes the most sense - maybe an array in app.json or app.config.js.
I'm considering this PR close to mergeable! See thread here. Waiting on testing!
https://discord.com/channels/774471080713781259/884270800180502538/942505347728437288
@brunokiafuka Amazing job! Thanks for the effort on this! ๐๐ป
This is awesome will this be added to the expo config plugin repo?
This is awesome will this be added to the expo config plugin repo?
I believe it is!
This PR fixes #87 and #86