Skip to content

Instantly share code, notes, and snippets.

@christianselig
Created December 9, 2020 18:10
Show Gist options
  • Save christianselig/6447bee28db9c21d7b2d28c7a46ab21d to your computer and use it in GitHub Desktop.
Save christianselig/6447bee28db9c21d7b2d28c7a46ab21d to your computer and use it in GitHub Desktop.
Unable to get Catalyst to work with a few Cocoapods dependencies

I have a few dependencies for a project (managed via Cocoapods) that I'm having trouble getting to compile under Catalyst, but compile fine for iOS.

Steps to Reproduce

  1. Create new Xcode project
  2. Create Podfile with two pods: "DTCoreText" (an HTML parser) and "Mantle" (helps with object modeling), so something like this:
platform :ios, '12.0'

target 'TestProj' do
  use_frameworks!

  pod "DTCoreText"
  pod "Mantle"
end
  1. Compile project with Catalyst

I get the following error to begin with:

Signing for "DTCoreText-Resources" requires a development team. Select a development team in the Signing & Capabilities editor.

Odd, but easy enough, under the target in Pods I add my account as the signing profile. Recompile.

New error!

DTCoreText/Resources.bundle: Is a directory Command CodeSign failed with a nonzero exit code

So it seems what I just signed is unable to be signed because it's a directory.

(Weirdly, this error doesn't present if I remove the "Mantle" dependency, which I'd rather not do)

What should I do?

@christianselig
Copy link
Author

@nedimf
Copy link

nedimf commented Dec 9, 2020

Signing for "DTCoreText-Resources" requires a development team. Select a development team in the Signing & Capabilities editor. That sounds like Pods error. Did you try removing those pods and re-inserting them in project.

@christianselig
Copy link
Author

Hmm, by re-inserting do you mean pod deintegrate then pod install? If so yes, no luck. If you meant integrating it by other means…

Moving the offending packages out of Cocoapods and into Swift Package Manager (which actually works with Objective-C packages too, huh!) caused it to compile correctly finally. :) Per NSBiscuit

@nedimf
Copy link

nedimf commented Dec 9, 2020

Yeah, that. Great it worked out!

@christianselig
Copy link
Author

Yeah, that. Great it worked out!

🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment