iOS 8 today extension - recompile - xcode

I create an extension for my app in iOS 8 and it is displayed correctly under the Today tab.
However when I make a change to the extension (either a UI change in the Storyboard, a UI change in viewDidLoad code, or some changes in the widgetPerformUpdateWithCompletionHandler method), there's nothing that is changed when I recompile. The only way I can make the changes to appear is to delete the app from the device/simulator then compile/install again. Restarting XCode (I work with XCode 6 beta 4) / restarting the computer does not help.
How can I fix the bug?
How am I supposed to debug the extension, because setting breakpoints does not seem to do anything and no NSLog messages are printed to the console (I suppose, since it's a different target).

It's a known bug, read the release notes for iOS 8b5.
Debugging (and NSLog) works in Xcode but not always (known bugs). You can still attach the debugger if Xcode cannot attach himself (Debug -> Attach to process)
For me, the simulator works better than real device, so use the simulator until things got better.
2 tips:
Close the simulator at end of debugging (i have a script for auto closing the simulator when i press STOP in Xcode, tell me if you want it).
When you launch the plugin process in simulator, wait for "All applications" display list, if you click "Run" before the list are loaded, the debugger won't attach.

Related

Simulator in use and even restarting XCode doesn't solve it

I sometimes get a dialog in Xcode which states "Simulator in use." Restarting Xcode didn't help.
I have no Simulator Icon in the Taskbar to quit it and I have no running Simulator.
Is there any solution without rebooting?
I know some of these points to not adress your specific issue since you wrote restarting Xcode would not help you but I'll try to provide a full list of possible fixes for people who might stumble upon this one day.
Is the "Stop" Button in the left corner of Xcode still clickable ? ==> Click It
Try to reset contents & settings of iOS Simulator
Clean Build & Clean Project
Quit iOS Simulator (look at the Activity Monitor if there is still something running)
Restart Xcode
Restart Mac
This is all I can think of. For me most of the times I can resolve it by just restarting Xcode. As you wrote this does not work for you so maybe some of the other points of my list will help you.
Normally this happens when you terminate the iOS Simulator but not the debug session itself, which is why most of the times the "Stop" button in the left corner is clickable most of the times...
This dialog (and the state that triggers it) comes entirely from Xcode and not the simulator itself. This dialog will present itself if Xcode is already using the simulator from another workspace. For example, if you have three projects open at the same time and you do a Build&Run (eg: click "play") in one of them, you will get this dialog if you do a Build&Run in one of the other projects.

Xcode 6 simulator not deleting sandbox

Without going on a bizarre snipe hunt into the bowels of ~/Library/Developer/CoreSimulator, I can't seem to remove an app completely from Xcode 6's simulator.
If I run the app the first time, all is good - The app believes it is the first time launched.
(no NSUserDefaults, etc)
If I then tap/hold to delete the app in the simulator, then re-run, all the data is there again-
Ergo it's NOT a clean install launch at this point.
Anyone figure out how to really remove the app from the simulator, as it is not removed as cleanly as it is on the device..
Unfortunately it seems like a bug in the latest simulator. Currently I've only been successful with the "Reset Content and Settings..." item from the "iOS Simulator" drop down menu.

Xcode5 won't allow Frame Debugger / Analyze button is greyed out

Xcode 4.2+ and Xcode 5 have a very powerful debugger for OpenGL ES. Until recently, the debugger itself would crash often (it didn't work reliably for me until Xcode5.0), but it sometimes disables itself and refuses to run at all.
This being an Apple application, they don't bother with error messages, they simply refuse to let you press the Analyze button:
I can't find any reference in Apple's docs to a situation that would "disable" the analysis. I know that it can work on this machine, because it worked fine on a different device.
Device that works:
iPad3, running iOS 6.x
Device that Xcode5 refuses to work with:
iPad Mini, running iOS 7.x
...I've tried updating to latest 7.x - no change. Xcode just refuses to work properly. All other debugging works fine.
It's not a perfect answer, but I've noticed something that might explain it...
When you pause the debugger, this triggers the button to grey-out. So, if you needed to analyse the frame at a particular point in your app ... you can't.
It sucks, and I have no idea how you're supposed to debug something without using the debugger, but ... it might be why I was getting disabled button!

When Running App in Simulator Xcode Gets Pushed to a Background Window

Whenever I build and run just this one particular app in XCode, the UI window of XCode gets pushed back underneath all existing running windows on OSX ( behind the browser and textedit etc...). This means I can't see the Xcode console debug outputs while playing with the app in the simulator. I feel like this could just be a quick setting in xcode or osx but I'm not sure why and how to fix this.
Use Spaces and develop with Xcode in its own virtual window. You will have just Xcode and Simulator wrestling for screen space then.
I normally have at least 5 windows open in Spaces:
Mail and Skype.
Web Browser
Xcode
Terminal/Finder/Odds and sods
Spare
Use Ctrl+Left and Ctrl+Right to switch windows.

xcode 4.3.2 process hangs

I have run into a rather annoying bug in Xcode 4.3.2.
If you run a process from within Xcode, then stop the simulator directly (outside of Xcode), Xcode still shows the process as running and effectively disables any further interaction with the simulator.
I can't stop the process from within Xcode (no response), and I can't start a new process either as Xcode sees the simulator as being in use. Shutting down the simulator does not notify Xcode either, so I have no option but to shut down Xcode and open it up again But even that does't work as Xcode hangs whilst trying to shut down the process too! So I have to force quit Xcode!
Has anyone found a way round this? I realise I should now only operate the simulator from within Xcode, but I am used to being able to operate the simulator independently.
thanks
I was having similar issues with Xcode 4.3.2. I fixed them by doing the following:
Launch Xcode.
Close any open projects.
Open Organizer.
Delete project form left panel using the gear icon on the bottom left. Select "Remove from Organizer...". This clears all the data about your project that Xcode has cached (indexes, DerivedData, Snapshots, etc.).
5). Re-open project.
Since doing this, my Xcode hanging issues have disappeared.
Here are the steps I follow when this happens:
Start the simulator if it isn’t already running
Choose the option “Reset Content and Settings…” from the iOS Simulator menu
Clean and rebuild the project

Resources