You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

iOS-watchOS应用发布报错ITMS-90806:CFBundleIdentifier冲突求助

Fix for ITMS-90806: CFBundleIdentifier Conflict with CocoaLumberjack (iOS + watchOS)

Hey there, I hit this exact same issue a couple weeks back when uploading an app with both iOS and watchOS targets using CocoaLumberjack. Turns out Apple did tighten up their bundle ID uniqueness checks recently—even across different platform targets, you can’t have duplicate bundle IDs for framework bundles anymore. Here are the fixes that worked for me:

Solution 1: Use a CocoaPods Post-Install Hook to Modify WatchOS Bundle ID

Add this script to the end of your Podfile to automatically adjust the bundle ID of the watchOS version of CocoaLumberjack. This ensures it’s unique from the iOS version:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    # Target names might vary slightly depending on the subspec you're using
    next unless target.name == 'CocoaLumberjack' || target.name == 'CocoaLumberjackSwift'
    
    if target.platform_name == :watchos
      target.build_configurations.each do |config|
        info_plist_path = config.build_settings['INFOPLIST_FILE']
        next unless info_plist_path && File.exist?(info_plist_path)
        
        # Read and update the Info.plist to add a .watchos suffix to the bundle ID
        plist_content = File.read(info_plist_path)
        updated_content = plist_content.gsub(
          /<key>CFBundleIdentifier<\/key>\s*<string>org.cocoapods.CocoaLumberjack<\/string>/,
          '<key>CFBundleIdentifier</key><string>org.cocoapods.CocoaLumberjack.watchos</string>'
        )
        File.write(info_plist_path, updated_content)
      end
    end
  end
end

After adding this, run pod install again. Xcode will now use a unique bundle ID for the watchOS version of the framework, avoiding the conflict.

Solution 2: Upgrade CocoaLumberjack to a Newer Version

Check if there’s an updated version of CocoaLumberjack that already addresses this platform-specific bundle ID issue. As of version 4.x, the library has fixed this by assigning distinct bundle IDs for iOS, watchOS, and other platforms.

Update your Podfile to use the latest compatible version:

pod 'CocoaLumberjack/Swift', '~> 4.0'

Then run pod update CocoaLumberjack and rebuild your project. This is the cleanest fix if your app supports the newer version.

Solution 3: Manual Fix for Carthage Users

If you’re using Carthage instead of CocoaPods, you’ll need to modify the watchOS framework’s Info.plist manually after building:

  • Run carthage update to build the frameworks.
  • Navigate to Carthage/Build/watchOS/CocoaLumberjack.framework/Info.plist.
  • Change the CFBundleIdentifier value from org.cocoapods.CocoaLumberjack to something unique like org.cocoapods.CocoaLumberjack.watchos.
  • Re-embed the modified framework into your watchOS extension target and reupload.

Verification Step

Before uploading, double-check the bundle IDs:

  • In Xcode, go to your Pods project → find the iOS CocoaLumberjack target → open its Info.plist. Confirm the bundle ID is org.cocoapods.CocoaLumberjack.
  • Do the same for the watchOS CocoaLumberjack target—its bundle ID should have the .watchos suffix (or whatever unique value you chose).

This should resolve the ITMS-90806 error immediately.

内容的提问来源于stack exchange,提问作者cristallo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 07:21:46