Skip to content

UIApplication openURL methods in the flutter/engine are deprecated in iOS 9.0 #128743

@cyanglaz

Description

@cyanglaz

To reproduce the deprecation warnings

  1. Go to local build root folder, typically located one level up of the engine directory. Then change the ios_deployment_target to 17.0: https://github.com/flutter/buildroot/blob/master/build/config/ios/ios_sdk.gni#L19
  2. Add -Wdeprecated-declarations and -Wdeprecated-implementations in flutter_clags_objc https://github.com/flutter/engine/blob/main/common/config.gni#L60
  3. Build the local engine like you normally would.

List of deprecated APIs

/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:299:1: note: method 'application:handleOpenURL:' declared here

  • (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url API_DEPRECATED_WITH_REPLACEMENT("application:openURL:options:", ios(2.0, 9.0)) API_UNAVAILABLE(xros) API_UNAVAILABLE(tvos);

/Applications/Xcode_15-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:300:1: note: method 'application:openURL:sourceApplication:annotation:' declared here

  • (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(nullable NSString *)sourceApplication annotation:(id)annotation API_DEPRECATED_WITH_REPLACEMENT("application:openURL:options:", ios(4.2, 9.0)) API_UNAVAILABLE(xros) API_UNAVAILABLE(tvos);

This is trivial to fix by replacing them with application:openURL:options:

Metadata

Metadata

Assignees

Labels

Bot is counting down the days until it unassigns the issueP2Important issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.engineflutter/engine related. See also e: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions