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

Swift Compiler Error (Xcode): Using bridging headers with module interfaces is unsupported #120404

Closed
bhz020418 opened this issue Feb 9, 2023 · 17 comments
Labels
in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds

Comments

@bhz020418
Copy link

bhz020418 commented Feb 9, 2023

So after I ran:
flutter build ipa
I got the output like this in visual studio code:


💪 Building with sound null safety 💪

Archiving com.ehealth.EMSdailysurvey...
Automatically signing iOS for device deployment using specified development team in Xcode project: 54GG7M63R4
Running pod install...                                             786ms
Running Xcode build...                                                  
 └─Compiling, linking and signing...                         5.4s
Xcode archive done.                                         39.1s
Failed to build iOS app
Error output from Xcode build:
↳
    error: using bridging headers with module interfaces is unsupported
    ** ARCHIVE FAILED **


Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/9p/bw8m2_ns5kx4hppr37mzz1zr0000gn/T/flutter_tools.9yTkx8/flutter_ios_build_temp_dir6Hgplm/temporary_xcresult_bundle

    error: Using bridging headers with module interfaces is unsupported (in target 'Runner' from project 'Runner')
    Command SwiftDriver emitted errors but did not return a nonzero exit code to indicate failure
    note: Building targets in dependency order
    warning: Run script build phase '[CP-User] Config codegen' will be run during every build because it does not specify any outputs. To address this
    warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the
    script phase. (in target 'flutter_config' from project 'Pods')
    warning: no rule to process file '/Users/wendasai/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/ios/Classes/BuildDotenvConfig.rb'
    of type 'text.script.ruby' for architecture 'arm64' (in target 'flutter_config' from project 'Pods')
    warning: no rule to process file '/Users/wendasai/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/ios/Classes/BuildXCConfig.rb' of
    type 'text.script.ruby' for architecture 'arm64' (in target 'flutter_config' from project 'Pods')
    warning: no rule to process file '/Users/wendasai/opt/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_config-2.0.0/ios/Classes/ReadDotEnv.rb' of type
    'text.script.ruby' for architecture 'arm64' (in target 'flutter_config' 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')

    Result bundle written to path:
        /var/folders/9p/bw8m2_ns5kx4hppr37mzz1zr0000gn/T/flutter_tools.9yTkx8/flutter_ios_build_temp_dir6Hgplm/temporary_xcresult_bundle

Swift Compiler Error (Xcode): Using bridging headers with module interfaces is unsupported

Uncategorized (Xcode): Command SwiftDriver emitted errors but did not return a nonzero exit code to indicate failure


Encountered error while archiving for device.

The application can be built properly using IOS simulator. I really start to get very confuse about why it does not allow me to build the ipa file. Any one have any idea why this is happening? I am trying to compile the ipa for a IOS program I wrote but I have been stuck on this bug for a week... I do not know how to solve this. I googled online and it seems there are no similar solutions... Can anyone help me please! Thank you in advance!

Regards

@darshankawar darshankawar added the in triage Presently being triaged by the triage team label Feb 10, 2023
@darshankawar
Copy link
Member

@bhz020418
Please check this and see if it helps in your case.

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 10, 2023
@bhz020418
Copy link
Author

@bhz020418 Please check this and see if it helps in your case.

Hello @darshankawar:

I tried the method listed in this post but is still not resolved, I am using Xcode version 14.2. So I decided to send the post on GitHub because I really failed to understand individually about why this is happening...

But still thank you for sending me this post, if you have any other idea about how to solve this issue please let me know. Thank you in advance and wish you a nice day! (^-^)

Regards
bhz020418

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 11, 2023
@bhz020418
Copy link
Author

I have this same issue, setting Build Libraries for Distribution to NO doesn't resolve this.

`Xcode archive done. 236.0s Failed to build iOS app Swift Compiler Error (Xcode): Using bridging headers with module interfaces is unsupported

Uncategorized (Xcode): Command SwiftDriver emitted errors but did not return a nonzero exit code to indicate failure

Encountered error while archiving for device.

Build failed :| Failed to build for iOS`

Flutter version 3.7.3 Xcode Version 14.2

Hello @farhanvk8:

Same here, I tried the method listed above by @darshankawar few days ago and it is not solved, I am using flutter version 3.7.0 and Xcode version 14.2. I am using mac computer with 2020 M1 chip. I did not upgrade to 3.7.3 for my flutter yet because after I updated the flutter to 3.7.3, the application wrote cannot simulate properly on the IOS simulator so I changed it back to 3.7.0.

If you have any new update about how to solve this issue please let me know. Thank you so much and wish you a nice day. I will also work on trying other methods and if I solved the issue I will let you know at once.

Regards
bhz020418

@darshankawar
Copy link
Member

@bhz020418
Please provide your flutter doctor -v. Also provide the entire verbose log by running flutter build ipa -v. The log will be huge so you can put that in a text file and attach the file here.

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 13, 2023
@bhz020418
Copy link
Author

@bhz020418 Please provide your flutter doctor -v. Also provide the entire verbose log by running flutter build ipa -v. The log will be huge so you can put that in a text file and attach the file here.

Hello @darshankawar:

Here is my flutter doctor -v and my flutter build ipa -v. If there is any other things that you need me to provide please let me know.

Looking forward to your response, thank you so much and wish you a nice day.

Regards
bhz020418
flutter doctor -v.txt
flutter build ipa -v.txt

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 13, 2023
@bhz020418
Copy link
Author

bhz020418 commented Feb 13, 2023

@bhz020418 Please provide your flutter doctor -v. Also provide the entire verbose log by running flutter build ipa -v. The log will be huge so you can put that in a text file and attach the file here.

And @darshankawar here is the error I can see after I entered flutter build ipa. Hope this can also help. (^-^)
recent problem

Regards
bhz020418

@darshankawar
Copy link
Member

@bhz020418 Can you also provide your podfile ?
Do you by any chance have checked "For install builds only" in the Xcode build phase ?

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 14, 2023
@bhz020418
Copy link
Author

bhz020418 commented Feb 14, 2023

@bhz020418 Can you also provide your podfile ? Do you by any chance have checked "For install builds only" in the Xcode build phase ?

Hello @darshankawar:

Sure! Here is my Podfile.lock and my Podfile. I did not check "for install builds only". No matter I checked it or unchecked it, it is always showing me that building failed...

Looking forward to your response.

Regards
bhz020418

Podfile.txt
Podfile_dot_lock.txt
Screen Shot 2023-02-14 at 8 59 30 AM

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 14, 2023
@darshankawar
Copy link
Member

I see that in your podfile, you have ios 12 platform support and target set to 12 as well:

config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'

I am not sure but this maybe restricting other pods or plugins you might be using which may not be targeting to iOS 12 yet, so can you try to comment or remove above line from podfile and try again to see if it helps ?

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 15, 2023
@bhz020418
Copy link
Author

I see that in your podfile, you have ios 12 platform support and target set to 12 as well:

config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'

I am not sure but this maybe restricting other pods or plugins you might be using which may not be targeting to iOS 12 yet, so can you try to comment or remove above line from podfile and try again to see if it helps ?

Hello @darshankawar:

I changed commented the line as shown in the figure attached below. But when I entered flutter build ipa it still output the same error... The IOS simulator is still running properly.

Looking forward to your response.

Regards
bhz020418
Screen Shot 2023-02-15 at 12 17 20 AM

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 15, 2023
@darshankawar
Copy link
Member

@bhz020418 Thanks for the update and your patience on this while we figure this out.
From your podfile.lock, I see the the pods you are using are not on latest versions. Can you try to delete the podfile.lock file or update the pods you are using to latest versions available and run your app again ?

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 16, 2023
@bhz020418
Copy link
Author

Hello @darshankawar:

I deleted the podfile.lock and then ran flutter build ipa again. The error I am encountering with is as shown in figure 1 (after I ran flutter build ipa, the podfile.lock is back again). Moreover, I also tried to run it in xcode and the output I got is shown in figure 2 - figure 3 or figure 4 - figure 13 (sometimes I got the errors and warnings as shown in figure 2 - figure 3(1 error and 7 warnings), sometimes I got the errors and warnings as shown in figure 4 - figure 13 (1 error and 137 warnings)). Also, If I am using the simulator on my computer, the code can be run properly (as shown in figure 14). I just really do not quite understand why my xcode is stopping me from building the ipa package, which is making feeling so frustrating. (T-T)

Also I do not know how to update the pods I am using to latest versions available. If possible, can you tell me how to do it?

Looking forward to your response, Thank you so much and wish you a nice day.

Regards
bhz020418

figure 1

figure 2

figure 3

figure 4

figure 5

figure 6

figure 7

figure 8

figure 9

figure 10

figure 11

figure 12

figure 13

figure 14

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 16, 2023
@darshankawar
Copy link
Member

@bhz020418
Please avoid sharing screenshots as they don't help much for searching for errors mentioned in it. Please provide the error messages in properly formatted text.

Also, if possible, please provide a sample repo that we can clone and run it at our end to analyze further.

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 17, 2023
@bhz020418
Copy link
Author

@bhz020418 Please avoid sharing screenshots as they don't help much for searching for errors mentioned in it. Please provide the error messages in properly formatted text.

Also, if possible, please provide a sample repo that we can clone and run it at our end to analyze further.

Hello @darshankawar:

Sure! I asked my group members and we reached to the consensus that we can provide the sample repo. But before that we need to change some parts in our programming relating to the customer data, which will take some time to do the adjustment. So sorry for cannot providing it right now and so sorry for previously sending the screenshots because we were thinking perhaps that will help solving the problem...

When we finished adjusting the part relating to the user's data, we will reply back with the sample repo as soon as possible. Thank you so much for helping us all along the road and wish you the best.

Regards
bhz020418

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 21, 2023
@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 22, 2023
@ephammer
Copy link

ephammer commented Mar 2, 2023

I had the same error. Tried everything didn't work.
I deleted the ios folder and recreated it with flutter create . now everything works again.

@github-actions
Copy link

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds
Projects
None yet
Development

No branches or pull requests

3 participants