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

Building the Typhoon.framework Library #316

Closed
zenkimoto opened this issue Feb 10, 2015 · 8 comments
Closed

Building the Typhoon.framework Library #316

zenkimoto opened this issue Feb 10, 2015 · 8 comments

Comments

@zenkimoto
Copy link

Hello! Nice project! I just cloned Typhoon Framework and tried to build the framework but it is failing when I'm trying to build the Cocoa framework library. The error indicates that UIDevice is an undeclared identifier (the other error is in reference to UIUserInterfaceIdiomPad being unidentified), but I've checked to see if the framework target has UIKit as a linked framework and it does. I've even checked the Build Phases tab and I don't see anything wrong. How do I just clone the project and build the Cocoa Framework library?

@jasperblues
Copy link
Member

The framework target was contributed by @mowens . . perhaps he's available to take a look? Otherwise we'll investigate ASAP.

Meanwhile, we recommend using Typhoon with CocoaPods. By default CocoaPods creates a static library, but if you specifically want a framework, it can support that now too.

@zenkimoto
Copy link
Author

Thanks @jasperblues! I do have the beta version of CocoaPods (0.36 beta 2) and it still creates a static library for Typhoon for some reason. I didn't look too heavily into it. I decided to follow your documentation on creating a git submodule for swift to build a dynamic framework. It didn't build there, so I just cloned the project and tried to build it.

I was planning on using Swift on a project and seeing if I could just use frameworks instead of using a bridging header, but I can always go the recommended approach if the framework route is not ready. Thanks for your help.

@jasperblues
Copy link
Member

@zenkimoto I believe that documentation should be updated as @mowens is now recommending CocoaPods. Here's an example:

# platform *must* be atleast 8.0
platform :ios, '8.0'

# flag makes all dependencies build as frameworks
use_frameworks!

# framework dependencies
pod 'Typhoon', '2.3.3'

@jasperblues
Copy link
Member

Does the above work for you?

@jasperblues
Copy link
Member

#281

@mowens
Copy link

mowens commented Feb 10, 2015

@zenkimoto Yes @jasperblues is correct in that it would be ideal to leverage CocoaPods instead of the dynamic framework target, however the target should still build (last I checked from master). Note that you have to use the use_frameworks! in order to force the project to build as a dynamic framework (CocoaPods will automatically build pods as dynamic frameworks only if they contain swift code, thus you want to force pods to build as frameworks).

I will look into the framework target sometime tonight as that should still be a valid way to include the project.

@jasperblues
Copy link
Member

Thanks @mowens , once @zenkimoto confirms Podfile example works, I'll update docs to recommend that as the first course of action, while the manual build remains an option.

@zenkimoto
Copy link
Author

Hi @jasperblues @mowens

Thanks guys!!! I used Cocoapods with the use_frameworks! specification and it works. I guess I should have tried that. (But if I did, I probably wouldn't have reported this issue :-D) I do prefer Cocoapods over manually building. Thanks for your help, it's working great now.

As far as why the framework isn't building, I'm not sure. Perhaps it's my setup?

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