Skip to content

Replace unsafe ClassFinder with ExtensionFinder to resolve crashes#1180

Merged
praveek merged 1 commit intoadobe:dev-v5.6.2from
praveek:dev-v5.6.2
Sep 5, 2025
Merged

Replace unsafe ClassFinder with ExtensionFinder to resolve crashes#1180
praveek merged 1 commit intoadobe:dev-v5.6.2from
praveek:dev-v5.6.2

Conversation

@praveek
Copy link
Copy Markdown
Contributor

@praveek praveek commented Sep 4, 2025

Crashes still occur intermittently when iterating over the list returned by objc_getClassList or objc_copyClassList.

I suspect two possible causes:

For now,

  • Modified ExtensionFinder, which loads all Adobe extensions. Any third-party extensions that were previously auto-loaded through the initializer API will now need to be registered manually using the registerExtensions API.
  • Detect whether the app uses SceneDelegate by checking for the presence of UIApplicationSceneManifest in the Info.plist, instead of iterating through all classes.

Copy link
Copy Markdown
Contributor

@kevinlind kevinlind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Added one small suggestion.

private static let LOG_TAG = "ExtensionFinder"

// EventHub automatically registers Configuration and the Placeholder extensions, don't include them to prevent duplicate registration warnings.
private static let adobeExtensionClassNames = [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel if will be easier to maintain this list if included in the CoreConstants file. Can it be moved there?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ll keep everything self-contained in this file for now until we decide on an approach for third-party extensions.

@praveek praveek merged commit aa5e558 into adobe:dev-v5.6.2 Sep 5, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants