Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mlfairy opened this issue Sep 30, 2019 · 6 comments

Comments

@mlfairy
Copy link

mlfairy commented Sep 30, 2019

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
Copy link
Author

mlfairy commented Oct 1, 2019

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
Copy link
Author

mlfairy commented Oct 1, 2019

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

@eytanbiala
Copy link

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

@ghost
Copy link

ghost commented Apr 1, 2020

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!

@mlfairy
Copy link
Author

mlfairy commented Apr 1, 2020

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

@ykjchen
Copy link
Collaborator

ykjchen commented May 31, 2020

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants