0

I've got an iOS app that needs to run efficiently and accurately. There's a lot of parameters involved in the code and different combinations of them provide varying results of success. So I plan to write a genetic algorithm to go ahead and find some good parameter sets for me. While I could do this using Objective-C directly in Xcode, I would complete this task much faster and enjoy it more writing the genetic algorithm part in Python. Is there any good way to control Xcode through Python? As in, be able to execute the simulator/device app through Xcode and get feedback from it using external code? I know a keyboard macro would be possible, but that approach would probably be a bit clumsy. If there's some way to directly control it programmatically, that would be great. Thanks!

Jenny Shoars
  • 994
  • 3
  • 16
  • 40
  • You can use [xcodebuild](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html) to build projects from the command line. You can integrate that into your python code. – DrummerB Mar 28 '14 at 14:08

1 Answers1

0

Your question is not very clear. Do you want to control Xcode to run your app ? Do you want to be able to change anything like flags automatically ?

If you want to control Xcode by writing code explaining what to do or even where to clic you can write an AppleScript

Maybe also take a look at this post

But if your question is about performing automatic UI tests maybe see UIAutomation, Calabash or MonkeyTalk

Community
  • 1
  • 1
FlavienSi
  • 156
  • 4