uni-app IOS打包报错 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild

发布于 1周前 作者 sinazl 来自 Uni-App

uni-app IOS打包报错 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild

ios打包错误  

https://ide.dcloud.net.cn/build/errorLog/8e262720-22ee-11ee-b814-f705e67c37bd  

Appid: UNI854A761  
Command line invocation:  
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild archive -sdk iphoneos16.4 -project [PackagePath]/HBuilder.xcodeproj -archivePath [PackagePath]/XArchive/HBuilder.xcarchive -scheme HBuilder -configuration Release  

User defaults from command line:  
IDEArchivePathOverride = [PackagePath]/XArchive/HBuilder.xcarchive  
IDEPackageSupportUseBuiltinSCM = YES  

Build settings from command line:  
SDKROOT = iphoneos16.4  

Prepare packages  

Computing target dependency graph and provisioning inputs  

Create build description  
Build description signature: 0fea1133db22ceed2ca0cb7a06c58564  
Build description path: /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/IntermediateBuildFilesPath/XCBuildData/0fea1133db22ceed2ca0cb7a06c58564.xcbuilddata  

note: Building targets in dependency order  
CreateBuildDirectory /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/IntermediateBuildFilesPath  
cd [PackagePath]/HBuilder.xcodeproj  
builtin-create-build-directory /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/IntermediateBuildFilesPath  

CreateBuildDirectory /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/InstallationBuildProductsLocation  
cd [PackagePath]/HBuilder.xcodeproj  
builtin-create-build-directory /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/InstallationBuildProductsLocation  

CreateBuildDirectory /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/BuildProductsPath  
cd [PackagePath]/HBuilder.xcodeproj  
builtin-create-build-directory /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/BuildProductsPath  

ClangStatCache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk /Users/[Name]/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos16.4-20E238-.sdkstatcache  
cd [PackagePath]/HBuilder.xcodeproj  
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang-stat-cache /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk -o /Users/[Name]/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos16.4-20E238-.sdkstatcache  

CreateBuildDirectory /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/BuildProductsPath/Release-iphoneos  
cd [PackagePath]/HBuilder.xcodeproj  
builtin-create-build-directory /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/BuildProductsPath/Release-iphoneos  

CreateBuildDirectory /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/IntermediateBuildFilesPath/EagerLinkingTBDs/Release-iphoneos  
cd [PackagePath]/HBuilder.xcodeproj  
builtin-create-build-directory /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/IntermediateBuildFilesPath/EagerLinkingTBDs/Release-iphoneos  

SymLink /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/BuildProductsPath/Release-iphoneos/HBuilder.app ../../InstallationBuildProductsLocation/Applications/HBuilder.app (in target 'HBuilder' from project 'HBuilder')  
cd [PackagePath]  
/bin/ln -sfh ../../InstallationBuildProductsLocation/Applications/HBuilder.app /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/BuildProductsPath/Release-iphoneos/HBuilder.app  

MkDir /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/InstallationBuildProductsLocation/Applications/HBuilder.app (in target 'HBuilder' from project 'HBuilder')  
cd [PackagePath]  
/bin/mkdir -p /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/InstallationBuildProductsLocation/Applications/HBuilder.app  

ProcessProductPackaging /Users/[Name]/Library/MobileDevice/Provisioning\ Profiles/ed16b634-e033-4c0d-8af2-bdac48ec9765.mobileprovision /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/InstallationBuildProductsLocation/Applications/HBuilder.app/embedded.mobileprovision (in target 'HBuilder' from project 'HBuilder')  
cd [PackagePath]  
builtin-productPackagingUtility /Users/[Name]/Library/MobileDevice/Provisioning\ Profiles/ed16b634-e033-4c0d-8af2-bdac48ec9765.mobileprovision -o /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/InstallationBuildProductsLocation/Applications/HBuilder.app/embedded.mobileprovision  

WriteAuxiliaryFile /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/IntermediateBuildFilesPath/HBuilder.build/Release-iphoneos/HBuilder.build/DerivedSources/Entitlements.plist (in target 'HBuilder' from project 'HBuilder')  
cd [PackagePath]  
write-file /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/IntermediateBuildFilesPath/HBuilder.build/Release-iphoneos/HBuilder.build/DerivedSources/Entitlements.plist  

ProcessProductPackaging [PackagePath]/HBuilder/HBuilder.entitlements /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-ayjpbzkeycahtbawbpamszzagqjs/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/IntermediateBuildFilesPath/HBuilder.build/Release-iphoneos/HBuilder.build/HBuilder.app.xcent (in target 'HBuilder' from project 'HBuilder')  
cd [PackagePath]  

2 回复

AlipaySDK 原生插件有问题


针对你提到的uni-app在IOS打包时遇到/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild报错的问题,这通常涉及到Xcode构建过程中的各种配置或代码问题。由于无法直接查看具体的错误日志,我将提供一些常见的解决方案和相关的代码配置示例,这些是在处理类似问题时通常需要考虑的几个方面。

1. 确保Xcode和命令行工具版本匹配

首先,确保你的Xcode和命令行工具版本是最新的,或者至少是兼容uni-app的版本。可以通过以下命令检查和更新命令行工具:

sudo xcode-select --install
sudo xcode-select --switch /Applications/Xcode.app
xcodebuild -version

2. 清理和重建项目

有时候,简单的清理和重建可以解决缓存导致的问题:

cd /path/to/your/uni-app/project
# 清理
xcodebuild clean
# 重建
xcodebuild -project YourProject.xcodeproj -scheme YourScheme -configuration Release

3. 检查项目配置

确保Xcode项目的配置正确,特别是Info.plist文件和Build Settings中的配置。例如,检查Info.plist中是否包含了所有必需的键值对,如CFBundleIdentifierCFBundleVersion等。

4. Podfile和CocoaPods

如果你的项目使用了CocoaPods,确保Podfile配置正确,并且所有依赖都已正确安装:

cd ios
pod deintegrate
pod install

5. 检查代码签名和证书

确保你的项目使用了正确的签名证书和配置文件(.mobileprovision)。在Xcode的GeneralSigning & Capabilities标签页中检查这些设置。

6. 查看详细错误日志

如果上述步骤仍未解决问题,尝试在Xcode中直接打开项目并运行,查看更详细的构建错误日志。这通常能提供关于是哪个部分(如某个库、代码文件或配置)导致构建失败的具体信息。

7. 示例代码和配置检查

由于无法直接提供具体的错误代码,建议检查以下常见的配置问题:

  • 确保manifest.json中的app-plus配置正确无误。
  • 检查所有第三方插件的兼容性和版本。

最后,如果问题依旧存在,建议查看uni-app社区或官方文档,看看是否有其他开发者遇到并解决了类似的问题。

回到顶部