m1entus / MZFormSheetPresentationController

MZFormSheetPresentationController provides an alternative to the native iOS UIModalPresentationFormSheet, adding support for iPhone and additional opportunities to setup UIPresentationController size and feel form sheet.
MIT License
973 stars 146 forks source link

Headers are not exposed correct when using with Carthage #68

Closed fatuhoku closed 8 years ago

fatuhoku commented 8 years ago
  1. Can't import & use MZFormSheetPresentationViewController.
#import <MZFormSheetPresentationController/MZFormSheetPresentationViewController.h> // THIS FAILS
  1. MZTransition.h isn't found.
#import <UIKit/UIKit.h>
#import <MZAppearance/MZAppearance.h>
#import "MZTransition.h"  // import not found.

typedef void(^MZFormSheetPresentationControllerTransitionBeginCompletionHandler)(UIViewController * __nonnull presentingViewController);
chazmo03 commented 8 years ago

Yeah, it would be great if this was fixed...

m1entus commented 8 years ago

I am waiting for correct PR because i am not using Carthage in any of my project, so this is not necessary for me

eliburke commented 8 years ago

I just got bitten by this as well. Perhaps you can update the README.md to indicate that Carthage support is not yet working?

As for the problem I think it is maybe not with Carthage, but the settings on the MZFormSheetPresentationController framework. I've never set up a framework myself, but steps 4 and 5 of this guide and Ray's tutorial make me think that you need to make more of the internal headers public, and perhaps change the import lines to include the framework folder like this: #import <MZFormSheetPresentationController/MZTransition.h>

screen shot 2016-04-20 at 11 03 37 am

livyathan commented 8 years ago

I'm having the same issue. I also have no idea how to solve it, I just started to use carthage yesterday.

eliburke commented 8 years ago

I've just created pr #85 to address this issue. I added 5 new headers to the public header list:

I also had to change some of the imports to use < > instead of " ".

I did not verify that CocoaPods still works so it would be great if someone could check that.

m1entus commented 8 years ago

Marged #85

eliburke commented 8 years ago

Just a final comment in case anyone lands here. As of right now, the correct framework import is #import <MZFormSheetPresentationController/MZFormSheetPresentationViewControllerFramework.h>

@m1entus I didn't think to update README.md to add this-- would you mind? Or I can submit another PR.

m1entus commented 8 years ago

If you can update README would be great, because i don't use Carthage and don't have experience with it.

eliburke commented 8 years ago

Sure thing, #86 Thanks for merging, I appreciate it.

KHellkvist commented 8 years ago

@eliburke thank you for fixing this, part of it was my mess, didn't really get it to work when I added the Carthage support a while back.

There is still some an issue with this when I use it, i get these 2 warnings:

Umbrella header for module 'MZFormSheetPresentationController' does not include header 'MZBlurEffectAdapter.h'
Umbrella header for module 'MZFormSheetPresentationController' does not include header 'MZFormSheetPresentationController Swift Example-Bridging-Header.h'
eliburke commented 8 years ago

Hey @KHellkvist I wasn't sure (especially about the swift bridging header) if I should throw everything in there or not, so I erred on the side of only including the headers I needed for my project. :)

KHellkvist commented 8 years ago

@eliburke I'm working on a PR for this since I don't like the warnings I get when I use this. I've only added the MZBlurEffectAdapterfor now. Do you have any input on if it really should be all of the headers? https://github.com/KHellkvist/MZFormSheetPresentationController/commit/f7b356f345a1b91410181d228855552ec0431c76

eliburke commented 8 years ago

@KHellkvist I'd say if you get a warning for both, add both. If it doesn't blow up, 👍