Xcode7 | Xcode UI Tests | How to handle location service alert?

Xcode 9 let springboard = XCUIApplication(bundleIdentifier: “com.apple.springboard”) let allowBtn = springboard.buttons[“Allow”] if allowBtn.exists { allowBtn.tap() } Xcode 8.3.3 _ = addUIInterruptionMonitor(withDescription: “Location Dialog”) { (alert) -> Bool in alert.buttons[“Allow”].tap() return true } app.buttons[“Request Location”].tap() app.tap() // need to interact with the app for the handler to fire Note that it is a bit different as … Read more

XCode 7: Launch screens may not set custom classnames

Note that the launch screen is not a fully customizable view controller. You cannot specify a custom class name in the storyboard and expect the system to give you the option to execute code at this stage by calling viewDidLoad. Remember, the app hasn’t launched yet. Launch Screen Constraints The system loads the launch screen … Read more

This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes

Do not change UI from anything but the main thread. While it may appear to work on some OS or devices and not others, it is bound to make your application unstable, and crash unpredictably. If you must respond to a notification, which can happen in the background, then ensure UIKit invocation takes place on … Read more

XCode 7. iOS simulators missing and not installable

One possible issue is that there may be old leftover simulators installed, which are not compatible with the new XCode, and their presence causes the whole Simulator to fail. To get rid of them, delete the simulators in /Library/Developer/CoreSimulator/Profiles/Runtimes (for me there was an iOS 7 simulator there which was the issue). Relaunch XCode after … Read more

Xcode 7 warnings: object file was built for newer iOS version than being linked

It actually means that the Minimum Deployment Target of the included library was is to 8.3 and linking it with lower Minimum Deployment Target produces this warning. Library does not officially support targets lower than 8.3 in this case. While linking this library to target with ower Minimum Deployment Target will still work, it might … Read more

tech