iOS Simulator scrolls too fast on Apple M1

Viewed 6801

I'm running a flutter project and when dragging any list or scroll view on the simulator, it scrolls with way too much force rendering almost impossible to get to the row I need.

This only happens in the simulator, and it seems to work fine on a real device. Also, this problem started when I had migrated to an Apple M1 MacBook Pro.

Drag is minimal

Any ideas?

4 Answers

I experienced a similar issue but the problem, in my case, is not related to speed but something different.

Specifically, if you force your iOS Simulator to run under Rosetta you'll see that it works as expected. Not sure why, but this is what I'm experiencing. Always reproducible with 1.22.5 (stable).

To run in Rosetta, right click on Xcode and choose "Show Package Contents", from there you navigate to "Contents > Developer > Applications," There you'll find the Simulator app. If you right click on it and choose "Get Info", you'll find an option to run it using Rosetta.

Update 14/9/2021: Xcode 12.5.1 no longer needs the above workaround. Scrolling is working fine out-of-the-box.

Jank is completely gone once you run the app while targetting arm64.

DO NOT DO THAT IF YOUR DEPENDENCIES CONTAIN NATIVE BINARIES One such example is google_maps_flutter, they don't provide arm64 binaries and as such, attempting to compile the project on M1 natively will result in errors.

Open app's ios folder in xcode, click on Runner and edit Build Settings so that Architectures points to arm64 and Excluded Architectures doesn't contain arm64 how it should look like (more or less)

(even though these gifs are only 10 seconds long, they are over 2MB and can't be embedded, sorry for that)

This probably happens because the emulators are faster due to the usage of ARM.

Is it the only one speeded up animation? Maybe there are more. If so, set the timeDilatation.

import 'package:flutter/scheduler.dart' show timeDilation;

void main() {
  timeDilation = 2.0;
  runApp(new MyApp());
}

If you are using AndroidStudio, try this one.

  1. Find 'Flutter Performance' and open.

enter image description here

  1. Enable slow animations

enter image description here

The simulator scroll will be way much slower.

Related