can't execute code on ipod touch 4th gen - xcode

I can't execute an app i have developed for iOs 5.
It works fine on my iPhone 4, but not on my iPod Touch 4th Gen.
I added the iPod to the list of devices used for development in the Xcode Organizer.
But when i press the 'Run' button, Xcode compiles successfully (states 'Build succeeded' in the middle of the screen) and suddenly tells me 'Finished running MyApp on m's iPod'
i'm using Xcode 4.2, iOS is 5.01 on iPod and iPhone.
The App can be tested on the iPhone 4 or in the simulator, but not on the iPod. It's doesn't even start, so an immediate crash of the app is not the reason!
Who knows how to cope with this phenomenon?

the issue was very easy to solve, but hard to find (for me) as no error report nor any message from Xcode gave a hint:
In the Info.plist file, the section Required device capabilities contained gps and magnetometer.
Both aren't available on the iPod.
After removing those required device capabilites the App worked on the iPod

Related

Simulator under iOS 13.3 (Xcode 11.3.1) not functioning properly

When using the simulator under Xcode 11.3.1 and iPhones simulating iOS 13.3, the simulation does not behave correctly. It works correctly under simulator iOS 12.1.
I get no messages that I don't also get under the iOS 12.1 simulator launch.
The behavior should be when a user starts the app for the first time, he is redirected to the signin screen. Instead it goes to the main screen (grayed out because there is no data). I can navigate manually to the signin screen and signin normally (device registers and appears on my online server) but the app should start downloading the database required to work. It just sits there (no alertview that would normally launch the download). If I relaunch the app, it again starts at the main screen, however at this point an alertview should appear that no database is present. If I manually try to start the download (in a setup screen within the app), the progress bar that normally appears does not, just a label signifying what database is suppose to download.
All of this works properly on the iOS 12.1 simulator (Xcode 10.1) of the same type (iPhone 8 Plus).
Is this an Xcode 11.3.1 bug or iOS 13.3 problem. I have customers using iOS 13.1 without any problems on actual devices. I am on a new iMac running Catalina, is it possible its a security setting to allow database download?
I was facing the same issue and I move back to Xcode 11.3. Guess it was not a stable update at all.

How to force an app to simulate in iPhone simulation using an iPad using Expo?

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.

App only crashes in certain devices ios8

So I recently had my app rejected by Apple. This is what they said:
2.1: Apps that crash will be rejected
----- 2.1 -----
We found that your app crashed on iPad running iOS 8 and iPhone 5s running iOS 8, which is not in compliance with the App Store Review Guidelines.
Your app crashed when we:
tapped on various menu items
If you have difficulty reproducing this issue, please try testing the workflow as described in Testing Workflow with Xcode's Archive feature.
I found it confusing why the app was only crashing on certain devices, especially the iPhone 5s. Since I don't personally own a 5s, I have been using the simulator and cannot recreate the crash. On the iPad retina simulator the app crashes when I press menu buttons and Xcode tells me the offending line is in the viewdidappear method of the view being segued FROM:
if( adBanner != nil )
{
adBanner.removeFromSuperview()
adBanner.delegate = nil
adBanner = nil
}
My questions are: How can I recreate these crashes on the iPhone 5s? How can I possibly fix this bug on the iPad or do I even need to? I assumed you could submit an app optimized to run on only certain iOS devices and that was determined by which devices you submitted screenshots for. Do I need this app to work for iPad or is there a way to just not publish it for iPad?
Mine was not also for ipad, but Apple still tested for that anyway.
I had the same issue. I was reproducing the issue on my ipad 2 when the project options is set to "link all assemblies" on my Xamarin project settings. The issue was not reproduced and the app on my ipad was working fine when I change options to only "link SDK assemblies only." This has been the reason with another app I published.
I'm going to try republishing the app again with that change in setting and hope for the best.
How can I recreate these crashes on the iPhone 5s
An iPhone 5c might reproduce the issue, but your best bet is to use an iPhone 5s. The simulator cannot possibly match behavior of the device when it comes to timing and memory characteristics.
You might be able to use guard malloc or NSZombies to find some issues related to memory mismanagement, so I suggest you try that out in the sim or on devices you own.
Do I need this app to work for iPad or is there a way to just not
publish it for iPad?
You can build an iPhone-only app that will be run in compatibility mode on an iPad, but there's no way to prevent someone from running your iPhone app on an iPad.

App doesn't build on my device

The app I am working on runs perfectly in the simulator, on an iPad, and on an iPhone. When I try to run it on my iPod Touch, NOTHING HAPPENS...
Xcode says "Building..."
and then it says "Finished running"
Nothing is written to the console and the app icon isn't installed on the iPod Touch and the app never even attempts to run.
Any ideas what could possibly be going wrong would be greatly appreciated. If there was some error that came up that would at least be helpful, but nothing happens whatsoever.
Thanks so much!
EDIT: I've gone back and opened some of my previously finished apps and all of them do this same thing when I try to run them on the iPod Touch...
Could this have anything to do with my having upgraded to XCode 4.2 and the iPod Touch still running OS 3.1.3? The deployment target in Build Settings is still 3.1.3 and up, so I don't think it should be an issue...
Does your scheme target dropdown list show "iOS Device" or does it show the "name" of your iPod Touch (something like "jons ipod touch"):
If it shows "iOS Device", that means your iPod isnt recognized by xcode and you may need to enable the device for developing by clicking "Use For Development" like so:
The armv6 architecture needed to be added to the build settings in order for me to build to the iPod Touch (OS 3.1.3).
In Xcode 4.2, in the Build Settings, under Architectures, armv6 wasn't an option for me in the dropdown menu. I had to select "Other...", then use the + sign to manually type in "armv6" NOT IN PLACE OF but IN ADDITION TO what was already entered there, which was "$(ARCHS_STANDARD_32_BIT)" and then I was able to build my app to the iPod Touch.
As a final note - while I got the app to run on my iPod Touch OS 3.1.3, it did not run as well as I wanted it to (as well as it runs on the iPad OS 5 and iPhone OS 4.2) so while I've previously always supported OS 3.1 in my apps, I sadly ended up NOT supporting armv6 for this one and setting the iOS Deployment Target for my app to iOS 3.2

Can't run on device after installing iOS 4.2 and the 4.2 SDK

I installed iOS 4.2 on my 2nd-generation iPod Touch last week. I tried running my application on the device through Xcode, but it didn't work (because Xcode didn't yet support iOS 4). To solve that, I installed Xcode 3.2.5 and the iOS SDK 4.2. Now I can get the app to run in the iPhone/iPad Simulator just fine.
However, I can no longer select "Device" from the menu at the top of the screen. It's a choice, but when I try to click on it, it never actually gets a check mark.
Because of this, I can no longer run the app on my iPod. The other (related) problem is that I can't choose "Build and Archive" from the Build menu anymore because the target is not a device.
Why is this happening? Do I need to change some settings in my project, or something with my device itself?
EDIT: Upon closer investigation, it appears that I can't select anything but the iPhone Simulator 4.0. Maybe there's something wrong with the project file.
Check that the base SDK is set to Latest iOS (currently set to iOS 4.2) for your Xcode project and your target's product, then perform a rebuild and see if your iPod is recognized.
Also try visiting the Xcode Organizer and see if it's asking for anything from your iPod. Typically Xcode will want to collect some data from devices whose OS receive updates, so it can update itself and install your apps on the updated OS properly.

Resources