microsoft / react-native-code-push

React Native module for CodePush
http://appcenter.ms
Other
8.87k stars 1.45k forks source link

Unable to parse "ios/my_product_name/Info.plist". Please ensure it is a well-formed plist file. #769

Closed jaeky closed 7 years ago

jaeky commented 7 years ago

Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):

Description

Hi! I tried code-push release-react my_product_name ios but it returns this message: Unable to parse "ios/my_product_name/Info.plist". Please ensure it is a well-formed plist file.

My Info.plist file is

<?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>CFBundleName</key>
    <string>$(PRODUCT_NAME)</string>
    <key>LineSDKConfig</key>
    <dict>
        <key>ChannelID</key>
        <string>12345678</string>
    </dict>
    <key>CFBundleAllowMixedLocalizations</key>
    <true/>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>lineauth</string>
        <string>line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER)</string>
        <string>line</string>
        <string>kakaotalk</string>
        <string>12345678</string>
        <string>kakaokompassauth</string>
        <string>storykompassauth</string>
        <string>kakaolink</string>
        <string>kakaotalk-4.5.0</string>
        <string>kakaostory-2.9.0</string>
        <string>fbapi</string>
        <string>fb-messenger-api</string>
        <string>fbauth2</string>
        <string>fbshareextension</string>
    </array>
    <key>CFBundleDevelopmentRegion</key>
    <string>ko</string>
    <key>CFBundleVersion</key>
    <string>170323</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.3.2</string>
    <key>FacebookAppID</key>
    <string>12345678</string>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
        <dict>
            <key></key>
            <dict>
                <key>NSIncludesSubdomains</key>
                <true/>
                <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
                <false/>
            </dict>
            <key>kakao.com</key>
            <dict>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
                <key>NSExceptionRequiresForwardSecrecy</key>
                <false/>
                <key>NSIncludesSubdomains</key>
                <true/>
            </dict>
            <key>facebook.com</key>
            <dict>
                <key>NSIncludesSubdomains</key>
                <true/>
                <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
                <false/>
            </dict>
            <key>kakaocdn.net</key>
            <dict>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
                <key>NSExceptionRequiresForwardSecrecy</key>
                <false/>
                <key>NSIncludesSubdomains</key>
                <true/>
            </dict>
            <key>fbcdn.net</key>
            <dict>
                <key>NSIncludesSubdomains</key>
                <true/>
                <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
                <false/>
            </dict>
            <key>kakao.co.kr</key>
            <dict>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
                <key>NSExceptionRequiresForwardSecrecy</key>
                <false/>
                <key>NSIncludesSubdomains</key>
                <true/>
            </dict>
            <key>kakaocorp.com</key>
            <dict>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
                <key>NSExceptionRequiresForwardSecrecy</key>
                <false/>
                <key>NSIncludesSubdomains</key>
                <true/>
            </dict>
        </dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
    </array>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>FacebookDisplayName</key>
    <string>$(PRODUCT_NAME)</string>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER)</string>
                <string>my_product_name</string>
                <string>12345678</string>
                <string>12345678</string>
            </array>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
        </dict>
    </array>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>KAKAO_APP_KEY</key>
    <string>12345678</string>
    <key>CodePushDeploymentKey</key>
    <string>$(CODEPUSH_KEY)</string>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
    </array>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string></string>
</dict>
</plist>

I don't know what is wrong.. is it because of my third party apps??

Additional Information

max-mironov commented 7 years ago

Hello @jaeky, I've looked at your plist file provided and although it looks valid when checking it via plutil <filename> tool it looks like one of our 3rd party dependencies - plist is throwing an error at this line: https://github.com/Microsoft/code-push/blob/master/cli/script/command-executor.ts#L877.

So I've dig deeper and it looks that empty nodes like <key></key> are not legal here and should be replaced with something like this <key>123</key>. Could you please verify this and let us know if it helps.

jaeky commented 7 years ago

It works successfully! thank you. 👍