How to add my custom struct to a NSArray ?

I try to [myArray addObject:&myStruct] and it doesn't work…
NSArray, NSDictionary stores only non-nil Objective-C object references ! You have to wrap your structure in a class :
@interface MyClass : NSObject
MyStructType _myStruct ;

+ (id)newMyClass:
- (id)initMyClass:
Then you will add object of class MyClass to the NSArray instance.
If you need to insert nil references, replace them by [NSNull null]. Later, when you will retrieve objects from the NSArray or the NSDictionary instance, you can test if the object is of class NSNull with isKindOfClass or isMemberOfClass methods.