Skip to content

Conversation

shirakaba
Copy link
Collaborator

@shirakaba shirakaba commented Oct 11, 2025

About

This PR fixes the following error I encountered when autolinking a framework built for macOS (which I brought up on Discord):

Screenshot 2025-10-11 at 17 13 11

The error indicates that it was unable to find Info.plist at the root of the framework. Indeed, it should have been looking elsewhere.

Details

iOS frameworks conventionally have this "unversioned" structure, where the Info.plist is placed at the root of the framework:

NativeScript.framework
├── Headers
│   └── NativeScript.h
├── Info.plist
├── NativeScript
└── _CodeSignature
    └── CodeResources

macOS frameworks conventionally have a "versioned" structure, where the Info.plist is instead nested at Versions/Current/Info.plist:

NativeScript.framework
├── Headers -> Versions/Current/Headers
├── NativeScript -> Versions/Current/NativeScript
├── Resources -> Versions/Current/Resources
└── Versions
    ├── 0.1.0
    │   ├── Headers
    │   │   └── NativeScript.h
    │   ├── NativeScript
    │   ├── Resources
    │   │   └── Info.plist
    │   └── _CodeSignature
    │       └── CodeResources
    └── Current -> 0.1.0

This PR first checks for an Info.plist at the root, then falls back to checking at the nested path.

@shirakaba shirakaba requested a review from kraenhansen October 11, 2025 08:54
cursor[bot]

This comment was marked as outdated.

@shirakaba shirakaba requested a review from kraenhansen October 12, 2025 03:06
cursor[bot]

This comment was marked as outdated.

Copy link
Collaborator

@kraenhansen kraenhansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely beautiful! 💙 Thanks for lot for iterating on this 👍

The only thing I'm missing (not a blocker for merging, but it could be nice) are tests to ensure this doesn't regress 🙏

I've also added the "Apple" label to make the iOS test app run on any new commits to this branch.

@kraenhansen kraenhansen added Apple 🍎 Anything related to the Apple platform (iOS, macOS, Cocoapods, Xcode, XCFrameworks, etc.) Android 🤖 Anything related to the Android platform (Gradle, NDK, Android SDK) and removed Android 🤖 Anything related to the Android platform (Gradle, NDK, Android SDK) labels Oct 15, 2025
@shirakaba
Copy link
Collaborator Author

Added tests!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Apple 🍎 Anything related to the Apple platform (iOS, macOS, Cocoapods, Xcode, XCFrameworks, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants