Warning: Creating default object from empty value in /www/htdocs/harmless/hscs.php on line 239
harmless Cocoa: Projects updated
Projects updated 2011-09-08 19:44:41
I just updated almost all projects to work with Lion and Xcode 4.
Apart from updating the project files I also fixed some memory management bugs, some syntactic issues with the static analyzer and a few logic errors. In some cases I also made changes to the API. So in case you use any of these projects, I recommend downloading the new versions and adapting your code.
von Andreas www.harmless.de

> I tried compiling your AMSerialPort Example but it won't build
I guess you downloaded the archive from the Cocoa code page? I'm afraid that's not up to date. Instead get the current version from sourceforge at http://sourceforge.net/projects/amserial/
I'll fix the download link to point to the sourceforge archive.
Sorry for the confusion.

von Christoph

Hello Andreas,

I tried compiling your AMSerialPort Example but it won't build on my 27" mid 2009 i7 iMac running 10.7.3.

I am getting:
The run destination My Mac 64-bit is not valid for Running the scheme 'AMSerialTest'.
The scheme 'AMSerialTest' contains no buildables that can be built for the SDKs supported by the run destination My Mac 64-bit. Make sure your targets all specify SDKs that are supported by this version of Xcode.

Any ideas?


von Ivan

Hello Andreas. I have a project with ARC and currently trying to include AMSerialPort. Can you provide ARC version or should I use second option you mentioned?

von Andreas www.harmless.de

Since ARC does only apply to Objective-C objects and everything else is the same as with manual memory management, I think the __strong specifier has no use in this case. Those memory blocks have to be explicitly freed in dealloc under ARC.

Another option would be to just compile AMSerial without ARC. You can add compiler flags to any file in the target's Build Phases settings under Compile Sources. I'm working on a version compatible with ARC at the moment, so if you can wait a few days, that might be the easiest solution.

von Axel Roest phlux.us

I'm trying to use the AMSerialPort in a project with ARC. It works fine, but I get lots of warnings from Clang about the __strong keyword in AMSerialPort.h. Clang seems to think "strong" is exclusive for Objective C types and not C structs.

A way around this is to surround the code with

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wall"


#pragma clang diagnostic pop

But maybe the __strong keyword is superfluous here? I'm not that familiar with strong C types.

Name:  Passwort: (1)
Email: (2)
Webseite: (3)
Obige Zeichen eingeben: (Groß-/Kleinschreibung egal)

1) Bitte geben Sie möglichst Ihren echten Namen an. (Momentan gibt es keine Möglichkeit, einen festen Account anzulegen.)

2) Ihre Email-Adresse wird nie veröffentlicht werden. Die Angabe ermöglicht mir, Sie ggf. zu kontaktieren.

3) Die Adresse Ihrer Webseite wird zusammen mit Ihrem Namen veröffentlicht. Bitte kurz halten.

Ich behalte mir das Recht vor, Beiträge aus beliebigen Gründen zu löschen.
Also bitte keinen SPAM posten, beim Thema bleiben, nicht unverschämt werden, etc.