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

Trying to run demo, running into errors #88

Open
stefanlenoach opened this issue Dec 11, 2024 · 5 comments
Open

Trying to run demo, running into errors #88

stefanlenoach opened this issue Dec 11, 2024 · 5 comments

Comments

@stefanlenoach
Copy link

Hi, i'm trying to get a simple demo working and running into issues. Basically copy/pasted your code directly into a swift file in my xcode project and getting several errors:

Screenshot 2024-12-11 at 3 58 53 PM

Also tried this to try to handle the 'top level' bug as seen above:
Screenshot 2024-12-11 at 4 02 55 PM

Apologies in advance if this is an obvious fix, I'm a swift/xcode noob trying to muddle his way through with AI.

@stefanlenoach stefanlenoach added the bug Something isn't working label Dec 11, 2024
@greenrobot
Copy link
Member

Please describe how you setup ObjectBox. Did you follow one of the ways described in https://swift.objectbox.io/install? Which one?

@stefanlenoach
Copy link
Author

stefanlenoach commented Dec 12, 2024

Yes i downloaded it via the swift package, using version 4.1.0-beta.1

@greenrobot
Copy link
Member

Please give a bit more details. E.g. https://swift.objectbox.io/install#swift-package mentions two variations. It would be best if you re-iterate all the steps that you have taken so far. Thanks!

@stefanlenoach
Copy link
Author

Apologies! I followed this essentially (from the docs):

Set up an Xcode project
In Xcode, add a package dependency and search for the package URL:

Copy
https://github.com/objectbox/objectbox-swift-spm
For the Dependency Rule, we recommend to use "Up to Next Major Version" and version 4.1.0-beta.1. To find the latest version to use view the tags of the objectbox-swift-spm repository.

Finally, when asked, add the ObjectBox.xcframework to your app target.

Now, you are all set to define your first ObjectBox entities. To continue check the Getting Started guide or the example project.

That's basically all I did before trying to use the demo example directly in my code and also have Claude try to help me out taking in context the xcode errors. Not getting any errors importing ObjectBox so I'm guessing it was correctly added as a dependency.

@greenrobot-team
Copy link
Member

greenrobot-team commented Dec 16, 2024

To continue check the Getting Started guide or the example project.

It looks like you still need to run the code generator: https://swift.objectbox.io/getting-started#generate-objectbox-code

Note: I labeled this issue with "more info required" so it will auto-close in a few days if there are no follow-up comments.

@greenrobot-team greenrobot-team added more info required Needs more info to become actionable. Auto-closed if no response. and removed bug Something isn't working labels Dec 16, 2024
@github-actions github-actions bot removed the more info required Needs more info to become actionable. Auto-closed if no response. label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants