- Find application/daemon that uses API you're interested in and hook method/function calls with CydiaSubstrate or theos/logos. That way you can
NSLog
argument types. - Disassembling. You will not find exact argument types but there may be some clues like which methods are called on argument (like
writeToFile:atomically:
in your case), where arguments are passed later etc. - Find someone elses code that uses the APIs.
That's about it. Of course, you can guess arguments types like you did but that will probably take longer. In some cases you will not be that lucky to get exception. Application will just crash with segmentation fault which is pretty much useless. Even crash log may not give you much information. It's especially difficult in case of C functions like CoreTelephony APIs or C++ classes. Many APIs expect pointers to CoreFoundation objects, C structures, some internal objects. Wrong argument - segmantation fault. In these cases only disassembly will help you.