Open thanhhai08sk opened 3 years ago
Upgrade Objectbox following https://swift.objectbox.io/install
So, you did the following?
pod repo update
pod update ObjectBox
Pods/ObjectBox/setup.rb
Can you paste the output of running setup.rb, please?
Yes, I did. The output:
MacBook-Pro:CoreIOS HaiNguyen$ Pods/ObjectBox/setup.rb
ObjectBox Project Setup
đ¸ Looking for project files in the current directory ...
đ¸ Found a single project.
đ¸ Using "/Users/HaiNguyen/Documents/githubProject/JournalIt/journal_it/ios/CoreIOS/CoreIOS.xcodeproj"
đ No launchable Xcode targets found in "/Users/HaiNguyen/Documents/githubProject/JournalIt/journal_it/ios/CoreIOS/CoreIOS.xcodeproj"
âšī¸ Please specify project and target explicitly; run with --help for help
Not sure if there's anything wrong but CoreIOS is a framework module, EntityInfo-CoreIOS.generated.swift was refreshed on each build, and I didn't have problem with version 1.3.1
When specify the target:
MacBook-Pro:CoreIOS HaiNguyen$ Pods/ObjectBox/setup.rb --skip-modified /Users/HaiNguyen/Documents/githubProject/JournalIt/journal_it/ios/CoreIOS/CoreIOS.xcodeproj CoreIOS
ObjectBox Project Setup
đ¸ Using "/Users/HaiNguyen/Documents/githubProject/JournalIt/journal_it/ios/CoreIOS/CoreIOS.xcodeproj"
Target "CoreIOS":
đ¸ Script was modified.
đ¸ Existing script: "$PODS_ROOT/ObjectBox/generate_sources.sh" -- --output "$PROJECT_DIR/generated/EntityInfo-CoreIOS.generated.swift" --model-json "$PROJECT_DIR/model-CoreIOS.json" # add this parameter to make entities exportable: --visibility public
đ¸ Expected script: "$PODS_ROOT/ObjectBox/generate_sources.sh" -- --output "$PROJECT_DIR/generated/EntityInfo-CoreIOS.generated.swift" --model-json "$PROJECT_DIR/model-CoreIOS.json" # add this parameter to make entities exportable: --visibility public
đš Skipped target "CoreIOS".
đ¸ 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.
Can you please try what is suggested here: # add this parameter to make entities exportable: --visibility public
To do this you have to locate the script in the Xcode build phase "[OBX] Update Sourcery Generated Files".
It might also be helpful to check the following docs: manual-installation, setup-script, and code generation.
Once we know what exactly is going on we'll try to make it simpler in the future. E.g. looking at setup.rb:
if !target.launchable_target_type? # probably a framework. Add a common use case reminder.
obx_shell_script << " # add this parameter to make entities exportable: --visibility public"
end
It might be better to detect a framework reliably, but not sure how exactly that could be done yet with what xcodeproj has to offer.
Unfortunately, I tried to add --visibility public
but got the same result.
Checked the docs, though I can't find anything to try out for this problem.
Describe the bug I was using 1.3.1 but then encounter the issue "Could not open env for DB (12)". I try to upgrade to 1.4.1 and 1.4.0 but the app crash at launch with:
dyld: symbol '_$s9ObjectBox13EntityBindingP09generatorD7VersionSiyFTq' not found, expected in '/private/var/containers/Bundle/Application/4D3A6114-9D36-4C10-856E-9FD825083863/Journal it!.app/Frameworks/ObjectBox.framework/ObjectBox', needed by '/private/var/containers/Bundle/Application/4D3A6114-9D36-4C10-856E-9FD825083863/Journal it!.app/Frameworks/CoreIOS.framework/CoreIOS'
ObjectBox is used in the common module CoreIOS. The generator script seems to work:
"$PODS_ROOT/ObjectBox/generate_sources.sh" -- --output "$PROJECT_DIR/generated/EntityInfo-CoreIOS.generated.swift" --model-json "$PROJECT_DIR/model-CoreIOS.json" # add this parameter to make entities exportable: --visibility public
Basic info (please complete the following information):
To Reproduce Steps to reproduce the behavior: