问题
actually I need to lock my iPhone programmatically, I have searched in the internet, also got some ideas, that is, using GraphicsServices.framework
and GSEventLockDevices()
method.. here is the thing: how can I add a private framework to my project? I knew it's jailbreaking, but no problem.
Could anyone help me to add a private framework to Xcode and lock the device programmatically?
回答1:
If you missed to import certain framework means, you may get like this kind of error.. When I met like this kind of problem, i have followed this way..
1) Select the project in the project navigation window which will show project summary on right
2) Select 4th tab build phases
3) Select Link binary with library option
4) Add framework for which you are getting
5) Move the framework from main folder to the frameworks folder
6) Build it again and errors are gone.
Hope this helps :)
回答2:
Check out the private framework headers: https://github.com/rpetrich/iphoneheaders
First copy a Private Frameworks Your Project. and add a #import "GSEvent.h"
GSEvent Header already in your project. So, as a relative path must be
来源:https://stackoverflow.com/questions/11771948/add-graphicsservices-private-framework-into-ios