mobile_scanner icon indicating copy to clipboard operation
mobile_scanner copied to clipboard

'GTMDefines.h' file not found

Open shichunlei opened this issue 1 year ago • 4 comments

Failed to build iOS app Could not build the precompiled application for the device. Lexical or Preprocessor Issue (Xcode): 'GTMDefines.h' file not found /Users/mac104/workspace/****/ios/Pods/GoogleToolboxForMac/Foundation/GTMNSData+zlib.h:19:8

shichunlei avatar Aug 23 '24 08:08 shichunlei

What version of mobile_scanner Are you using? What is your Flutter version? Did you run pod install ? (Maybe you need to recreate your Podfile.lock)

navaronbracke avatar Aug 23 '24 20:08 navaronbracke

[✓] Flutter (Channel stable, 3.22.0, on macOS 14.1.1 23B81 darwin-x64, locale zh-Hans-CN) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 15.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2024.1)

mobile_scanner: ^5.2.1

shichunlei avatar Aug 26 '24 10:08 shichunlei

It's a problem with the header file

I found GoogleToolboxForMac under ios/Pods/, and then changed the #import "GTMDefines.h" imported in the header of GTMLogger.h, GTMNSData+zlib.h, and GTMNSData+zlib.m under Foundation to #import <GTMDefines.h>. I solved this problem, but after I executed the “flutter clean” command, Pods became #import "GTMDefines.h" again. I still need to modify it manually. How can I do it? 1 2

shichunlei avatar Sep 12 '24 04:09 shichunlei

You will have to raise an issue on the MLKit issue tracker. MLKit is one of our dependencies, and we are currently on the latest version of MLKit for iOS

navaronbracke avatar Sep 12 '24 06:09 navaronbracke

Lexical or Preprocessor Issue (Xcode): 'GTMDefines.h' file not found

Lexical or Preprocessor Issue (Xcode): 'GTMDefines.h' file not found gettting this error too

Henrydykee avatar Jun 06 '25 14:06 Henrydykee