Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Fix wrapObject typeFooDerivedFromBar then unwrapObject typeBar will cause error on iOS #229

Open
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

flyskywhy
Copy link

@flyskywhy flyskywhy commented Aug 31, 2023

Fix wrapObject typeFooDerivedFromBar then unwrapObject typeBar will cause error on iOS, e.g. image.getWidth() will be -1, or Error: react_native_pytorch_core.MediaToBlob.MediaToBlobError.unknownUnwrappedObject

Summary

the type in JSContext.wrapObject of photoOutput in CameraView.swift is Image
the type in JSContextUtils.unwrapObject of getWidth in ImageModule.swift is IImage

Changelog

  • Change IImage to Image around JSContext.wrapObject and JSContextUtils.unwrapObject

Test Plan

tested in RN0.64.3 with Xcode14.0.1(14A400) on macOS Monterey 12.6.5 (21G531), iOS 14.4.2 on iPhone7

…ause error on iOS, e.g. image.getWidth() will be -1

Summary:
the type in JSContext.wrapObject of photoOutput in CameraView.swift is Image
the type in JSContextUtils.unwrapObject of getWidth in ImageModule.swift is IImage

tested in `RN0.64.3` with `Xcode14.0.1(14A400)` on `macOS Monterey 12.6.5 (21G531)`
@vercel
Copy link

vercel bot commented Aug 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
playtorch ⬜️ Ignored (Inspect) Visit Preview Aug 31, 2023 2:18am

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 31, 2023
…odules/react-native/android' to contain exactly one file, however, it contains no files`
…d in modules jetified-fbjni-0.3.0-runtime (com.facebook.fbjni:fbjni:0.3.0) and jetified-fbjni-java-only-0.2 (com.facebook.fbjni:fbjni-java-only:0.2.2)`, ref to

facebook/react-native#34328 (comment)
…variables are used in this project, but they are set to NOTFOUND. FBJNI_LIB`, ref to

mrousavy/react-native-vision-camera@b82d0e
…/jni/arm64-v8a/libpytorch_jni_lite.so', missing and no known rule to make it`
…ed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~Bu6UWdRieDpDrpvvyvNNVQ==/com.foo.bar-w8nusksLnLfSCCsWG3cEkg==/lib/arm64/libfolly_runtime.so](facebook/react-native#43126)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants