Conversation
|
I did not touch the image functions, but I could take a look at it if needed. |
|
If its reasonable for you, I would prefer to support images on iOS out-of-the-gate as well, since it appears to be supported in the name of preventing cross-platform feature/support drift. I've seen plenty of apps utilize it so I can see this as being something that bites someone. |
src/platform/apple.rs
Outdated
| let _: usize = unsafe { msg_send![self.pasteboard, clearContents] }; | ||
| #[cfg(target_os = "ios")] | ||
| let _: () = unsafe { | ||
| msg_send![self.pasteboard, setItems: NSArray::from_vec(Vec::<Id<NSString>>::new())] |
There was a problem hiding this comment.
Is this the right array type to clear any existing content type? The docs seem to say this is essentially an array of [String; Any] but its unclear if this matches. At a glance, this needs an inner dictionary type instead of a plain NSString?
There was a problem hiding this comment.
The type here doesn't really matter, I just want to send an empty array to the items property.
It is indeed technically wrong, so I'll push a fix.
| #[cfg(target_os = "ios")] | ||
| let success: bool = { | ||
| let string = NSString::from_str(&data); | ||
| unsafe { msg_send![self.clipboard.pasteboard, setString: string] } |
There was a problem hiding this comment.
Did this (and other callsites) get mixed up? setString appears to be only a method on NSPasteboard.
There was a problem hiding this comment.
setString is the objc way of setting a value for the string property, same as setItems.
@complexspaces I just pushed the iOS image implementation. I had to use PNG instead of TIFF format though. |
|
Is there anything preventing this being merged? I’m sure lots of people would like to see it added. I’m happy to help if I can. |
|
Hi @rizerco, there's still interest in merging this one in but its fallen off my priority list. Previously I was trying to see if there was a way to convert a |
|
anything else i can do? |
|
Thank you for your offer. I am coming up with a plan to resolve conflicts and try testing out the changes here. I'm interested in getting iOS support landed because it would get 1Password closer to using |
|
Hi again, I have a short status/transparency update: I believe I've finished rebasing/porting to the latest |
|
Awesome! On the Tauri side we also use a custom Swift implementation 😅 |
|
Hey again everyone. I'm sure no one (including me) is happy about how long this one has been sitting but this time I'm back with two bits of forward progress:
Please stay tuned for that work, and please feel free to ping me here over the summer for specific updates on the iOS component. |
`arboard` doesn't support support iOS yet: 1Password/arboard#103 Launching an app on a physical device results in a long timeout while trying to connect to the X11 server (the timeout is immediate when launching on a simulator).
`arboard` [doesn't support support iOS yet](1Password/arboard#103), so this PR adds iOS to the conditions that prevent `arboard` from being enabled. Launching an app on a physical device results in a long timeout (~8s) while trying to connect to the X11 server (the timeout is immediate when launching on a simulator), with the following trace: ``` egui_winit::clipboard: Failed to initialize arboard clipboard: Unknown error while interacting with the clipboard: X11 server connection timed out because it was unreachable ``` <!-- Please read the "Making a PR" section of [`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/main/CONTRIBUTING.md) before opening a Pull Request! * Keep your PR:s small and focused. * The PR title is what ends up in the changelog, so make it descriptive! * If applicable, add a screenshot or gif. * If it is a non-trivial addition, consider adding a demo for it to `egui_demo_lib`, or a new example. * Do NOT open PR:s from your `master` branch, as that makes it hard for maintainers to test and add commits to your PR. * Remember to run `cargo fmt` and `cargo clippy`. * Open the PR as a draft until you have self-reviewed it and run `./scripts/check.sh`. * When you have addressed a PR comment, mark it as resolved. Please be patient! I will review your PR, but my time is limited! --> * [x] I have followed the instructions in the PR template
`arboard` [doesn't support support iOS yet](1Password/arboard#103), so this PR adds iOS to the conditions that prevent `arboard` from being enabled. Launching an app on a physical device results in a long timeout (~8s) while trying to connect to the X11 server (the timeout is immediate when launching on a simulator), with the following trace: ``` egui_winit::clipboard: Failed to initialize arboard clipboard: Unknown error while interacting with the clipboard: X11 server connection timed out because it was unreachable ``` <!-- Please read the "Making a PR" section of [`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/main/CONTRIBUTING.md) before opening a Pull Request! * Keep your PR:s small and focused. * The PR title is what ends up in the changelog, so make it descriptive! * If applicable, add a screenshot or gif. * If it is a non-trivial addition, consider adding a demo for it to `egui_demo_lib`, or a new example. * Do NOT open PR:s from your `master` branch, as that makes it hard for maintainers to test and add commits to your PR. * Remember to run `cargo fmt` and `cargo clippy`. * Open the PR as a draft until you have self-reviewed it and run `./scripts/check.sh`. * When you have addressed a PR comment, mark it as resolved. Please be patient! I will review your PR, but my time is limited! --> * [x] I have followed the instructions in the PR template
No description provided.