With GSCopyPurpleNamedPort(appId) in GraphicsServi

2019-02-03 20:18发布

问题:

I want to send gsevent in IOS7. Which I follow from here:How to find the purple port for the front most application in IOS 5 and above?

I got it working for IOS 4,5,6, now I am working on IOS7 beta. I found out that the private API has been changed. The result of GSCopyPurpleNamedPort(appId) is always 0.

So how do I get the purple port of the current running application for IOS7, anyone has any ideas?

回答1:

Take a look in the console logs, whether it says anything.

Most likely (it's a guess), they protected it with some entitlement and since your application doesn't have it, you will get 0 as result.