Skip to content

Instantly share code, notes, and snippets.

@oravecz
Last active May 10, 2022 00:23
Show Gist options
  • Save oravecz/c2699522259992cb1f836a3005d704de to your computer and use it in GitHub Desktop.
Save oravecz/c2699522259992cb1f836a3005d704de to your computer and use it in GitHub Desktop.
Flutter/Amplify Steps on Mac M1 w/ Terminal (not Rosetta mode)
➜ npm -v && node -v && git --version
8.6.0
v16.13.1
git version 2.32.0 (Apple Git-132)
➜ flutter doctor -v
[✓] Flutter (Channel stable, 2.10.5, on macOS 12.3.1 21E258 darwin-arm, locale en-US)
• Flutter version 2.10.5 at /Users/jimcook/.fvm/versions/2.13.0-0.1.pre
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5464c5bac7 (3 weeks ago), 2022-04-18 09:55:37 -0700
• Engine revision 57d3bac3dd
• Dart version 2.16.2
• DevTools version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/jimcook/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.1)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 67.0.4
• Dart plugin version 221.5588
[✓] VS Code (version 1.54.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.20.0
[✓] Connected device (3 available)
• iPhone 13 mini (mobile) • C590B31F-1549-4E60-804E-BD2E019A008F • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-4
(simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.3.1 21E258 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 101.0.4951.54
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
➜ flutter create app
# Instructions now say to edit ios/Podfile, but it doesn't yet exist.
# I create it first using pod init
➜ cd ios
➜ pod init
➜ cd ..
# Edit ios/Podfile line 2 to be `platform :ios, '11.0'`
# Open Xcode and update the Deployment Target to 11.0
# Add the following dependencies to pubspec.yaml
# - amplify_flutter: ^0.4.0
# - amplify_auth_cognito: ^0.4.0
# - amplify_analytics_pinpoint: ^0.4.0
➜ flutter pub get
Running "flutter pub get" in app... 1,333ms
➜ amplify init
Note: It is recommended to run this command from the root of your app directory
? Enter a name for the project citysleuth
The following configuration will be applied:
Project information
| Name: citysleuth
| Environment: dev
| Default editor: Visual Studio Code
| App type: flutter
| Configuration file location: ./lib/
? Initialize the project with the above configuration? No
? Enter a name for the environment dev
? Choose your default editor: IntelliJ IDEA
? Choose the type of app that you're building flutter
Please tell us about your project
? Where do you want to store your configuration file? ./lib/
Using default provider awscloudformation
? Select the authentication method you want to use: AWS profile
For more information on AWS Profiles, see:
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html
? Please choose the profile you want to use citysleuth
Adding backend environment dev to AWS Amplify app: d3jubs0097b73i
⠋ Initializing project in the cloud...
CREATE_IN_PROGRESS amplify-citysleuth-dev-200303 AWS::CloudFormation::Stack Mon May 09 2022 20:03:05 GMT-0400 (Eastern Daylight Time) User Initiated
CREATE_IN_PROGRESS UnauthRole AWS::IAM::Role Mon May 09 2022 20:03:10 GMT-0400 (Eastern Daylight Time)
CREATE_IN_PROGRESS AuthRole AWS::IAM::Role Mon May 09 2022 20:03:10 GMT-0400 (Eastern Daylight Time)
⠙ Initializing project in the cloud...
CREATE_IN_PROGRESS DeploymentBucket AWS::S3::Bucket Mon May 09 2022 20:03:10 GMT-0400 (Eastern Daylight Time)
CREATE_IN_PROGRESS UnauthRole AWS::IAM::Role Mon May 09 2022 20:03:11 GMT-0400 (Eastern Daylight Time) Resource creation Initiated
CREATE_IN_PROGRESS AuthRole AWS::IAM::Role Mon May 09 2022 20:03:11 GMT-0400 (Eastern Daylight Time) Resource creation Initiated
CREATE_IN_PROGRESS DeploymentBucket AWS::S3::Bucket Mon May 09 2022 20:03:12 GMT-0400 (Eastern Daylight Time) Resource creation Initiated
⠼ Initializing project in the cloud...
CREATE_COMPLETE UnauthRole AWS::IAM::Role Mon May 09 2022 20:03:25 GMT-0400 (Eastern Daylight Time)
⠦ Initializing project in the cloud...
CREATE_COMPLETE AuthRole AWS::IAM::Role Mon May 09 2022 20:03:25 GMT-0400 (Eastern Daylight Time)
⠧ Initializing project in the cloud...
CREATE_COMPLETE DeploymentBucket AWS::S3::Bucket Mon May 09 2022 20:03:33 GMT-0400 (Eastern Daylight Time)
⠏ Initializing project in the cloud...
CREATE_COMPLETE amplify-citysleuth-dev-200303 AWS::CloudFormation::Stack Mon May 09 2022 20:03:36 GMT-0400 (Eastern Daylight Time)
✔ Successfully created initial AWS cloud resources for deployments.
✔ Initialized provider successfully.
✅ Initialized your environment successfully.
Your project has been successfully initialized and connected to the cloud!
Some next steps:
"amplify status" will show you what you've added already and if it's locally configured or deployed
"amplify add <category>" will allow you to add features like user login or a backend API
"amplify push" will build all your local backend resources and provision it in the cloud
"amplify console" to open the Amplify Console and view your project status
"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud
Pro tip:
Try "amplify add api" to create a backend API and then "amplify push" to deploy everything
# Next, I edit main.dart to import, add plugins and call configure.
➜ flutter run -d iphone
Downloading ios tools... 6.6s
Downloading ios-profile tools... 5.0s
Downloading ios-release tools... 27.3s
Launching lib/main.dart on iPhone 13 mini in debug mode...
Running pod install... 837ms
Running Xcode build...
└─Compiling, linking and signing... 1,067ms
Xcode build done. 16.0s
Failed to build iOS app
Error output from Xcode build:
objc[13071]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x202eddeb0) and
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1065204f8). One of the two will be used. Which one
is undefined.
objc[13071]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x202eddf00) and
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106520548). One of the two will be used. Which one
is undefined.
objc[13071]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x202eddf50) and
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106520598). One of the two will be used. Which one
is undefined.
objc[13071]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x202eddfa0) and
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1065205e8). One of the two will be used. Which one
is undefined.
objc[13071]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x202eddff0) and
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106520638). One of the two will be used. Which one
is undefined.
objc[13071]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x202ede040) and
/Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x106520688). One of the two will be used. Which one
is undefined.
2022-05-09 20:11:14.945 xcodebuild[13071:17151751] Requested but did not find extension point with identifier
Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in
com.apple.dt.IDEWatchSupportCore
2022-05-09 20:11:14.946 xcodebuild[13071:17151751] Requested but did not find extension point with identifier
Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in
com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **
Xcode's output:
Writing result bundle at path:
/var/folders/j_/v4k3gxnn5wq29nc_xd_jvqrr0000gn/T/flutter_tools.jo5r0j/flutter_ios_build_temp_dirnKpMwY/temporary_xcresult_bundle
/workspace/app/ios/Runner/GeneratedPluginRegistrant.m:12:9: fatal error: module
'amplify_analytics_pinpoint_ios' not found
@import amplify_analytics_pinpoint_ios;
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
note: Removed stale file
'$HOME/Library/Developer/Xcode/DerivedData/Runner-cfozjehssmlnsegjdlmifhellvfh/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulat
or/Runner.build/Script-193D5C0D18DB5F62B97F1223.sh'
Result bundle written to path:
/var/folders/j_/v4k3gxnn5wq29nc_xd_jvqrr0000gn/T/flutter_tools.jo5r0j/flutter_ios_build_temp_dirnKpMwY/temporary_xcresult_bundle
Parse Issue (Xcode): Module 'amplify_analytics_pinpoint_ios' not found
/Users/jimcook/Projects/BlueCowGroup/citysleuth/app/ios/Runner/GeneratedPluginRegistrant.m:11:8
Could not build the application for the simulator.
Error launching application on iPhone 13 mini.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment