Re: Custom Target in Xcode?
Re: Custom Target in Xcode?
- Subject: Re: Custom Target in Xcode?
- From: Jean-Daniel Dupas <email@hidden>
- Date: Mon, 01 Oct 2012 14:12:21 +0200
Le 1 oct. 2012 à 13:47, Roland King <email@hidden> a écrit :
>
> On 1 Oct, 2012, at 7:12 PM, Vyacheslav Karamov <email@hidden> wrote:
>
>> Hi!
>>
>> Why don't you add "Run script" build phase to one of the existing targets?
>> In that bash script do what you want.
>>
>> 01.10.2012 13:44, Roland King пишет:
>>> Is there a way to make a simple custom target in Xcode? In my case the HTML for the webpage for my iOS app uses the same png files the app does, so what I wanted to do was put the HTML into the project and have a custom target which just copies the selected html files to one directory, and the image files I need to another one. Not a very interesting target but it does keep everything about the project in one place. I hoped to just 'archive' that target and have a directory tree I can plop straight on my server.
>>>
>>> I don't want to do this as part of the app build because I don't want the html in the app.
>>>
>
> That has the exact same problem as adding copy files to an existing target (which is what I actually want to do), all the existing targets want to do something like build a library or application and after all the build phases have run they still finish up the task they were expecting to do. So if I start, as I said, with a library target, but remove the library build bit, the target fails because there's no library at the end of it to chown. If I let it build the library and then use a run script to delete it (which I tried), it STILL tries to chown the library after that last script runs and it still fails because I've just deleted the library. As I said I can find no target that basically doesn't do anything and the external build script target, which really actually doesn't do anything, won't let you add run script or copy.
Using an "Aggregate Target" should work.
Add Target -> Other -> Aggregate target. Then you can add custom build steps (script or copy file)
-- Jean-Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden