Adding iOS UI Testing

How do you add iOS UI Testing to your app and version it? I was thinking of adding them with hooks, but I am not sure how to do it, since the tests change some iOS files, such as platforms/ios/integration.xcodeproj/project.pbxproj