skip to Main Content

I’m making a simple text-to-speech app with the flutter TTS plugin, and running it on my physical iPhone and iPad for debugging.

I tried googling it, and the github repository for flutter said that I should run flutter analyze and I did that, but it says no issues found. So I’m not sure what to do. I think it’s a problem with xcode.

Here is my error:

Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    <module-includes>:1:9: note: in file included from <module-includes>:1:
    #import "Headers/flutter_tts-umbrella.h"
            ^
    /Users/ragz/Desktop/Desktop/Development/Projects/flutter/useless_app/ios/Pods/Target Support
    Files/flutter_tts/flutter_tts-umbrella.h:13:9: note: in file included from
    /Users/ragz/Desktop/Desktop/Development/Projects/flutter/useless_app/ios/Pods/Target Support
    Files/flutter_tts/flutter_tts-umbrella.h:13:
    #import "FlutterTtsPlugin.h"
            ^
    /Users/ragz/.pub-cache/hosted/pub.dartlang.org/flutter_tts-1.0.0/ios/Classes/FlutterTtsPlugin.h:1:9: error:
    'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^
    <unknown>:0: error: could not build Objective-C module 'flutter_tts'
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported
    deployment target versions is 9.0 to 14.4.99. (in target 'flutter_tts' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported
    deployment target versions is 9.0 to 14.4.99. (in target 'Flutter' from project 'Pods')

Could not build the precompiled application for the device.

Error launching application on iPad.

4

Answers


  1. Change the version to 9.0 here and it would work fine.

    enter image description here

    Login or Signup to reply.
  2. you need to change the deployment target to 9 or in my opinion 10 by changing it in the xcode runner and target , also you need to change it in the pod file , uncommenting this #platform :ios, '8.0' by deleting the # and change the string to 10.0.
    also you need to change this
    post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target)
    into this
    post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0' end end end
    at the the end of your pod file

    Login or Signup to reply.
  3. Follow the below steps:

    1. Go to ios/Podfile and uncomment platform: ios parameter and replace with

      platform :ios, ‘9.0’

    2. Run the below command inside the ios folder structure

      pod install

    3. Run command flutter upgrade

    4. Run command flutter run

    Login or Signup to reply.
  4. - Platform in ios/podfile you can use platform :ios, '10.0'
    - If you are changing platform version in podfile than you have to also change version in AppFrameworkInfo.plist.
    - Also change version in Deployment Target and Deployment Info of Runner.
    
    - If not working than you have to try with this below commands using for uninstall and install again pods and Run.
    
    flutter clean
    rm -Rf ios/Pods
    rm -Rf ios/.symlinks
    rm -Rf ios/Flutter/Flutter.framework
    rm -Rf ios/Flutter/Flutter.podspec
    rm ios/Podfile
    flutter run
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search