I am currently creating ios bindings for the EDQueue library .
The Structs.cs file looks something like this:
using System; using ObjCRuntime; namespace EDQueue {
The ApiDefinition.cs file looks something like this:
using System; using Foundation; using ObjCRuntime; namespace EDQueue { // typedef void (^EDQueueCompletionBlock)(EDQueueResult); delegate void EDQueueCompletionBlock(EDQueueResult result); // ETC.... // @protocol EDQueueDelegate <NSObject> [Protocol, Model] [BaseType(typeof(NSObject))] interface EDQueueDelegate { // @optional -(EDQueueResult)queue:(EDQueue *)queue processJob:(NSDictionary *)job; [Export("queue:processJob:")] EDQueueResult Queue(EDQueue queue, NSDictionary job); //// @optional -(void)queue:(EDQueue *)queue processJob:(NSDictionary *)job completion:(EDQueueCompletionBlock)block; //[Export("queue:processJob:completion:")] //void Queue(EDQueue queue, NSDictionary job, EDQueueCompletionBlock completeBlock); } // ETC... }
As written, the following error occurs: Error CS0426: the type name "EDQueueResult" does not exist in the type "EDQueue" (CS0426) (EDQueue) in the file EDQueueDelegate.g.cs
This file looks like this when an error occurs:
// // Auto-generated from generator.cs, do not edit // // We keep references to objects, so warning 414 is expected
However, if I delete or comment on the [Protocol, Model] bit, the library builds without errors.
I also get a similar error if I uncomment the second function using EDQueueCompletionBlock , which ultimately relies on an EDQueueResult enumeration.
The assembly action of the Structs.cs file Structs.cs set to ObjcBindingCoreSource .
Any help really appreciated. Thanks!