Open rbmdotdev opened 1 year ago
I have the same issue, just to help clarify:
PlayTorchJSIModule is not found
-> this happens when scanning the Expo QR on Expo Go, correct?2a. torchlib-lite seems to not have.. something built for arm yet. I needed to disable arm64 as a build target for simulators 2b. After disabling arm64 build targets, I encounter this:
❌ (/Users/rs/Projects/uni/capstone/app/node_modules/expo-modules-core/ios/Swift/Functions/ConcurrentFunctionDefinition.swift:49:5)
47 |
48 | // Switch from the synchronous context to asynchronous
> 49 | Task { [arguments] in
| ^ 'Task' is only available in iOS 13.0 or newer
50 | let result: Result<Any, Exception>
51 |
52 | do {
❌ (/Users/rs/Projects/uni/capstone/app/node_modules/expo-modules-core/ios/Swift/Functions/ConcurrentFunctionDefinition.swift:49:5)
47 |
48 | // Switch from the synchronous context to asynchronous
> 49 | Task { [arguments] in
| ^ 'init' is only available in iOS 13.0 or newer
50 | let result: Result<Any, Exception>
51 |
52 | do {
I already tried reinstalling the expo-modules-core but still can't continue.
The biggest problem here is that the tutorial/docs is outdated and we can't even start a new project following the steps.
After more digging, seems like https://github.com/facebookresearch/playtorch/issues/195 is related.
I managed to run the tutorial steps, modified:
npx create-expo-app my_app --template blank@47
npx expo prebuild
, run xed ios
and disable arm64
bulid target. Follow these steps:xed ios
B. Pods -> PROJECT -> Pods -> Build Settings -> Excluded Architectures -> Add arm64
For building CocoaPods library.
from: https://developer.apple.com/forums/thread/672541?answerId=722978022#722978022
now you should be able to run npm run ios
and continue the tutorial
Version
0.2.4
Problem Area
react-native-pytorch-core (core package)
Steps to Reproduce
follow these instructions on a 2023 m2 MacBook pro (not positive this is the cause) until you get to the section "Use PlayTorch SDK"
up until this point the expo app will work correctly for each of the following commands
npx expo start
npm run ios
npm run android
once you add the import
import { torch } from 'react-native-pytorch-core';
The exception from line 27 of install-jsi.ts will be thrown when you run
npx expo start
If you run npm run ios I get an extremely long xcodebuild error, I have posted what I think is the relevant portion below
if you run
npm run android
I get the following errorremoving the import allows
npx expo start to work again
howevernpm run ios
andnpm run android
still throw the same errorExpected Results
I expext to be able to follow the instructions on this tutorial https://playtorch.dev/docs/tutorials/get-started-expo-app/ and get a working app
Code example, screenshot, or link to repository
No response