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?
Related
I am trying to run my first WatchKit application on Apple Watch (watchOS 7) from latest XCode (12.0).
I can select emulator as a destinantion, but I have no idea how to add my real watch to the list, so I can start testing on a real device.
I have iCloud account, and it seemed sufficient to run iPhone applications, but not Apple Watch.
How do I make it work?
Ok, I am not the sharpest tool in the shed.
Apart from assigning a proper Team to the Project, make sure you have your iPhone (to which the Apple Watch is paired) connected to your Mac via cable.
The "connect your iPhone using cable" was not thet obvious to me. I assumed it got the device from iCloud account.
I'm currently using Expo to build an iPhone app.
I'm not supporting iPad and I have it so when it builds on iPad it runs in an iPhone Simulation.
The problem is I can't develop with Expo using this approach.
The app shows up as an iPad app, but this is not the mode being shipped to users.
According to this I might have some luck adding ios.supportsTablet to the app.json file and setting it to false but it didn't change anything.
Is there another configuration value I'm missing to force iPhone simulation mode on an iPad?
I'd rather not eject if I don't have to.
According to this, there currently isn't a way to live develop using "iPhone mode" on an iPad.
The Expo Client app can’t change its tablet support on the fly,
unfortunately, so it will always adapt your project to the iPad
viewport.
So, following the above forum here is how you get around it:
Run exp build:ios -t simulator
Open Simulator
Select Hardware/Device/iOs 11.x/iPad x generation
Unpack the generated build from the first command
You should have a file named yourApp.app
Drag that file into the iPad you are running in Simulator
It will install the app on the device and you can then view your creation
This is faster than doing a whole build cycle with TestFlight just to see your changes.
But it still leaves a bit to be desired.
The screen is just white whenever I try and open my app on the device and the simulator. I have built and ran apps successfully before but I can't figure out why this one won't build correctly.
There's a few things that could cause this, but the first thing I would check is to make sure the initial view controller is set properly.
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.
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.