Why is Nativescript on ios so slow? - nativescript

In my app, I timed the duration it takes to navigate to one particular screen.
In Android simulator about 700 ms and about the same or faster on the device.
In IOS simulator about the same but on the device over 4000ms - 5x slower!
On the device in debug mode but on the release version also super slow.
I'm trying on iPhone 6.
What could cause such a slowdown?
Do I need to optimize the build - config file somewhere.
Maybe the iPhone6 has a processor that needs to be built for - arm???

Related

Xcode 13: Build hangs with "iPhone is busy: making Apple Watch ready for development"

Issue: The build hangs with "iPhone is busy: making Apple Watch ready for development"
Further facts:
iOS 14.8
iPhone 8
watchOS 7.6.2
Xcode 13
Apple Watch Series 3 + Cellular (42mm)
Does anyone know a solution for that issue?
Many of the developers have the same issue:
https://developer.apple.com/forums/thread/691452
I have been struggling with this for some time now. If you don't need the Apple Watch, instead of turning it off completely, you can also turn on airplane mode if configured correctly.
On your watch, go to Settings App → Airplane Mode. Make sure that both WIFI and Bluetooth switches are turned off!
When the bluetooth switch is turned on, a connection will still be established even if your watch is in airplane mode AND bluetooth is turned off on the phone from Control Center. It took me some time to figure this out...
Update: The Bluetooth setting seems to turn itself on again after some time! No idea why... 🤷🏼‍♂️ Keep that in mind and check the setting again if flight mode does not fix your issue.
Using Flutter?
When running flutter doctor, it will give you a clear hint, that your watch is causing the issue.
When trying to build your app e.g. from Android Studio, you might instead find these messages in your log:
The requested device could not be found because no available devices matched the request.
Available destinations for the "dev" scheme:
[list of devices]
Could not build the precompiled application for the device.
Building a deployable iOS app requires a selected Development Team with a Provisioning Profile. Please ensure that a Development Team is selected by:
[instructions how to set the development team]
Ineligible destinations for the "dev" scheme:
[list of devices]
I put these messages here for people googling them. If you have an Apple Watch, then run flutter doctor to check if this is the root cause.
This is what works for me:
Turn off the Bluetooth from settings in your iPhone from Settings -> Bluetooth (Don't turn it off from the control center)
Quit Xcode
Launch it again
Build and Run
The solution is:
Waiting for 5-20 mins
Let your iPhone and Apple Watch on
I think all answers are overlooked, you don't need 5-20 mins if you let it finish the preparing process, it'll take just a few minutes, 5 mins top..
But regarding fixing this with an upgrade, that's not the case, and I would love to see it fixed, or offered with an option to exclude watch from the dev purpose unless really needed.
I facing this issue too. This is because the latest xcode only support until iOS 15.2 sdk, but my phone's iOS version is 15.3. Thus, xcode is downloading the iOS 15.3 sdk from your phone that's why takes time (I knew the message is not saying that)
However, I do some testing and it works for me.
Get the iOS 15.3 sdk (is 10BG!!!) from my friend xcode's Devices Support iOS folder /Users/XXX/Library/Developer/Xcode/iOS DeviceSupport and paste it to yours one.
Downloading the iphone OS device support file from https://github.com/filsv/iPhoneOSDeviceSupport/blob/0e8ef7bc51b982304ed3258454f88ae2d5615ac7/15.3.zip unzip it and paste it in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Restart Xcode.
Build success without waiting.
Origin From: https://developer.apple.com/forums/thread/691452?answerId=704424022#704424022
The Apple Watch configuration takes around 5 minutes. It's way better to postpone everything and let it run for 5 minutes then the other workarounds - such as disconnecting your watch, turning on/off your iphone, etc
In my case:
If my Apple Watch is turned on - then from Xcode I'm still able build and run the app just fine.
But when I'm using Flutter - it fails.
flutter devices shows my iphone as "Busy".
As soon as I turn off the Apple Watch, and then disconnect and reconnect the iPhone USB cable - all is good.
Since it's one of the earliest Apple Watch modules, the latest WatchOS that I can install is v6.3, although the latest available is WatchOS v8.x.
I suppose this issue doesn't occur with the latest WatchOS.
(I'm using iOS v15.2)
This still happens from time to time. The solution that has worked for me every time is to reboot the phone
Make sure you're running a version of Xcode that supports the SDK versions of your iOS/watchOS device. If you've recently updated either OS versions, you may need a matching Xcode update for this to work properly.
The real solution is:
If you don't need the apple watch you can just power off the Apple Watch and unplug/plug the iPhone. That's a quick fix. No need to unpair the watch no need to wait 5 - 20 mins
According to this post, this issue is fixed with an upgrade to iOS 15.0.2 / watchOS 8.0.1: https://developer.apple.com/forums/thread/691452

Why my application get stretched on Xcode 6.1 and not 5.1.1?

I have an application on Xcode that loads a local website in it. When I run it via Xcode 5.1.1 it runs as expected but when I run it with Xcode 6.1 it looks like it is zooming the window (stretching) what should I change ? I compared majority of the settings and they were all the same.
The only difference is that, the simulator of the one that works is based on iOS 7.1 and the one that does not work as expected runs on iOS 8.1, but how to solve the problem?
As you said, the issue is with the simulator. Just change the simulator and try to test it on a real device. It is highly recommended to test the product on a real device to find the issues.

iOS 7 memory issues

I was recently trying to make my iOS 6 compatible app work with iOS 7 (noted still in beta). So i had my boss install iOS 7 on his iPhone 4S. We noticed that camera picker was slow and not responsive, and when we take a picture everything freezes. When i run the profile with memory allocations i notice that we have a really high memory usage : 160 MB. and btw we received a loot of memory warnings. So i tried running on the iPhone that still has ios6 and the maximum memory spike was 16 MB. Has anyone encountered this problem? Thank you
I do observe different Memory numbers on iOS 6 & iOS 7.
I have an app that makes use of openGL (a 3D viewer), and of AVFoundation (my own camera implementation, with AVCaptureDevice...)
I ran the app on iPhone 4S with iOS 6, and on iPhone 4 with iOS 7, my observations so far :
Allocations, Dirty & resident VM sizes reported by Instruments seem higher on iOS 7 than iOS 6 (50% to 100% higher)
BUT
I get much less Memory warning with iOS 7 (although I probably would have to repeat these tests to get more reliable results)
In iOS 7, apple introduce more restriction on memory allocation for single instance. If the single thread uses more memory it should crash.
This is not only related to native application but also related to hybrid app.
Ex: Google Maps getting crashed only in iOS 7, if it uses more memory. You can able to get more information in the below link.
Crashes in iOS7

How can I test app on older iPhone 3G with iOS v 4.2.1

I have been testing my app on my iPhone 4S and my wife's iPhone 3GS. I would also like to test it on the older iPhone 3G running iOS 4.2.1 (the highest version it will support).
When I connect the 3G to my Mac and attempt to provision it, I get two error messages:
Could Not Support Development
and
Xcode cannot find the software image to install this version
I am using the latest version of xCode (v. 4.4.1).
Is there some place to find the missing 'software image' in order to test my app on the 3G and older iOS devices?
If not, how does one know what devices the app will work with?
I do note that the newer iPhones that run iOS5 and above also support Automatic Reference Counting (ARC). I have checked the ARC button whenever I created a new project. Does one have to abandon ARC if one wants their app to work on an older pre iOS5-capable device?
...Dale
Is there some place to find the missing 'software image'?
I believe you can download it through iTunes by clicking restore in the device's summary page and then searching for the *.ipsw file. iTunes might even share the image once it is downloaded automatically.
Does one have to abandon ARC if one wants their app to work on an
older pre iOS5-capable device?
Not in entirety. iOS 4.2 supports the vast majority of ARC, But it does not support weak references.
Also, there are a few hoops you must jump through to target. I have an answer here that outlines them (with screenshots).
I know for a fact that Xcode 4.4.1 can use an iOS 4.2.1 device as a target, since I can test on a second generation iPod touch running 4.2.1.
Finally, If you are not able to obtain a software image, you could try adding your device by UDID directly on the provisioning portal through developer.apple.com.(The old fashioned way)

Instruments freezes and restarts iPod touch 2G

I can't get my application running with Instruments. I tried running it in Xcode with Run › Start with Performance Tool. Instruments starts, iPod touch 2G gets stuck and restarts every time. I'm on OS X 10.6.2, Xcode 3.2.2 and using iOS SDK 3.2.1.
Running instruments adds a heavy load (both CPU and memory) to your device. The iPod 2G just may not be able to handle your app under load like this with instruments. Do you have a newer device that you can test your app with instruments to at least fix any leaks. If your app runs fine on the iPod without instruments it'll probably be ok.

Resources