carekit-apple / CareKit

CareKit is an open source software framework for creating apps that help people better understand and manage their health.
https://www.researchandcare.org
Other
2.4k stars 443 forks source link

Xcode 14/Ventura Beta5 issue with compiling carekitstore #665

Open wmalloc opened 2 years ago

wmalloc commented 2 years ago
Screenshot 2022-08-08 at 9 51 40 PM
gavirawson-apple commented 2 years ago

I'm not seeing this issue on my end. Can you share your configuration (MacOS version, Xcode version, and CareKit branch)?

Of note - it also looks the CareKit SPM package is being built here, is that intentional?

cbaker6 commented 1 year ago

When building a project that uses CareKit (latest commit on main) via SPM on macOS Ventura, the CareKitStore produces the following error:

image

This error doesn't occur when building on macOS Monterey using Xcode 14.1.

Though apps can still build and run with this error, Xcode Cloud will not build successfully because of it. To build a successful archive, the build has to be completed manually.

zxcheergo commented 1 year ago

And How to fix this error? Should we wait for a newer version of CareKit?

gavirawson-apple commented 1 year ago

Thanks for the additional info folks, I'm going to look into this on our end.

rachelnaidich commented 1 year ago

I had the same issue, and it seemed to go away when I cloned the package and used it locally instead.

Hengyu commented 1 year ago

Hi team, do we have any updates on this issue? This does not block the build & compile for local tests but does block the archive process which prevents us from releasing new versions. @gavirawson-apple

gavirawson-apple commented 1 year ago

I see, apologies for the inconvenience folks. We're working on this on our end but will need some more time to get it resolved. In the meantime, I recommend embedding the frameworks in Xcode instead of using SPM. From my testing it seems like this issue doesn't appear when going down that route. To embed the frameworks you can follow these instructions, but let me know if you have any questions along the way.

cbaker6 commented 1 year ago

@gavirawson-apple I see this error when using the latest issue which seems to be closer to the problem:

Attempt to add read-only file at path file:///Users/xxxx/Documents/Xcode_Projects/ParseCareKit/DerivedData/ParseCareKit/SourcePackages/checkouts/CareKit/CareKitStore/CareKitStore/CoreData/Migrations/2_0To2_1/2.0_2.1_Mapping.xcmappingmodel/xcmapping.xml read/write. Adding it read-only instead. This will be a hard error in the future; you must specify the NSReadOnlyPersistentStoreOption.

Let me know what you think of the workaround in #679

gavirawson-apple commented 1 year ago

Yep I see that on my end too, thanks Corey.

Hengyu commented 1 year ago

Thanks @gavirawson-apple, l'll try the fallback instructions.