Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is it error when my framework contains .framework file

My project uses cocoapods to manager frameworks. The podfile contains the command line

 use_frameworks!

One of my framework core depends on another framework UMCCommon. So core framework's podspec file has command line

 s.dependency 'UMCCommon'

But the UMCCommon have a UMCCommen.framework file. Then I get an error likes below: enter image description here

If I add the line

s.static_framework = true

in core framework another error will appear:

enter image description here

If import the UMCCommon in podfile:

pod 'UMCCommon'

it will be successful. And the UMCCommon catalogue likes below: enter image description here

But I need import UMCCommon in core rather than import it in project podfile. How can I solve this problem.

like image 363
yuanyingding Avatar asked Dec 05 '25 17:12

yuanyingding


2 Answers

If you want to add UMCCommon.framework framework file you can go with s.vendored_frameworks = 'PATH_TO_FRAMEWORK'. Don't remove s.static_framework = true line when you do this. I'd recommend checking out cocoapods documentation for other available options.

like image 108
Ayazmon Avatar answered Dec 07 '25 05:12

Ayazmon


I'm not sure, I completely understand your question. Do you get this error when you're trying to submit Core framework to Cocoapods? Do you get it during pod validation?

If yes, please, make sure that Core pod file contains this:

  use_frameworks!
  pod 'UMCCommon'

And Core podspec file should contain the next lines:

  s.static_framework = true
  s.dependency 'UMCCommon'
  s.vendored_frameworks = "UMCCommen.framework"
like image 43
Boris Avatar answered Dec 07 '25 05:12

Boris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!