uni-app IOS云打包失败,求大佬看看

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

uni-app IOS云打包失败,求大佬看看
Appid: UNI6765028

Command line invocation:

/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild archive -sdk iphoneos18.1 -project [PackagePath]/HBuilder.xcodeproj -archivePath [PackagePath]/XArchive/HBuilder.xcarchive -scheme HBuilder -configuration Debug

User defaults from command line:

IDEArchivePathOverride = [PackagePath]/XArchive/HBuilder.xcarchive
IDEPackageSupportUseBuiltinSCM = YES

Build settings from command line:

SDKROOT = iphoneos18.1

Prepare packages

ComputeTargetDependencyGraph

  • note: Building targets in dependency order
  • note: Target dependency graph (1 target)
    • Target ‘HBuilder’ in project ‘HBuilder’ (no dependencies)

GatherProvisioningInputs

CreateBuildDescription

ExecuteExternalTool commands:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.1.sdk -x objective-c -c /dev/null
/Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --version --output-format xml1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.1.sdk -x c -c /dev/null
/Applications/Xcode.app/Contents/Developer/usr/bin/actool --print-asset-tag-combinations --output-format xml1 [PackagePath]/HBuilder/Assets.xcassets
/Applications/Xcode.app/Contents/Developer/usr/bin/actool --version --output-format xml1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc --version
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld -version_details
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.1.sdk -x c -c /dev/null

Build description signature: 9ccdac1e66a5d3b3ca1948865e6d71a3 Build description path: /Users/[Name]/Library/Developer/Xcode/DerivedData/HBuilder-dsusdwkmpawchebrxcxdmkbvtoic/Build/Intermediates.noindex/ArchiveIntermediates/HBuilder/IntermediateBuildFilesPath/XCBuildData/9ccdac1e66a5d3b3ca1948865e6d71a3.xcbuilddata

Errors:

  • Provisioning profile “dida” doesn’t support the App Groups capability. (in target ‘HBuilder’ from project ‘HBuilder’)
  • Provisioning profile “dida” doesn’t include the com.apple.security.application-groups entitlement. Profile qualification is using entitlement definitions that may be out of date. Connect to network to update. (in target ‘HBuilder’ from project ‘HBuilder’)

Notes:

  • Disabling previews because SWIFT_VERSION is set and SWIFT_OPTIMIZATION_LEVEL=-O, expected -Onone (in target ‘HBuilder’ from project ‘HBuilder’)

Warnings:

  • Run script build phase ‘Run Script’ will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking “Based on dependency analysis” in the script phase. (in target ‘HBuilder’ from project ‘HBuilder’)
  • Using the first of multiple matching destinations:
platform id name
iOS dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder Any iOS Device
macOS 00008112-000D29A41AFB401E My Mac
iOS Simulator dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder Any iOS Simulator Device
iOS Simulator 50854179-90DA-4762-B4B0-B2391FE92E52 iPad (10th generation)
iOS Simulator 12C90E47-1360-4BA0-A240-747F3AA548BD iPad Air 11-inch (M2)
iOS Simulator 06F4E4DD-D607-401E-B875-90A46AF2BC70 iPad Air 13-inch (M2)
iOS Simulator 25E532C8-E2E6-4E28-B599-01803627B5D4 iPad Pro 11-inch (M4)
iOS Simulator 15FEB433-F852-4C89-BE95-E5058FAEDE81 iPad Pro 13-inch (M4)
iOS Simulator 5260961C-899E-4DDC-A09C-8076E466A38E iPad mini (A17 Pro)
iOS Simulator 6BB64F16-3AFE-4538-9491-D73456F1CBE6 iPhone 16
iOS Simulator 4D1462CD-819B-4848-9142-E2910E1B3BED iPhone 16 Plus
iOS Simulator AA8D4289-CF82-4D00-9B8C-EACC6EFDDEA4 iPhone 16 Pro
iOS Simulator AB69CCBE-AB26-496D-80B9-42B48E115CAA iPhone 16 Pro Max
iOS Simulator 9B4E2FE0-9409-4C04-B654-B36E6E936BC7 iPhone SE (3rd generation)

ARCHIVE FAILED The following build commands failed:

  • Archiving project HBuilder with scheme HBuilder (1 failure)

日志:https://app.liuyingyong.cn/build/errorLog/19765d90-d238-11ef-8eae-b52b6c4590fb


4 回复

项目的manifest.json中配置了capabilities,: “capabilities”: {
“entitlements”: {
“com.apple.security.application-groups”: [""]
}
}, 去掉以上配置,或者苹果后台对应的AppID下勾选“App Groups”,重新生成profile文件并下载,再提交云端打包。
关键错误信息: [PackagePath]/HBuilder.xcodeproj: error: Provisioning profile “dida” doesn’t support the App Groups capability. (in target ‘HBuilder’ from project ‘HBuilder’)
[PackagePath]/HBuilder.xcodeproj: error: Provisioning profile “dida” doesn’t include the com.apple.security.application-groups entitlement. Profile qualification is using entitlement definitions that may be out of date. Connect to network to update. (in target ‘HBuilder’ from project ‘HBuilder’)


‌com.apple.developer.associated-domains‌是一个权限设置,允许iOS应用通过URL打开其他应用或服务。证书那边有配置相关权限嘛?有重新生成证书吗?应该是这个问题吧

谢谢两位,capabilities去掉了,权限加上了,成功了

遇到uni-app在IOS云打包失败的问题,通常可能是由于多种原因导致的,包括但不限于配置文件错误、证书问题、代码签名问题、依赖库冲突等。下面我将给出一些常见的检查点和示例代码,帮助你定位和解决问题。由于无法直接访问你的项目代码和环境,以下是一些通用的解决思路和代码示例:

1. 检查manifest.json配置

确保manifest.json中的IOS相关配置正确无误,特别是app-plus下的distributeios部分。

"app-plus": {
    "distribute": {
        "apple": {
            "profile": "path/to/your/profile", // 确保路径正确
            "mobileprovision": "path/to/your/mobileprovision" // 确保路径正确
        }
    },
    "ios": {
        "bundleIdentifier": "com.yourcompany.yourapp", // 包名
        "appid": "your_appid", // 应用ID
        "version": "1.0.0", // 版本号
        "name": "Your App Name" // 应用名称
    }
}

2. 检查证书和签名

确保你的开发者账号、证书和签名文件(mobileprovision)是最新的且没有过期。同时,确认证书类型(Development或Distribution)与打包类型(Debug或Release)匹配。

3. 检查Xcode项目配置

如果可能,尝试在本地Xcode中打开生成的Xcode项目,检查Build Settings和Signing & Capabilities配置是否正确。

4. 清理和重建

在uni-app的HBuilderX中,尝试先清理项目(Clean Project),然后重新构建(Rebuild Project)。

5. 查看云打包日志

仔细查看云打包过程中生成的日志文件,通常这些日志会提供详细的错误信息,帮助你定位问题。

6. 示例代码检查

虽然直接提供代码示例可能不太适用,但你可以检查是否有使用到特定的第三方库或插件,这些库或插件可能与IOS环境不兼容。如果是,尝试更新或替换这些库。

7. 联系支持

如果以上步骤都无法解决问题,建议联系DCloud官方支持或访问uni-app社区寻求帮助。

由于无法直接访问你的项目,以上建议仅供参考。希望这些信息能帮助你解决问题。如果有更具体的错误信息或日志,可以提供出来以便进一步分析。

回到顶部