构建问题 info.plist 属性 (React-native IOS)

Problems to build info.plist property (React-native IOS)

我正在尝试 运行 yarn ios 来构建我的应用程序。

但我有一个例外:

ProcessInfoPlistFile /Users/flavio.luiz/Library/Developer/Xcode/DerivedData/growerdiariesapp-fsidgwpdrbcpxubccmkpffoykvsz/Build/Products/Debug-iphonesimulator/growerdiariesapp.app/Info.plist /Users/flavio.luiz/Documents/learning/grower-diaries-app/growerdiariesapp/ios/growerdiariesapp/Info.plist (in target 'growerdiariesapp' from project 'growerdiariesapp')
    cd /Users/flavio.luiz/Documents/learning/grower-diaries-app/growerdiariesapp/ios
    builtin-infoPlistUtility /Users/flavio.luiz/Documents/learning/grower-diaries-app/growerdiariesapp/ios/growerdiariesapp/Info.plist -producttype com.apple.product-type.application -genpkginfo /Users/flavio.luiz/Library/Developer/Xcode/DerivedData/growerdiariesapp-fsidgwpdrbcpxubccmkpffoykvsz/Build/Products/Debug-iphonesimulator/growerdiariesapp.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -additionalcontentfile /Users/flavio.luiz/Library/Developer/Xcode/DerivedData/growerdiariesapp-fsidgwpdrbcpxubccmkpffoykvsz/Build/Intermediates.noindex/growerdiariesapp.build/Debug-iphonesimulator/growerdiariesapp.build/LaunchScreen-SBPartialInfo.plist -additionalcontentfile /Users/flavio.luiz/Library/Developer/Xcode/DerivedData/growerdiariesapp-fsidgwpdrbcpxubccmkpffoykvsz/Build/Intermediates.noindex/growerdiariesapp.build/Debug-iphonesimulator/growerdiariesapp.build/assetcatalog_generated_info.plist -o /Users/flavio.luiz/Library/Developer/Xcode/DerivedData/growerdiariesapp-fsidgwpdrbcpxubccmkpffoykvsz/Build/Products/Debug-iphonesimulator/growerdiariesapp.app/Info.plist
error: unable to read property list from file: /Users/flavio.luiz/Documents/learning/grower-diaries-app/growerdiariesapp/ios/growerdiariesapp/Info.plist: The operation couldn’t be completed. (XCBUtil.PropertyListConversionError error 1.) (in target 'growerdiariesapp' from project 'growerdiariesapp')

我认为这可能是信息列表属性的问题。我最近更改了文件以删除 react-native-vector-icons:

<?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>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleDisplayName</key>
    <string>grower diaries</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>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
        <dict>
            <key>localhost</key>
            <dict>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
            </dict>
        </dict>
    </dict>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string/>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
    </array>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
    <key>UIAppFonts</key>
</dict>
</plist>

我刚试过 plutil info.plist,这就是答案:

info.plist: Value missing for key inside <dict> at line 55

有人知道如何解决这个问题吗?

我知道了。

我刚刚从 Info.plist 中删除了 UIAppFonts 键,它就起作用了。键已声明但没有值引用。