Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Xcode 16.0 #141

Open
sprijk opened this issue Oct 14, 2024 · 6 comments
Open

Error with Xcode 16.0 #141

sprijk opened this issue Oct 14, 2024 · 6 comments

Comments

@sprijk
Copy link

sprijk commented Oct 14, 2024

Build system version info:

% fvm flutter --version
Flutter 3.22.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 761747bfc5 (4 months ago) • 2024-06-05 22:15:13 +0200
Engine • revision edd8546116
Tools • Dart 3.4.3 • DevTools 2.34.3

Xcode: Version 16.0 (16A242d)

Running flutter run results in an error:
error: type 'UIApplication' does not conform to protocol 'Launcher'

Possibly relating to component url_launcher as discussed in flutter/flutter#151467

Full output:

% fvm flutter run      
"ar": 36 untranslated message(s).
"zh": 55 untranslated message(s).
"zh_CN": 55 untranslated message(s).
"zh_TW": 54 untranslated message(s).
To see a detailed report, use the untranslated-messages-file 
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection> 


This will generate a JSON format file containing all messages that 
need to be translated.
Launching lib/main.dart on iPhone 15 Pro Max in debug mode...
Running Xcode build...                                                  
Xcode build done.                                            6.2s
Failed to build iOS app
Error output from Xcode build:
↳
    --- xcodebuild: WARNING: Using the first of multiple matching destinations:
    { platform:iOS Simulator, id:CE6D797D-B94C-4C11-A963-CD812BA8A32B, OS:17.5, name:iPhone 15 Pro Max }
    { platform:iOS Simulator, id:CE6D797D-B94C-4C11-A963-CD812BA8A32B, OS:17.5, name:iPhone 15 Pro Max }
    ** BUILD FAILED **


Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/kt/twk4pmfn6wl7mk69n4081hx00000gn/T/flutter_tools.Y8kuSJ/flutter_ios_build_temp_dir5wTZll/temporary_xcresult_bundle

    /Users/sprijk/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.1/ios/Classes/Launcher.swift:20:1: error: type 'UIApplication' does not conform to protocol 'Launcher'
    extension UIApplication: Launcher {}
    ^
    UIKit.UIApplication:24:15: note: candidate has non-matching type '(URL, [UIApplication.OpenExternalURLOptionsKey : Any], (@MainActor @Sendable (Bool) -> Void)?) -> Void'
        open func open(_ url: URL, options: [UIApplication.OpenExternalURLOptionsKey : Any] = [:], completionHandler completion: (@MainActor @Sendable (Bool) -> Void)? = nil)
                  ^
    /Users/sprijk/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.1/ios/Classes/Launcher.swift:20:1: note: add stubs for conformance
    extension UIApplication: Launcher {}
    ^
    /Users/sprijk/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.1/ios/Classes/Launcher.swift:20:1: error: type 'UIApplication' does not conform to protocol 'Launcher'
    extension UIApplication: Launcher {}
    ^
    UIKit.UIApplication:24:15: note: candidate has non-matching type '(URL, [UIApplication.OpenExternalURLOptionsKey : Any], (@MainActor @Sendable (Bool) -> Void)?) -> Void'
        open func open(_ url: URL, options: [UIApplication.OpenExternalURLOptionsKey : Any] = [:], completionHandler completion: (@MainActor @Sendable (Bool) -> Void)? = nil)
                  ^
    /Users/sprijk/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.1/ios/Classes/Launcher.swift:20:1: note: add stubs for conformance
    extension UIApplication: Launcher {}
    ^
    Command SwiftEmitModule failed with a nonzero exit code
    Command SwiftEmitModule failed with a nonzero exit code
    Command SwiftEmitModule failed with a nonzero exit code
    /Users/sprijk/Code/flutter_thingsboard_app_orig/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target
    versions is 12.0 to 18.0.99. (in target 'OrderedSet' from project 'Pods')
    /Users/sprijk/Code/flutter_thingsboard_app_orig/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target
    versions is 12.0 to 18.0.99. (in target 'MTBBarcodeScanner' from project 'Pods')
    note: Run script build phase 'Run Script' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
    note: Run script build phase 'Thin Binary' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
    /Users/sprijk/Code/flutter_thingsboard_app_orig/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target
    versions is 12.0 to 18.0.99. (in target 'PromisesObjC' from project 'Pods')
    /Users/sprijk/Code/flutter_thingsboard_app_orig/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target
    versions is 12.0 to 18.0.99. (in target 'flutter_local_notifications-flutter_local_notifications_privacy' from project 'Pods')
    /Users/sprijk/Code/flutter_thingsboard_app_orig/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target
    versions is 12.0 to 18.0.99. (in target 'PromisesObjC-FBLPromises_Privacy' from project 'Pods')

Could not build the application for the simulator.
Error launching application on iPhone 15 Pro Max.
@ybeshkarov
Copy link
Contributor

Hello,

This is Xcode 16 issue. This issue will help you to resolve it thingsboard/flutter_thingsboard_pe_app#165

@sprijk
Copy link
Author

sprijk commented Oct 14, 2024

Hi, thanks for the pointers!
Too bad it does not work for me it seems..
Anyway, I guess I'd probably need to wait for an Xcode update or downgrade

@ybeshkarov
Copy link
Contributor

You did what is mentioned there but still not able to build the project?

@sprijk
Copy link
Author

sprijk commented Oct 14, 2024

  1. Just cloned a fresh flutter_thingsboard_app.
  2. Followed the instructions (including all the Xcode settings).
  3. Same result

@ybeshkarov
Copy link
Contributor

Just to double check
You did what mentioned there thingsboard/flutter_thingsboard_pe_app#163 (comment) but still have the same issue?

@sprijk
Copy link
Author

sprijk commented Oct 17, 2024

Hi @ybeshkarov!

Apologies for the late reply. I am able to look again and thoroughly next week.

Thanks for the hints, I'll come back to you when I've tested more.

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

No branches or pull requests

2 participants