Won't load past launch screen

Recently I finished my app and I submitted to the app store but I had a bug in it where it wouldn’t work without Wi-Fi, or on Cellular, so I went back to my app and started to fix it.

Suddenly, I think I got it to load once but then I shut off the wi-fi and now that app won’t load at all, it goes to the load screen and just stays there. Now, even with Wi-fi on it doesn’t load, and in the simulator, or on a device, it just doesn’t load past the load screen.

Any help is appreciated

The Solution -

After a few hours of working on this problem I finally hit upon the solution. I knew the problem wasn’t with my code since the program never got to my code. I put a print() statement inside my viewDidLoad inside my GameViewController but it never came up, so obviously there was something broken in my project, not in my code.

And that makes sense, I was about to submit my app to the app store and someone had me go to the Build Settings and make some changes and I must have hit the wrong thing or something.

Anyways, since I couldn’t find what I did wrong I had to open a new project, and transfer all the files from the old project to the new project, and it worked just fine.

Now, a special note about that, when I deleted and attempted to move over my GameViewController, GameScene.swift, and GameScene.sks, Xcode would not let me do that for some reason. So, I had to open another project, and instead of deleting those three I just copied and pasted what was inside and now the program works just fine and again I have resubmitted it to the app store.

Very interesting. I’ve had a project bug out in a similar manner before. The best solution was basically copy/pasting the code and resources to a new project. Not ideal though since we have no way to know why it was broken.

I would just mention that any login to GameCenter or Ad networks if you use them should, ideally, be somewhat intelligent about whether or not the game can reach the internet. GameCenter could easily cause a game to crash if you write your game to basically wait for it to authenticate for example.