3

I want to remove Apple Watchkit from my App until the new version of IOS is released. This is so I can upload releases of the App until we can upload Watchkit based Apps.

I deleted the 2 Folders:

  • Twoater WatchKit Extension
  • Twoater Watchkit App

I then deleted the two Targets of the same name.

I built the App successfully.

I then tried to run the simulator and got a LaunchError = 0.

So something somewhere is not correct.

Did I remove the Watchkit in the correct way or is there a better way of doing it to ensure that all config files are properly adjusted ?

Shows the Folders and Targets I wish to remove

Jano
  • 60,366
  • 20
  • 152
  • 174
Guy
  • 261
  • 2
  • 14
  • Luanch error = 0 is quite common and might be fixable simply by closing the simulator and trying again – Jack Feb 09 '15 at 19:25

1 Answers1

2

What you're doing is quite a bit overboard.

You should just create two separate schemes: one which includes the WatchKit App Extension and App (for testing for iOS 8.2) and one that doesn't include it (for testing with iOS 8.1 and submitting to the store).

You'll need to provide more details on your error running in the sim. See An error was encountered while running (Domain = LaunchServicesError, Code = 0)

Community
  • 1
  • 1
Jeremy Huddleston Sequoia
  • 21,715
  • 5
  • 69
  • 82
  • Thanks a lot for this suggestion. I am new to schemes and so have done some testing to see how it works and it looks like it works perfectly. The only question I have (which you touch on in your comment) is : - when I build the App using the Scheme that does not include the Watchkit, how do I know it is running on the correct IOS. The reason I ask is that when I build and run this version thru the simulator the simulator pulls up the Watchkit simulator as well (but does nothing with it so it is actually not running) Thanks – Guy Feb 10 '15 at 08:13
  • Is what? Don't leave me hanging. ;) – Jeremy Huddleston Sequoia Feb 10 '15 at 08:16
  • It will run on whatever device you install it to (in the run destination menu). You can install older versions of iOS to test backwards compatibility. The fact that you see a black watch window indicates that your simulated device is iOS 8.2 and you are testing the watchkit-free version of your app. You can disable the watch from the Hardware -> External displays menu. – Jeremy Huddleston Sequoia Feb 10 '15 at 08:20
  • OK great that all makes sense - thanks. So if I build the non-Watchkit version, upload it to iTunes Connect TestFlight, download it to my IOS 8.1 phone, it should work just fine. – Guy Feb 10 '15 at 08:31
  • What I did in the end : - I tried to use schemes but when I tried to load the non-Watchkit build up to iTunes Connect, it didn't recognise the provisioning profile and so I gave up, although I am sure this is probably the best way to do it. - I deleted xCode Beta - I deleted the 2 folders, deleted the 2 targets and successfully built the code and loaded it up to iTunesConnect. - the only issue I now have is that when I run the simulator it is invoking the 8.2 simulator (WatchKit) rather than 8.1 – Guy Feb 10 '15 at 10:52
  • 1
    Solved the simulator issue - I just ran Product > Clean, then the simulator worked – Guy Feb 10 '15 at 11:57
  • I was trying to create two schemes but could not figure out where I could remove the targets from the "no WatchKit" scheme, could you provide some detail as to how to remove the targets from one scheme but not the others? – Brent Priddy Apr 08 '15 at 06:51
  • Schemes only allow you to add targets to a scheme. You would need to remove the watchkit related targets from your other targets' dependencies and only include them in the scheme. – Jeremy Huddleston Sequoia Apr 08 '15 at 18:42