Is there any complete documentation (the interface is present in crt_externs.h
) about this functions :
_NSGetArgc
and _NSGetArgv
I can't get any documentation on the apple website about this functions.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- back button text does not change
- iOS (objective-c) compression_decode_buffer() retu
- how to find the index position of the ARRAY Where
相关文章
- 现在使用swift开发ios应用好还是swift?
- TCC __TCCAccessRequest_block_invoke
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- How can I add media attachments to my push notific
- didBeginContact:(SKPhysicsContact *)contact not in
- Custom Marker performance iOS, crash with result “
- Converting (u)int64_t to NSNumbers
As those functions are prefixed with an "_", that's usually a sign that they are private, and not meant to be used by you. If you need to get the command line arguments, a better way to do it would be to look up NSProcessInfo.
You can also access the commandline arguments using
NSUserDefaults
as described in the blogposts by Greg Miller or Alex Rozanski.You basically get an
NSUserDefaults
instance through a call to[NSUserDefaults standardUserDefaults]
and then use messages likeboolForKey:
orstringForKey:
to access the values.The official Apple documentation can be found here.
If all you need to do is get the command line arguments in Cocoa, you can do: