This is an automated email from the ASF dual-hosted git repository. dpogue pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cordova-ios.git
The following commit(s) were added to refs/heads/master by this push: new eeeb62b9 doc: add precompiled prefix header deprecation notice to 8.x upgrade (#1546) eeeb62b9 is described below commit eeeb62b9e0aa68920f6187760bcfd21694afd52b Author: エリス <er...@users.noreply.github.com> AuthorDate: Sat Jun 21 23:10:31 2025 +0900 doc: add precompiled prefix header deprecation notice to 8.x upgrade (#1546) * doc: add precompiled prefix header deprecation notice to 8.x upgrade * doc: Apply suggestions from code review Co-authored-by: Darryl Pogue <dar...@dpogue.ca> --------- Co-authored-by: Darryl Pogue <dar...@dpogue.ca> --- CordovaLib/CordovaLib.docc/upgrading-8.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CordovaLib/CordovaLib.docc/upgrading-8.md b/CordovaLib/CordovaLib.docc/upgrading-8.md index 285a38a5..aca42b83 100644 --- a/CordovaLib/CordovaLib.docc/upgrading-8.md +++ b/CordovaLib/CordovaLib.docc/upgrading-8.md @@ -152,6 +152,26 @@ if webView.responds(to: scrollViewSelector) { This updated code is compatible with existing versions of Cordova iOS. +### Precompiled prefix header removal + +Previously, Cordova projects included a precompiled prefix header that automatically imported the `Foundation` and `UIKit` frameworks. This made these frameworks available globally, without requiring explicit imports in each Objective-C file. + +While this may have offered convenience, it also introduced an implicit dependency on the Cordova-managed prefix header and prefix headers have gradually been replaced with module imports in Objective-C and were never supported in Swift. + +To align with Xcode defaults and improve long-term maintainability, the precompiled prefix header has been removed from generated Cordova app projects. While this may be a breaking change for some plugins, developers are now expected to explicitly declare the frameworks their code depends on by adding the appropriate import statements directly in their source files. + +```objc +// New code (Objective-C) +#import <Foundation/Foundation.h> +#import <UIKit/UIKit.h> +``` + +```swift +// New code (Swift) +import Foundation +import UIKit +``` + ## Other Major Changes ### Deprecating AppDelegate category extensions --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org