Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetPreferred hangs in TextZoom plugin on IOS #4492

Closed
jezrsmith opened this issue Mar 19, 2021 · 3 comments · Fixed by #4493
Closed

GetPreferred hangs in TextZoom plugin on IOS #4492

jezrsmith opened this issue Mar 19, 2021 · 3 comments · Fixed by #4493

Comments

@jezrsmith
Copy link

Bug Report

Plugin(s)

@capacitor/TextZoom

Capacitor Version

Latest Dependencies:

  @capacitor/cli: 2.4.7
  @capacitor/core: 2.4.7
  @capacitor/android: 2.4.7
  @capacitor/ios: 2.4.7

Installed Dependencies:

  @capacitor/cli: 3.0.0-rc.0
  @capacitor/core: 3.0.0-rc.0
  @capacitor/android: 3.0.0-rc.0
  @capacitor/ios: 3.0.0-rc.0

Platform(s)

IOS

Current Behavior

calling TextZoom.getPreferred() hangs on IOS. Works OK on Android (simulator)

Expected Behavior

calling TextZoom.getPreferred() should return preferred zoom level.

Code Reproduction

Can be reproduced using the capacitor-testapp
Just run the app, go to the TextZoom screen and click Get Preferred Zoom. Hangs on both IOS simulator and real device (IOS 14.4.1

Other Technical Details

IOS 14.4.1

Additional Context

@alexsasharegan
Copy link

alexsasharegan commented Apr 6, 2021

I've been attempting to debug this for a couple hours today. Something looks amiss with how there is a javascript implementation of the ios plugin alongside the ios sub package and swift implementation. I'm referring to this: https://github.com/ionic-team/capacitor-plugins/blob/main/text-zoom/src/index.ts#L6

Update
I changed that line to be the web implementation, and it's working on iOS now.

On web, this line appears to create an infinite loop which is causing the hangup: https://github.com/ionic-team/capacitor-plugins/blob/main/text-zoom/src/ios.ts#L21

It seems like the iOS plugin is unfinished too, missing get and set implementations. Maybe I'm missing the inheritance chain thought.

@alexsasharegan
Copy link

See my PR (#338) for progress. I think I've found most of the problems that would take this plugin to a functional state on iOS, but I've taken it about as far as I know how.

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 11, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants