Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove Watchkit Glance from my App

When I created my app I was excited to work with Glances and Notifications, but as it progressed I realized that it wasn't a needed functionality. I deleted the .swift and interfaces for both the glance and notification controllers, but is that all? I don't want to submit my app with a blank glance.

I only worry because there is build scheme for both the notification and glance. I can delete these but i'm afraid there is some kind of plist key hidden somewhere that says my app still requires glances and notifications.

Any ideas how to permanently remove these from a watckhit app?

like image 205
YichenBman Avatar asked Apr 21 '15 17:04

YichenBman


2 Answers

Two options

1) Do as you suggested, delete swift files, delete glance from interface builder, delete build schemes. If something went wrong during the removal, you should get a build error and you can go from there.

2) Delete the watchkit app and re-create it without the glance.

Only way to test this is to get an apple watch and see if the glance doesn't show up. If you don't have the glancecontroller though, you should be fine.

like image 129
TWilly Avatar answered Sep 19 '22 14:09

TWilly


Testing on a watch confirms you must entirely remove the class from your Xcode project.

I performed clean builds to my phone (which auto installed on my paired watch) in between these steps and only the final one removed the glance.

  1. Remove glance from interface builder storyboard
  2. Remove file from Target > Build Phases > Compile Sources (So I could potentially continue coding for a future release.)
  3. Remove source file from project

It's possible I made a mistake along the way (as it's pretty late, and the clean building is a bit putzy) but I believe all of those steps are required.

I'm not sure why having a file in project would be the last indicator for the glance to be included, and renaming might've worked if I had any source code I wanted to save.

Funny business:

  • Between steps one and two, my interface still appeared roughly like what I had framed-in in the storyboard before I deleted the glance (long ago).
  • Between steps two and three, the glance just showed a spinner
like image 30
owenfi Avatar answered Sep 21 '22 14:09

owenfi