I am new in Xcode. From the "Targets" in Xcode, I could see that there is a Tab called "Build Rules".
I wonder what is this tab does?
Thanks
To my understanding under the Tab 'Build rules' you can automate any behaviour you would like the compiler to do when compiling a file. Xcode has standard rules when compiling, with Build Rules you can add a rule to that.
Personally I am quite new to Xcode as well and didn't know about build rules too. I found this information that helped me understand it better, maybe that is any help to you. If anyone with more experience with Xcode has a better answer, please correct me as I'm still learning Xcode too.
You can use "build rules" to say: hey XCode, with files matching pattern (your pattern), do the following: (your instructions)
For example, you can use that to specify that all Ruby files ('*.rb') that happened in your source (don't ask how) should be executed during build process.
Related
After finding a number of articles that describe using Apple's Swift for scripting purposes, I wanted to try my hand at it. I want to do some simple scripts that perform actions on the file system: moving things around, renaming things, and so on.
My preferred text editor is Sublime, and while there is a package for Swift syntax, you obviously don't get any kind of autocomplete. Alternatively, I could use Xcode, which historically has had awesome autocomplete. From the command-line, I can type open myFile.swift to pop open an Xcode editor window for that file.
However, when I do this there's no autocomplete. I fear that I need to have a whole Xcode project set up with a build target, etc. to get autocomplete going...is this the case?
Does anyone know a simple way to get Swift autocomplete in Xcode (or Sublime) for scripting purposes? Thanks!
You should try using a playground in XCode if you don't need to reference other files. This lets you perform some basic debug as well.
After checking the help command with swift package --help I noticed about the generate-xcodeproj subcommand:
generate-xcodeproj Generates an Xcode project
So, you can generate an Xcode project doing swift package generate-xcodeproj and benefit the awesome autocompletion that Xcode gives you, even using dependencies.
Just generate and open the project file. Resolving new package dependencies will not update the project, so you need to rerun the generate-xcodeproj command on every dependencies change.
I'm implementing ObjectiveFlickr into my project and I'm very VERY new to all of this (C language and Xcode included).
I managed to fix a few compile errors and I'm down to this one that just popped up after I added some supporting files to get rid of the other errors:
systemconfiguration/systemconfiguration.h file not found
I have no idea what this means and have done much searching online before posting here, but the only resolution to another poster's issue was to re-install Xcode. I'm sort of doubting that will solve this problem as I've had no issue with Xcode up until this error.
Can anyone spare a tip or two in layman's terms to help me get past this? I've been searching for 24 hours and the only link to the Apple Developer forums isn't working, go figure.
Any help is appreciated. Thanks in advance.
XCode can be very picky about where to look at in terms of header files.
If you got yourself a .framework folder, then click in your project, choose "Build Settings", then look for one called "Header Search Paths". Put the framework's path in there, and change the box on the right from "non-recursive" to "recursive". This should get the build going, and works for almost all third-party libraries.
If, on the other hand, you're trying to compile the library with your app, double-check to see if you didn't forgot to include some file in your XCode project, or if it is not marked for compilation in the project settings (.h files do not count, but maybe the source of your problem are some extra .c or .m that shouldn't be there).
If all else fails, since XCode projects compile into a "flat" directory tree, you could try removing the folder indicator from the #include: from "systemconfiguration/systemconfiguration.h" to "systemconfiguration.h", from the files where the .h is called. This worked in some cases of mine.
There is a framework in iOS called "Systemconfiguration.framework". Add it may help a lot.
Hope this may help you.
I had blanks for some reason in my code around the header decaration
#import < SystemConfiguration/SystemConfiguration.h >
I removed them and it worked.
I just downloaded and compiled Pantomime for SMTP use in my Cocoa Application. The first issue was that it is old... so I changed the build settings to use the most recent SDK as well as eliminate the old PPC build settings.
After those changes, everything compiled nicely (or at least appeared to do so.)
Next, I installed the Pantomime.framework into the /Library/Frameworks directory per Apple documentation recommendations.
Then, I imported the framework into my project under the Build Phases tab where it says "Link Binaries to Libraries".
So far everything seemed to work as it did with WebKit.framework, and ScriptingBridge.framework.
Finally, I added the following to my code:
#import <Pantomime/Pantomime.h>
I got as far as "Pa" when it auto completed the rest, so it apparently knows what I'm looking for. However, when I try to compile my code, I receive the following error:
Lexical or Preprocessor Issue "Pantomime/Pantomime.h" file not found.
All of the other frameworks seemed to work, but this one does not, and I really don't know why (I'm relatively new to working with frameworks.)
Anyone have any ideas on what I'm doing wrong here?
Thanks!
I've never used Pantomime, but this happens to me all the time with Xcode, so although I'm a newbie to development in general I'd wager it's just a bug with Xcode. Here's how I fix it:
In Xcode, hit command-1 to switch to the Navigator's file/folder view.
Reveal the Pantomime.h and .m files in the Finder, wherever you've stored them.
Drag them into the Navigator.
Xcode will prompt you to confirm adding again, and I usually leave it set as is to "copy files if needed".
Xcode will import. You should then delete the old references in the Navigator. It should work fine after that.
I have met this problem.
The solution is setting 'Build Settings' --> 'Header Search Path' Value where your pantomime is. Good luck!
I've tried to use MonoDevelop 2.4 and 2.6 with Ubuntu 11.04, but neither of them seems to actually provide any way of running the project. (As the picture shows, the Run, Step, and Debug items are disabled -- both on the toolbar and inside the menus.)
This is true for all project types I've seen so far -- C#, Python, etc...
But mono-debugger is installed. Is there some post-setup task that I need to do manually, for this to work?
Looking over https://github.com/mono/monodevelop/blob/master/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
Perhaps you haven't selected a 'Project'? Open up the Solution pad and click on the Test1 project (not the solution at the root of the tree, but the project just below it).
I'm just guessing here since I don't have Ubuntu and can't actually test anything.
Edit: actually, it looks like clicking on the Solution would work as well.
From looking at the code, another possibility is that you don't have a build target? Not sure how that would happen, but unless you only opened Main.cs and not actually Test1.sln, I don't know what to suggest.
When you opened the project, which file did you open? Test1.sln? Test1.csproj? Or Main.cs?
Try looking for mono-mdb and more packages in synaptic, this may fix this issue.
Don't remember exact names, Linux box at home...
Did you really open the project? It looks like you just opened Main.cs. It won't work that way.
Make sure you installed the compilers (mcs etc)
Is there any documentation available on how to write plugins for the xcode? I have googled the subject but i was not able to find any reasonable answer, so i was wondering if someone here knows the resources which can help.
In general i am looking for how i can create "Project Templates" for different kind of languages or framework. In other words creating "Custom Project Templates".
"No" is an answer, whether you like it or not. Apple doesn't document this.
You can create project templates without needing a plug-in. Just look in /Library/Application Support/Developer/Shared/Xcode/Project Templates/ and follow the same format (you can add yours in your user’s app support directory).
http://maxao.free.fr/xcode-plugin-interface/
Maybe…but not from Apple.
You could alternatively write an AppleScript, perl, python or bash script that can be executed from Xcode.
The scripts are listed in the Script menu (between Window and Help), which also offers a script editor ("Edit User Scripts...").
You can use this template which is a well researched one available in the market.
http://www.binpress.com/app/ios-boilerplate-and-template/1597