-
Notifications
You must be signed in to change notification settings - Fork 443
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
Cannot find 'OCKSurveyTaskViewController' in scope #645
Comments
The |
Yes, I can confirm that I add the ResearchKit and import it where I use the OCKSurveyTaskViewController. It worked with the old version of Xcode 13.2.1. When I updated Xcode to version 13.3, first I got an error that "Module (ResearchKit) compiled with Swift 5.5.2 cannot be imported by the Swift 5.6 compiler". Then I set Build Libraries for Distribution set to Yes for ResearchKit. After the operation, I build my project and get the error that I mentioned before. |
I also test the WWDC 21 RecoverApp and I also encounter this can't find problem. It worked well with the old version of Xcode. |
This is most likely related to #642. The old description I had on there:
@zxcheergo you probably updated ResearchKit to latest commit on the main when updating Xcode. If I'm right, you should be able to swap out your CareKit in SPM with the one on my branch, https://github.com/cbaker6/CareKit, specific commit 2e4bbe35162a0ecbe794afb543aca84067b6fd64 to get a working build. Basically, the CareKit minimum deployment needs to raise to iOS15 or the ResearchKit deployment needs to drop back to iOS13. You can also use the commit 90c68d0d195f23fff1f618a9a4ffa518be9ac845 on ResearchKit right before the latest. Assuming you are using SPM for CareKit, you can use my branch of CareKit that I currently have bumped to iOS15 until the changes are in CareKit/ResearchKit, https://github.com/cbaker6/CareKit/tree/2.1-slider. This works fine with the latest ResearchKit in Xcode 13.2+ |
Thanks for your replying! Could you please tell me how to use your branch 2.1-slider with the SPM in detail? Do I have to download and drag & drop in the project, instead of using SPM? |
You use it just like you use the CareKit apple repo in SPM.
You will need to use the same process when reverting back to the apple CareKit repo in the future |
Thanks for your replying! I follow your instruction and get the following error: |
Please do you know why I get this message while trying to add package via SPM? I'm unable to find any package result when I use the url EDIT: It's most likely has to do with something it my Xcode's connection to Github. Couldn't fix. The alternative was to download 2.1 slider from the URL, drag the folders for CareKit, CareKitUI, and CareKitStore and drop it at top level in project. Check the Readme for guidance. |
Yes, this is something with your Xcode or your network connection. My repo is public, so anyone can read from it.
This most likely has something to do with how you are using Xcode/SPM (or if you updated to the latest Xcode version recently). Or, how you are importing |
Thank you. clean build folder saved me. |
If #642 gets merged developers can point directly to the Apple CareKit main branch to use the latest commit of ResearchKit with CareKit for iOS 13+ with async/await. Until then, if you need the latest Carekit and ResearchKit for iOS 13+ with async/await you can do the following:
Basically the commit above has #642 merged in it which allows it to work with iOS 13+. |
With the latest Xcode 13.3, I encounter the problem the Cannot find 'OCKSurveyTaskViewController' in scope. Actually, I import the CareKit with the SPM. How to fix this problem?
The text was updated successfully, but these errors were encountered: