Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of undeclared identifier 'jsi'; did you mean 'RNSkia::jsi'? #624

Closed
Tracked by #638
andreialecu opened this issue Jun 23, 2022 · 8 comments · Fixed by #629
Closed
Tracked by #638

Use of undeclared identifier 'jsi'; did you mean 'RNSkia::jsi'? #624

andreialecu opened this issue Jun 23, 2022 · 8 comments · Fixed by #629
Assignees

Comments

@andreialecu
Copy link

I have just created a new RN project using:

npx react-native init App --template react-native-template-typescript

After adding react-native-skia and running a pod install, it seems that the iOS build fails with:

/node_modules/@shopify/react-native-skia/ios/RNSkia-iOS/SkiaManager.mm:37:34: Use of undeclared identifier 'jsi'; did you mean 'RNSkia::jsi'?

Screenshot 2022-06-23 at 12 19 50

I'm unsure if I'm missing something obvious - this is the first time I have tried this library -, but I wanted to report it here in case someone else runs into this.

@andreialecu
Copy link
Author

Accepting Xcode's auto-fix to use RNSkia::jsi seems to resolve it. What am I missing? :)

@chrfalch
Copy link
Contributor

This looks really strange - these lines are working as expected in our examples without the need for updating anything.

Could you provide some more information like version of React Native etc? Could you also try to create a new project without any other dependencies and see if this is an issue with some other libraries you're using?

@vlaxis
Copy link

vlaxis commented Jun 24, 2022

This also happened to me, using react-native 0.69. Blank project.

@andreialecu
Copy link
Author

andreialecu commented Jun 24, 2022

@chrfalch I created a completely blank project for this, RN 0.69.

I ran into the issue while creating the repro for #625

You can find the project at https://github.com/andreialecu/rn-perf-gradients. I was only able to run it by applying the Xcode suggested fixes.

@chrfalch chrfalch self-assigned this Jun 24, 2022
@chrfalch
Copy link
Contributor

Thanks, @andreialecu. I tested this now, with the following commands resulting in a test using RN 0.69:

  1. npx react-native init Testing624 --template react-native-template-typescript
  2. cd Testing624
  3. yarn add @shopify/react-native-skia
  4. npx pod-install ios
  5. npx react-native run-ios

This gives me the same error as you are seeing.

Doing the same with RN 0.68 works fine (changing 1) to npx react-native init Testing624_068 --version "0.68.0") works fine.

Will try to find a quick fix for this!

@chrfalch
Copy link
Contributor

Possibly related to #627

@hadnet
Copy link

hadnet commented Jun 27, 2022

Tried to install react-native-skia on RN 0.69 as well (yarn add @shopify/react-native-skia; cd ios && pod install), and I got this error

The following build commands failed:
        CompileC /Users/jon/Library/Developer/Xcode/DerivedData/ProjectName-gyiatrubjzhjbvdbweyubqraqudl/Build/Intermediates.noinde
x/Pods.build/Debug-iphonesimulator/react-native-skia.build/Objects-normal/x86_64/SkiaManager.o /Users/jon/ReactNativeProj/ProjectName/node_modules/@shopify/react-native-skia/ios/RNSkia-iOS/SkiaManager.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang
.1_0.compiler (in target 'react-native-skia' from project 'Pods')
(1 failure)

Opening Xcode I got same error of andreialecu, "Use of undeclared identifier 'jsi'; did you mean 'RNSkia::jsi'?"
But I got another error "No member named 'jsiNSkia' in namespace 'RNSkia'" and this can't be resolved by Xcode.

Using Skia 0.1.133

NOTE: Ok, I was able to run the project and solve the issue as highlighted in "Added correct namespace", just adding Facebook namespace, like this:

auto callInvoker = bridge.jsCallInvoker;
       facebook::jsi::Runtime* jsRuntime = (facebook::jsi::Runtime*)cxxBridge.runtime;

@wcandillon
Copy link
Contributor

We didn't release the fix for it yet, we will do it once we fixed the build for Android as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants