What is __NSArrayI and __NSArrayM? How to convert to NSArray?

Solution 1:

__NSArrayI is a code-word for an immutable array - that is, a "regular" NSArray which you cannot change.

__NSArrayM is a code-word for a mutable array - that is, NSMutableArray. In NSMutableArray, you can add and remove items.

Solution 2:

These are classes of the private api. There is a project where you can see all classes of the private api. You are not allowed to use them inside an app for the app store but sometimes it is useful too see how to access the objects and also what kind of object it is. They cannot be converted. I think, getting these kind of objects inside the debugger is just the representation of internal classes, for the classes you are using inside your project. Knowing what kind of class it is, lets you also understand where to look for the problem inside your code.

Here you can see a short lookup of both:

__NSArrayI

enter image description here

__NSArrayM

enter image description here