Xcode: Can't create snapshot - This file does not exist in the index - objective-c

I am trying to create a snapshot in Xcode 4, and I keep on getting the error "This file does not exist in the index." and it says it can't create a snapshot. When I press ok, it has the progress bar for creating a snapshot and doesn't do anything else.

I am guessing this is happening when using the simulator. This happened to me a while back. Use this program:
http://www.curioustimes.de/iphonesimulatorcropper/
IOS-Simulator cropper is a great tool to take screenshots of the simulator. It will let you save the file anywhere and also gives you the option to save only the screen image or with the iphone border. It is byfar the best screen shot program for the iphone simulator I have found. If your not using the simulator, just press the sleep button and the home button at the same time and the picture will be saved to your camera app

Related

React Native iOS simulator only performs fetch on click

I have a weird bug in my simulator. iOS / React Native does a call, but it waits until I click inside the simulator to actually display the data (and show the result actions from Redux in my console.log).
Has anyone experienced this behaviour before?
If you're using remote JS debugging (in Chrome for example), try disabling it.
Update: Rather than disabling JS debugging completely, you can instead deactivate breakpoints and remove Pause on exceptions, which usually means you don't have to click to nudge the code to progress.
To do so in Chrome click the Sources tab in inspector, followed by the relevant file, then on the right ensure the two options are disabled. One looks like a bullet with a line through it (you want this to be blue), and the other looks like a pause icon in a circle (you want this to be grey).

simulate Document in Xcode 6

There used to be a pretty nifty command in xcode 5 where you could simulate the document. I mean when you pressed this option, only the UI of the app got loaded and then you can just see how the autolayout is working.
I forgot where this is and I'd upgraded to Xcode 6.0. COuld anyone help me where this option is in xcode?
Yes, it is gone. There's no way to get it back.
However, you can instead preview .xib or storyboard files in assistant editor. This dose not open a new window, however, the storyboard file shows the UI preview by default.

iOS 8 beta 5 Today view extension (widget) stuck at Waiting to Attach

I want to debug a today view extension (widget) in iOS 8, so I select the widget under "Scheme" in Xcode, and select my iPhone as the device and hit run. It says "running today-view on iPhone" and on the side bar on the left it says "Waiting to attach". It gets tuck at the "waiting to attach" phase forever and never shows me any debugging info on my iPhone. However this works fine if I select the simulator as my device. After a few seconds of "waiting to attach" in the simulator, the widget comes alive and debugging info is displayed.
Has anybody come across why an extension won't show debugging info on an iPhone but will in the simulator?
Do not stop & start the debugger while notification windows is open in the simulator. Close the notification window. Stop the debugger. Start it again. Debugging widget in iOS8 is very delicate. You need to do everything in a slow non-agressive way (for now).
Edit the extension scheme and make sure that under Run, the Executable option is set to Ask on Launch.
Run the extension scheme.
From the list, select the Today executable.
It should launch the Today app and your extension should be attached to the debugger now.
Close the notification window. It should start working.
I've been able to debug my Today view extensions in this way.
1) Make sure the notification center is dismissed.
2) Stop every process in Xcode with the stop button.
3) Run the extension scheme
4) Pull down the notification center and should hear the usual "app launched" sound from Xcode
5) Debugger will be attached automatically and you'll be able to debug the extension.
Let me know if this works for you.
This happened to me .... Looks like you were doing everything right .... try all the above.
The problem went away when I unplugged and re-plugged in my Phone.
Sometimes click on the widget will fire the running of extension.
Delete the app from your phone
Run the today widget scheme
It worked for me.

Add button to OSX lock screen

Is it possible to alter the existing OSX lock screen ? For example if I wanted to add a button above the users profile image that says "Hello World" on click.. is this possible?
The goal is to run an AppleScript when the button is clicked.
EDIT -
/System/Library/PrivateFrameworks/LoginUIKit.framework
Inside here you have the ability to change the login screen images and such, but also it contains several compiled nib files abbreviated with 'LUI' which I am assuming stands for 'Locked User Interface'. I'm about to set up parallels and try to open them in Snow Leopard with xcode 3.2.6, and see if I can edit the nibs. If I'm able to accomplish this, would editing such files be in violation of their TOS?
Another possibility was running a window above it. On screen lock I can get the window above the screensaver simply by saying
[window setLevel:NSScreenSaverLevel]
but still, that doesn't overlay the login screen.
I feel like this shouldn't even be possible, but I seen something similar on the Knock to Unlock app.
Did you try to use the following line?
[window setLevel:CGShieldingWindowLevel()+1];
I'm using it to do the same as KnockToUnlock and it works like a charm. I see my window above the login screen either if I come on the login screen from the sleep mode or the screensaver.
Hope this helps.

changed product name in build settings, now app won't launch in simulator

I wanted a different title to be displayed in the sub-title under my iPad app's icon and changed the Product Name for my app under Build Settings.
This worked but has had a strange side effect. Whilst the app continued to work perfectly on a connected iPad, on the emulator it now behaves in a similar way to that described in [this question].1
Namely, it says it has finished running <my app> on iPad 6.0 Simulator
I tried changing the Product Name back but the problem persists.
I also tried some of the suggestions on the other question (e.g. removing armv7 frfom Required Device Capabilities) but nothing worked.
This isn't a showstopper at the moment as I have a real iPad to test on but I'd still like to understand what is going on, if anyone knows.
Sounds like time for a reboot of the Mac. Restarting Xcode might suffice. One other thing to try is to delete the app from the simulator.
I have seen this on iPhone simulator 6. Many a times, when you click "Run" again - it runs without problem.
However if that doesn't work, you may try one of the following:
Project->Command+Alt+Shift+K - a choice will appear saying something like clean folders. Do it.
In organizer, go to derived data folder (finder) using tiny arrow just at the right of your project. Try deleting your project from finder. If it doesnt delete at once, try it often.
Try resetting iPhone or iPad simulator.
Exit XCode and reopen project. Do the same with iPhone / iPad simulator.
If you are wondering why this is happening, no one really knows! It's just some flags gone bad, restored once you re-do everything for it to work, that's it.
Have you tried switching off the Debugger?
So Edit Schemes -> Debugger -> None
Also restarting the Simulator and Xcode and cleaning the project may help
Use another way: click on the azure icon of your project, keep the trackpad pressed until you see it allows to edit the name. Choose the name that you want, then a sheet like this will appear:
Click "rename" and you're done with it.