Open ldiqual opened 9 years ago
To be automatically detected in our perfect world you can put the file near the storyboard with specific extension, as I do with my PR https://github.com/krzyzanowskim/Natalie/pull/48/files Without that XNatalie or a generic launcher will not add the additional command parameter
what is wrong with specyfying module in storyboard? this is the easiest way to handle it. Configuration file introduce complication how to deal with the file, where to store etc. I'd like to realy avoid that as long as possible.
you can't specify module for objective-c framework, this is what I understand in the corresponding issue
@phimage --additional-imports
or any option would be good to have for this.
Yes option is far better than adding an extra argument behind the file path But option
I prefer configuration files by storyboard because
that's why I make "plist" into PR #48
then plist VS json, the two are easy to read, but in Xcode I prefer create and edit plist file
As a side note, if a solution is found to the issue #64 I just opened where I ask for a feature to have Natalie parse an xcodeproj file to generate target specific files, Natalie could automatically find out which frameworks each target is linked with.
@phimage I like the solution of a configuration file next to the storyboard. Not really a big fan of the plist
format but at least it's consistent with what apple uses.
@hartbit Agreed that your solution would be best, maybe we could iterate by merging https://github.com/krzyzanowskim/Natalie/pull/48 and https://github.com/krzyzanowskim/Natalie/issues/64 when it's code-ready?
hello, I want merge this change, can you please rebase to current codebase ? :+1: This feature need documentation in README too.
@krzyzanowskim
Here's a proposed fix for https://github.com/krzyzanowskim/Natalie/issues/37, as per phimage's suggestion.
This commit modifies
natalie.swift
so it can take a second argumentimports_file_json
. This JSON file must contain an array of all the framework names to import and that natalie might not be able to autodetect (see original issue).For example, in
natalie-imports.json
:and then:
which will add
import FlatUIKit
right before custom module imports.A couple notes:
natalie-imports.json
to be automatically detected inprojectdir
, but since the documentation says that the path should beprojectdir/projectname
we'd have to go one directory up and that seems a bit hacky.--additional-imports natalie-imports.json
would be best, but I didn't want to add too much code without your approval (since we'd need to hack aroundProcess.argv
)Let me know what you think about this solution and how to possibly improve it.