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

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.

Related

SwiftUI navigationLink not working after dismissing destination from the stack

I haven't noticed this before, so it may be a bug with the new release.
When I click on a NavigationLink, everything works as expected. Then I can click the back button (which I have done with the default back button as well as a custom back button) and it still works. If I try to click the same NavigationLink again, it does not trigger the destination. I can click on a different NavigationLink, and it will work, and when I go back the first link is functional again. Only the last link is unavailable.
This seems to be the case in lists, forms, and free navigation links.
Has anyone encountered this functionality? Is there a fix for it?
Working on Xcode Version 11.3 (11C29)
Thank you for your help.
After a lot of searching and testing, this appears to be a bug specific to the simulator in the new release. When running the app on my phone it works perfectly. Hopefully it is fixed soon, but for now I can run testing on the phone.

Xcode 6.1 crashing when running the project

I searched StackOverflow and it doesn't look like many people are having this problem, but for me, this happens very, very frequently. Maybe not every time, but perhaps every other time.
Once I try to build and run the app, Xcode crashes, and in a strange way: it just disappears with no error messages, no suggestion to report the problem, nothing at all. This happened with Xcode 6.0 as well. It doesn't matter whether I am running the app on a device or on an emulator.
To prevent the crash, I need to Product > Clean. If I do this clean each time before running the app, crashes do not happen, but once I forget to do that, Xcode can crash any moment.
I don't think I ever had this crash with an old project, but it keeps happening with the project that I started in Xcode 6.0.
Because of that, iOS development is becoming for me quite a painful exercise, similar to pre-Android-Studio Android development.
Is it just my problem, or maybe someone else is having it? Maybe someone has a solution?
I just started running into the same issue and found a workaround for it. Found it to be an issue with building when Xcode is full screen. Seems silly, but so far exiting full screen mode has worked for me. I've been able to re-introduce the issue after building full screen a few times, and then instantly fix it again by exiting full screen.
Yeah, it's not that the app is crashing, it's just that the click is triggering the red close window button behind the red button (yeah, seriously). You'll notice, Xcode is still open, it's just that the window has closed. You might also notice that sometimes when you click "stop" in full screen mode, it switches to non full screen. Again, the tap is passing through the run/stop buttons to the underlying window controls.
So dumb.
I solved it using 'cmd + R' instead of clicking the run button

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.

changing a png image from project

I want to change a png image in my project, I deleted the first one, and add the new one, but the last one is shown.
I deleted the second one from project, and the original image is still shown. I look for the image in the project, and it is not there.
How can I delete the first one? I tried to clean the project, but the image continues there.
Did you try:
Removing the app from device / simulator?
Closing Xcode?
Rebooting your computer?
Rebooting your device?
Resetting the simulator?
Try Product -> Clean; then Run the app once again.
If it isn't working, then close the Xcode and open again and Run.
Even the problem exists, then just reset your simulator(ResetContentsAndSettings) and Restarts the Mac.
Delete that build from your simulator first.
Then clean and build the project again.
It should work.

I comment out code in my iPad app, but it still gets executed...how is this possible?

I have a calendar program that I am trying to convert to iPad (using XCode4, no storyboards, but running on the Simulator).
It currently is not behaving correctly when I move to a previous month (I get a blank screen before the view is re-drawn). So I commented out the code that does the actual creating and drawing of the screen, and the screen is still re-drawn! I comment out other code, and the same thing happens... it's as if it is ignoring the commented statements!
I am dumbfounded as to why this is happening... I have done multiple cleans, straight builds then run... same thing happens.
Any ideas?
Have you tried clearing the cache of the simulator?
From the simulator menu:
IOS Simulator > Reset contents & settings
Try cutting out the code from Xcode. If it still runs then something is seriously wrong. Also try duplicating the project folder in finder and run the new project, it has solved some weird xCode behavior for me.
An unmatched brace, parenthesis or other syntax error can cause both the problems you describe.