If you try to build a project in Visual Studio 2010 and you get the following error:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): warning MSB8015: Forcing a rebuild of all source files due to the contents of ".........\Debug\custombuild.command.1.tlog" being invalid.
Don't despair. I tried googling it and came up with a total of 3 (THREE) results in the whole web, two being in Korean. Yikes.
In any case, the solution was rather simple - check line ending inside the project file. If for some reason (due to being committed to SCM incorrectly, or something of similar nature) it has improper line endings, VS2010 will think that you have bad symbols inside build commands and make the build result invalid.
In my case, I had CR-CR-LF line endings - which, after being changed to CR-LF - solved the issue.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you are usings AVPlayer with Asset URLs, you might want to check asset's existence on the device.
If the asset is a file in local folder - no problem, you can use NSFileManager to check for existance? But what if it's inside the iPod library? The following trick wasn't easy to find, but here it is:
So, let's say you have a problem tracking down some pesky retain/autorelease issue in your code. You can use NSZombieEnabled to catch double-releases, but sometimes those happen inside somebody else's code, and it's hard to track it down.
Based on a code I've found in this blog post, I've wrote a template for subclassing somebody else's class to print out the allocation history.
Here's how it looks:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Couple of things I found out that helped porting a QT application to Mac:
The QMainWindow you create does not look like a native Cocoa window. The status bar is there, no matter what you request, the menu doesn't port and the icon is yucky.
Here's what you can do:
Remove status bar/resize grip:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Don't show unneeded icon in the title bar and move a QAction to Mac's main menu:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SIMBL (SIMple Bundle Loader) - pronounced like "symbol" or "cymbal" - enables hacks and plugins. For instance, SIMBL enables PithHelmet to enhance Safari.
So, let's say we have a naughty program that has a behaviour we don't like. How would we treat that problem?
class-dump TargetProgram
Look at the list of classes and note the one that seems to be the issue. Let's call that class Victim.
Inside, find your naughty method, let's call it '- (BOOL) victimMethod;'
Open Info.plist of the victim, and note the bundle name and version
Create new Cocoa bundle in XCode according to the steps on SIMBL site
Fill in the bundle name as stated
Use the following code:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters