Originate / OriginateTheme

OriginateTheme is a lightweight user interface theming framework.
MIT License
5 stars 0 forks source link

Compilation Fails When Compiling for the First Time #14

Closed pkluz closed 7 years ago

pkluz commented 7 years ago

@allewun @chhaylatte When compiling a project that includes OriginateTheme for the first time, compilation tends to fail despite the Run Script phase being executed before the Compile Sources phase. Is the list of sources to compile not being updated correctly and working off of stale data perhaps?

chhaylatte commented 7 years ago

I think the run script is run after the sources in cocoa pods are already built. So when it goes to compile, it won't reflect the changes done by the script. I can't figure out how to get the script to run just before the pods are built. Alternatively maybe the cocoapods post_install hook can work? I don't know if the script can be called from there properly though.

allewun commented 7 years ago

I'm tackling this now, I'm removing the prepare_command from the Podspec, I don't think that's the right tool for the job.

allewun commented 7 years ago

Sorry, probably should've mentioned that I started looking into this. FYI, yeah I'm moving to a post_install hook. There might be some rough edges though, we'll see...

chhaylatte commented 7 years ago

I found another way to do this and it's stupidly simple. We can actually edit the scheme and add a pre-action to build to run our script...

screen shot 2016-11-30 at 4 03 44 pm
pkluz commented 7 years ago

Can this be automated such that all the end-user needs to do is to run pod install?

chhaylatte commented 7 years ago

The post install may be able to do this. There's the xcodeproj gem that lets us edit the proj file. I'm not efficient enough with ruby though. Maybe @allewun knows?

allewun commented 7 years ago

@chhaylatte ha.. let me digest this for a second. In the meantime, have a look at #17

allewun commented 7 years ago

Closed via #17