无法从文件读取属性列表

问题描述 投票:0回答:1

不确定确切的问题是什么,但是当我运行时

npx expo run:ios

它给了我以下错误。

错误:无法从文件读取属性列表:/Users/jayengineer/Workspace/react_projects/Breached/ios/Breached/Info.plist:操作无法完成。 (XCBUtil.PropertyListConversionError 错误 2。)(在项目“Breached”的目标“Breached”中)

<?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>CADisableMinimumFrameDurationOnPhone</key>
    <true/>
    <key>CFBundleDevelopmentRegion</key>
    <string>$(DEVELOPMENT_LANGUAGE)</string>
    <key>CFBundleDisplayName</key>
    <string>Breached</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>$(PRODUCT_NAME)</string>
    <key>CFBundlePackageType</key>
    <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0.4/string>
      <key>CFBundleSignature</key>
      <string>????</string>
      <key>CFBundleURLTypes</key>
      <array>
        <dict>
          <key>CFBundleURLSchemes</key>
          <array>
            <string>com.jay754.Breached</string>
          </array>
        </dict>
      </array>
      <key>CFBundleVersion</key>
      <string>1</string>
      <key>LSApplicationCategoryType</key>
      <string></string>
      <key>LSRequiresIPhoneOS</key>
      <true/>
      <key>NSAppTransportSecurity</key>
      <dict>
        <key>NSAllowsArbitraryLoads</key>
        <false/>
        <key>NSAllowsLocalNetworking</key>
        <true/>
      </dict>
      <key>UILaunchStoryboardName</key>
      <string>SplashScreen</string>
      <key>UIRequiredDeviceCapabilities</key>
      <array>
        <string>armv7</string>
      </array>
      <key>UIRequiresFullScreen</key>
      <false/>
      <key>UIStatusBarStyle</key>
      <string>UIStatusBarStyleDefault</string>
      <key>UISupportedInterfaceOrientations</key>
      <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
      </array>
      <key>UISupportedInterfaceOrientations~ipad</key>
      <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
      </array>
      <key>UIUserInterfaceStyle</key>
      <string>Light</string>
      <key>UIViewControllerBasedStatusBarAppearance</key>
      <false/>
    </dict>
  </plist>
ios xcode react-native expo plist
1个回答
0
投票

您的 XML 中有错误(缺少

<
):

<string>1.0.4/string>

应该是:

<string>1.0.4</string>

您可以使用以下方法轻松找出 XML 的问题所在:

/usr/bin/plutil -lint info.plist
© www.soinside.com 2019 - 2024. All rights reserved.