Skip to content

Support ARM32 iOS devices (iPhone 4, iPhone 5) #2089

Closed

Description

@eseidelGoogle

@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.

Activity

  1. added this to the milestone on Feb 22, 2016
  2. chinmaygarde commented on Feb 22, 2016

    @chinmaygarde
    Contributor

    Ninja can build a non-aarch64 engine and runner if the --ios-force-armv7 flag is specified to GN

  3. modified the milestones: Next, on Mar 4, 2016
  4. modified the milestones: , Next on Mar 10, 2016
  5. eseidelGoogle commented on Mar 10, 2016

    @eseidelGoogle
    ContributorAuthor

    Lets hold off on this for now. This is just a plumbing question.

    • Document the instructions on how to build for 32 bit devices.
    • Wire up our buildbots to build for ios_arm_32 and upload binaries
    • teach the flutter tool how to use the binaries.

    This is almost identical to, but superseded in importance by two other bugs:
    Mac #1707
    Android x86 emulator #490

  6. chinmaygarde commented on Apr 8, 2016

    @chinmaygarde
    Contributor

    The buildbot now build this target. The tools need to be wired up though.

  7. eseidelGoogle commented on Nov 4, 2016

    @eseidelGoogle
    ContributorAuthor

    @chinmaygarde does your Apr 8 comment mean that we're publishing the artifacts but just haven't taught the flutter tool to use them? FYI @danrubel

  8. 94 remaining items

  9. cbracken commented on May 7, 2018

    @cbracken
    Member

    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.

  10. cbracken commented on May 7, 2018

    @cbracken
    Member

    @MiguelCatalan Here's what I tried (with a new project), which worked for me:

    1. Create the project
    flutter create --ios-language=swift geoloc_test
    cd geoloc_test
    
    1. Edit pubspec.yaml. Add geolocation: ^0.2.1 to the dependencies section.
    2. 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).
    3. Set my development team and bundle identifier in the Signing section of the General tab.
    4. 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.

  11. johanhenselmans commented on May 8, 2018

    @johanhenselmans

    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:

  12. afocsa commented on May 11, 2018

    @afocsa

    @cbracken It works for me, too. With flutter upgrade from master.
    Do you know when will this be available on beta? Thanks.

  13. jeffreyfate commented on May 12, 2018

    @jeffreyfate

    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:

    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.
    
  14. MiguelCatalan commented on May 15, 2018

    @MiguelCatalan

    Sorry for the delay.

    @cbracken I can confirm this is working.

    I had to upgrade cocoapods gem install cocoapods and pod 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.

  15. ypelud commented on May 18, 2018

    @ypelud

    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.

  16. cbracken commented on Jun 1, 2018

    @cbracken
    Member

    @ypelud I’ve just landed a fix for the issue you reported about distribution through test flight. Thanks for reporting.

  17. dylan-cm commented on Mar 26, 2019

    @dylan-cm

    @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.

  18. cbracken commented on May 1, 2019

    @cbracken
    Member

    @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?

  19. mleonhard commented on Oct 30, 2019

    @mleonhard
    Contributor

    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

  20. cbracken commented on Nov 5, 2019

    @cbracken
    Member

    @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.

  21. github-actions commented on Aug 26, 2021

    @github-actions

    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.

  22. locked as resolved and limited conversation to collaborators on Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

c: new featureNothing broken; request for a new capabilitycustomer: alibabaplatform-iosiOS applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions