Search code examples
swiftresearchkit

How to Handle ResearcKit 2.0.0 Deprecated Code for Use With iOS 14?


I'm a novice in iOS development and learning how to build an app for conducting a research study that involves the use of surveys, audio, displaying progress for study duration, and if possible a token system for completion of the surveys to allow participants to enter raffles for completing surveys on time.

Now, I've tried implementing the ResearchKit but it has so many errors when trying to build it and I'm not entirely sure how to fix each one of them. I've tried searching around for a walk through for updating the code but I can't seem to find anything and the developer documentation is a bit difficult to interpret for fixing the errors.

Is ResearchKit just out of my grasp for now to use for this project?

If so, what other solutions should I look into because as of now, because ResearchKit handles and standardizes a lot of the components that I'm trying to build from scratch and I want to make sure the IRB accepts the app within the first submission (hopefully).


Solution

  • After deleting the framework, re-specifying the target, and performing the following steps ResearchKit 2.1.0 beta is properly imported and no issue with deprecated code.

    1- Delete your Podfile.lock (I like to use the command '-rm -rf Podfile.lock' on the terminal for this) 2- Delete your Pods folder (I like to use the command '-rm -rf Pods' in the terminal for this) 3- Delete your .xcworkspace 4- Pod install 5- Clear your project into XCode> Product> Clean Build Folder

    All thanks to an old post from jeffersonsb on: https://developer.apple.com/forums/thread/123790?answerId=386841022#386841022