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 0e659c37 fix(swift): Fix some new Swift deprecation warnings (#1544)
0e659c37 is described below

commit 0e659c3722fa0a0716a940c6b1ba11b58c145ca9
Author: Darryl Pogue <dar...@dpogue.ca>
AuthorDate: Sun Jun 8 14:44:31 2025 -0700

    fix(swift): Fix some new Swift deprecation warnings (#1544)
    
    Can't even go one Xcode minor version without new stuff getting
    deprecated 🙄
    
    To be fair, this is now an officially supported Swift feature rather
    than an experimental option, so this is better in the long run.
---
 templates/project/App/AppDelegate.swift    | 4 ++++
 templates/project/App/ViewController.swift | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/templates/project/App/AppDelegate.swift 
b/templates/project/App/AppDelegate.swift
index e6ef28ff..d0ec40f4 100644
--- a/templates/project/App/AppDelegate.swift
+++ b/templates/project/App/AppDelegate.swift
@@ -20,7 +20,11 @@
 import UIKit
 
 @main
+#if compiler(>=6.1)
+@objc @implementation
+#else
 @_objcImplementation
+#endif
 extension AppDelegate {
     open override func application(_ application: UIApplication, 
configurationForConnecting connectingSceneSession: UISceneSession, options: 
UIScene.ConnectionOptions) -> UISceneConfiguration {
         return UISceneConfiguration(name: "Default Configuration", 
sessionRole: connectingSceneSession.role)
diff --git a/templates/project/App/ViewController.swift 
b/templates/project/App/ViewController.swift
index 87837032..0f29fed2 100644
--- a/templates/project/App/ViewController.swift
+++ b/templates/project/App/ViewController.swift
@@ -19,7 +19,11 @@
 
 import Cordova
 
+#if compiler(>=6.1)
+@objc @implementation
+#else
 @_objcImplementation
+#endif
 extension MainViewController {
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org

Reply via email to