Parse iOS / OSX SDK uses PFObject instances for basically everything. All subclasses of PFObject are represented in MongoDB/PostgreSQL as collections/tables with given names. Mapping of the PFObject subclasses and their names in MongoDB/PostreSQL need to be known to Parse SDK so that PFObject subclasses can be loaded/stored properly to the database.
Originally registration of all classes was needed to be done manually by invoking code like this after initialising the Parse SDK:
Then came https://github.com/parse-community/Parse-SDK-iOS-OSX/pull/967 that made things much simpler by scanning executable bundles (read frameworks) for all classes that are subclassing PFObject and registering them during SDK startup automatically.
Building with Xcode 16 seems to break the functionality because objc_copyClassNamesForImage returns nothing.
More investigation is needed. I have not yet been able to see if this is a compiler option that needs to be toggled, or some new measure preventing apps from examining available runtime classes and their properties via Objective-C runtime reflection.
Steps to reproduce
Recompile your app with Xcode 16 and try to run against iOS 18. And see if that works for you.
It fails for me with unrelated error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid class name. Class names cannot start with an underscore.'
This is actually an exception coming from deep inside the Parse SDK where it tries to instantiate PFInstallation with collection name _Installation and failing because PFInstallation class was not registered.
Actual Outcome
Recompiling working code using Xcode 16 breaks the app.
Workaround
For the moment registering all required classes manually seems to work around the problem:
🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.
New Issue Checklist
Issue Description
Parse iOS / OSX SDK uses
PFObject
instances for basically everything. All subclasses ofPFObject
are represented in MongoDB/PostgreSQL as collections/tables with given names. Mapping of thePFObject
subclasses and their names in MongoDB/PostreSQL need to be known to Parse SDK so thatPFObject
subclasses can be loaded/stored properly to the database.Originally registration of all classes was needed to be done manually by invoking code like this after initialising the Parse SDK:
Then came https://github.com/parse-community/Parse-SDK-iOS-OSX/pull/967 that made things much simpler by scanning executable bundles (read frameworks) for all classes that are subclassing
PFObject
and registering them during SDK startup automatically.The code is here:
https://github.com/parse-community/Parse-SDK-iOS-OSX/blob/c301262e17951e893a76a2448e7ce5f74f49bf85/Parse/Parse/Internal/Object/Subclassing/PFObjectSubclassingController.m#L384-L387
Building with Xcode 16 seems to break the functionality because
objc_copyClassNamesForImage
returns nothing.More investigation is needed. I have not yet been able to see if this is a compiler option that needs to be toggled, or some new measure preventing apps from examining available runtime classes and their properties via Objective-C runtime reflection.
Steps to reproduce
Recompile your app with Xcode 16 and try to run against iOS 18. And see if that works for you.
It fails for me with unrelated error:
This is actually an exception coming from deep inside the Parse SDK where it tries to instantiate
PFInstallation
with collection name_Installation
and failing becausePFInstallation
class was not registered.Actual Outcome
Recompiling working code using Xcode 16 breaks the app.
Workaround
For the moment registering all required classes manually seems to work around the problem:
Environment
Client
master
Server
master