Skip to content

fix(ios): remove deprecated CDVPluginResult.associatedObject usage in CDVFile - #659

Open
GitToTheHub wants to merge 1 commit into
masterfrom
pr-ios-remove-use-of-CDVPluginResult.associatedObject
Open

fix(ios): remove deprecated CDVPluginResult.associatedObject usage in CDVFile#659
GitToTheHub wants to merge 1 commit into
masterfrom
pr-ios-remove-use-of-CDVPluginResult.associatedObject

Conversation

@GitToTheHub

Copy link
Copy Markdown
Contributor

Platforms affected

iOS

Motivation and Context

Fix XCode deprecation warnings about assigning CDVPluginResult.associatedObject which is deprecated since cordova-ios 8

  • replace initWithBytesNoCopy string creation with initWithData:encoding: in iOS read paths
  • remove result.associatedObject = data assignments in readAsText and readAsBinaryString
  • keep behavior the same while eliminating Cordova iOS 8 deprecation warnings

Generated-By: GPT-5.3-Codex

Description

Testing

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

…in `CDVFile`

- replace `initWithBytesNoCopy` string creation with `initWithData:encoding:` in iOS read paths
- remove `result.associatedObject = data` assignments in `readAsText` and `readAsBinaryString`
- keep behavior the same while eliminating Cordova iOS 8 deprecation warnings

Generated-By: GPT-5.3-Codex
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.

1 participant