promises icon indicating copy to clipboard operation
promises copied to clipboard

[OSX] Umbrella header for module 'FBLPromises' does not include header '/Headers/PromisesObjC-umbrella.h'

Open mlfairy opened this issue 4 years ago • 6 comments

Hi, I'm sorry to cross post this with stackoverflow, but there was no tag related to google-promises.

I'm working on a framework that uses promises internally, and I'd like the framework to work cross platform for iOS, macos and tvOS.

When building my framework for distribution with cocoapods, the lint check is failing specifically for macos, but not the other platforms.

I've described the error in this ticket: https://stackoverflow.com/questions/58171317/umbrella-header-for-module-fblpromises-does-not-include-header-headers-promi

If I can get some help, i'd very much appreciate it.

mlfairy avatar Sep 30 '19 15:09 mlfairy

Ok, seems this happens when i include Promises with any MacOS app. I have a link to a project which shows the problem.

I simply created a new macos app, added a Podfile, and added Promises as a dependency.

mlfairy avatar Oct 01 '19 01:10 mlfairy

I forked the repo, and submitted a PR for what I believe fixes this issue.

My understanding is that the custom modulemap file that's defined in the FBLPromises target is not used by Cocoapods (which instead is generating its own umbrella header, duplicating the includes).

In the same sample app i provided in the previous comment, I instead changed my podfile to point to my fork. This seemed to clean up the problem.

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'TestPromises' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!
  pod 'PromisesObjC', :git => "https://github.com/mlfairy/promises.git"
  pod 'PromisesSwift', :git => "https://github.com/mlfairy/promises.git"

  # Pods for TestPromises

end

mlfairy avatar Oct 01 '19 02:10 mlfairy

Friendly ping here - @mlfairy are you still using your custom fork? @tristane0 what do you think of merging this PR?

eytanbiala avatar Apr 01 '20 16:04 eytanbiala

Apologize for the extremely long delay in following up on this. Before merging, can we test with the latest versions of cocoapods and Xcode for both iOS and macOS? May also want to test without the change too just to make sure it’s still required.

Thank you!

ghost avatar Apr 01 '20 17:04 ghost

hi @eytanbiala I was up until a few weeks ago. Then i moved over to using combine. thanks for checking in!

mlfairy avatar Apr 01 '20 17:04 mlfairy

I was able to reproduce mlfairy's issue with Cocoapods version 1.7.5, but the issue appears to have been fixed in more recent Cocoapods version, and pod spec lint passes with Cocoapods version 1.9.2. I was unable to track down the specific Cocoapods fix that addressed this, but also did not spent much time searching.

Repro steps:

  1. run pod lib create Foo to create a framework targeting OSX,
  2. update podspec to include s.osx.dependency "PromisesSwift", "~> 1.2.8"
  3. push the repo created in step 1 to github,
  4. tagged the commit with version 0.1.0,
  5. run pod spec lint --no-clean --fail-fast --verbose --allow-warnings --platforms=macos

Even though this issue was addressed by some Cocoapods update, it may be preferable to specify s.module_map since Promises provides a custom module map. But I haven't had a chance yet to verify this across the various platforms.

@eytanbiala it sounds like your issue was not identical (it doesn't sound like you're maintaining a framework distributed through Cocoapods)... are you still having issues with this?

ykjchen avatar May 31 '20 22:05 ykjchen