objectbox / objectbox-swift

Swift database - fast, simple and lightweight (iOS, macOS)
https://swift.objectbox.io
Apache License 2.0
452 stars 30 forks source link

Manual installation in a Xcode framework gives error "No launchable Xcode targets found" #84

Closed mariusgab closed 6 months ago

mariusgab commented 7 months ago

I want to add this library inside a Xcode framework using the steps provided here https://swift.objectbox.io/advanced/manual-installation , but when trying to run the setup.rb script it gives error No launchable Xcode targets found in "/Users/marius/work/testframework/testframework.xcodeproj".

Below are the steps I took:

  1. Creating Xcode framework

    Screenshot 2024-02-26 at 22 46 05
  2. Downloading & adding the framework in the project folder

  3. Adding the ObjectBox.framework folder in the project settings

    Screenshot 2024-02-26 at 22 48 08 Screenshot 2024-02-26 at 22 48 39
  4. running the scripts

    Screenshot 2024-02-26 at 22 51 51

Am I doing something wrong here or its just that this library cannot be added by any means to a framework via using manual installation or by cocoapods/spm (I tried both methods, nothing worked).

greenrobot-team commented 7 months ago

Thanks for reporting! We have not tested this in a while. However, based on the error it looks like the Xcode project does not have launchable targets. Try adding at least one, for example for macOS or iOS. Then try to run the script again.

You can also see what the script does.

mariusgab commented 6 months ago

if I add a launchable target (by selecting "App" from the popup) it will work, but then the library will be "attached" to this app and not the framework itself, from what I understand.

What i want is a singular xcode FRAMEWORK (NOT a launchable app) where I can add this library and then use it with multiple apps/projects. Would this be possible at the moment?

mariusgab commented 6 months ago

Ok so I followed the steps outlined here https://swift.objectbox.io/advanced/setup-script and it seems to work!