App only crashes in certain devices ios8 - xcode

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.

Related

App Icon not appearing on device with TestFlight installed app iOS 15

I have noticed on iOS 15, when I install an app from TestFlight, my app icon is not appearing on the device. Only placeholder for app icon appears on physical device.
All app icon assets for every resolution are correctly added to Assets. The app icon appears in the test flight app and in appstoreconnect everywhere including TestFlight and builds.
The only place it doesn't appear is on the device. It appears normally on the simulator.
The only fix I found was to add a version of the app to add a build where you submit for review and save it. No need to submit. Then install from TestFlight and reboot device. The problem is as soon as I uploaded a new build to TestFlight it stopped showing icon and had to go through this silly process again.
I have never had this issue with past apps and wondering what the issue is and how to resolve it.
I encountered the same issue with testflight on iOS 15. I found this from apple developer forum that might of help:
https://developer.apple.com/forums/thread/682648
According to the accepted answer by #vladweinstein, a temporary solution is to restart the device after installing the app.
This works for me too.
We are still having the same issue with TestFlight apps (iOS 14.7 and iOS 15+)
The only solution we found is to restart the device as Raphael Rex mentioned.

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.

XCODE iOS 8 iAD Load Error

I have a universal app that has been in use for several years with iAD Banner working. This was first implemented in iOS4, so it does not use ".canDisplayBanner" and does use the delegate. This has worked in all iOS versions.
With XCODE 6, it still works on simulator and device, iPhone and iPad, in development, when running on iOS7 target (aka, developer ad loads most of the time). If I run the same build on an iOS8 target, everything is the same, but ad Load ALWAYS gets error (3) ads not available, and NEVER become available.
As I understand it, iAd Banner should always return ads in development - regardless of iTunesConnect or provisioning. I have changed iOS Settings->Developer->(iAd Stuff), but no effect. Unfortunately, the Apple AdViewBanner and iAD docs appear to have only had formatting changes for iOS8, and are still essentially iOS6 docs. Searching the net, I can not find any one else with an iOS8 issue with iAd.
I can not determine is this is a coding issue/change for iOS8, or some type of Apple iAD service issue. Suggestions?

How to limit iTunes App Store "Requirements" listing?

The iTunes AppStore auto generates some listings on its published pages. One of them is "Requirements:" and shows the devices that this app is compatible with. iPod, iPhone or iPad etc.
QUESTION: Where is this REQUIREMENTS listing set during the build process?
I have submitted an app that I 'thought' was properly configured because the Xcode settings for iPhone and NOT iPhone/iPad. But apparently this is either broken or I am totally confused as to where this is set and how its created on the AppStore.
Can someone enlighten me?
If you create an app that is iPod/iPhone only, it will still run on an iPad, just not as an iPad native app. That is to say, an iPhone/iPod-only app will run in an iPhone-sized window on an iPad. I do not think that you can say you want your iPhone app NOT to run on iPad.
When you select iPhone/iPad for your app type in Xcode, that is telling Apple and iTunes that your app binary is a universal app -- built for both platforms.
may be it's done by apple reviewers according to this guidelines limitation
App Store Review Guidelines:
2.10
iPhone apps must also run on iPad without modification, at iPhone resolution, and at 2X iPhone 3GS resolution
... or else it will be rejected.
What's the problem? When you start a project you get to choose whether its for iPhone or iPad or both. When you submit it to apple this is also checked against your iOS build version and other things (normally though if there's a conflict it'll let you know before submission - eg: if you haven't included the iPad icons and your app says that its for iPad too).
In XCode4 theres a nice handy interface now that you can use. If you select your project in the left hand pane and click on your main target in the main window you can select the iOS application targets that your app is for.
In your Project settings Version, Device and Deployment Target are where the iTunes Requirements come from. If you choose only iPhone, then your requirements will inlcude iPod touch.
I believe this is the answer you are looking for:
http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/App-RelatedResources/App-RelatedResources.html

Resources