FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
117 stars 19 forks source link

Upgrade Flutterflow dependency 'url_launcher_ios' for Xcode 16 #3834

Open jryankennedy opened 1 week ago

jryankennedy commented 1 week ago

Can we access your project?

Current Behavior

I am using the new Xcode 16, which releases tomorrow, and am getting an error preventing from using Local Run for my app.

I did some digging and I narrowed it down to the 'url_launcher_ios' needing to be updated to 6.3.1

Error:

/Users/jordankennedy/.pub-cache/hosted/pub.dev/url_launcherios-6.2.5/ios/Classes/Launcher.swift:22:1: error: type 'UlApplication' does not conform to protocol 'Launcher' extension UlApplication: Launcher{} UlKit.UlApplication:24:15: note: candidate has non-matching type '(URL, [UlApplication.OpenExternalURLOptionsKey : Any], (@MainActor @Sendable (Bool) → Void)?) → Void' open fun open( url: URL, options: [UlApplication.OpenExternalURLOptionsKey : Any] = [:], completionHandler completion: (@MainActor @Sendable (Bool) → Void)? = nil) /Users/jordankennedy/.pub-cache/hosted/pub.dev/url_launcher_ios-6.2.5/ios/Classes/Launcher.swift:22:1: note: add stubs for conformance extension UlApplication: Launcher {}

Potential solution: https://github.com/flutter/flutter/issues/151467

Expected Behavior

Flutterflow apps should compile in Xcode 16

Steps to Reproduce

Try running any app that used the 'url_launcher_ios' dependency in Xcode 16.

See: https://github.com/flutter/flutter/issues/151467

Reproducible from Blank

Bug Report Code (Required)

ITFXz8jf5c1NochE16XxKcEwuCIwGUwbUOc7j9VEGAsjCePrOpYDOuPeUElpWOqHeglceFX9kXEzwfTKjdnUG/knOROVQbZgz5ZLUxDgUketaYy0OpaOP3QnTMRQfR2u17WRpxJ5HMtpS1Zk3DuTfN6AY3qCf9qOYwx5e6fDbOY=

Visual documentation

Screenshot 2024-09-15 at 4 01 23 PM Screenshot 2024-09-15 at 3 58 07 PM

Environment

- FlutterFlow version: 4.1.91
- Platform: Mac
- Browser name and version: N/A
- Operating system and version affected: MacOS Sequoia / Xcode 16

Additional Information

No response

asomervell commented 1 week ago

This fixes the issue in projects outside of FlutterFlow, has made using FlutterFlow impossible.

paulperez-dev commented 6 days ago

Hi @jryankennedy,

Thank you for flagging this! I’ll inform the engineering team so they can work on a fix as soon as possible.

pedromamare commented 5 days ago

Thank you! Looking forward to it.

geret1 commented 5 days ago

This is how I solved it.

Create pubspec_overrides.yaml with the following packages

dependency_overrides:
  url_launcher_ios: ^6.3.1
  devtools_app_shared: ^0.2.2
  devtools_extensions: ^0.2.1
  pointer_interceptor: ^0.10.0

Then I need to set "Yes" into Xcode "Allow Non-modular Includes in Framework Modules" to make it work or edit Podfile with the following snippet

post_install do |installer|
  installer.pods_project.build_configuration_list.build_configurations.each do |configuration|
    configuration.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
  end
end

P.D.: Also for Firebase users it would be good to add in the beggining of the Podfile to manage better Firebase versioning

$FirebaseSDKVersion = '10.25.0'
MamadAsap commented 4 days ago

Hi ! Same issue for me I can no longer use local run :( . @geret1 these actions can be done from Flutterflow UI ?

geret1 commented 4 days ago

Hi ! Same issue for me I can no longer use local run :( . @geret1 these actions can be done from Flutterflow UI ?

Unfortunately no. I made all this changes on VSCode plus XCode :(

guidomarangoni commented 4 days ago

This is how I solved it.

Create pubspec_overrides.yaml with the following packages

Ciao, I have the same problem...in which directory did you create pubspec_overrides.yaml file? Where is "Allow Non-modular Includes in Framework Modules" option in XCode? Thank you

geret1 commented 4 days ago

This is how I solved it. Create pubspec_overrides.yaml with the following packages

Ciao, I have the same problem...in which directory did you create pubspec_overrides.yaml file? Where is "Allow Non-modular Includes in Framework Modules" option in XCode? Thank you

At same level that pubspec.yaml and the XCode attached screenshot.

Screenshot 2024-09-18 at 12 41 31
PanSalut commented 4 days ago

Same issue here right now.

NDM01 commented 4 days ago

Same issue here.

guidomarangoni commented 4 days ago

Works! Thank you @geret1 👍

gianniginom commented 4 days ago

Same issue !

MamadAsap commented 4 days ago

Hi @guidomarangoni , what's in your pubsec_overrides file? Just the 4 dependencies? How is it structured ?

guidomarangoni commented 4 days ago

Ciao @MamadAsap , exactly as indicated by @geret1

Create pubspec_overrides.yaml with the following packages

dependency_overrides:
  url_launcher_ios: ^6.3.1
  devtools_app_shared: ^0.2.2
  devtools_extensions: ^0.2.1
  pointer_interceptor: ^0.10.0
oleksii-it commented 4 days ago

Same issue. Does anybody have solution via FF UI?

lemmen6 commented 4 days ago

Same issue.

ken-umamii commented 4 days ago

Same issue too.

dmk23 commented 4 days ago

Running into the same issue

I have added url_launcher_ios: ^6.3.1 via FF UI (custom action dependencies) and now this is the error:

Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/1m/kgwq7_rn1sl6zdrswfw58fww0000gn/T/flutter_tools.Kr12uU/flutter_ios_build_temp_dir7SYYaf/temporary_xcresult_bundle

    /Users/dmitriykruglyak/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.1/ios/url_launcher_ios/Sources/url_launcher_ios/URLLauncherPlugin.swift:22:26: warning: 'keyWindow' was deprecated in iOS 13.0: Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes
        UIApplication.shared.keyWindow?.rootViewController?.topViewController
                             ^
    /Users/dmitriykruglyak/.pub-cache/hosted/pub.dev/sign_in_with_apple-4.3.0/ios/Classes/SignInWithAppleError.swift:99:13: warning: switch must be exhaustive; this is an error in the Swift 6 language mode
                switch code {
                ^
    /Users/dmitriykruglyak/.pub-cache/hosted/pub.dev/sign_in_with_apple-4.3.0/ios/Classes/SignInWithAppleError.swift:99:13: note: add missing case: '.matchedExcludedCredential'
                switch code {
                ^

Does sign_in_with_apple need to be upgraded too?

lemmen6 commented 3 days ago

I hope we can increase the priority on this issue, as all iOS development is halted.

geret1 commented 3 days ago

I hope we can increase the priority on this issue, as all iOS development is halted.

Agree :(

Investing at least 3 days for a critical, or high-prio issue (because some service levels cannot be offered, i.e. local testing) requires a clear communication about it.

I would invest more time with a proper priority tagging for customers, define some kind of service levels and escalation procedures. On the tech side, FF should provide more provide more freedom from FF UI to edit/override low-level parameters such as Podfile or pubspec.yaml.

rikyscara commented 3 days ago

This is how I solved it. Create pubspec_overrides.yaml with the following packages

Ciao, I have the same problem...in which directory did you create pubspec_overrides.yaml file? Where is "Allow Non-modular Includes in Framework Modules" option in XCode? Thank you

Hi, be sure to select All in Build Settings. I had Basic selected by default and the setting wasn't s showing up

Screenshot 2024-09-19 at 09 39 36

Coder-Pranav commented 3 days ago

This is how I solved it.

Create pubspec_overrides.yaml with the following packages

dependency_overrides:
  url_launcher_ios: ^6.3.1
  devtools_app_shared: ^0.2.2
  devtools_extensions: ^0.2.1
  pointer_interceptor: ^0.10.0

Then I need to set "Yes" into Xcode "Allow Non-modular Includes in Framework Modules" to make it work or edit Podfile with the following snippet

post_install do |installer|
  installer.pods_project.build_configuration_list.build_configurations.each do |configuration|
    configuration.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
  end
end

P.D.: Also for Firebase users it would be good to add in the beggining of the Podfile to manage better Firebase versioning

$FirebaseSDKVersion = '10.25.0'

Just a question but whenever we try running locally the changes we made will be overwritten right?

halituzun commented 3 days ago

aynı sorun :(

geret1 commented 3 days ago

This is how I solved it. Create pubspec_overrides.yaml with the following packages

dependency_overrides:
  url_launcher_ios: ^6.3.1
  devtools_app_shared: ^0.2.2
  devtools_extensions: ^0.2.1
  pointer_interceptor: ^0.10.0

Then I need to set "Yes" into Xcode "Allow Non-modular Includes in Framework Modules" to make it work or edit Podfile with the following snippet

post_install do |installer|
  installer.pods_project.build_configuration_list.build_configurations.each do |configuration|
    configuration.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
  end
end

P.D.: Also for Firebase users it would be good to add in the beggining of the Podfile to manage better Firebase versioning

$FirebaseSDKVersion = '10.25.0'

Just a question but whenever we try running locally the changes we made will be overwritten right?

From pubspec_overrides.yaml no, your changes will remain because it is out of scope FF but not for Podfile. I have requested to FF team this considerations here.

vianneypercq commented 3 days ago

Hi there 👋 I'm not sure but do I have the same issue?

I am using the new Xcode 16 and I can't make a local run neither on a real device nor on the simulator. I have done a new clean Xcode installation and I have deleted all the files in the IOS folder to let Flutterflow generate new ones by launching local run. All Doctor Output items are green.

Here is the log screenshot:

CleanShot 2024-09-19 at 13 11 32@2x

Is-it the same issue? Thanks for helping.

lemmen6 commented 3 days ago

@vianneypercq yes, this is the same issue.

smplfy commented 3 days ago

Same, completely blocked.

alexanderchw commented 3 days ago

Same here....

max-h-silverman commented 3 days ago

I ran into this issue trying to build on a physical device in xcode but I was able to run local test (Chrome) and on a physical Android device. The mobile deployment to App Store worked as well. In case that's helpful to anyone...

jryankennedy commented 3 days ago

Could we get an Engineering update on when they estimate this will be fixed and pushed to production?

timdcochran commented 3 days ago

This is how I solved it.

Create pubspec_overrides.yaml with the following packages

dependency_overrides:
  url_launcher_ios: ^6.3.1
  devtools_app_shared: ^0.2.2
  devtools_extensions: ^0.2.1
  pointer_interceptor: ^0.10.0

Then I need to set "Yes" into Xcode "Allow Non-modular Includes in Framework Modules" to make it work or edit Podfile with the following snippet

post_install do |installer|
  installer.pods_project.build_configuration_list.build_configurations.each do |configuration|
    configuration.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
  end
end

P.D.: Also for Firebase users it would be good to add in the beggining of the Podfile to manage better Firebase versioning

$FirebaseSDKVersion = '10.25.0'

This was great help, thanks!

In addition to the above, I had to disable Crashlytics and then Performance Monitoring under Firebase setup as both were producing errors like this:

/Users//Library/Application Support/io.flutterflow.prod.mac//build/ios/Debug-iphonesimulator/firebase_performance/firebase_performance.framework/Headers/FLTFirebasePerformancePlugin.h:5:9: error: include of non-modular header inside framework module 'firebase_performance.FLTFirebasePerformancePlugin': '/Users//Library/Application Support/io.flutterflow.prod.mac//ios/Pods/Headers/Public/Firebase/Firebase.h' [-Werror,-Wnon-modular-include-in-framework-module] 5 | #import <Firebase/Firebase.h> | ^ 1 error generated.

But once disabled, local run is working so happy days!

sebointruz commented 2 days ago

What helped me:

  1. Update flutter to [3.24.3] along with dart 3.5.3
  2. Update firebase_* packages to latest if you have
  3. Update cocapods
  4. pod: deintegrate, repo update, setup, install

Hope it will help also to you.

geret1 commented 2 days ago

What helped me:

  1. Update flutter to [3.24.3] along with dart 3.5.3
  2. Update firebase_* packages to latest if you have
  3. Update cocapods
  4. pod: deintegrate, repo update, setup, install

Hope it will help also to you.

I think is not related with the current issue.

I've also seen a relative distance between latest firebase packages and those that FF uses, pubspec and pods, dependency management is not good in FF I guess.

lemmen6 commented 2 days ago

I suppose this isn't an easy fix as FlutterFlow is not providing any updates and letting us wait for 5 days!! Platform broken?

InceeChun commented 2 days ago

same issue

abuzzahra commented 2 days ago

perhaps they are busy with FFDC

webinti commented 2 days ago

Hello same issue here.

I have reinstalled all Xcode, i thought It was something broken in my Mac, but apparently no. Just a FF bug.

Will stay updated

caneyglobal commented 2 days ago

same problem here, whats the finally soluction?, flutterflow team repair that?

tensoralex commented 2 days ago

Here is another temporary workaround to get everything building on IOS (including firebase_performance and crashlytics) - install XCode 15.4 alongside with XCode 16.

  1. Download Xcode 15.4 from https://developer.apple.com/download/applications/

  2. Rename it and put into Application folder (in my case I named it Xcode_15.4 and moved it into Applications folder).

  3. Switch to Xcode 15 as active sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer

  4. Verify that it switched

    xcode-select -p
    /Applications/Xcode_15.4.app/Contents/Developer
  5. Cleanup and reinstall pods:

    flutter clean
    flutter pub get
    cd ios
    rm -rf Pods && rm -rf Podfile.lock && pod cache clean --all 
    pod install --repo-update
  6. Go back to the parent folder and try to build/run it:

    cd ..
    flutter run --release -d <your IOS device>

    For now it seems to work.

P.S. I hope that FlutterFlow team updates dependencies soon, especially Firebase SDK versions. However, there are quite a few versions of FIrebase packages are currently behind. So I suspect that will be not straightforward. XCode 16 made quite a few changes as I am reading. I hope their FF 5.0 release next week would fix this.

kellvembarbosa commented 2 days ago

Here is another temporary workaround to get everything building on IOS (including firebase_performance and crashlytics) - install XCode 15.4 alongside with XCode 16.

  1. Download Xcode 15.4 from https://developer.apple.com/download/applications/
  2. Rename it and put into Application folder (in my case I named it Xcode_15.4 and moved it into Applications folder).
  3. Switch to Xcode 15 as active sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer
  4. Verify that it switched
xcode-select -p
/Applications/Xcode_15.4.app/Contents/Developer
  1. Cleanup and reinstall pods:
flutter clean
flutter pub get
cd ios
rm -rf Pods && rm -rf Podfile.lock && pod cache clean --all 
pod install --repo-update
  1. Go back to the parent folder and try to build/run it:
cd ..
flutter run --release -d <your IOS device>

For now it seems to work.

P.S. I hope that FlutterFlow team updates dependencies soon, especially Firebase SDK versions. However, there are quite a few versions of FIrebase packages are currently behind. So I suspect that will be not straightforward. XCode 16 made quite a few changes as I am reading. I hope their FF 5.0 release next week would fix this.

This worked well for me, without any change in the project, just follow the step by step that is success!

❤️💙

Thanks @tensoralex

webinti commented 2 days ago

Did you notice that images in assets do not display correctly on Local Run? I have always Exception Asset not found.

Capture d’écran 2024-09-21 à 03 42 08 Capture d’écran 2024-09-21 à 03 42 37

lemmen6 commented 1 day ago

@webinti let's keep it on topic!! for your problem is an easy fix, for this isn't clearly!!

webinti commented 1 day ago

no problem, i found the fix :)

cadufreeela commented 23 hours ago

Funny that new features get all the attention but getting the basic support for me ios is put in backlog. Hard to rely on a platform that should treat this as P1 Sev 1

iamnabink commented 19 hours ago

Don't worry these issue can be solved with:

1- Upgrade your project to recent flutter stable 2- Upgrade your dependencies if some new xcode 16 related issues with

dependency_overrides:
  url_launcher_ios: ^6.3.1
# or some giturl

4- follow @rikyscara 's answer [set "Yes" into Xcode [Build settings] "Allow Non-modular Includes in Framework Modules" to make it work] 3- Clean Project and update pod dependencies

geret1 commented 19 hours ago

Don't worry these issue can be solved with:

1- Upgrade your project to recent flutter stable 2- Upgrade your dependencies if some new xcode 16 related issues with

dependency_overrides:
  url_launcher_ios: ^6.3.1
# or some giturl

4- follow @rikyscara 's answer [set "Yes" into Xcode [Build settings] "Allow Non-modular Includes in Framework Modules" to make it work] 3- Clean Project and update pod dependencies

Worth mentioning that dependency upgrade should be placed on pubspec_overrides.yaml otherwise is not gonna work because FF will replace on any potential update.

Same with Xcode but in this case you need to freeze your code or change it again on any FF update.

Downgrading Xcode (proposed by @tensoralex) seems the "most feasible" option taking into account that here there is no good options because all we're just tweaking our systems to make FF work. Sounds a bit crazy yes taking into consideration that Xcode 16 was launched 10th June...

Hope that FF 5.0 fix all these issues but time is only increasing the issues (i.e. firebase_* dependencies)

cadufreeela commented 19 hours ago

Agree, it's just a bandaid fix, however this should be fixed asap as Apple review process tests in ios 18 already so FF needs to be compliant with ios 18

On Sun, 22 Sept 2024, 5:08 pm Germán Retamosa, @.***> wrote:

Don't worry these issue can be solved with:

1- Upgrade your project to recent flutter stable 2- Upgrade your dependencies if some new xcode 16 related issues with

dependency_overrides: url_launcher_ios: ^6.3.1

or some giturl

4- follow @rikyscara https://github.com/rikyscara 's answer [set "Yes" into Xcode [Build settings] "Allow Non-modular Includes in Framework Modules" to make it work] 3- Clean Project and update pod dependencies

Worth mentioning that dependency upgrade should be placed on pubspec_overrides.yaml otherwise is not gonna work because FF will replace on any potential update.

Same with Xcode but in this case you need to freeze your code or change it again on any FF update.

Downgrading Xcode (proposed by @tensoralex https://github.com/tensoralex) seems the "most feasible" option taking into account that here there is no good options because all we're just tweaking our systems to make FF work. Sounds a bit crazy yes taking into consideration that Xcode 16 was launched 10th June...

Hope that FF 5.0 fix all these issues but time is only increasing the issues (i.e. firebase_* dependencies)

— Reply to this email directly, view it on GitHub https://github.com/FlutterFlow/flutterflow-issues/issues/3834#issuecomment-2365641750, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHAGDWOZWJ5DETJ5TZYALLTZXZUGHAVCNFSM6AAAAABOIE24K6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRVGY2DCNZVGA . You are receiving this because you commented.Message ID: @.***>