Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't run iOS app on simulator in Xcode 10.2

In Xcode 10.2 I can no longer run my app on a simulator with thread sanitizer enabled. I get the error

This app could not be installed at this time.

WatchKit v3 app has disallowed Info.plist key: NSBuiltWithThreadSanitizer

My app includes a watch app and a lot of frameworks (some for watch, some for iOS), but I get this error when trying to run my main app on a simulator. I checked my plist files and confirmed that this is not a key I specified anywhere.

When I check the plist files in DerivedData, I see that indeed all of the plists for my watch OS frameworks have this key. But the only way I can find to remove the flag is to disable thread sanitizer completely. How do I disable it just for the watch and not my main app?

like image 986
Max Avatar asked Apr 23 '19 19:04

Max


People also ask

How do I run an app in Xcode simulator?

The basic way to open a list of simulators is to use Xcode -> Window -> Devices and Simulators. Here you can create and manage all available simulators. But you cannot run them directly. You need to build your application on the simulator, and then you can run it.

How do I open iOS app in simulator?

Select a Simulated Device For iOS, tvOS, and watchOS apps, you can choose a simulated device, under [Platform] Simulators, from the run destination menu next to the scheme menu in the toolbar.

How do I enable simulator in Xcode?

Open Xcode and click Menu > Xcode > Preferences > Select Components, and then choose the simulator version you want to download.


Video Answer


1 Answers

Depending on what your use case is, another workaround is to remove the watch target from your main app temporarily: Prevent deploying (disable) WatchKit App with iOS iPhone App in Xcode (remove from Project File settings, Build Phase -> Target Dependencies, and Build Phase -> Embed Watch Content)

You can quickly restore this with version control after your debugging session.

like image 74
J. Song Avatar answered Oct 15 '22 04:10

J. Song