简体   繁体   中英

iOS Catalyst Cocoapod framework error - signing requires a development team

I'm updating my iOS app to also work on Mac. After selecting the Mac checkbox, I am getting the error in the screenshot below when trying to build for Mac. It's telling me I need to select a development team for this Cocoapod framework. However, I can build to an iPhone or iPad without selecting a development team.

I tried selecting a development team which made the error go away but when I uploaded the app binary to Apple, it was rejected with the error: ITMS-90284: Invalid Code Signing - The executable 'Timestamp.app/Contents/Frameworks/BSImagePicker.framework/Versions/A/Resources/BSImagePicker.bundle' must be signed with the certificate that is contained in the provisioning profile.

I am thinking I'm getting this error from Apple because I selected a development team for this Cocoapod framework.

Any suggestion on how to handle this error for a Catalyst app?

Mac 构建错误

I have this issue with MessageKitAssets, this works for me:

Select MessageKitAssets from pods targets,

Select a team manually, and set signing certificate 'sign to run locally' (for platform macOS) Use iOS bundle id, provision profile not required.

I solved this issue setting the development team to each pod during pod install like this issue from CocoaPods repo describes: https://github.com/CocoaPods/CocoaPods/issues/8891#issuecomment-546636698

You need to add the folling at the end of your Podfile :

def fix_config(config)
  if config.build_settings['DEVELOPMENT_TEAM'].nil?
    config.build_settings['DEVELOPMENT_TEAM'] = '<YOUR TEAM ID HERE>'
  end
end

post_install do |installer|
  installer.generated_projects.each do |project|
    project.build_configurations.each do |config|
        fix_config(config)
    end
    project.targets.each do |target|
      target.build_configurations.each do |config|
        fix_config(config)
      end
    end
  end
end

Then you need to do a pod install in order to work.

You can find your team id here: https://developer.apple.com/account/#!/membership

在此处输入图像描述

Add this to the top of your podfile:

source 'https://github.com/CocoaPods/Specs.git'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM