Setting up for Amplify Mobile Development
This won't be anything elaborate, but I'm working my way through Adrian Leung's excellent "Rapid Application Development with AWS Amplify" and thought it might be useful to capture a few notes on setup prerequisites I discovered on my personal 12.5.1 MacOs machine. In case anyone else has the same configuration needs on their machines - hopefully this will help.
Expo Apps
I tried the Expo apps first.
iOS
The important thing to know here is that, if you didn't already have xCode installed, besides installing it, you have to actually start it up once before trying to do the Expo app with it. The latest version of xCode does a bunch of stuff on its first run that you need to have done before trying to run "yarn ios".
Android
The big thing for me here was that I chose to emulate a Pixel 4a (since that's the kind of phone I own) and it turns out that the defaults on storage are not large enough. I had to bump both the internal storage and mem card storage (both emulated, of course) to 4098 MB using the Advanced Settings for the emulator.
Another thing is that here I had to do "sudo yarn android" instead of just "yarn android".
Last but not least, I got a dialog the first time I ran it complaining that the emulator file wasn't signed properly. I had to launch Settings, then go to Security and hit a button that was specifically added to that dialog to allow the emulator executable to run.
领英推荐
Web
The only thing that happened here was that when I first tried running "yarn web" it told me that some prerequisites were required. It gave me exactly the command line to run to execute them. I did that and everything worked fine.
ReactJS
This worked first time without any changes required.
React Native
When I ran "yarn ios" the first time without the emulator running, it gave an error. When I re-ran the command with the emulator running, there was no error. However, it took a really long time to actually build the application (over 10 minutes - whereas every app type up to this point took less than a minute).
When I ran "yarn android", it absolutely refused to run on the emulator I had up-and-running still in Android Studio. So, I launched an instance from the command console and tried deploying to that. This also failed, so I looked at the errors. They were all complaining about not being able to find certain binaries associated with Android. I wound up having to add the following environment variables...
Adding these fixed everything in the stand alone emulator, and then - when I retried it in the emulator in Android Studio... it all worked there, too!