Objective c access another ios app -
i have 2 apps written objective c. have ios 8 jailbroken device. can information view of application?
can access self.view of other app? want send clicks command (touch inside) button in other applications? possible?
i have, ios 8, jailbreak device, xcode 6.3. i'm sorry bad english.
no need jailbrake.
here quick can try open , click button in 2nd app.
use url schemes open app app.
in 2nd app in plist in url types\item\url schemes\item0 add string my2ndapp
to open 2nd app 1st app use:
[[uiapplication sharedapplication] openurl:[nsurl urlwithstring:@"my2ndapp://somedata"]];
so url: my2ndapp://somestring - open 2nd app , run method in appdelegate:
(bool)application:(uiapplication *)application handleopenurl:(nsurl *)url { //do url if need to, can use tell yuor 2nd app different things openedfromurl=yes;//set bool flag, add bool var in .h of appdelegate return yes; }
then in same appdelegate in method
-(void)applicationdidbecomeactive:(uiapplication*)application{ if(!openedfromurl){return;} //run method viewcontroller want, import in .m , add in .h of appdelegate myviewcontroller * myvc = [[myviewcontroller alloc]init]; [myvc mymethodhere]; openedfromurl=no;//drop flag }
you can go particular view or viewcontroller , run method associated button touch inside event
similarly, can make 2nd app interact 1st 1 too.
Comments
Post a Comment