Cocoapods: [tvOS] The key UIDevicesRequiredCapabilities is invalid for frameworks

Created on 17 Nov 2016  路  4Comments  路  Source: CocoaPods/CocoaPods

It seems Apple changed the validation process and PR #4539 now causes the error ITMS-90689 - The Key UIRequiredDevicesCapabilities in bundle *** is invalid for frameworks

Confirmed by https://forums.developer.apple.com/thread/68032

easy confirmed defect

Most helpful comment

I managed to upload the build making use of this post_install workaround in my Podfile

post_install do |installer|
    plist_buddy = "/usr/libexec/PlistBuddy"
    installer.pods_project.targets.each do |target|
        plist = "Pods/Target Support Files/#{target}/Info.plist"
        puts "Delete UIRequiredDeviceCapabilities from #{target} to make it pass iTC verification."
        `#{plist_buddy} -c "Delete UIRequiredDeviceCapabilities" "#{plist}"`
    end
end

All 4 comments

I was able to upload a build to iTunes Connect today by manually deleting the UIRequiredDevicesCapabilities key out of all of the Info.plists included by the Pods project.

Should be able to make a post install hook to do this.

I managed to upload the build making use of this post_install workaround in my Podfile

post_install do |installer|
    plist_buddy = "/usr/libexec/PlistBuddy"
    installer.pods_project.targets.each do |target|
        plist = "Pods/Target Support Files/#{target}/Info.plist"
        puts "Delete UIRequiredDeviceCapabilities from #{target} to make it pass iTC verification."
        `#{plist_buddy} -c "Delete UIRequiredDeviceCapabilities" "#{plist}"`
    end
end

Almost the same here :)

post_install do |installer|
  PLISTBUDDY = '/usr/libexec/PlistBuddy'
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      # Temporary fix for  https://github.com/CocoaPods/CocoaPods/issues/6193
      # TODO should only run once per target
      # WARN use carefully if your pods really have UIRequiredDeviceCapabilities
      if target.platform_name.to_s == "tvos"
          puts "Found a tvOS target #{target}"
          plist = "Pods/" + config.build_settings['INFOPLIST_FILE']
          plist_path = plist.gsub('Target Support Files', 'Target\ Support\ Files')
          CoreUI.puts "Patching UIDevicesRequiredDeviceCapabilities in plist: #{plist_path}"
          `#{PLISTBUDDY} -c "Delete :UIRequiredDeviceCapabilities" #{plist_path}`
        end
    end
  end
end

Thanks for letting us know! The fix here seems pretty straight forward, and we'd appreciate if someone closer to the root issue could open a PR to ensure the PR is well-tested. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

luhui picture luhui  路  3Comments

pronebird picture pronebird  路  3Comments

sonu5 picture sonu5  路  3Comments

soleares picture soleares  路  3Comments

intelliot picture intelliot  路  3Comments