English.lproj
.
index.html
Put in these headers:<head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <title>AppName Help</title> <meta name="AppleTitle" content="AppName Help"> <meta name="AppleIcon" content="AppName%20Help/images/icon-name.png"> <meta name="AppleFont" content="Lucida Grande,Helvetica,Arial"> <meta name="AppleSearchResultsFont" content="Lucida Grande,Geneva,Arial"> <meta name="robots" content="noindex"> </head>Along with your actual help content.
AppName Help
directory into your XCode project. When Adding, make sure "Copy items into destination group's folder" is unchecked, and select "Create Folder References for any add folders". You wnat XCode to preserve your AppName Help
directory.
<key>CFBundleHelpBookFolder</key> <string>AppName Help</string> <key>CFBundleHelpBookName</key> <string>AppName Help</string>
Set your Versioning System (VERSIONING_SYSTEM) to "apple-generic".
Set your Current Project Version (CURRENT_PROJECT_VERSION) to some floating point value that you'll increment every build. You could just start at 1, unless you already have builds out there with other numbers.
This will generate and build a source file automatically that defines two globals whenever you build your project. One is a double corresponding to CURRENT_PROJECT_VERSION, the other is a string. The file is a derived source file; it won't be added to your project, but it will be built with it.
If you're building a framework, there are other build settings you'll probably want to set as well, such as Current Version (DYLIB_CURRENT_VERSION), Compatibility Version (DYLIB_COMPATIBILITY_VERSION), and VERSION_INFO_PREFIX.
To update the version number, you can use agvtool next-version or agvtool new-version.
/Library/Application Support/Apple/Developer Tools/Project Templates/
and edit the projects there.
(For Project Builder, go to /Developer/ProjectBuilder Extras/Project Templates/
and edit the projects there. The changes will take effect next time you create a new project.)
xcodebuild
is the pbxbuild
equivalent. To get a development build, you'll need to specify the style:% xcodebuild -buildstyle Development
.octest
file of interest:
% find . -name "*.octest" -print ./build/Debug/Tests.octestThen gdb
Tools/otest
:
% gdb /Developer/Tools/otestThen run it with the name of the bundle:
(gdb) run ./build/Debug/Tests.octest
ld: Undefined symbols: .objc_class_name_BWTrackerPluginYou can fix this by adding
-undefined dynamic_lookup
to the "Other Linker Flags" of the Build Tab of the Target Settings for your plugin (whew!). You also need to make sure that the "Mac OS X Deployment Target" is 10.2 or later before using this flag.Here's how Jens cast out that demon. It's two different edits:
To make the TOC section (left side bar) of the developer documentation default to be hidden, do as follows:
Before you begin, make the two files and their parent-folders writable.
In the file....
/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/Resources/CSS/frameset_styles.css
...change the line...
#bodyText { margin-left: 210px; }
...to read...
#bodyText { /* margin-left: 210px; */ margin-left:10px; /* TOC-FIX */ }
...And in the file...
/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/Resources/JavaScript/page.js
...add the following somewhere in initialize_page() function, for instance at the bottom, right before the closing brace...
showHideTOC('hide'); // TOC-FIX
...now you have a much better view!!
Note that you'll need to apply this patch when the docs get upgraded.
Project->New Group
. Give it a name. Note that the hierarchy of files in Xcode is a fantasy of the project, and doesn't necessarily reflect what's actually in the file system.@property (strong, nonatomic) IBOutletCollection(XXLaneView) NSArray *laneViews;
~/Library/Developer/Xcode/Archives
ld: multiple definitions of symbol __ZN13CaptureWidgetD2Ev
/Users/blah/blah/build/./capture.build/Debug/capture.build/Objects-normal/ppc/capturewidget-F17F43C0.o definition of __ZN13CaptureWidgetD2Ev in section (__TEXT,__text)
/Users/blah/blah/build/./capture.build/Debug/capture.build/Objects-normal/ppc/capturewidget-F17F43C0.o definition of __ZN13CaptureWidgetD2Ev in section (__TEXT,__text)
This is especially annoying, because the same object file is listed as having a duplicated symbol. If you take out the file from being compiled, you get undefined symbols for that particular source file, and if you put it back in, you get duplicated symbols.
Turn out the problem is that Xcode (somehow) added the C++ file to the "Build Sources" phase of the target. It happily generated two identical object files, and proceded to link them (hence the error), but doesn't get the reporting information correct (hence saying that both symbols come from the same file)
perl -pi -e 's/MyDocument/BWGraphDocument/g' *.[hm] *.xcodeproj/* *.plist
mv MyDocument.h BWGraphDocument.h
mv MyDocument.m BWGraphDocument.m
mv MyDocument.nib BWGraphDocument.nib
- open the nib file, drag in your document header and change the class of the File's Owner to the new class. Delete the MyDocument type.
translate
to run the powerPC side of the world:
% xcodebuild -configuration Release -target "Test All" -project Tests.xcodeproj NATIVE_ARCH="i386 ppc" % /usr/libexec/oah/translate /Developer/Tools/otest build/Release/Tests.octest
% /Developer/Tools/otest -SenTest ClassName ./build/Debug/TheUnitTest.octest
% /Developer/Tools/otest path/to/build/Unittest/TheUnit Test.octest
compile sources
build phase. If you get info on the source file in other places in Xcode, there's no build tab, and you're left with that "Am I crazy? I know I've seen that setting somewhere before, but where is it? I better go back to listening to Finnish polkas 24/7 and give up this software thing" kind of feeling.% defaults write com.apple.dt.Xcode DVTTextBeepOnNonMatchingBrace -bool NO
(In Project Builder, open the Targets tab, double-click the target, go to the "Build Settings" tab, scroll down to Build Settings, look for WARNING_CFLAGS
. Edit that, and add -Werror
to what's already there.)
% defaults write com.apple.Xcode XCShowUndoPastSaveWarning NO
% cd '/Library/Application Support/Apple/Developer Tools/Project Templates' % find . -name "*.pbxproj" -exec perl -pi -e "s/ZERO_LINK = YES/ZERO_LINK = NO/g" {} \; -print
blah.M
(upper case M
), or name your source file blah.mm
(two lower case M
s). It's best to use .mm
because of the case-insensitive (yet case-preserving) nature of HFS+/Library/Application Support/Apple/Developer Tools/Project Templates/
for the templates for its projects. You can put your own project templates here, and tweak the existing templates (for instance, Xcode 1.1's Cocoa projects have a compiler warning in main.m
, which is really annoying for those of use who treat warnings as errors. You can go into /Library/Application Support/Apple/Developer Tools/Project Templates/Application/Cocoa Application/
and fix that warning if you wish.
This
% cd '/Library/Application Support/Apple/Developer Tools/Project Templates' % find . -name "*.pbxproj" -exec perl -pi -e "s/ZERO_LINK = YES/ZERO_LINK = NO/g" {} \; -print
// // TapDance.h // Groovilicous // // Created by markd on 7/25/08. // Copyright 2008 __MyCompanyName__. All rights reserved. //With the __MyCompanyName__ placeholder. There is no UI to change this, for obvious reasons. (Why would anyone want to easily and conveniently change something they'll otherwise need to edit in each and every source file they create. That's unpossible). The obvious solution is to drop to the terminal and run the straightforward command:
% defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{"ORGANIZATIONNAME" = "Borkware";}'Seemple, no? Zee trick, she is doone.
/usr/include
Here's an easy way to fix this:
% xcode-select --install
This will kick off a download of the tools, and install them.
This advice brought to you by a DTS incident.
You can work around it by setting this environment variable pair in your Run/Arguments scheme thing:
OS_ACTIVITY_MODE=disable
-Xanalyzer -analyzer-disable-all-checksIf you do this you should feel bad. I did this, and I feel bad.
% defaults write com.apple.dt.xcode IDEIndexingClangInvocationLogLevel 3
% defaults write com.apple.dt.Xcode IDEDisableStructureEditingCoordinator -bool YES
% defaults write com.apple.dt.Xcode DVTTextShowMatchingBrace -bool NOI <3 Zach Waldowski for this tidbit.
XCTAssertNil (expression, ...) XCTAssertNotNil (expression, ...) XCTAssert (expression, ...) XCTAssertTrue (expression, ...) XCTAssertFalse (expression, ...) XCTAssertEqualObjects (expression1, expression2, ...) XCTAssertNotEqualObjects (expression1, expression2, ...) XCTAssertEqual (expression1, expression2, ...) XCTAssertNotEqual (expression1, expression2, ...) XCTAssertEqualWithAccuracy (expression1, expression2, accuracy, ...) XCTAssertNotEqualWithAccuracy (expression1, expression2, accuracy, ...) XCTAssertGreaterThan (expression1, expression2, ...) XCTAssertGreaterThanOrEqual (expression1, expression2, ...) XCTAssertLessThan (expression1, expression2, ...) XCTAssertLessThanOrEqual (expression1, expression2, ...) XCTAssertThrows (expression, ...) XCTAssertThrowsSpecific (expression, exception_class, ...) XCTAssertThrowsSpecificNamed (expression, exception_class, exception_name, ...) XCTAssertNoThrow (expression, ...) XCTAssertNoThrowSpecific (expression, exception_class, ...) XCTAssertNoThrowSpecificNamed (expression, exception_class, exception_name, ...)