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

Enable iOS plugin #40

Merged
merged 13 commits into from
Dec 21, 2022
Merged

Enable iOS plugin #40

merged 13 commits into from
Dec 21, 2022

Conversation

donpui
Copy link
Contributor

@donpui donpui commented Nov 28, 2022

Add iOS dart plugin with static libraries compilation

Related with Destiny issue 196


Code Review Checklist (to be filled out by reviewer)

  • Description accurately reflects what changes are being made.
  • Description explains why the changes are being made (or references an issue containing one).
  • The PR appropriately sized.
  • New code has enough tests.
  • New code has enough documentation to answer "how do I use it?" and "what does it do?".
  • Existing documentation is up-to-date if impacted.

@donpui donpui changed the title Ios build Enable iOS plugin Nov 28, 2022
@donpui donpui marked this pull request as ready for review December 7, 2022 13:12
@donpui donpui requested a review from ewanas December 7, 2022 13:12
@donpui donpui mentioned this pull request Dec 14, 2022
11 tasks
@@ -142,11 +143,19 @@ class Config {
class NativeClient {
late final DynamicLibrary _wormholeWilliamLib;
late final DynamicLibrary _asyncCallbackLib;

late final Config config;

NativeClient({Config? config}) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ewanas can we make error handling here in case we fail to load library? For example, if I run iOS app on amd64 arch and if fails to load static libraries, receive or sender is just as waiting.. Probably we should throw error and display something to user as technical error.

Copy link
Collaborator

@ewanas ewanas Dec 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we rely on executable() as the source of symbols here, the case of "could not find the library" isn't possible. Right now symbols are looked up when a client function needs them. Maybe the constructor for NativeClient can lookup or check if all needed symbols are there beforehand otherwise fail with an error

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From other hand.. this is more a check for build not for running. I am thinking can be there any cases, when libraries stop loading up during installation or launching. For example tries to load ios app retrieved from apple store and run in ios simulator..

Copy link
Collaborator

@ewanas ewanas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@donpui
Copy link
Contributor Author

donpui commented Dec 21, 2022

Also updated submodule to latest w-w version as there was fix for hints.

@donpui donpui merged commit 49b003b into main Dec 21, 2022
@donpui donpui deleted the ios-build branch December 21, 2022 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants