BugsBiteBugs / sqlitepersistentobjects

Automatically exported from code.google.com/p/sqlitepersistentobjects
0 stars 0 forks source link

NSObject may not respond to class name warning #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create a new window-based application in Xcode.
2. Add the sqlitepersistentobjects src directory to the project.
3. Add linsqlite3.0.dylib to the project.
4. Build project for iPhone OS 2.1 (Release or Debug)

What is the expected output? What do you see instead?

When built for the device I get the following warnings from the compiler:
../src/NSObject-SQLitePersistence.m (2 warnings)
    warning: 'NSObject' may not respond to '-className'
    warning: 'NSObject' may not respond to '+className'

When built for the simulator there are no warnings.  I think this would be the 
desired behavior.

What version of the product are you using? On what operating system?

I'm using Xcode 3.1.1 with iPhone 2.1 final SDK and rev. 28 of 
sqlitepersistentobjects.

Original issue reported on code.google.com by doug.pe...@gmail.com on 12 Nov 2008 at 4:48

GoogleCodeExporter commented 9 years ago
You could add a casting to SQLitePersistentObject on every className method 
call.

That's the only way I know to remove warnings

Original comment by mnemonic...@gmail.com on 3 Dec 2008 at 8:54

GoogleCodeExporter commented 9 years ago
A recent change introduced NSObject-ClassName. This should resolve the warning.
Update to the top-of-trunk and if the warning is gone, post a comment so that 
the
issue can be closed.

Original comment by baron.ro...@gmail.com on 22 Jan 2009 at 7:51

GoogleCodeExporter commented 9 years ago
I've gotten the latest from trunk, and the warnings are still there for me.

Original comment by kennethr...@gmail.com on 23 Jan 2009 at 3:47

GoogleCodeExporter commented 9 years ago
I think I can get this resolved.

Original comment by kennethr...@gmail.com on 23 Jan 2009 at 4:39

GoogleCodeExporter commented 9 years ago
Resolved by importing NSObject-ClassName.h in SQLitePersistence.m, so that the 
code is aware that NSObject 
implements the ClassName extension methods.  Warnings are now gone when 
targeting a device, and still builds 
successfully when targeting the simulator.

Original comment by kennethr...@gmail.com on 23 Jan 2009 at 4:47