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

Issue with fully qualified INFOPLIST files #95

Open
spread-admin opened this issue Jan 31, 2025 · 1 comment
Open

Issue with fully qualified INFOPLIST files #95

spread-admin opened this issue Jan 31, 2025 · 1 comment

Comments

@spread-admin
Copy link

Hey @EvanBacon - cool project!
Been trying it out on my project and hit the following snag.

withIosXcodeProjectBeta2BaseMod: ENOENT: no such file or directory, open '/Users/dev/repo/apps/expo/ios/Users/dev/repo/apps/expo/ios/ShareExtension/ShareExtension-Info.plist'

Error seems to be caused by node_modules/@bacons/xcode/build/api/XCBuildConfiguration.js:

resolveFilePath(key) {
        const fileRef = this.resolveBuildSetting(key);
        if (fileRef == null || typeof fileRef !== "string") {
            return null;
        }
        const root = this.getXcodeProject().getProjectRoot();
        // TODO: Maybe interpolate
        // TODO: Maybe add root projectRoot, currently this is always `""` in my fixtures.
        return node_path_1.default.join(root, fileRef);
    }

From some debugging it seems like https://github.com/timedtext/expo-config-plugin-ios-share-extension is setting it as an absolute path and not relative as the function above expects. That causes the double /Users/dev/... path to appear.
I added the following patch locally just to unblock myself for now:

resolveFilePath(key) {
        const fileRef = this.resolveBuildSetting(key);
        if (fileRef == null || typeof fileRef !== "string") {
            return null;
        }
+       if (fileRef.startsWith('/')) {
+           return fileRef
+       }
        const root = this.getXcodeProject().getProjectRoot();
        // TODO: Maybe interpolate
        // TODO: Maybe add root projectRoot, currently this is always `""` in my fixtures.
        return node_path_1.default.join(root, fileRef);
    }

But figured there might be a better solution out there :)

@billyjacoby
Copy link

billyjacoby commented Feb 17, 2025

Just chiming in to add that this patch fixed an issue i was having with uploading source maps to Bugsnag

Edit: This actually isn't fixing the issue for me like i though

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

No branches or pull requests

2 participants