When I play my .sks (spritekit scene file) within the editor everything looks as it should. However, when I build the application only some nodes show, and different ones show each time. Im stumped and could use some help....[image of occurrence][1]
Sound works..
I have tried reordering nodes, deleting and recreating the scene file, and quitting xcode and re-opening
I am using xCode 13.4.1
This screenshot shows my issue, to the left the editor shows one thing, then to the right when the application is built it shows only some of the nodes
[1]: https://i.stack.imgur.com/oZO9j.jpg
Related
I have spritekit scene with element that has actions:
https://scr.hu/dXryae
https://scr.hu/Gw3Ra5
I'm loading this scene, get the Overlay element and put every child of it in main scene of game. Everything were working fine till I tried to add some more features to it. This "features" cause that actions doesn't works. But this is not my problem. I came back to working copy and now it works different on different devices.
Test devices:
Iphone 5 10.3.3 - actions works
Iphone 7 Plus 11.0.2 - actions doesn't work
I've noticed that when I go to home screen of iOS and come back to game actions starts working.
I thought that it can be some cache problem but probably I tried every method of cleaning it.
I have no errors/warnings in xcode or in console.
This is a longshot...but I had a similar issue with my GameScene in iOS11. However I was embedded in Messages so I am not sure it is the same issue, but I had the same symptoms. The Game Scene during the transition was getting paused automatically (but only in iOS11) after transitioning to the scene I ran myScene.isPaused = false and it fixed the issue, and had no adverse affects on iOS10
This is driving me nuts.
My app was running normally and then I don't know what I did but any changes I now make in the storyboard/ IB/ Xibs etc are not updating when I run the app either on real device or simulator. For instance, I changed the textColor of UILabel but when I run the app, the old color still shows both on device or simulator. I am using Xcode Version 7.3.1.
Please help. Thanks
This solution had worked for me:
Just delete that storyboard in which changes are not reflecting and take new storyboard instead it will start reflecting changes.
When you have the simulator open.
Click and hold down your app icon
When you seen the icons shaking and "X" in their Top Left, Click to delete it
Do the same for any other App Icons you may have showing in the Simulator Home screen
In Simulator menu at top - Click "HardWare" -- "Home" to stop icons shaking
In same menu Click "HardWare" -- "Reboot" (Wait for this to complete)
Quit Simulator from its menu "Quit Simulator"
(nb: when using device to run app, I would delete it from app as well)
Then Go back to Xcode
click in to menu "Product" -- "Clean"
Quit Xcode and open up again
Run Simulator on the iPhone Simulator Size you just cleaned out (above)
I've tried to simulate the issue you're having but unable to, however, when I have any issues on running my apps, the above seems to work.
[ Sometimes Xcode can be a bit slow, so I tend to wait a few seconds to confirm it / Xcode has actioned it, as I sometimes used the keyboard too fast for it to keep up.]
Hope this helps!
Hopefully to save someone some frustration, I had this same problem and figured out that I must have accidentally hit Command+d while trying to copy something and duplicated the scene. The duplicate was laid perfectly over the original so I couldn't tell I was editing the duplicate instead of the actual scene linked to my navigation controller. I was so focused on the problem I didn't notice the new warning for an unreachable scene in my storyboard.
When my Main.storyboard was not saving (its file icon remained grey after clean+build), I found that running git add -u and git commit -m "//your comment" in my terminal would change the Main.storyboard file icon to yellow again (not grey)
Try removing all constraints from the changes you made and then reapply them. That is what worked for me.
When I open storyboard, the XCode shows that it's building right now, I suppose because of IBDesignable I use.
So it never got success, XCode stuck:
I tried to open just storyboard file with opening entire project, so seems it works, but when I try to close it, it's starting stucking again, I can't close it, and it every time in my process.
I tried restarting my mac, deleting xcuserdata, but nothing help to me.
It's upset because I written entire project using storyboards and now I can't continue to work on the project =(
One more when I try to open another file and I am in storyboard right now, like selecting a class or project file it also stuck. (switching from storyboard)
I have a problem with testing my SpriteKit game on my iPhone.
In the simulator, it runs perfectly. But when I try to run the game on my device, there are no graphics. But the information in the corner right says that there are three nodes on the screen. When I touch an "invisible" node, the console prints that I touched it.
I removed the game from my iPhone and built it again. But still the same problem. Cleaning it had also no effect.
Can someone help me ?
The only explanation I could think of is when you put your pictures in Xcode you did not copy it to the project folder therefore it did not get bundled up in the IPA file and is unable to find the pictures on your phone. Remove the pictures and place them again ensuring that this time they get copied in the project folder.
I found the solution for my problem.
I had to set the zPosition of my Sprite to a higher value than the background zPosition. I don't know why it worked on the simulator without setting the zPositions.
I have an xcode project for an app I am in the middle of developing. Recently I saved my xcode project, and then moved a single button using the arrow keys, somehow causing xcode to crash. Several re-opening attempts failed, as I saved just prior to the crash, and xcode would then simply crash upon opening.
After restarting the computer to no avail, I opened the project in xcode 5 developer preview, didn't upgrade the app to xcode 5, and then was able to open it in xcode 4 again. However, for some reason a bunch of IULabel I had created with important text were missing. After closer inspection, I found that I had some UITextFields that were also missing. When I inspected the connection in my header file, I could right click the outlet and select the UITextField. It turns out the X coordinate was set to -345, so it was missing because it was out of my view.
I suspect all of my missing UILabels are similarly out of my view, but since they aren't explicitly connecting to my header, I have no way of selecting them manually, and I can find any way of searching for them or selecting them, since they are out of my view.
Does anyone know how I might be able to select these missing UILabels so that I can change their faulty X coordinates?
Thanks!
All UI elements you have used in your storyboard/xib should be available in the left sidebar of the interface editor.
If the sidebar is not visible you have to click the little round button at the bottom.