Xcode Build Fails on Archive, but the Build does not Fail on Run with ResearchKit

105 Views Asked by At

What I am trying to achieve is to archive the app and still have a working consent form on the app.

Although this piece of code is deprecated and says to use ORKInstructionStep I haven't found anywhere how to use ORKInstructionStep instead of ORKVisualConsentStep. Whenever I try to Archive the app I keep getting this problem. Still, I also can't remove the ORKVisualConsentStep because I haven't been able to find anywhere how to add the consentDocument otherwise.

I've looked at so many other tutorials and all of them use the ORKVisualConsentStep and haven't seen anyone that has had this problem show how to still keep the consent form working. I can get the app running on a phone but I can't get it to archive so not entirely sure what is going on.

Any insight would be beneficial thank you

2

There are 2 best solutions below

0
On BEST ANSWER

I managed to fix the problem by using cocoapods to install the ResearchKit framework instead of dragging ResearchKit into my project. It now archives however I had to comment out this line of code instructionStep.imageContentMode = .scaleAspectFit for my survey tasks.

0
On

If you don't know how to added all frameworks, libraries and Embedded contents then you can find shown below what I shared and you can remove it. Please check after your local files remove it.

enter image description here