Could not build module 'Darwin' after upgrading react-native 0.65.3 - ios

almost i try every things but still cann't find out this solution
issue comming in xcode 14 while building app
macos chip Apply m2
Could not build module 'Darwin'
how to fix this issue. help me

Related

iOS, Xcode 14+, Building a project for 64-bit architectures with Pods/SPM

I have inherited an old project with some old cocoapods dependencies that do no support arm64 devices. So when I go to import the module (whether it be pods or using Swift Package Manager) ... i.e.
import Module
i get the error: (Compile swift source files (arm64), No such module 'Module' found)
I know that there are past questions and answers for building/testing on a simulator and changing the build settings/valid archs/excluded archs) but I am actually trying to get to this to work on a device that has 64-bit architecture. The machine that I am working on is still Intel.(Not M1)
If the cocoapod library or swift package doesn't include support for 64-bit what workarounds are there (if any)?
It also looks like on Xcode 14.2(Mac OS Monterey 12.6.3), that the option of opening Xcode using Rosetta is no where to be found. Excluding certain archs in build settings and all other past solutions appear to not work.
Anyone have any suggestions?

XCode 13 build failure - XCode 12 working fine - could not build module 'Darwin'

I have problems building my project with XCode 13 (same error message with XCode 13.1 and 13.2 (beta)).
XCode 12.5.1 is still working fine.
Deleting the "derivedData" folder does not change the error.
My project is doing some cross compilation with another XCode workspace generated by CMake.
I doubt this is related to the root cause of the problem because the error occurs after the cross compilation.
The project uses Swift and some legacy Objective-C code.
The failure is happening on Compile Swift source files (arm64) -> Precompile bridging header (arm64)
Here is an extract of the error message:
<module-includes>:392:9: note: in file included from <module-includes>:392:
#import "netinet6/ipsec.h"
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/include/netinet6/ipsec.h:132:2: error: unknown type name 'uuid_string_t'; did you mean 'io_string_t'?
uuid_string_t wake_uuid;
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/include/device/device_types.h:89:33: note: 'io_string_t' declared here
typedef char io_string_t[512];
Do you have any ideas what I am doing wrong or what I should try to get XCode 13 building?
Thanks for every comment. I am desperate to fix this problem.
Details on the error message:
Here a screenshot of the error message displayed in XCode 13
https://i.stack.imgur.com/ttOeu.png
full error log:
https://pastebin.com/RXziwFrE
Details on my environment:
I am using Mac Mini M1
the error is the same with Mac Mini with intel
Mac OS 11.6
upgrading to Mac OS 12 did not help
output of brew doctor:
Your system is ready to brew.
Selected Command Line Tools:
Xcode 13.1
Screenshot

Xcode 12. copy swift standard libraries into... error

I have a Mac Mini M1, and I'm facing this issue: Build input file cannot be found... (in target 'appname' from project 'appname'), this is the copy Swift standard libaries into 'appname.app' error...
Can build on real device, can archive, can do everything but the simulator doesn't work. I tried all workaround what founded on different forums but nothing works. This is a react-native project. If somebody got this issue and found a solution please help.

Module 'flutter_local_notifications' not found in Xcode

In my app I am using flutter local notifications to push the notifications locally and the version of the package is: flutter_local_notifications: ^1.4.4+4. It is working perfectly fine on android. But it is throwing an error on Xcode saying "Module flutter_local_notifications is not found". Not sure what is causing this issue any help is appreciated.
This is my error:
fatal error: module 'flutter_local_notifications' not found
#import flutter_local_notifications;
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
Make your iOS version in pod file same as Xcode deployment info in Xcode refer to below images
Xcode deployment info
PodFile

Could not build module

After Xcode update to v. 5.0.2 i can't build my app for iOS 6.0 target.
I can build only for iOS 7.0
I get many errors:
Could not build module CoreFoundation
Could not build module Darwin
Cyclic dependency in module Darwin: Darwin -> Foundation -> CoreFoundation -> Darwin
Could not build module Foundation
Interesting thing, is that before the update it was possible to compile the app for iOS 6.0, BUT I had the same errors when trying to compile app for iPhone 4/4S
PS. Build Settings - armv7, armv7s. Without arm64.
Had the same issue.
Solved it by following:
Go to Build settings -> Apple LLVM 7.0 - Language - Modules -> Enable Modules (C and Objective-C) and switch it to NO for debug and release.
I was able to solve this problem by moving my Header Search Paths settings to User Header Search Paths
I was able to solve this problem by making my Header Search Paths non-recursive instead of recursive.

Resources