[Mono-osx] ObjC library run from Mono always returns null
alex.j.gray23 at gmail.com
Thu Aug 22 04:45:33 UTC 2013
I've got a simple objc library which has 1 static function, return a string,
which will only return null when run from mono.
This is the source code of the library:
@interface DeviceGetter : NSObject
+ (NSString *)test
Which compiles to DeviceGetter.dylib.
I run bmac.exe on the following API definition file
[BaseType (typeof (NSObject))]
public interface DeviceGetter
[Static, Export ("test")]
And then in my final project I reference the compiled definition file and
include the DeviceGetter.dylib in the output directory.
And then as according to Duane in this thread
make changes to AppDelegate as such:
public AppDelegate ()
Type t = typeof(DeviceGetter);
string a = DeviceGetter.test ();
But it never prints "test" as I would expect it to, instead the variable "a"
If anyone can point out what i might be doing wrong that would be greatly
View this message in context: http://mono.1490590.n4.nabble.com/ObjC-library-run-from-Mono-always-returns-null-tp4660618.html
Sent from the Mono - OSX mailing list archive at Nabble.com.
More information about the Mono-osx