Testing iOS changes? - ios

I want to know one thing: how accurate is the Xcode iOS simulator in representing the actual run time on a physical device? I recently tested an app with a 6.1 deployment target on a device running 6.1 (iPad 2). So far I had been testing on an iPad mini running 8.2 (after building the app in Xcode 6.2 and scaling back the deployment target from 7.1) but was shocked to see that the buttons I made didn't load at all on my physical iPad 2. The buttons instead loaded as blank "old school" iPhone buttons and when I clicked some of them, they crashed the app even though their only functionality was to perform a basic segue.
Should I update my iPad 2 to 8.2/8.3 and try again? I guess I am asking because the iPad 2 isn't technically mine and the owner doesn't want me to update it in fear of loosing data so I'm in a pickle as far as conceiving my next step in development . Does this problem sound at all familiar to anyone or should I just save up and buy my own 2nd testing device and hope for the best?

Related

Strange bug - Some elements are visible when I run app from Xcode, but not if I start running the app from device

Context: Native iOS app developed with Swift which manages external control units via bluetooth. I use Xcode Version 14.2, but it used to happen with older versions as well. Tested on devices with iOS 15 and 16.
In a specific section what the app has to do is:
take the data through the Bluetooth input and output
go to the outputs screen and present the outputs
from the outputs screen go to the inputs screen and show them
The problem is as follows.
If I take a physical iPhone and connect it to the Mac, then start the app from Xcode, everything works fine.
If, with the same iPhone, I start the app not from Xcode but with a tap from the iPhone screen, the app starts correctly, connects via Bluetooth, shows all the outputs correct, while for the inputs they are all correct except the last. The last one is never displayed, all the others are.
The main problem is that I don't know how to debug since it only happens when the app starts unlinked from Xcode. Does anyone know of other ways to troubleshoot the problem or have had similar problems and know of possible solutions?

Can't create iOS simulator

I am trying to create an iOS simulator with iOS 10 on iPad 2.
I went to the dialog which allows us to create new simulators, Then I entered the simulator's name
and the device "iPad 2" in my case.
Now, time to chose an operating system. Since iOS 10 wasn't available by default, I checked the download option on the left and downloaded the version I wanted.
I downloaded iOS 10 as shown below. :
But when I go back to select the OS I downloaded for my emulator, it doesn't even appear in the drop down.
The same goes for every other simulator I tried to create.
Please does someone know what is wrong ?
Max iOS for iPad 2 is iOS 9.x
Best option is to use a device.
If you really want an iPad 2 simulator, you'll need to use an older version of Xcode.

Xcode 9 compiled app and iOS 9.5.3 (iPad 2)

Anyone noticed issues with apps that are created with Xcode 9 and do not seem to work on iOS 9.5.3 and in this case an older iPad 2?
I have a customer that downloaded my app that I’ve complied and uploaded with Xcode 9, but when he installs the app it crashes straight away, and on some occasions in a flash of 2 sec. will display the interface builder screen layout of the app (ie all the views, buttons etc that are visible on interface builder but with a normal app nicely hidden until needed etc).
The minimum development target in Xcode is set to 8.2 so I assume it will and should be backwards compatible?
Seems like the device is jailbroken.. My latest app version includes a check for a jailbroken device, and does not allow the app to load when it detects one.
I Could reproduce the exact behaviour when triggering this validation check.

iPhone not showing same results as simulator

I have an app that was developed for iOS 4 and 5 and I migrated it to iOS7. When I test it on my iPhone 4 with iOS 7.1 is not showing the same results as the simulator.
Any suggestions?
Basically is not showing the initial segmented control, the map segmented control, the view associated with the control and it´s showing the scanner in a bigger size. The simulator showed the same issues before I restore the contents and settings in the simulator.
EDIT
If you watch very closely on the iphone it shows the segments and other elements of the view behind de navigation bar . But in the storyboard they appear right in the place that i want them. Is any form to consolidate my storyboard ??? Are any files that depend of the storyboard that i´m not including or generating.
The storyboard icon looks like black and also the .plist what does this means?
Simulator doesn't have the memory limitation as the device.
Simulator uses x86 arch, device uses ARM
It is a simulator, so it only "simulates" the behavior. Always test on device before submitting to the App Store.
Ok the problem was that i had installed the original app that is published in the app store. When I tested the current development on the iphone the existing app was replaced with the current one and that caused trouble. The solution was to delete the app from the device and then run again the current version of the app and that was all.

IOS-Simulator in Xcode does not show iPhone -like but regular window

It used to work properly, with 100% as well as 50%. Then I did not use the simulator for some time but only the console, having moved the simulator almost out of site. Now I need it but realize that instead of an iPhone surface just a regular window is shown, like in this thread:
XCode iPhone simulator does not look like an iPhone
I read lots of proposal I found on the web to this problem and followed the advices.
So I changed the size to 100%, tried different iPhone devices. And finally I deleted the Xcode application from the application folder and removed all remaining items by putting in the order
sudo /Library/uninstall-devtools --mode=all
into the terminal.
I downloaded Xcode again.
The problem is still there.
The very strange thing about it: It did work properly when I installed Xcode for the first time, about 6 weeks ago.
As far as I know it depends on the deployment target whether the simulator shows the iPhone frame or not. I think if you set iOS 7 as the target you won't be able to see the iPhone image around your app screen. (For example, I have never seen an iPhone image in the simulator for a 4'' device.)
Try changing the deployment target and play around with different devices under Hardware / Device in the simulator.
Edit:
Here is a more detailed answer.
It's one of the replies to the question that you linked.
You better select your simulator and set Hardware -> Device -> iPhone
Note 1: If you want the simulator should looks like iPhone do not select the retina simulator.
Note 2: You must check the target version of you app in xcode it must be below 7.0
Note 3: Keep the scale of simulator always 100%.
Are you sure the current project you're working on is an iOS and not an OS X project? You can verify this be looking at the project's folder. If the app ist for OS X, there is most likely a .xib file. If it's a iOS project, there should be a storyboard file.
As the OS X apps use windows, like the one you described, this could be a hint.
I have found the solution for the problem I had (and other users as well):
At PREFERENCES / DOWNLOADS older versions of the iOS simulator are available. While at the moment the current version is 7.0 (beginning January 2014), versions 6.0 and 6.1 are being offered for download.
After downloading I could chose more devices than with version 7.0. Now also the non-Retina iPhone is available.
As a result, the iPhone surface is being displayed when set to 100% (at WINDOW - SIZE).
Thanks to everyone helping!

Resources