Apple's caution in its documentation of + (NSMethodSignature *)signatureWithObjCTypes:(const char *)types

StackOverflow https://stackoverflow.com/questions/4229393

  •  26-09-2019
  •  | 
  •  

Question

In Apple's documentation of this method, it says the following at the end:

Special Considerations

This method, available since Mac OS X v10.0, is exposed in Mac OS X v10.5. Only type encoding strings of the style of the runtime that the application is running against are supported. In exposing this method there is no commitment to binary compatibily supporting any "old-style" type encoding strings after such changes occur.

It is your responsibility to pass in type strings which are either from the current runtime data or match the style of type string in use by the runtime that the application is running on.

I'm afraid I didn't understand that. Can anyone explain?

What I really want to know is this: If I write an iOS app that uses this method, are they saying it might break on me at some later time, if Apple changes the way it does something?

I am using Cocoa . . .

Was it helpful?

Solution

What I really want to know is this: If I write an iOS app that uses this method, are they saying it might break on me at some later time, if Apple changes the way it does something?

Yes. They are saying that they might change the format of the type encoding strings (the argument of the method) in future versions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top