I've just discovered, via the Objective Flickr API, that you can add projects into xcode as secondary libraries for your own project. It's very nifty, and it's finally let me get on top of the Flickr stuff I wanted to do.
Problemo! I need to bung this stuff into version control. Presumably the .proj file is what keeps a record of these references and libraries? Is that what I need to commit to make sure other people working on this project get the libraries? Additionally, in the past, committing the .proj file has conflicted very badly with other people. Is there a good way of doing it? Should it be done at all?
If you mean the .xcodeproj file, then yes, you should commit that to version control. It'll contain all the file references and settings that someone else needs to compile the project.
Related
I'd like to know if it is possible to get a list of the frameworks being used in an Objective-C project.
Perhaps there's some way to access XCode's "Build Phases"? Doesn't matter if it's some obscure method not advised by Apple, I'm trying to make an XCode plugin.
Thanks
I haven't written a Xcode plugin (yet), but is there a way for you to use terminal commands? If this is possible you could open the projects build path and simply use
ls *.framework
They should also be linked in the .xcodeproj file.
Using Xcode4.2.1, with a basic PhoneGap template based app. (I say template, but I cant find it now :( - PhoneGap is a static framework).
The app works ok on its own.
Now trying to add in AdWhirl. AdWhirl comes as source files - no library of its own, although there are libraries for the specific ad services you use.
I have added the folders to the project, but it does not seem to compile the AdWhirl sources - if amend/break the AdWhirl code, I get no compile errors.
Where I have included/imported the AdWhirl headers into my app, I had to tweak the related imports in AdWhirl files to find their dependancies - seems to be related to issue above.
I can get it compiling with that hack - but then fails to link - missing AdWhirlView, which also seems to be due to first issue - not being compiled, so not available to link.
Under build phases/compile sources, I have just 2 items: main.m and AppDelegate.m - do I need to add the AdWhirl code into here?
Here is a sample project with just the AdWhirl stuff, no PhoneGap, but still has the issue :(
Thanks in advance for any tips/pointers.
Just wanted to post the answer here that I gave on Twitter. Seems like the issue is that Xcode is unhappy with folder references. Try reimporting the AdWhirl files into your project, but tell Xcode to add groups for folders, rather than folder references. (Incidentally, if anyone knows why Xcode is choking on the folder references, I'd love to hear about it.)
Then, you'll start getting errors about ARC and missing files pertaining to the Google Ads framework. So, you'll have to add the Google Ads files to quell the errors; then, you'll want to make sure ARC is disabled in your project. If you want to use ARC, then your best bet is to repackage AdWhirl as a static library that builds without ARC, and have that as a dependency in your workspace.
I am trying to import one of my xcode projects into another, and I was just wondering if there were some best practices for this task, or if anyone has any advice how to make this happen?
Thanks.
Not sure exactly what you mean by import.
If you want to do a framework then you'll want this.
Framework Docs
If you want to do a shared library then you'll want this.
Shared Libs
Just click on .xcodeproj file and it will be automatically opened in whatever version of xcode installed in your system and if the project was created in an older version just click on "Modernise Project" which you can find at the bottom of your xcode and xcode will take care of the rest.
I am following this tut
http://monoclestudios.com/cocos2d_whitepaper.html
to integrate coco2sd. I have created a project, modified the sources, added external directory to project, delete some files within and added coco2sd to proect as they requested.
There are a lot more to do by hands.
If I had to do it again oh my, so is there a tool to automate ?
It is possible — although not exactly easy - to add your own new project templates to Xcode.
I'm developing an "installation" like cocoa application wich needs to take care of some http request, some file system reading, copying files to /usr/share, set up cron (not launchd) and ask some information to user.
I discarded PackageMaker since I need more flexibility.
Currently everything is going well, but on my last installation step, I need to:
Delete my previously installed application folder (if exists). It's always the same path: /usr/share/MY_APP
Create again the application folder at: /usr/share/MY_APP
Copy application files to /usr/share/MY_APP
Update a cron job
It's very important that /usr/share/MY_APP keeps protected with administrative privileges, so a regular shouldn't delete it.
What would be the best approach to implement those steps?
BTW, I'm using Xcode 3.2.
Thanks a lot!
Carlos.
Between the preflight script, the postflight script, and perhaps an Installer plug-in for the custom UI, I see no reason why you can't do all of this in PackageMaker.
Note: “Installer plug-in” is a little misleading. The user does not have to install the plug-in somewhere as a separate step; you include the plug-in inside your package, and Installer will use it from there.
The relevant document is a ReadMe file in a sample code project. There's also an Installer plug-in project template in Xcode since 2.0.
Also, an Installer plug-in won't get used if the user does a command-line installation. Of course, they can't install from the command line at all (which includes remote installation onto an office or lab full of machines) if you write your own custom installer.
By the way: Why /usr/share? What are you putting there? There may be a better way to do what you're really trying to accomplish.