LtbLightning / bdk-flutter

Bitcoin Development Kit - Flutter Package
MIT License
63 stars 29 forks source link

iOS, build & run ipa file in physical device #119

Closed luzemma closed 10 months ago

luzemma commented 10 months ago

Hi!

I can't generate a Mnemonic from String when I build ipa file (release mode) and then run it in a physical device. But when I run the app with VSCode and physical device is plugged into computer the plugin works correctly.

I reproduced this issue with the project example of this repository, and the result is the same, I couldn't restore the "alice wallet".

Stack trace of Sentry console of my app:

_Exception: Exception: Subclasses of `FlutterRustBridgeBase` should be singletons - there should not be two instances (runtimeType=RustBdkFfiPlatform)
  File "basic.dart", line 51, in FlutterRustBridgeBase._sanityCheckSingleton
  File "basic.dart", line 27, in new FlutterRustBridgeBase
  File "bindings.dart", line 1827, in new RustBdkFfiPlatform
  File "bindings.dart", line 23, in new RustBdkFfiImpl
  File "loader.dart", line 16, in loaderApi
  File "root.dart", in Mnemonic.fromString

Plugin version - bdk_flutter: ^0.29.2 Doctor

➜  ~ flutter doctor   
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.5, on macOS 13.5.2 22G91 darwin-arm64 (Rosetta), locale en-MX)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google
    Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.85.1)
[✓] Connected device (2 available)
[✓] Network resources
BitcoinZavior commented 10 months ago

@luzemma Pleas do the following steps please:

Open Xcode and navigate to your project's settings. Select the "Target Runner" option. In the "Build Settings" tab, locate the "Strip Style". Change the value from "All Symbols" to "Non-Global Symbols."

luzemma commented 10 months ago

Thanks @BitcoinZavior! It was solved my issue. 🤟