Skip to content

Error running ObjectBoxGeneratorCommand with objectbox via xcode #94

Closed
@angelocarasig

Description

@angelocarasig

Is there an existing issue?

Build info

  • ObjectBox version: 4.1.0-beta.2
  • OS: iOS18
  • Device/chipset: iPhone 16

Steps to reproduce

TODO Tell us exactly how to reproduce the problem.

  1. Create a new xcode App
  2. Go to File -> Add Package Dependency
  3. Paste in https://github.com/objectbox/objectbox-swift-spm and set dependency rule to Next Major Version, set the version to 4.1.0-beta.2
  4. Add package and set target to the created xcode project
  5. Right click project and run the ObjectBoxGeneratorCommand

Expected behavior

The generator to run with no errors

Actual behavior

A crash.

Logs, stack traces

Running the setup.rb file similarly with the cocoapods approach nets me an error log like below with a more detailed idea on whats happening but unsure how to fix it

Logs
🔸 Looking for project files in the current directory ...
🔸 Found a single project.
🔸 Using "/Users/User/Repositories/Project/Project/Project.xcodeproj"
🔹 Adding a new group for generated files at `./generated/`...
Pods/ObjectBox/setup.rb:225:in `block in <main>': undefined method `name' for #<Xcodeproj::Project::Object::PBXFileSystemSynchronizedRootGroup:0x0000000124a39cb8> (NoMethodError)
	from Pods/ObjectBox/setup.rb:225:in `index'
	from Pods/ObjectBox/setup.rb:225:in `<main>'

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions