Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode project does not build after adding ObjectBox using SPM #59

Closed
ChristianFox opened this issue Mar 19, 2022 · 6 comments
Closed

Xcode project does not build after adding ObjectBox using SPM #59

ChristianFox opened this issue Mar 19, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@ChristianFox
Copy link

Describe the bug

Xcode project does not build after adding ObjectBox using SPM

Basic info (please complete the following information):

  • ObjectBox version: 1.7.0
  • Reproducibility: always
  • Device: MBP
  • OS: macOS, attempting to run on iOS Simulator

To Reproduce

  1. New Project
  2. Add ObjectBox 1.7.0 with SPM
  3. Run gem install xcodeproj
  4. Run setup.rb. I first did this from it's location in cocoapod directory but it failed saying something along the lines of "can't find project files in this location", so I cd'd to the project root and then ran the script using it's full path.
  5. Disabled bitcode
  6. Run the project, get error
  7. Installed sourcery using homebrew
  8. Run the project, still get error

Expected behavior

App to build successfully

Logs, stack traces

Script: /Volumes/.../DerivedData/ObjectBoxTryout2-cdretzkgkdmcmvdywyijqqhssfcv/SourcePackages/checkouts/objectbox-swift/Source/ios-framework/cocoapod/generate_sources.sh
Script realpath: /Volumes/.../DerivedData/ObjectBoxTryout2-cdretzkgkdmcmvdywyijqqhssfcv/SourcePackages/checkouts/objectbox-swift/Source/ios-framework/cocoapod/generate_sources.sh
error: Cannot find Sourcery in the expected location at '/Volumes/.../DerivedData/ObjectBoxTryout2-cdretzkgkdmcmvdywyijqqhssfcv/SourcePackages/checkouts/objectbox-swift/Source/ios-framework/cocoapod/Sourcery.app/Contents/MacOS/Sourcery'

@ChristianFox ChristianFox added the bug Something isn't working label Mar 19, 2022
@greenrobot-team
Copy link
Member

Thanks for reporting. The instructions at https://swift.objectbox.io/install indicate that the setup.rb script needs to be run from within the ObjectBox package.

Can you share the full error message? Also it would be helpful to know which version of macOS, XCode and Swift you are using!

@ChristianFox
Copy link
Author

Thanks for getting back to me,

macOS Monteray: 12.2.1
Xcode: 13.3
Swift: 5

That is the full error message, the only thing I've removed is some of the file path.

Sorry if I'm being dense but what do you mean "From within the ObjectBox package", cd to the package directory?

@greenrobot
Copy link
Member

@ChristianFox any chance you can use Cocoapods? SPM is still WIP...

@ChristianFox
Copy link
Author

Yeah I'll give that a go

@ChristianFox
Copy link
Author

It works for me with Cocoapods

@greenrobot-team
Copy link
Member

greenrobot-team commented Mar 29, 2022

OK, closing this then. For people looking to report issues with Swift Package Manager please share your feedback in #19.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants