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

macOS deployment target 10.10 #8

Open
dani-mp opened this issue Aug 16, 2016 · 4 comments
Open

macOS deployment target 10.10 #8

dani-mp opened this issue Aug 16, 2016 · 4 comments

Comments

@dani-mp
Copy link

dani-mp commented Aug 16, 2016

Hi! Any reason the macOS framework deployment target is not set to an older version, at least 10.10, instead of the latest one?

I've forked the project myself and tried, but when I integrate it in my project using Carthage, it won't work, I get "Library not loaded, image not found", so probably I'm missing something else.

If I build from that commit in my local and then add it to my project manually, it does work, so I guess the problem is something I'm missing related with the Carthage configuration.

If someone could give me some guidance, it'd be great!

@dani-mp
Copy link
Author

dani-mp commented Nov 29, 2016

What's missing is the file Xcode generates creating a new framework, that would look like:

#import <Cocoa/Cocoa.h>

//! Project version number for WFOAuth2-Mac.
FOUNDATION_EXPORT double WFOAuth2_MacVersionNumber;

//! Project version string for WFOAuth2-Mac.
FOUNDATION_EXPORT const unsigned char WFOAuth2_MacVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <WFOAuth2_Mac/PublicHeader.h>

#import "WFOAuth2.h"

@conradev
Copy link
Contributor

Hi @danielmartinprieto, if you would like to send a pull request fixing the deployment target, I will merge it, but if not, I can go ahead and fix the issue.

as for the error:

Library not loaded, image not found

That happens when you forget to embed the framework in the resulting app

I don't use the Xcode generated umbrella header and have my own here.

@dani-mp
Copy link
Author

dani-mp commented Dec 18, 2016

Hi, @conradev. Thanks for answering my issue.

I was actually embedding the framework in the resulting app. After a lot of research comparing this framework with others, I found that the umbrella header was missing. To test this, I created a new Mac target and added all the files to the project, and then added all the headers imports to the automatically created umbrella header like this:

#import <WFOAuth2/WFOAuth2Defines.h>
#import <WFOAuth2/WFOAuth2Error.h>
#import <WFOAuth2/WFOAuth2SessionManager.h>
#import <WFOAuth2/WFOAuth2Credential.h>
#import <WFOAuth2/WFOAuth2ProviderSessionManager.h>
#import <WFOAuth2/WFOAuth2RevocableSessionManager.h>
#import <WFOAuth2/WFGoogleOAuth2SessionManager.h>
#import <WFOAuth2/WFSlackOAuth2SessionManager.h>
#import <WFOAuth2/WFUberOAuth2SessionManager.h>
#import <WFOAuth2/WFSquareOAuth2SessionManager.h>

And now this new target works as expected.

Maybe I'm missing something and I don't know how to use your custom umbrella header?

Thanks.

@dani-mp
Copy link
Author

dani-mp commented Dec 18, 2016

I've created a new project (macOS app) adding WFOAuth2 as dependency using Carthage (as I'm doing in my real project) and everything worked, so I've cleaned everything in my project regarding this library and my old fork and tried again and it also worked.

Then, I've removed my old fork and created a new one, set the deployment target of the macOS framework to 10.10, and tried again (this time using my fork, but without changing anything else). It didn't compile, with the error include of non-modular header inside framework module WFOAuth2 and pointing me to the two private headers you were importing in the custom umbrella header. I've removed them (another solution was to make them public, but I guess we don't want that) and now everything seems to work again.

I'm going to create a PR including these changes in case you want to merge it, but let me know if removing those imports was a mistake.

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

2 participants