powersync-ja / powersync.dart

SDK that enables local-first and real-time reactive apps with embedded SQLite for Flutter/Dart clients
https://www.powersync.com
133 stars 18 forks source link

Getting undefined symbol: _sqlite3_* issue in iOS #184

Closed iamdipanshusingh closed 1 month ago

iamdipanshusingh commented 1 month ago

Getting undefined symbol: sqlite3* issue in iOS

Screenshot

Screenshot 2024-10-03 at 11 51 31 PM

flutter doctor

flutter doctor -v [✓] Flutter (Channel stable, 3.24.3, on macOS 14.4 23E214 darwin-arm64, locale en-IN) • Flutter version 3.24.3 on channel stable at /Users/dipanshu/fvm/versions/stable • Upstream repository https://github.com/flutter/flutter.git • Framework revision 2663184aa7 (3 weeks ago), 2024-09-11 16:27:48 -0500 • Engine revision 36335019a8 • Dart version 3.5.3 • DevTools version 2.37.3 [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/dipanshu/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15E204a • CocoaPods version 1.15.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2024.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314) [✓] Connected device (4 available) • iPhone 15 Pro (mobile) • 2FC2403D-2DE5-4E47-8C64-3DCC3FD622F1 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 14.4 23E214 darwin-arm64 • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.4 23E214 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 129.0.6668.89 ! Error: Browsing on the local area network for Dipanshu’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) [✓] Network resources • All expected network resources are available. • No issues found!
mugikhan commented 1 month ago

Hey @iamdipanshusingh this could be a conflict with GRDB. PowerSync bundles it's own sqlite3 and that might conflict with other libraries. Could you test it without using any other sqlite3 libraries?

iamdipanshusingh commented 1 month ago

yeah, I noticed that and removed GRDB, and its working fine.

attaching link for the same

iamdipanshusingh commented 1 month ago

also, deleting an existing implementation of sqlite seems like a huge and breaking change, don't you think it could've been avoided?

mugikhan commented 1 month ago

@iamdipanshusingh PowerSync currently relies on loading its core extension into sqlite and uses a version of sqlite3 provided by sqlite3_flutter_libs. We are looking into making it so that PowerSync can be used with other sqlite3 libraries provided they allow extension loading. Please see this reply from Ralf.