CocoaPods / cocoapods-packager

CocoaPods plugin which allows you to generate a static library from a podspec.
Other
1.15k stars 221 forks source link

Unsealed contents when a pod contains a CoreData model file #118

Open martindaum opened 8 years ago

martindaum commented 8 years ago

Whenever I try to include a CoreData model file in the resources of my CocoaPod and try to use the packaged pod in a sample project, I get the error "unsealed contents present in the bundle root".

The issue can be reproduced by using the following sample project. https://github.com/Ashton-W/CoreDataPodSample

The structure of the resources in the resulting framework seems messed up:

screen shot 2016-01-04 at 11 18 46

I'm encountering the same issue when I use my own CocoaPod. Is there anything I can change in the podspec to fix this issue? Thank you!

neonichu commented 8 years ago

I'm not sure if relevant, but there's a fix for some issues with resources in CocoaPods/CocoaPods#4635 — might be worth trying to package with CP 1.0 beta installed to see if that fixes this issue as well.

martindaum commented 8 years ago

Trying to use cocoapods-packager with CP 1.0 pre results in the following error:

NoMethodError - undefined method `integrate_targets=' for #<Pod::Config:0x007fe27c249030>
/Library/Ruby/Gems/2.0.0/gems/cocoapods-packager-1.3.0/lib/pod/command/package.rb:65:in `build_in_sandbox'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-packager-1.3.0/lib/pod/command/package.rb:84:in `block in build_package'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-packager-1.3.0/lib/pod/command/package.rb:83:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-packager-1.3.0/lib/pod/command/package.rb:83:in `build_package'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-packager-1.3.0/lib/pod/command/package.rb:56:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.0.beta.1/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0.beta.1/lib/cocoapods/command.rb:48:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.0.0.beta.1/bin/pod:44:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
neonichu commented 8 years ago

OK, then that isn't an option right now and cp-packager needs to be adopted to the new API first.