SpriteKit Scene Editor changes are not applied - ios

I'm developing a game for iOS 9 in Swift, my testing device is a iPhone 6.
In Xcode I edited a .sks file with the help of the built in Scene Editor (changed the background color, added new nodes etc.). My problem is that these changes are not applied to my compiled game.
I tried following approaches but were not successful:
Clean the project before building it
Run the app on the simulator
Any ideas on what I am doing wrong?
Edit: I discovered that after closing the file through "File->Close" and reopening it the old content appeared again. Can somebody explain me why this was happening? I'm sure I saved the file before and were not editing another file.

SpriteKit and SceneKit Scene Editors are buggy, works in progress.
You'll find all sorts of quirks from one version to another. Unfortunately this might well be one of them. There's no consistency to these quirks and oddities.
There's also no descriptions of changes made from one version of iOS to another with regards Sprite Kit or Scene Kit, which is causing a great deal of annoyance because it's left to the small community to find the changes through trial and error and the sorts of experience you're having.
A compendium of issues would be helpful, and you'd think someone like Apple would have sufficient resources.
If corporations are people, too, then Apple is a poor communicator with attitude issues and a highly secretive nature.

Related

iOS Resizable GUIs with JUCE

I'm using the JUCE framework to make my first few iOS apps, mostly just proofs of concepts for my Github account for job recruiters.
I've got my first app compiled and working on iOS, but I'm having tons of issues with the GUI.
I can't seem to find the right resolutions to fill the screen. I'm testing with an iPhone 7 Plus, and I figured I could just type in the resolution of that screen to the Projucer, but it doesn't work correctly.
Then I realize I'd probably just want one that fills the screen automatically, but dont know which function calls to use or where its located in the Projucer (haven't found it yet).
Also, I'm entirely new to GUI developing as of December, so I'm still learning all of this. I would greatly appreciate keeping it simple. Thank you to anyone who is able to help.
Try this in MainComponent.cpp
Rectangle<int> area = Desktop::getInstance().getDisplays().getMainDisplay().totalArea;
centreWithSize (area.getWidth(), area.getHeight());

Can we use sketch UI elements directly into Xcode?

I am new to sketch 3. I have a hand on experience with Xcode and iOS development.
My question is wether we can directly use sketch elements in xcode or sketch is only used for prototyping the UI?
For example, If I design Label with a text field in sketch then can I used it as UI Label and UITextField in Xcode?
In my experience as a designer that also develops in Xcode any solutions that claim to go directly from Sketch into Xcode either become vapourware after some time or don't provide a very good solution. I assume it's because Auto Layout is quite complicated and fragile.
It's best to just learn iOS development using Storyboards or possibly SwiftUI for layout. There are some elements that you can get from Sketch into Xcode such as colors, typography and iconography.
Here's a list of apps that can help you with that:
Zeplin: Handoff designs and styleguides with accurate specs, assets, code snippets automatically. https://zeplin.io
InVision: Prepare designs for development. https://www.invisionapp.com/feature/inspect
Avocado: Open designs without design tools. Export images without preparing layers. Click on layers to get code.
https://avocode.com/hand-off-and-inspect
Flawless: A tool to compare the expected design and the real app right inside iOS Simulator (useful for designers who use Xcode or
mobile developers). https://flawlessapp.io
Sketch to Xcode: The fastest way to get colors from Sketch to Xcode. https://sketchtoxcode.com
Disclaimer: I'm the maker of this app.
There is not a way to integrate the sketch elements in xcode, you can use a sketch plug-in you can buy:
https://www.paintcodeapp.com/sketch
I had the same problem, the design was already prepared in the Sketch and wanted to get the code from it easily. My friends and I've working on a solution for converting design into UI codes, last 2 years.
We've developed Monday Hero platform to improve the development phase and actually save time for repetitive code. https://www.mondayhero.io
In Monday Hero, you can upload design and get responsive code with Storyboard, Xib or only code options. You can also select the elements on the design, group them as you wish for your code library and download it easily in like 15 minutes :) It was a dream of me to get the UI code that easily, I hope it can be also useful to you.

Xcode 6.3 Storyboard Scenes Cannot Be Dragged Around

Environment
OS: OS X Yosemite Version 10.10.3IDE: Xcode Version 6.3.1
Precondition(s)
Project created as Single View Application.
XCode configuration
state is in the default state (same as when initially downloaded).
Problem
This problem is less about source code in that it pertains in part to the IDE tool. XCode offers this feature to design UIs and workflows in an interface builder called Storyboards. Every Storyboard has a scene, and from videos of XCode 5+, it appears you can drag these scenes around to organize them along with the segues. For my IDE instance, I can drag-n-drop scenes from the Object Library into the editor, but once there, I can no longer adjust or move them around. The scenes appear "pinned" to the editor. This results in scenes overlapping one another. Basically, I have a ball of scenes in the middle of my editor currently.
Research Background
I have spent the better part of the day exploring XCode for ways to enable adjustments and/or googling. Googling this issue has not helped as XCode documentation seems to assume this is intuitive and works out-of-the-box (which is how it should be IMO). Results for developers having issues with dragging-n-dropping objects/scenes into the editor seems to be more common so any results for this, if any, gets eclipsed.
Questions
So I have the following questions:
Is there a switch or configuration that I have somehow missed in XCode that essentially "unpins" these scenes from the editor?
Or is it a bug/new feature that has either a workaround/new concept to apply/learn?

Best method for troubleshooting "hiccups" in xCode?

I've been working on a small iPhone game using SpriteKit. Periodically the game will "hiccup" and freeze for a half a second before resuming (Activity monitor shows CPU usage drop to 0%). I don't really have a lead as to where things might be freezing up, and I'm unfamiliar with the tools xCode provides to solve these issues. I've experimented with setting up breakpoints and looking for where things freeze up, but I don't think it's the right way to solve the problem. What is the methodology for solving brief and seemingly random runtime issues that aren't easily reproduced?

iOS left slide navigation mernu

I want to have in my app some nice slide navigationmanu just like in SWRevealViewController. My problem is that SWRevealViewController needs iOS 7.0 and ARC and in my project I have iOS 6.0 without ARC. Is there any way to use SWRevealViewController in my app or maybe there is any alternative to it?
You might want to take a look at ViewDeck https://github.com/Inferis/ViewDeck
It is compatible with iOS 6 and non-ARC.
I cannot tell about SWRevealViewController without ARC or iOS7 (thus I cannot directly answer your question), but I would put a lot of weight behind the following :
Over 80% of all iOS devices currently run iOS7 or greater. ARC has been available since iOS5, which is several years ago.
The mobile market is a quickly evolving one. Not upgrading will quickly lead you to a dark path where you'll end up fighting a losing battle. I understand that your project probably has limitations, but converting right now and keeping up with new technologies will save you a lot of trouble (for instance, trying to make a newer component work with your specific setup).
I would add, the same goes for AutoLayout. If you aren't using it already, you should start, NOW. Rumor has it the next iPhones will vary in size, and the legacy way of handling visuals cannot scale correctly (perhaps the whole reason AutoLayout was created is to prepare this change).
So in short, I wouldn't recommend adapting a new component to your old project, but rather updating your old project to make it modern. You'll end up saving a lot of time.

Resources