Flutter/iOS App Store error message: ITMS-90338: Non-public API usage

As a brief note today, if you’re using Flutter and get this “ITMS-90338: Non-public API usage” App Store Connect error message, it probably means you forgot to run flutter build ios before submitting your app to the App Store:

We identified one or more issues with a recent delivery for your app, 
"Foo Bar" 1.0.0 (5). Please correct the following issues, then 
upload again.

ITMS-90338: Non-public API usage - The app references non-public symbols 
in Frameworks/Flutter.framework/Flutter: _ptrace. If method names in 
your source code match the private Apple APIs listed above, altering 
your method names will help prevent this app from being flagged in 
future submissions. In addition, note that one or more of the above APIs 
may be located in a static library that was included with your app. If 
so, they must be removed. For further information, visit the Technical 
Support Information at http://developer.apple.com/support/technical/ 


Step 1 in your Flutter/iOS release process should be to run this command:

flutter build ios

Or you can add the --release flag, if you prefer:

flutter build ios --release

After that, then you can hop into XCode and deploy your iOS app to Apple’s App Store.

Personally, I kept forgetting this step, so Apple kept sending me emails with that “ITMS-90338: Non-public API usage” error message until I finally realized what I was doing wrong.