tr3v3r / react-native-esc-pos-printer

An unofficial React Native library for printing on an EPSON TM printer with the Epson ePOS SDK for iOS and Epson ePOS SDK for Android
MIT License
164 stars 71 forks source link

XCode Error: type specifier missing, defaults to 'int' #147

Closed omarst9 closed 4 months ago

omarst9 commented 4 months ago

Hi, when I build the app using version 3.0.3 or 3.1.0 in Xcode I’m seeing the following error:

(node_modules/react-native-esc-pos-printer/ios/ThePrinterWrapper.m:171:15)

  169 |     const disconnectResult = [self disconnectPrinter:target];
  170 |     if (disconnectResult == EPOS2_SUCCESS) {
> 171 |         const diallocResult = [self deallocPrinter:target];
      |               ^ type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]

has anyone come across this and how can I resolve it? I’m using Xcode 15.

Modifying the const to int on line 171 fixes it but i wanted to check if there is another solution without modifying the native code like that.

tr3v3r commented 4 months ago

Hi, when I build the app using version 3.0.3 or 3.1.0 in Xcode I’m seeing the following error:

(node_modules/react-native-esc-pos-printer/ios/ThePrinterWrapper.m:171:15)

  169 |     const disconnectResult = [self disconnectPrinter:target];
  170 |     if (disconnectResult == EPOS2_SUCCESS) {
> 171 |         const diallocResult = [self deallocPrinter:target];
      |               ^ type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]

has anyone come across this and how can I resolve it? I’m using Xcode 15.

This version is not supported anymore. Please migrate to 4.0.0-beta

https://github.com/tr3v3r/react-native-esc-pos-printer/pull/139