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

Add View Controller placeholders support #61

Closed
vkaramov opened this issue Nov 11, 2015 · 8 comments
Closed

Add View Controller placeholders support #61

vkaramov opened this issue Nov 11, 2015 · 8 comments

Comments

@vkaramov
Copy link

XCode 7 and iOS 9 supports View Controller placeholders in your storyboards. But swiftgen doesn't support them.

Generated enum looks like this:

enum ServicePromo : String, StoryboardScene {
case nextSegue = "NextSegue"
static func nextSegueViewController() -> UIViewControllerPlaceholder
{
return ServicePromo.nextSegue.viewController() as! UIViewControllerPlaceholder
}
}

@AliSoftware
Copy link
Collaborator

Care to make a PR? Should be pretty easy to fix the StoryboardParser to detect such nodes I think.

@vkaramov
Copy link
Author

I guess so, but I'm pretty busy in 2 projects. I'll probably make a PR later this week.

@AliSoftware
Copy link
Collaborator

Fine by me, I'm busy too so you'll probably beat me to it anyway 😉 👍

@vkaramov
Copy link
Author

Hello, when are you going to merge or reject my PR?
And one more question: why swiftgen crashes when launched from the debugger?

@AliSoftware
Copy link
Collaborator

Sorry I've been super super busy this month both at work and in personal life and I admit I totally forgot your PR, so thanks for reminding me! I commented on it as I wish that code to be tested before merging anything.

Regarding the debugger, I'm not sure I understand your question. You mean when you try to run the SwiftGen.xcodeproj from Xcode, right? If so, yeah that's an issue with Xcode which is not yet really fit for Command Line projects (= that produce a single binary without a bundle) written in Swift (as projects written in Swift depend on Swift dynamic libs and the Swift dylibs are normally copied by Xcode in the app bundle — inside YourApp.app/Frameworks — but for CLI tools there is no bundle). So for CLI apps I mostly use Xcode so that I have syntax highlighting and code completion but building require a custom string.
Hopefully this will change soon with Swift becoming OpenSource and the Swift Package Manager and Apple wanting to make Swift apps working on Linux (which means no bundles but flat binaries and no frameworks or done differently) and a future version of Xcode supporting that.

@vkaramov vkaramov mentioned this issue Dec 16, 2015
@vkaramov
Copy link
Author

Hello,
I've updated unit tests, so please take a look.

@AliSoftware
Copy link
Collaborator

@vkaramov
Copy link
Author

Great! Thanks!

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

No branches or pull requests

2 participants