Standalone PWA slow performance on iOS 16 - ios

I'm developing a React PWA and I'm having some performance issues only when running in standalone mode; it runs fine in Safari. This only happened on iOS 16 (betas and the official release).
In particular, the problem is that when I click on two buttons in quick succession only the first click works.
Sorry, I know this is kind of a bad question but I'm really lost here. The difference in performance between the browser and the standalone mode makes no sense to me.

Related

Debug freezing safari on iphone

Problem: So I have that website which is developed with Google Web Toolkit (gwt). However, since the recent patch, the application freezes at a certain point for iPhone5 users with Safari. Other iOS-Devices like iPad seem to work fine so far.
My approach:
However, since I do not have an iPhone, I tried various online tools simulating websites on the iPhone but neither of them is having any trouble. Then I tried the Chrome's built-in device emulator which did not cause any trouble, as well.
Question: Is there any way, I can debug this case or at least reproduce it given the fact that I do not have access to an iPhone?
In case the answer is 'no': how can I debug a freezing Safari given the fact that I get access to an iPhone?
Bonus question: Why do the iPhone emulators not freeze? At least I would expect them to behave in a strange way or give me some message, that something might be wrong.
Solved the problem by using browserstack.com, which emulates an OS environment in-browser, where I could use the iPhone-Dev-Tools. Other browser-based emulators did not work as they did not emulate the OS and thus did not recreate the errors described.

Is necessary purchase some physical devices (smartphone/tablets) for develop/test a mobile website?

I'm currently developing a mobile website with jquery mobile, not exactly responsive web design. I know I can develop the project in the browser on my desktop PC with some plugins or use some online services or simulators available. But I'm not sure if I missing something really important for test.
Example:
touch/swype events or viewport rotation.
Is necessary purchase some physical devices (smartphone/tablets) to develop/test the project? Why?
Intro
First don't let anyone tell you it is not necessary to purchase a real devices for a test purpose. I will tell you why from an Android perspective, same thing, just in a much smaller manner also goes for iOS development.
Good sides of an emulator testing
It is free, you only need a computer which will run your emulator.
You can test your applications in different cases (different screen resolutions, different OS versions)
Faster I/O and network operations but this is not so much a good point if you calculate how much everything else is slow.
Bad sides
It is slooooooooow, if you never tried to use it you can comprehend how slow it is (iOS emulator is fast like hell in a comparison). It doesn't matter if you have a top of a line hardware PC or Mac it is just that slow.
Emulator is simply to darn buggy, there will be a lot of times when application will work just fine on a read device and it will brake on an emulator.
This also goes other way around, sometimes application will work just fine on an emulator but will brake on a real device, in some case it will not work at all or it will not work on some devices. This is usually a case when working with hybrid applications. for some reason Android web view acts differently on real devices and on an emulator.
Emulator simply don't have some functionalities to interact with a hardware nor it can successfully emulate it. Hardware connection it can emulate even don't work correctly sometimes.
I have talked about how slow it is (because of a converting ARM bytecodes to x86 ones on the fly) but from a graphics standpoint it tends to be even slower so don't expect to do any game development on it.
Real devices comes with much more preinstalled software which may slower your application or in some ways enhance its functionalities.
Real world GPS testing is out of a question
Final notes
If you are intending to work with iOS only emulator can be used to do much of a development. Sheer lack of different screens sizes and hardware diversity makes it a perfect platform for a test purposes. Android on the other hand is completely different story, its emulator is simply useless for test purposes. I have several real Android devices, ranging from Android 2.1 + , different screen sizes and finally hardware architecture. You don't need to believe me but everything I mentioned play a significant role while testing Android applications.
If your main concern is testing your jQuery Mobile application I would still advise you a use of a real device in case of Android while in case of iOS you can successfully use emulator. Android is problematic because transition effects are to darn slow and that includes everything else that requires animations. Swipe will not be a problem and I can vouch it works just fine. Second real problem is a device rotation. jQuery Mobile sometimes can have a problem with it, mostly when used with non responsive 3rd party jQuery plugins (carousels, sliders ....). Third problem is mentioned in my list of bad sides, basically web view used in a emulator acts different then one in a real phone so sometimes you will see one thing in your real device and one thing in your emulator.
It is not necessary to purchase such a device.
For Android there is an emulator provided by the Android Development Kit (ADK). You can use it to configure multiple emulated devices with defferent screen sizes, etc. to test for multiple resolutions and Android (browser) versions.
[edit] Though to really test it for iphones you would need that emulator too I suppose, to make sure the website is correctly displayed in the provided browser.
[edit 2] To test "real" smartphone apps (not webapps), it is better to have a real device at hand.
This very much depends to which level you want to test it before you are happy to hand it over for the usage. After you do that and someone reports a defect, will you be able to see where is the problem (if it works on your PC)?
The development itself can be done in your browser, you can even simluate swipe events by dragging mouse. You don't even need any simulators, you can just make chrome window smaller (most of the devices are using some version of webkit, same as chrome).
However, once it comes to testing, I wouldn't feel great if I didn't know how it looks on the device itself. So I think having at least one device (ideally two with different OS and resolution) is always beneficial.
I would also be unsatisfied if I was working on something of which I could not see the result :)

iOS app compiling and MacInCloud/similar

I am contemplating developing iOS apps use Delphi XE4 with iOS. In my research I saw MacInCloud, http://www.macincloud.com/features/tools/tools
Does anyone have practical experience with this? Can I hook up my Windows/Delphi/similar development tool to MacInCloud/xCode for cross compiling (to obey licensing terms) and have the app debugged on my iPhone?
Maybe over time it would be beneficial to buy an iMac, but if I could start creating apps without it would be great.
I recently tried exactly that with MacInCloud. XCode and Delphi XE4's PAServer is now automatically installed by MacInCloud so I had few issues hooking up my Windows and Delphi environment.
What I found was that running and debugging in the iOS simulator on the Mac in the cloud worked fine. However as my upload speed was quite slow a compilation took some considerable time. Each compilation seemed to require an upload of about 17MB for the app and another 50MB for the debug symbols.
There is no way of plugging in your iPhone into the mac in the cloud and MacInCloud therefore recommend that you use a further cloud provider (TestFlightApp.com) to deploy the app to your device. I couldn't test using the TestFlightApp service as I have not signed up for the required developer account with Apple and so cannot deploy to physical devices at all.
All in all, if I was doing serious work I would either buy a Mac or pay for faster upload speeds but despite that I found it an very educational experience.
Good luck with TestFlightApp. That is one of those great services we use to have but not anymore. It use to work at one time but has fallen in great disrepair and been neglected.
Even if that did work, you would go out of you mind if you was working on something that can only run on the device. Not all iOS features work on simulator, like in app purchase for instance.
Where with a real machine at hand it deploys right to device almost as fast as simulator. Just a few seconds longer. Doing it this other way would take 15 minutes or more and require many steps of your interaction. You will forget where you left off in your code by that time.

Slow initial loadingscreen iOS web app

I am working with a web app built for webkit browsers that is quite javascript-heavy. The app runs rather smooth in the safari browser and the initial loading is about 1,5-2 sec (iPhone 4s iOS 6) on my 3g net. However, when I launch the app from my homescreen, the splashscreen will stay for 5-6 seconds, sometimes even longer (Have gotten reports it can stay for around 10 seconds).
I am wondering how the difference can be so big? What can be done to reduce this loading?
Any help is appreciated.
If you are using a UIWebView where you load your WebApp, you are using a version of WebKit that does not support JIT optimizations for JS (source)
I'll break the app in smaller pieces and try to show something to the user ASAP, then continue loading your JS in the background. I know this is not good, but if your problem is a heavy JS App, you are stuck with non-JIT WebKit engine (AKA UIWebView)
Have a look at WWDC 2012 Session 601: Optimizing Web Content in UIWebViews and Websites on iOS (you need to be a registered iOS developer), and hear this episode of Cocoanetics podcast
Would love to know some optimizations, though.
Web apps launched from the homescreen are slower than those launched from inside Safari, due to the home screen ones not taking advantage of Safari's Nitro Javascript engine.
Source: http://thenextweb.com/apple/2011/03/17/apple-admits-to-slower-performance-in-ios-web-apps/
Yes, the article is a bit dated, but I cannot find any information stating that this is no longer the case.

iOS webapp performance safari vs home screen start

I read an article recently which states that web apps on iOS launched from the home screen running in full screen mode have slower performance than webapps running inside safari.
Then I found a followup article to it which seems to sugguest that the issue above is fixed.
Does anyone know if this is confirmed?
According to information from appleinsider, ios5 beta fixes that problem and now Nitro JavaScript engine enabled on Web.app.
I've iOS 5 installed on my iphone4 and updated SunSpider JavaScript testing framework 0.9.1 (to be able to start as fullscreen web application under ios). And I've started subspider several times in fullscreen webapp mode and in Safari mobile. So, see my results below (images are clickable):
May be something was fixed (apple insider provides 4 vs 10 seconds difference), but I can't say that performance is equals in both cases (3756.5ms vs 5243.8ms for those who can't see images).
UPD
Small interesting note about UIWebView, it is impossible to use Nitro-enabled JavaScript engine in native applications (I mean applications designed in Xcode and posted to AppStore) because Nitro JIT requires to be able to use dynamic code signing.
UPD
Look at iOS 5 Top 10 Browser Performance Changes on blaze.io, Seems Apple enabled Nitro for Fullscreen WebApps in iOS5 (nice statistics in article).

Resources