3

Just ran into this problem today using v1.30 and I'm out of ideas on what else to apply. Funny enough, I can run a debug build on an iOS device and it builds and runs correctly, but attempting to run on a simulator, or build the project in Xcode produces this error.

Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/n8/srtfdgdx4ggdvqjqp9j3ldwh0000gn/T/flutter_tools.hIAEZA/flutter_ios_build_temp_dirw8LQTg/temporary_xcresult_bundle

    ld: framework not found ObjectBox
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order

    Result bundle written to path:
        /var/folders/n8/srtfdgdx4ggdvqjqp9j3ldwh0000gn/T/flutter_tools.hIAEZA/flutter_ios_build_temp_dirw8LQTg/temporary_xcresult_bundle


Error (Xcode): Framework not found ObjectBox

Could not build the application for the simulator.
Error launching application on iPhone 13.

I've updated the podfiles, ran setup.rb which outputs

 ObjectBox Project Setup 

 Looking for project files in the current directory ...
 Found a single project.
 Using "/Users/me/Projects/appName/ios/Runner.xcodeproj"

Target "Runner":

   Skipping target "Runner", build phase "[OBX] Update Sourcery Generated Files" already up to date.

  No changes made to project. 
 ℹ️ If your code generation was not setup properly run with --help to see options

  Please remember to use the .xcworkspace CocoaPods created from now on instead of your project.

Output from flutter doctor

[✓] Flutter (Channel master, 2.10.0-1.0.pre.337, on macOS 11.6.1 20G224 darwin-x64, locale en-US)
    • Flutter version 2.10.0-1.0.pre.337 at /Users/me/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 53771aba0c (2 days ago), 2022-01-31 01:15:14 +0530
    • Engine revision fccb9b670d
    • Dart version 2.17.0 (build 2.17.0-67.0.dev)
    • DevTools version 2.10.0-dev.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/me/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.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 11.0.11+0-b60-7590822)

[✓] Connected device (2 available)
    • iPhone 13 (mobile) • D81593D6-5B4A-422C-87BD-8008E7B0AF65 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator)

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

I've checked files and locations and everything appears to be there, it just appears to not link correctly. Can anyone shed some insight?

Swisscheese
  • 571
  • 1
  • 5
  • 21
  • As you ran setup.rb are you maybe trying to set up ObjectBox for Swift instead of ObjectBox for Dart/Flutter? See https://docs.objectbox.io/getting-started for Flutter instructions. For ObjectBox for Dart the iOS libraries ship with the objectbox_flutter_libs package, no setup necessary AFAIK. – Uwe - ObjectBox Feb 07 '22 at 06:37

0 Answers0