Skip to content

fix: declare ios component correctly #27

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

Merged

Conversation

itsramiel
Copy link
Contributor

@itsramiel itsramiel commented Jul 11, 2025

Currently the example app on version 0.77 crashes because of this

Configure iOS components correctly according to codegen. Check docs.

@fobos531
Copy link
Contributor

Hello @dominicstop - do you think you're able to merge this?

@dominicstop
Copy link
Owner

hello, @fobos531
sure, i'll merge it, and submit a relese

@dominicstop dominicstop merged commit 8edae4a into dominicstop:master Jul 14, 2025
@fobos531
Copy link
Contributor

fobos531 commented Jul 14, 2025

Also @dominicstop I'm not sure what your policy is on the supported react native versions, but once you start supporting only RN 0.80+ for this library, I think we can migrate to the new format for this. facebook/react-native#49941

So

"ios": {
      "componentProvider": {
        "RNIDetachedView": "RNIDetachedView",
        "RNIDummyTestView": "RNIDummyTestView",
        "RNIWrapperView": "RNIWrapperView"
      }
    }

would become

"ios": {
      "components": {
        "RNIDetachedView": {
          "className": "RNIDetachedView"
        },
        "RNIDummyTestView": {
          "className": "RNIDummyTestView"
        },
        "RNIWrapperView": {
          "className": "RNIWrapperView"
        }
      }
    }

@dominicstop
Copy link
Owner

dominicstop commented Jul 14, 2025

@fobos531 thank you vey much for the detailed info! i've been out of the loop w/ RN lately so i'll have to read up on this...

in the meantime, if you have any other PR's you want merge, please let me know!

@fobos531
Copy link
Contributor

@dominicstop Thank you, much appreciated!

This one dominicstop/react-native-ios-context-menu#132 probably also needs a merge for this to work fully.

#28 and #29 in this repo also look like they would be useful to merge, but maybe @itsramiel should provide more context on it first, or whether they feel confident that it can be merged.

@dominicstop
Copy link
Owner

okie, i will check

@itsramiel itsramiel deleted the fix/declare-ios-components branch July 14, 2025 09:22
@itsramiel
Copy link
Contributor Author

#28 updates the example app to 0.80.1 where the library breaks. You can either initialize a new rn project with 5.1.6 and see the error. Or run pr #28 since the example app is in 0.80.1

#29 fixes the issue you see in #28

@dominicstop
Copy link
Owner

hello @itsramiel

thanks very much for your fixes; i've released a new verion with your changes: v5.1.6, and v5.1.8-0

i'm still trying to get the updated example to run (that's why it's a prepatch 5.1.8-0 release); once i'm able to get it running, i'll release another patch

@itsramiel
Copy link
Contributor Author

Awesome! let me know if you have a problem running the example app!

@itsramiel
Copy link
Contributor Author

@fobos531 thank you vey much for the detailed info! i've been out of the loop w/ RN lately so i'll have to read up on this...

Btw I just want to say you are such a valuable addition to the RN ecosystem. RN has been growing lately and there are many talented people working on it. You are def one of them!

@dominicstop
Copy link
Owner

dominicstop commented Jul 16, 2025

hello, i'm releasing a new patch w/ your changes (patch 5.1.8) + additional fixes for paper (just had to do some testing first)


New Examples:
Refactored to have multiple examples (for easier upgrading in the future):

examples
├── example-core
├── example-v0.77
├── example-v0.78
└── example-v0.80.1

had to make a minor fix, but everything seems to work-ish in both fabric + paper (It would be nice to also do this for the other libs too but i just don't have the time atm unfotunatley)

test-build-ios-all.sh Test Results:
log-test-build-ios-all.txt (2025-07-16 11:48:00)

Build Environment Metadata:
Timestamp: 2025-07-16 11:48:00
macOS Version: ProductName:		macOS
ProductVersion:		15.3
BuildVersion:		24D60
Xcode Version: Xcode 16.2
Build version 16C5032a
Ruby Version: ruby 3.1.7p261 (2025-03-26 revision 0a3704f218) [arm64-darwin24]
Node.js Version: v16.11.1
npm Version: 8.0.0
Yarn Version: 3.6.1
Git Version: git version 2.48.1
Git Branch: refactor-to-support-multiple-examples-v2
Last Commit Hash: 407d2ab2308d168c596205b15b7017daea467323
Last Commit Description: ⚙️ Chore: Ex - Enable New Arch in `example-v0.78`
Last Commit Date: 2025-07-16 11:02:45 +0800

Build Results #0
Timestamp: 2025-07-16 11:18:43
BUILD_CURRENT_PATH: examples/example-v0.77/ios
BUILD_MODE: quick
Build - NEW_ARCH_STATIC_DEBUG: SUCCESS
Build - OLD_ARCH_STATIC_DEBUG: SUCCESS
Build - NEW_ARCH_STATIC_RELEASE: SUCCESS
Build - OLD_ARCH_STATIC_RELEASE: SUCCESS
Build - OLD_ARCH_DYNAMIC: SUCCESS

Build Results #1
Timestamp: 2025-07-16 11:33:36
BUILD_CURRENT_PATH: examples/example-v0.78/ios
BUILD_MODE: quick
Build - NEW_ARCH_STATIC_DEBUG: SUCCESS
Build - OLD_ARCH_STATIC_DEBUG: SUCCESS
Build - NEW_ARCH_STATIC_RELEASE: SUCCESS
Build - OLD_ARCH_STATIC_RELEASE: SUCCESS
Build - OLD_ARCH_DYNAMIC: SUCCESS

Build Results #2
Timestamp: 2025-07-16 11:47:59
BUILD_CURRENT_PATH: examples/example-v0.80.1/ios
BUILD_MODE: quick
Build - NEW_ARCH_STATIC_DEBUG: SUCCESS
Build - OLD_ARCH_STATIC_DEBUG: SUCCESS
Build - NEW_ARCH_STATIC_RELEASE: SUCCESS
Build - OLD_ARCH_STATIC_RELEASE: SUCCESS
Build - OLD_ARCH_DYNAMIC: SUCCESS

**Screenshots**: 2025-07-16 - Screesnhots

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 this pull request may close these issues.

3 participants