Custom Keyboard Crash - xcode

I made a custom keyboard. Everything works fine except of two things:
(I am using Xcode 7 and am testing the app on my iPhone 5.)
When I turn the device from portrait to landscape or the other way round
sometimes it does not change the formation and crashs.
I wonder why this happens only sometimes and not every time the first time.
When my phone is not connected to Xcode it does not work like
when it is connected to the computer.
It crashs when I was not in the app for around 5-10 seconds and I open
it again then.
It does not pop up again and a restart is necessary.

Related

Does iOS Simulator Save Core Data?

Everytime I run my app on the iOS Simulator, the current data I have stored is reset. I was wondering if this is natural for the simulator to do that, or if it is something with my code? If I run it on my phone, it works when I double tap home & close the app, but if it crashes, it resets. Thanks!
Saving works the same in the simulator as on a device. It's not normal for simulator data to just disappear under any circumstances.
However, note that each type of simulated phone is, in effect, a different simulator. If you simulate once on a simulated iPhone 6 and then on a simulated iPhone 6+, it's normal for data saved in one to not be available in the other.

SpriteKit-based app not running on real device

I just finished making my game with SpriteKit, and it runs perfectly fine on the simulators. When I connect my iPhone 5s to my computer and try to run it on my device, the app icon appears on my device but when I tap it all I get is a white screen. I set up all of my certificates, identifiers, and profiles. Is there something I was supposed to change in Xcode to make this work?

Running the app on a real Apple Watch and infinite spinner

I wanted to make a clickable prototype of an app on (storyboard only). I have just added two interface controllers and some images and buttons. I filled xcassets with several images (overall less than 150kB) and tried to run the app. When there was a single interface controller with 3 buttons (images in background) + 1 imageView (around 100kB all) it took some time but the app lauched. I added 1 more interface controller and a few images to it (the biggest are around 9kB) and this time Xcode displayed me a message that it lost a connection with an iPhone but the watch is still running or the watch app timed out error. At the same time I have the app name on the watch screen and a spinner. And it's spinning for ages without any result... I've tried to delete the app from both devices, restarting, cleaning folders etc. and no success. Is there a limit of images one can put in the watch's xcassets? So frustrating...
I was also facing same issue where spinner on real devices was never ending.
This was because watch extension and watch app were missing arm64 architecture, make sure you select Standard Architectures(armv7 and arm64)in build setting.
Here is what you could do/check:
You should use the xcassets that is located in your WatchKit app, not the one in your WatchKit extension.
Build and run your main iPhone app as the primary target once.
Yeah, i've been struggling with this too...
the only way i found : i click on digital crownd of the AppleWath, then re-tap on my app and magically the app launching (and the debugger work.)
if this is not working the hard way : Reboot xcode, Clean, if still not working same as you clean, restart devices... this is so annoying.
first solution take less time, and work 7/10 times
if someone knows a beter solution i'll take it !! ;-)

After starting an application for the second time, the splash image does not disappear

I am using Worklight v5.0.5 and have created a Worklight Hybrid application; I am running the app on iOS v5.1.1, compiled with Xcode 4.6.
When I execute the application in the iPad from Xcode - the iPad connected with the USB cable to the Mac - the application starts fine, I see the splash screen and then the login page.
If I disconnect the USB cable I'm not able to run the application again. Once I kill the application from the iPad, or stopping it ib Xcode before disconnecting the USB cable, I'm not able to start it again, the application does not go past the splash image.
Similarly, if I generate an .ipa and I install the it via the IBM Worklight Application Center then the first time I start the application it is fine, but if I kill the application (click twice the home button and so on...) then the next time I start the application it won't go past the splash image as well.
Any hint?
I have noticed similar behavior, not the same scenarios as you have described. For me, this helped:
After disconnecting the device from the Mac, I have made sure to exit the app in the same manner you have and to also close the iPad (not shut down, just clicking the power button to close the display) and then try to run the app again. You can also try shutting down the iPad. If that helps, this is not a Worklight issue...
Based on comment #3 to this answer, which revealed the issue at hand:
Once creating an application - for example with the name "newApp". this value, "newApp" is referenced in several locations throughout the project - the HTML filename, in application-descriptor.xml, references to the CSS and JS files of the applications and possibly another one or two references.
Changing this value is not supported. Changing it can indeed cause what is described in this question, and other oddities. Revert the change, and the application will work.

iPad 2 shows blank black screen after launch randomly on device

I'm newer to xcode and have picked up this universal app project from another dev who never could figure out how to fix a bug that was in the code because he said that he could not replicate it.
I have 4 different testing devices and I'm able to get the app to work fine on 3 of the 4. iPad retina, iPhone 4, and iPhone 3 all work. It also works fine in simulator. It's the iPad 2 that has been getting the error.
There is a blank / black screen that appears after the application loads. The default.png file shows during loading and then after that the screen goes blank. There is a looping music file that plays on the main view controller iPad_HomeViewController.m. I can hear this playing so I know the app is running, but the screen is blank and you can't use the app. Sometimes the app loads up perfectly and works correctly and then after a few uses of closing it out and reopening it the blank screen appears again. I've also seen it load the iPad_HomeViewController for just a few seconds so that you can see all the graphics and the navigation buttons and then it goes blank/black. I can usually get the blank screen to go away by closing the app out completely and relaunching or by powering the device off completely and then turning it back on and relaunching.
I'm working with xcode 4.3.3

Resources