shaqian / flutter_tflite

Flutter plugin for TensorFlow Lite
https://pub.dartlang.org/packages/tflite
MIT License
630 stars 404 forks source link

iOS build failed #226

Open Alisofin opened 2 years ago

Alisofin commented 2 years ago

Hello, my build fails with the following output: Xcode's output: ↳ /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/tflite-1.1.2/ios/Classes/TflitePlugin.mm:21:9: fatal error: 'metal_delegate.h' file not found

import "metal_delegate.h"

        ^~~~~~~~~~~~~~~~~~
1 error generated.
/Applications/flutter/.pub-cache/hosted/pub.dartlang.org/tflite-1.1.2/ios/Classes/TflitePlugin.mm:21:9: fatal error: 'metal_delegate.h' file not found
#import "metal_delegate.h"
        ^~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in parallel
note: Removed stale file '/Users/alain/Library/Developer/Xcode/DerivedData/Runner-aluwvsnnrmgyolbvyvhthhxkqxbu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBSDKCoreKit_Basics.build/InputFileList-5A3770FC020BB2992A8A91D6A694C4BB-FBSDKCoreKit_Basics-xcframeworks-input-files-d62456de18fc9278816caf1edc8ec4be-resolved.xcfilelist'

note: Removed stale file '/Users/alain/Library/Developer/Xcode/DerivedData/Runner-aluwvsnnrmgyolbvyvhthhxkqxbu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBSDKCoreKit_Basics.build/OutputFileList-5A3770FC020BB2992A8A91D6A694C4BB-FBSDKCoreKit_Basics-xcframeworks-output-files-af501755e41daaa5055957e344b6aa79-resolved.xcfilelist'

note: Removed stale file '/Users/alain/Library/Developer/Xcode/DerivedData/Runner-aluwvsnnrmgyolbvyvhthhxkqxbu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBSDKCoreKit_Basics.build/Script-5A3770FC020BB2992A8A91D6A694C4BB.sh'

note: Removed stale file '/Users/alain/Library/Developer/Xcode/DerivedData/Runner-aluwvsnnrmgyolbvyvhthhxkqxbu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/PromisesObjC.build/Script-9B55CA93E42083CEA14CCF83D3DB055B.sh'

/Users/alain/Arduino/Bird Feeder/App/flutter/happy_birds/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'leveldb-library' from project 'Pods')

Could not build the application for the simulator. Error launching application on iPhone 11 Pro.

Could you please help ?

jmtrutna commented 2 years ago

Go to your Podfile.lock in your ios folder and change whatever version your TensorflowLiteC is to 2.2

Alisofin commented 2 years ago

thanks for the tip but it doesn't work, creating other dependencies problems, notably with flutter_share_me. For the moment, I'm stuck.

Keeys commented 2 years ago

I have the same problem on apple m1