2022-04-26 xcode13 Info.plist同步错乱

https://mp.weixin.qq.com/s/mgGjBb9dt714c117xrYGfQ

  1. "Custom iOS Target Properties"的缺点
    首先,不支持搜索

其次,不支持“Open As Source Code”,不能直接编辑源码

最后,由于“Custom iOS Target Properties”并没有完全摆脱Info.plist文件,这导致属性分布在“Custom iOS Target Properties”和Info.plist两个地方,最终的Info.plist只有在打包时才会合并。在打包前查看或操作(比如用脚本)完整的Info.plist属性将变得困难。

  1. 如何恢复从前的Info.plist

这是Xcode13新增的配置,Xcode13打开老项目,这里默认是NO;
如果Xcode13新建项目,这里默认是YES。

当这个属性为YES时,Xcode会自动同步“Custom iOS Target Properties”和Info.plist文件,
并在打包时合并,如果我们需要手动管理Info.plist,设置为YES这会引起同步混乱

关闭Generate Info.plist


image.png

找一份老项目的Info.plist拷贝到当前新项目,然后修改称需要的。





    CFBundleDevelopmentRegion
    $(DEVELOPMENT_LANGUAGE)
    CFBundleDisplayName
    xxx
    CFBundleExecutable
    $(EXECUTABLE_NAME)
    CFBundleIconName
    AppIcon
    CFBundleIcons
    
    CFBundleIcons~ipad
    
    CFBundleIdentifier
    $(PRODUCT_BUNDLE_IDENTIFIER)
    CFBundleInfoDictionaryVersion
    6.0
    CFBundleName
    $(PRODUCT_NAME)
    CFBundlePackageType
    $(PRODUCT_BUNDLE_PACKAGE_TYPE)
    CFBundleShortVersionString
    1.0.0
    CFBundleSignature
    ????
    CFBundleVersion
    100
    LSApplicationQueriesSchemes
    
        mqqopensdkapiV2
    
    NSAppTransportSecurity
    
        NSAllowsArbitraryLoads
        
    
    UIFileSharingEnabled
    
    UILaunchStoryboardName
    LaunchScreen
    UIPrerenderedIcon
    
    UIRequiredDeviceCapabilities
    
        armv7
    
    UIRequiresFullScreen
    
    UIStatusBarHidden
    
    UIStatusBarStyle
    UIStatusBarStyleDefault
    UISupportedInterfaceOrientations
    
        UIInterfaceOrientationPortrait
    
    UIUserInterfaceStyle
    Light
    UIViewControllerBasedStatusBarAppearance
    



你可能感兴趣的:(2022-04-26 xcode13 Info.plist同步错乱)