Reputation: 4174
I originally found this problem in the Xcode beta when I converted an existing iOS app/ WatchKit app from Swift 1.x/WatchKit 1.x to Swift 2.0 / WatchKit 2.0 (beta). The general problem: When running the WatchKit App in the simulator the IBAction functions don't get called for MenuItems. Just had the problem on Xcode 7 beta 4.
Steps to Reproduce:
Expected Results: I would expect the IBActions to get called.
Actual Results: No IBAction breakpoints were hit nor were IBAction print() statements activated.
Version: Version 7.0 beta 3 (7A152u)
I searched the forums at developer.apple.com as well as StackOverflow and found no mention of this problem, nor was it in the release notes.
Upvotes: 1
Views: 634
Reputation: 4174
Well, it turns out that the "problem" has a "workaround". First, I'm running on a 2010 MacBook Pro. In Xcode 6.x, the "force touch" in the simulator is done using a sustained "true click" (even if you have single-tap click enabled for the track-pad, to get force touch you must actually activate the touch pad press). Shallow touch can be initiated by a tap or a short "true click" on the trackpad.
On the Xcode 7 betas, the behavior of the watch simulator no longer follows this paradigm; presumably because they take advantage of force touch on the newer Mac laptops. Instead, to test the menus on the new Xcode 7 beta simulator, you must perform the following actions on a non-force-touch Mac:
Note that single-tap touching doesn't work for any of these actions, even if enabled in the trackpad preferences. Also note that the visual feedback when you inadvertently use a "Deep Press" to attempt to select a menu; it looks almost like you've selected it!
Upvotes: 5