nandorojo / burnt

Crunchy toasts for React Native. 🍞
MIT License
1.2k stars 37 forks source link

iOS build issue on latest version - v0.10.0 #13

Closed juanchoperezj closed 1 year ago

juanchoperezj commented 1 year ago

Version 0.9.0 was working just fine, the issue appeared in the last one.

React Native: 0.68.0 I checked the Swift version used on the project's build settings and it is Swift 5

Screenshot 2023-03-07 at 5 20 13 PM

The last two lines disappeared after I remove the node modules and pods, then reinstall them and clean the build folder using Xcode, but the Cannot find type 'Enumerable' in scope it's still there.

Screenshot 2023-03-07 at 5 20 05 PM
nandorojo commented 1 year ago

@alantoa any idea? I saw you changed to Enumerable in #12

nandorojo commented 1 year ago

I think we may need to upgrade expo modules

nandorojo commented 1 year ago

A bit confused though, @alantoa said it was working for him. I wonder if we could get a repro made?

alantoa commented 1 year ago

@nandorojo yeah, I made the change because EnumArgument was deprecated in expo-modules-core v1.0.x, the source code can be found here.

@juanchoperezj so I guess you are using expo-modules-core version less than v1, right? if so, you need to upgrade it for it to work!

juanchoperezj commented 1 year ago

Thanks for the response @alantoa @nandorojo

My bad, I was using Expo 45, and now it works fine!

But I do not see two lines on the toast on iOS. Text is: In order to use the app, you must have internet connection.

Toast config:

  title: 'No internet connection',
  message: 'In order to use the app, you must have internet connection.',
  preset: 'error',
  duration: 5,
}
Screenshot 2023-03-16 at 12 35 15 PM
nandorojo commented 1 year ago

I believe that's a limitation of SPIndicator: https://github.com/ivanvorobei/SPIndicator/blob/main/Sources/SPIndicator/SPIndicatorView.swift#L155

nandorojo commented 1 year ago

This isn't necessarily bad: Toasts should be very short and easy-to-read. In your case, I wouldn't even have a message beyond "No internet connection"

juanchoperezj commented 1 year ago

Agree! I just wanted to bring it out, I'll close the issue! Thanks for the help!