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

fix: Fallback to xcodebuild vars for faulty Info.plist files #1310

Merged
merged 2 commits into from Aug 16, 2022

Conversation

kamilogorek
Copy link
Contributor

@kamilogorek kamilogorek commented Aug 16, 2022

This is sort of an edge-case, as XCode is not producing an Info.plist file
by default anymore. However, it still does so for some templates.

For example iOS Storyboard template will produce a partial Info.plist file,
with a content only related to the Storyboard itself, but not the project as a whole. eg.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>UIApplicationSceneManifest</key>
    <dict>
        <key>UISceneConfigurations</key>
        <dict>
            <key>UIWindowSceneSessionRoleApplication</key>
            <array>
                <dict>
                    <key>UISceneStoryboardFile</key>
                    <string>Main</string>
                </dict>
            </array>
        </dict>
    </dict>
</dict>
</plist>

This causes a false-positive in this branch, as INFOPLIST_FILE is present, yet it contains
no data required by the CLI to correctly produce a InfoPlist struct.

In the case like that, we try to fallback to variables produced by xcodebuild binary,
and read them directly, just like we do in from_xcode_env method.

Fixes #1301

@kamilogorek kamilogorek requested a review from a team August 16, 2022 15:08
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.

Using upload-dif results in Serde("missing field CFBundleName")
2 participants