You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support ARM32 iOS devices (iPhone 4, iPhone 5) #2089
@chinmaygarde says this should be very straightforward and is just about teaching our Mac bot to build the ARM32-bit variants of our engine, uploading them to the right place, and teaching our XCode project template to use them.
EDIT: Turns out it was not straight forward. Work is actively underway, @cbracken is driving the effort.
Thanks for checking. It's entirely possible I need to do a pass over our plugins repo and verify each of them. I've verified the gallery, which uses pods, but I'll do a pass over the rest now. Until then, one possibility is to manually edit the build settings for the geolocation plugin in the same way as documented in the wiki and see if that gets you going. I'll quick try the geolocation plugin now.
@MiguelCatalan Here's what I tried (with a new project), which worked for me:
Create the project
flutter create --ios-language=swift geoloc_test
cd geoloc_test
Edit pubspec.yaml. Add geolocation: ^0.2.1 to the dependencies section.
Open ios/Runner.xcworkspace. Select the Runner project. In the Build Settings tab, Set the Deployment target to 9.0 (the geolocation package has this restriction).
Set my development team and bundle identifier in the Signing section of the General tab.
Run the project on on 32-bit device. flutter run -d MyDevice --release
I didn't add code that made use of the geolocation plugin, but I did check the contents of the built app under build/ios/Release-iphoneos/Runner.app/Frameworks and it contained geolocation.framework. Running lipo on that framework returns:
Architectures in the fat file: build/ios/Release-iphoneos/Runner.app/Frameworks/geolocation.framework/geolocation are: armv7 arm64
I'm using flutter on master at de332ec78292c2d79fdb76034328f902c9087ee9, and cocoapods 1.5.0. If necessary, you can update cocoapods by doing gem install cocoapods and pod repo update.
Can you give that a go and let me know if that work for you?
Possibly worth noting -- the geolocation plugin isn't developed by the Flutter team or Google, but I did notice that their podspec doesn't contain s.static_framework = true which I believe we added to a lot of our plugins during the transition to cocoapods 1.5, though I'm not familiar with the background. The above steps seemed to work for me without that change though.
When I run a "flutter run --release" on a new flutter project I am getting this warning :
You've implemented -[ application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist.
You've implemented -[ application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
i have tried to add these settings to Info.plist in the folder ios/Runner, but no avail.
The test app runs ok, afterwards, in the real app I am getting an unhandled exception error:
Running pod install... 3.0s
Starting Xcode build...
├─Building Dart code... 44.0s
├─Assembling Flutter resources... 2.2s
└─Compiling, linking and signing... 18.7s
Xcode build done. 82.2s
Installing and launching... 20.6s
To repeat this help message, press "h". To quit, press "q".
[VERBOSE-2:dart_error.cc(16)] Unhandled exception:
Could not install build/ios/iphoneos/Runner.app on xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Try launching Xcode and selecting "Product > Run" to fix the problem:
open ios/Runner.xcworkspace
Error running application on iPhone.
Build and debug (simulator) work well on iPhone5c but Testflight crash.
Crash is may be not the good term because the app is still alive but goes background immediately.
Tests done on the basic flutter demo app.
Did someone succeed with testFlight on iPhone 5C ?
@wurst-case we've taken down the wiki page since Flutter has been building universal binaries by default for some time now. We still don't support building for 32-bit i386 simulators (just x86_64).
Can you provide some details about your usecase for 32-bit simulators and why using a 64-bit simulator device doesn't work for you?
EDIT: Interesting, it looks like I did enable support for 32-bit device simulators in #17443. Can you file a new bug with what you're seeing and repro instructions, then CC me on it?
@mleonhard can you run flutter upgrade to be sure you're using a recent version of the SDK, and if you're still hitting issues, would you mind providing details of the build failure you're seeing?
You're correct that 32-bit i386 binaries are no longer supported on Catalina, but we eliminated the dependency on 32-bit i386 binaries in the Flutter build over the summer. 32-bit armv7 builds for old iOS versions are still supported under Xcode 11 with the iOS 13 SDK on Catalina. Here's me building the examples/hello_world app just now:
18:16 cbracken@momiji:hello_world (master)% % sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.1
BuildVersion: 19B88
18:16 cbracken@momiji:hello_world (master)% xcodebuild -version
Xcode 11.1
Build version 11A1027
18:17 cbracken@momiji:hello_world (master)% flutter build ios --release
Downloading ios tools... 2.3s
Downloading ios-profile tools... 1.3s
Downloading ios-release tools... 6.4s
Running "flutter pub get" in hello_world... 2.5s
Building io.flutter.examples.hello-world for device (ios-release)...
Warning: Missing build name (CFBundleShortVersionString).
Warning: Missing build number (CFBundleVersion).
Action Required: You must set a build name and number in the pubspec.yaml file version field before submitting to the App Store.
Signing iOS app for device deployment using developer identity: "iPhone Developer: Chris Bracken (7RANYCR6BW)"
Running Xcode build...
├─Building Dart code... 17.0s
├─Generating dSYM file... 1.4s
├─Stripping debug symbols... 0.8s
├─Assembling Flutter resources... 1.3s
└─Compiling, linking and signing... 43.7s
Xcode build done. 66.7s
Built /Users/cbracken/src/flutter/flutter/examples/hello_world/build/ios/iphoneos/Runner.app.
18:19 cbracken@momiji:hello_world (master)% lipo -info /Users/cbracken/src/flutter/flutter/examples/hello_world/build/ios/iphoneos/Runner.app/Runner
Architectures in the fat file: /Users/cbracken/src/flutter/flutter/examples/hello_world/build/ios/iphoneos/Runner.app/Runner are: armv7 arm64
Notice the app is still a fat binary containing both armv7 and arm64 architectures. If you're seeing this broken on recent builds, please file a bug with repro instructions and reference it here and we'll take a look.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
chinmaygarde commentedon Feb 22, 2016
Ninja can build a non-aarch64 engine and runner if the
--ios-force-armv7flag is specified to GNeseidelGoogle commentedon Mar 10, 2016
Lets hold off on this for now. This is just a plumbing question.
fluttertool how to use the binaries.This is almost identical to, but superseded in importance by two other bugs:
Mac #1707
Android x86 emulator #490
chinmaygarde commentedon Apr 8, 2016
The buildbot now build this target. The tools need to be wired up though.
eseidelGoogle commentedon Nov 4, 2016
@chinmaygarde does your Apr 8 comment mean that we're publishing the artifacts but just haven't taught the
fluttertool to use them? FYI @danrubel94 remaining items
cbracken commentedon May 7, 2018
Thanks for checking. It's entirely possible I need to do a pass over our plugins repo and verify each of them. I've verified the gallery, which uses pods, but I'll do a pass over the rest now. Until then, one possibility is to manually edit the build settings for the geolocation plugin in the same way as documented in the wiki and see if that gets you going. I'll quick try the geolocation plugin now.
cbracken commentedon May 7, 2018
@MiguelCatalan Here's what I tried (with a new project), which worked for me:
geolocation: ^0.2.1to thedependenciessection.ios/Runner.xcworkspace. Select the Runner project. In the Build Settings tab, Set the Deployment target to9.0(thegeolocationpackage has this restriction).flutter run -d MyDevice --releaseI didn't add code that made use of the geolocation plugin, but I did check the contents of the built app under
build/ios/Release-iphoneos/Runner.app/Frameworksand it containedgeolocation.framework. Running lipo on that framework returns:I'm using flutter on master at
de332ec78292c2d79fdb76034328f902c9087ee9, and cocoapods 1.5.0. If necessary, you can update cocoapods by doinggem install cocoapodsandpod repo update.Can you give that a go and let me know if that work for you?
Possibly worth noting -- the geolocation plugin isn't developed by the Flutter team or Google, but I did notice that their podspec doesn't contain
s.static_framework = truewhich I believe we added to a lot of our plugins during the transition to cocoapods 1.5, though I'm not familiar with the background. The above steps seemed to work for me without that change though.johanhenselmans commentedon May 8, 2018
When I run a "flutter run --release" on a new flutter project I am getting this warning :
You've implemented -[ application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist.
You've implemented -[ application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
i have tried to add these settings to Info.plist in the folder ios/Runner, but no avail.
The test app runs ok, afterwards, in the real app I am getting an unhandled exception error:
Running pod install... 3.0s
Starting Xcode build...
├─Building Dart code... 44.0s
├─Assembling Flutter resources... 2.2s
└─Compiling, linking and signing... 18.7s
Xcode build done. 82.2s
Installing and launching... 20.6s
To repeat this help message, press "h". To quit, press "q".
[VERBOSE-2:dart_error.cc(16)] Unhandled exception:
afocsa commentedon May 11, 2018
@cbracken It works for me, too. With
flutter upgradefrommaster.Do you know when will this be available on
beta? Thanks.jeffreyfate commentedon May 12, 2018
I ran the instructions described on https://github.com/flutter/engine/wiki/iOS-Builds-Supporting-ARMv7 but am still getting an error trying to run my application on an iPhone 5c:
MiguelCatalan commentedon May 15, 2018
Sorry for the delay.
@cbracken I can confirm this is working.
I had to upgrade cocoapods
gem install cocoapodsandpod repo update.Also and because upgrading from older version of cocoapods had to apply this.
And everything work as expected. Thanks a lot for the help.
ypelud commentedon May 18, 2018
Build and debug (simulator) work well on iPhone5c but Testflight crash.
Crash is may be not the good term because the app is still alive but goes background immediately.
Tests done on the basic flutter demo app.
Did someone succeed with testFlight on iPhone 5C ?
I create an issue for that #17619.
cbracken commentedon Jun 1, 2018
@ypelud I’ve just landed a fix for the issue you reported about distribution through test flight. Thanks for reporting.
dylan-cm commentedon Mar 26, 2019
@cbracken looks like the wiki referenced above, https://github.com/flutter/engine/wiki/iOS-Builds-Supporting-ARMv7, is gone? Or the whole wiki looks to be gone. No such page on the framework's wiki exists. I'm still getting build errors for arm32 device simulators, trying to diagnose.
cbracken commentedon May 1, 2019
@wurst-case we've taken down the wiki page since Flutter has been building universal binaries by default for some time now. We still don't support building for 32-bit i386 simulators (just x86_64).
Can you provide some details about your usecase for 32-bit simulators and why using a 64-bit simulator device doesn't work for you?
EDIT: Interesting, it looks like I did enable support for 32-bit device simulators in #17443. Can you file a new bug with what you're seeing and repro instructions, then CC me on it?
mleonhard commentedon Oct 30, 2019
This appears to be broken again, due to Apple discontinuing support for 32-bit builds in XCode. This wiki page has instructions for installing old build tools to get it to work:
https://github.com/flutter/flutter/wiki/Supporting-legacy-platforms
cbracken commentedon Nov 5, 2019
@mleonhard can you run
flutter upgradeto be sure you're using a recent version of the SDK, and if you're still hitting issues, would you mind providing details of the build failure you're seeing?You're correct that 32-bit i386 binaries are no longer supported on Catalina, but we eliminated the dependency on 32-bit i386 binaries in the Flutter build over the summer. 32-bit armv7 builds for old iOS versions are still supported under Xcode 11 with the iOS 13 SDK on Catalina. Here's me building the
examples/hello_worldapp just now:Notice the app is still a fat binary containing both armv7 and arm64 architectures. If you're seeing this broken on recent builds, please file a bug with repro instructions and reference it here and we'll take a look.
[battery] Update and migrate iOS example project (flutter#2089)
github-actions commentedon Aug 26, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.