iOS6 large downloads time out - ios

It seems like all large downloads timeout on iOS6 using ASIHTTPRequest.
Does anybody know of any forks that have updated this library for iOS6. I love this library and really do not want to have to switch.
EDIT:
This issue is not specific to ASIHTTPRequest. Upon testing FSNetwork, MKNetwork, AFNetwork, and NSURLConnection they all fail.
A sample project can be downloaded from here:
https://github.com/BLamy/NetworkTest
It must be built to an actual device running iOS6 (I used an iPad2 unsure if that makes a difference).

I was having the issue with uploading. The solution I found was to set the cachePolicy of the urlRequest to NSURLRequestReloadIgnoringLocalAndRemoteCacheData. (There were a few other networking bugs I encountered too which only occurred on iPhone 5.)

Are you getting the timeouts on apps that are build against iOS SDK 5.x running on iOS 6 (ie your old builds. If you don't have access to an old build, how about the one you have existing on the App Store?).
Or are your symptoms ONLY occurring for new builds with Xcode 4.5 against iOS SDK 6.0? If the latter, and you really don't want to give ASI up, (and you don't want to implement any of the new iOS functionality), then you could consider building against iOS SDK 5.x instead of 6.0. See my answer here for instructions.
If you need to implement new iOS 6 features, or iOS 6 actually broke your implementation of ASIHTTP (built against iOS SDK 5.x), then you should consider other networking options. It's been over a year since Ben advised developers to seek other options, with good reason.

iOS6 has serious problem related to Wi-Fi. We use ASIHTTPREQUEST. We find small file downloads work fine, in some case large file(10MB above) downloads too, but after the download, we keep the device idle for a minute, again you try to add operation to the queue. The app crashes.
Initially, we got many Network unavailable alerts, though the internet was available. Later, we changed the Wi-Fi setting security mode WAP to NONE. Then for sometime we did not find the network unavailable error, as well downloads were ok..
However, when the server itself becomes loaded, the connectivity and download becomes to halt at mid of the progress. I have noticed this behavior, even in native SDK facebook app.
The simulators work very fine, even the devices like iPad1, iO5.0, iPhone 4 with iOS5.0, the never crash.
I sum up..Apple half baked the iOS6.0, may be the iOS6.0 is suitable only for iPhone 5,the new antenna structure. Unless Apple fix the iOS6.0 issue may not be solved.

Related

Things to be considered while upgrading the iOS app

There is an iOS app developed in iOS 4.3. Now I want to upgrade this app to iOS 9 and later. I can able to run the application even on iOS 10 devices. But there are lot of deprecated warnings regarding the latest SDK.
The main reason I'm posting this question is, while upgrading the app from lower version to latest version, what are the action items to be consider to make the application perfect on latest SDK?
Here are few points I've noted,
Clear all deprecated warning.
Do analyser for memory leak.
Enable ARC if not enabled yet.
Proper unit testing.
Please advice me some more point.
Note: I'm not converting the app to Swift, using Objective-C only.
Update: I know the basic things like changing the deployment targets, update the used libraries / Frameworks to latest one, etc., I want more high level points those features are available in latest SDK comparing with lower one.
Thanks
Here are some more points you have to consider for latest iOS support,
Change deployment target in general setting.
Check for device compatibility for design constraint. There are new devices.
Change the version of your app in general settings.
If there are any functionality for touch event than check if it is possible to implement 3D touch for newer device.
And go for proper testing of functionality and design.
Hope it will help you.

Will iOS Application created in XCode 7.2 with SDK 9.2 be compatible with iOS 6 in iPhone 4?

If i create an iOS application in XCode 7.2 with SDK 9.2, will that application work in iOS 6 in iPhone 4?
In general, this is possible - that is where the availability information in the apple documentation comes into play.
You may use iOS 6 as your deployment target and only use the API available on iOS 6.
This will mean your code completion on the current Xcode will suggest unavailable methods and you will be very limited in terms of what the API can do for you.
Also, to cherry pick one of the problems you might run into:
iOS 6 has a whole different approach to authorization for location usage than iOS 9, so you would have to (partly) clutter your code with a lot of version checks to give different implementations for the different versions (and version checks were not available back then). Because, a iOS 9 device will not even ask the user for permissions if you do it the way iOS 6 documentation says you have to do it.
The very fact that you do ask this question might already give away that in general, the answer is
Yes, that can be done with a lot of work that is almost intractable for a single person and in almost all cases not needed.
as the market share of iOS 6 is only a tiny fraction, but in your case, the answer might even be
You will probably fail horribly at some point and should reconsider if this is really necessary. The market share of iOS 6 is really small and you are basically putting in weeks of extra work for basically a hand full of potential users.
Also, as you might have guessed from this (and other answers), if your question is if this works out of the box, the answer is
No.
in general yes or no terms.. yes it is possible.
(Our app spans between 7 and 9)
Supporting ios6 will require a lot of work though since you must take care not to use any features that aren't available on ios6 and iOS sdk6 and iOS sdk9 differ quite a bit :)
I'd consider if it is worth the effort.

can a mobile application developed for io6 work correctly on ios7 and ios8?

Could you please indicate us if an Mobile Application developed for iOS6 can work correctly (without any adaptation) on iOS 7 and 8 or there will always be any functional and display issues and therefore it will be necessary to redevelop this Mobile Application for iOS 7 and 8.
Your iOS6 application might run correctly without any problem.
It might also show some visual problems (iOS6 did not cater for the new iphone6/6+ formats or even 3x retina displays), or could fail (crashes) because it's using deprecated functionalities. As suggested, the best you can do is test your application with those newer iOS versions, there's no straight answer to that question.
If your application is not already on the AppStore, but you have its source code and would like to submit it at some point in the future, it will most likely need to be reworked because the submission process will check for compliance with newer i-devices.

iOS BLE disconnecting right after connection, only restarting device helps

My app uses BLE (Bluetooth 4) to connect to a physical peripheral.
My users and I have repeatedly encountered a bug where, at some point, the app stops connecting to the peripheral - you can see an indication that the BLE peripheral is discovered and the connection was established, but then few seconds after, the connection is dropped.
Things go back to normal only after restarting the iDevice.
I’ve done a very long work on checking it and researched this issue thoroughly, until I got to the conclusion that this must be a bug in iOS (tested with 7.1, but probably occurs on 8.0 as well).
My tests and findings:
Occurs with every BLE supporting iDevice.
Occurs with both my own BLE peripheral and with other 3rd party BLE products, both known to work perfectly in normal cases.
It can sometimes work well for even 50 launches, but then eventually it’ll fail.
Network & factory settings reset did not help.
Tested and occurred with various applications: ##
My own app.
Clean new Xcode project that’s only scanning for peripherals and trying to connect to the first and only discovered peripheral.
Apple’s BLE example app: Health Thermometer (with relevant modifications since I don’t have this particular peripheral).
3rd party apps, including the generic LightBlue.
Important note: Every one of the options above worked perfectly for a while (multiple launches), at some point suddenly stopped and then worked again after a restart of the device.
The connection procedure seems to fail when trying to discover the peripheral’s services - i.e. it gets discovered and connected normally, but when initiating discovery of services, it stops responding (didDiscoverServices isn't called).
I have of course tried many approaches found online with no luck.
Can anyone shed some light on this problem?
Is it a known issue?
Was it fixed in a recent iOS update?
Is it going to be fixed?
You can imagine the negative affect such an issue has on my users’ experience, as BLE connection is essential to the product.
I'll appreciate your advice and suggestions on how to solve it.
Thanks!
Update:
Apple responded to my tech support request:
Bottom line(s):
They said they had fixed some BLE related bugs in iOS 8 and urging us to test if it still happens in iOS 8.
They said to start with that and if not, try to diagnose the problem with a utility app they provide.
So far for me it didn't happen with iOS 8, but on the other hand I can see posts about other Bluetooth issues, that are not necessarily related but who knows.
Full answer:
I’m responding to your finding that you and your customers find that
after some point of use, iOS BLE fails to maintain a connection. You
indicate that the problem was identified with iOS 7.1. There have been
issue regarding iOS BLE which have been reported and have been fixed
with iOS 8.0. To best determine whether your issue has been addressed,
of course the simplest means would be to install iOS 8 and to see if
the issue can be replicated. However, as you report that you can
replicate the problem on your deivce with iOS 7.1 the first thing
would be to obtain the Bluetooth Server profile, install it to your
deivce, replicate the problem, then obtain a BLE Server log when the
problem occurs. The profile will have the BLE server report additional
logging details which can help to report issues that the server
encounters. We can see if the issue is one which has been reported
previously. Something to consider is that for all new bug report
issues, Core Bluetooth engineering is requesting that all issues be
regressed with the currently shipping version of iOS - that is 8.0.
For customers with iOS 7.x, there will be no more iOS 7 updates - all
software fixes and bug fixes will be with iOS 8. For this reason, only
issues which are reported with iOS 8 will be investigated. You can
obtain the BLE server profile from the Apple Developer bug report web
page https://developer.apple.com/bug-reporting/ios/bluetooth/. The
instructions for installing the profile and capturing the log, are
presented on the web page. If you capture a log with iOS 7.x, you can
send it to me for review. However, this will be somewhat of an
academic exercise - to know if iOS solves the issue, or whether it
persists, we will need to see if the issue occurs under iOS 8.
Something to keep in mind, once you update a device to iOS 8, you will
not be able to restore it to a previous version. I’m happy to
review your results. If however, the problem persists under iOS 8,
it’s best to submit a bug report to get Core Bluetooth engineering’s
attention on this matter. You can submit a bug report using the Apple
Developer bug report web page. - http://bugreport.apple.com
So it looks like the problem is solved with recent iOS update (either 8.0 or 8.1).

App crashes on iPhone 5S but not on iPhone 4S.

I have an iPhone app that I have developed and tested on my iPhone 4S. The app is released on the market and some users claim that the app is unusable as it crashes on start up.
I have done exactly the same things as the users have to their devices, running the same version of the app on my iPhone 4S and I cannot get it to crash.
I have been to the houses of users and plugged their phones into my computer to get the log read out and when I do, I get errors that I am not getting on my phone and my mac.
I am completely at a loss as to how I start to find the solution to a problem like this. Does anyone have even the faintest ideas?
A good start will be to integrate a crash log collecting, crash reporting SDK in your app like HockeyApp, TestFlight, Crittercism or QuincyKit.
This will send you the crash logs to you so you don't have to collect them manually. These tools can also automatically symbolicate the crash logs for you so you can find the source of the crash in your code.
You should test a release build before you ship it. Archive a release build and distribute it as an Ad-Hoc build. You can load a saved IPA file to your iDevice using iTunes or Organizer. The thing is that you can test a release build which is the same you would ship to the App Store (they are signed differently but the build configuration is the same unless you changed that).
iPhone 5S ships with 64-bit A7 processor. Your iPhone 4 is a 32-bit device. Most likely processor architecture is not the case but as Apple says: Before you distribute your app, you must test it on actual hardware. Some of the runtime changes can be detected only when the app is running on a device. I recommend you updating your set of test devices with different models. I still own an old iPhone 3GS which is great for spotting performance issues.
The general comments others have posted are correct. Add crash logging into your app with a pre-made SDK and test on an actual device. I can't add much more to those points, but I will tell a short story about a similar bug that I found in one of my apps in the hopes it helps you with your issue.
Our app was predominately iPad2 users. When the iPad4 was released, waves of our users upgraded and they started experiencing an issue that was not present on iPad2. Two network requests were fired off at the same time and the result from one of them was crashing. We eventually found out it was a concurrency bug. The result of the first request was being processed "too quickly" and the code was getting to a critical section of code that was not thread-safe with the other request handler.
While this bug was still possible on the iPad2 if the network latency fluctuated just right, it never happened that way. The iPad4 made it happen almost every time.
You can use https://github.com/CocoaLumberjack/CocoaLumberjack lib to collect crash data logs from users.
Have you considered installing a crash logger in your app? There are plenty out there (Flurry, TestFlight, Crittercism, Hockey App, etc).
Most are fairly straightforward to install - add a framework and a couple of lines of code. Once you've done this, you'll (hopefully) be able to see exactly where your app is crashing on the users' devices, without having physical access to them.

Resources