Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Can't start app on ios simulator with regtest #462

Open
holzeis opened this issue Nov 30, 2022 · 8 comments
Open

Can't start app on ios simulator with regtest #462

holzeis opened this issue Nov 30, 2022 · 8 comments

Comments

@holzeis
Copy link
Collaborator

holzeis commented Nov 30, 2022

  1. Start ios simulator
  2. Run NETWORK=regtest flutter run
  3. Select ios if necessary

The app starts against the default setting testnet instead of regtest

flutter: {_TenTenOneState} {setupRustLogging} {ten_ten_one::wallet: event rust/src/wallet.rs:81: electrum_str: ssl://blockstream.info:993,message: Creating the wallet,network: Testnet}
@holzeis
Copy link
Collaborator Author

holzeis commented Nov 30, 2022

@klochowicz do we need #215 after all?

@klochowicz
Copy link
Contributor

klochowicz commented Dec 1, 2022

@holzeis , what's the use-case? we can fully test the library with a native build on regtest, and use the simulator with testnet to ensure the widgets work well.

@da-kami
Copy link
Contributor

da-kami commented Dec 1, 2022

Would --dart-define allow us to read these properties inside the simulator? Then this solution might actually be superior.

The problem with the environment variables is, that we cannot set them inside the simulator. Will we be able to set the arguments when running the app inside the simulator?

@holzeis
Copy link
Collaborator Author

holzeis commented Dec 1, 2022

@holzeis , what's the use-case? we can fully test the library with a native build on regtest, and use the simulator with testnet to ensure the widgets work well.

well, you can do that, but it's not the nicest developer experience in my point of view, given that you could achieve the same thing with using --dart-define instead of environment variables.

@holzeis
Copy link
Collaborator Author

holzeis commented Dec 1, 2022

Would --dart-define allow us to read these properties inside the simulator? Then this solution might actually be superior.

Yes! like environment variables.

@bonomat
Copy link
Contributor

bonomat commented Dec 2, 2022

--dart-define does not seem to work on the simulator.

@holzeis
Copy link
Collaborator Author

holzeis commented Dec 2, 2022

It does, you have to use const though - very weird.

@holzeis
Copy link
Collaborator Author

holzeis commented Dec 2, 2022

@bonomat It's unfortuntely not possible to access the arguments passed through --dart-define directly in rust. They haved to be passed through flutter.

#215 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants