last day (15 days later) » 

3:28 PM
0
Q: Swift cmd shift alt k cleaned everything

BetkowskiSo, I've seen an advice somewhere, to cmd shift alt k, to clean some stuff up, and when I did it, when I run the game, all I get is black screen. Is there any way to undo it? edit: Is it a good idea to just copy everything to a new project? Or should I not waste time doing that?

 
No, this can't be undone.
 
So is it a good idea to copy everything?
 
I would rather fix the project. Cmd shift alt k shouldn't break a working project. It just removed the build folder.
 
So what should I do?
 
Set breakpoints. Rebuild. Try to find out what's going on. The best debugger is your brain.
 
3:28 PM
Thing is, even the ViewController doesn't work.
 
What do you mean with doesn't work?
 
I've got this function in ViewController that plays the game's theme. It doesn't work, and it's supossed to, because it's the first thing debugger should do
Now Diagnostics crashed
 
Crashes should be shown in the View > Debug Area > Activate Consol. Are you using storyboards or Code?
 
only code.
and at the start, this tutorial I've found, told me to remove the storyboard
maybe that's the problem? maybe it's launching the storyboard that doesn't exist?
but on the other hand, It would pop up as an error
 
Ok, then you should set a beakpoint in didFinishLaunchingWithOptions. Do you set the initial view controller to the rootviewcontroller property of the window? Do you call makeKeyAndVisible on the window?
 
3:41 PM
I don't really know what are you talking about, so I guess no, :(
 
Oh.... If you have deleted the storyboard I wonder how it ever worked because right now (without a storyboard) you aren't telling the app where to start. Are you sure it worked before?
 
I've been working on this game for a month now, tested it on ipad, iphone, various simulators
So how to tell the app where to start?
hey, now that I think about it, there was something in my appdelegate, a line telling something about GameViewController
checked other project -no, there was nothing
 
Do you have the link to the tutorial?
 
2014-12-07 15:54:27.289 AfraidGame[4102:1908487] Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set?
 
3:58 PM
I don't find the sentence where you were asked to delete the storyboard.
 
I know, sorry, my bad
but I think I know what the problem is
this is a screen from Main.storyboard of a different app
and from mine
so it seems like a starting for point for my app is Main, and Main doesn't know where to go, because it doesn't have a gameviewcontroller set up(?)
 
Yes, this is the problem. You storyboard is empty. But I really don't understand how it ever worked. The cmd shift alt k does not delete stuff from storyboards.
 
Tell me about it, this is all new to me
I used to code in ActionScript3, and I thought that was hard
this is Independence Day of programming languages
Do you know what should I do now?
 
Honestly I think it's easier to start a new project. It's possible to fix you project but it's hard to do it if you haven't got much experience.
 
4:14 PM
And copy everything? All the classes and images? will it work that way?
 
If you do it correctly, it should work. But is safer to create the classes in the new project and copy the contents of the classes over to the new project.
 
Cool. Can you stay here for a while in case I need to ask you something along the way?
 
Sure.
 
I have copied every class, every file, everything with the same names
It's launching my launchscreen, but other than that - nothing
 
4:31 PM
Hm. Hard to tell what's missing. I would suggest to work again through the tutorial.
 
No, no, this game, I wrote myself
It's a new project, how could there be nothing?
 
Somehow you didn't set up everything correctly. Do you have a large arrow at the start screen in the storyboard?
 
yes
And when I click on it, on the right side, in Custom Class, it's set to GameViewController, so it's seems like it's correct
Fucking hell,
in Deployment Info, the Main Interface was set to LaunchScreen and not to Main.storyboard
It's all working now
thanks for all your help and patience bro
 
4:48 PM
Yeah! You're welcome!
 
When it's up on the appstore, I'll send you a link so you can see what you helped to save!
 
That would be great!
 
I'm going now. I'll follow you on twitter. See you bro!
 

last day (15 days later) »