应苹果要求2023.4.25之后提交送审必须使用Xcode14.1以上版本开发,在此记录一下升级遇到的报错问题处理。
CocoaPods报错
Signing for "xxx" requires a development team. Select a development team in the Signing & Capabilities editor.
-
解决方案:
修改Podfile文件,在Podfile中添加如下内容:
#方案一
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["DEVELOPMENT_TEAM"] = "Your Team ID"
end
end
end
end
#方案二
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['CODE_SIGN_ALLOWED'] = 'NO'
# 将Sign置为空
# config.build_settings['CODE_SIGN_IDENTITY'] = ''
end
end
end
xxx.xcworkspace子工程报错
Ad Hoc code signing is not allowed with SDK 'iOS 16.2'
-
解决方案:
TARGETS - Build Settings - User-Defined,添加配置CODE_SIGNING_ALLOWED=NO
提交送审构建包阶段报错
"Unexpected CFBundleExecutable Key. The bundle at 'Payload/xxxxxxx.app/xxx.bundle' does not contain a bundle executable. If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL. If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue."
-
解决方案:
找到该bundle内的info.plist文件,打开后删除CFBundleExecutable或Executable file 那一行对应的配置,然后重新构建打包即可。