Is it possible to see variable states in native iPhone apps?
For example, if upon launching my app I wanted to see who the current caller was or what the latest SMS message was from "Phone" or "Messages",开发者_运维知识库 are there classes available that can access information at this level?
This may be a system security/stability/scoping issue that Apple wants to avoid, but it's worth a try.
You're assumptions are correct, this is not currently allowed, nor do I think it ever will be.
I believe their reasoning for this is so developers cannot access personal information like phone numbers and addresses and exploit them.
You can send mail and SMS messages from with the app, and you can see the current call state.
Your hunch is right, that it's a system security issue. Apple does not give access to such information, since it's definitely a breach of privacy. Sorry.
精彩评论