2

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?

Erik Kaplun
  • 37,128
  • 15
  • 99
  • 111
praba
  • 1,074
  • 3
  • 17
  • 38
  • I have added private framework by click project target--> build phases--> Link Binary with Libraries etc.. after I added the GraphicsServices.framework to target. I copied into framework folder. also I already copied the Headers folders from https://github.com/rpetrich/iphoneheaders.. now the problem is , when I import the GraphicsService the error messages shows "File not Found". kindly some one help me please. – praba Aug 02 '12 at 06:35

2 Answers2

1

Check out the private framework headers: https://github.com/rpetrich/iphoneheaders

enter image description here

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

bitmapdata.com
  • 9,572
  • 5
  • 35
  • 43
  • I have copied headers from github and imported private framework to my project. when I import the method into my my file using #import , it's shows "NO such File or directory" – praba Aug 02 '12 at 06:37
  • 1
    you add a only #import "GSEvent.h" – bitmapdata.com Aug 02 '12 at 06:41
  • 1
    @thanks for quick reply friend, now I have another problem, when I call GSEventLockDevice method in my AppDelegate, I got a error like this, " Undefind Symbol for Architecture i386 : _GSEventLockDevice" do you have any idea about this ? – praba Aug 02 '12 at 07:08
0

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 :)

Rathakrishnan Ramasamy
  • 1,612
  • 2
  • 25
  • 46