my xcworkspace can build&run success,but when i want to pack my project to a framework,the error occurd:
iPhoneOS18.0.sdk/System/Library/Frameworks/SystemConfiguration.framework/Headers/SystemConfiguration.h:28:10: fatal error: module 'DarwinFoundation' is needed but has not been provided, and implicit use of module files is disabled
error detail:
[15:20:35]: ■ [35m/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -ccl -Wundef-prefix=TARGET_05_ -Wdeprecated-objc-isa-usage - Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -o /var/folders/mjcrl7502s1bOnpvnmvtd2xsw0000gn/T/frameworks-yOch9inn/build/Pods.build/Release-iphoneos/NetReachManager.build/Objects-normal/arm64/NetReachManager.o -disable-free -emit-obj -0 it /var/folders/mjcr17502s1bgenpvnmvtd2xsw0000gn/T/NetReachManager-cabOc9.bc - target-abi darwinpcs -triple arm64-apple-ios9.0.0 -target-sdk-version=18.0 -fno-modulemap-allow-subdirectory-search -02 -fembed-bitcode=all -fobj c-msgsend-selector-stubs - disable-11vm-passes -finline-functions -Os -fdiagnostics-hotness-threshold=0 -fdiagnostics-misexpect-tolerance=0 [Om
[15:20:35]: . [35mIn file included from ..../Classes/NetReachManger.m:8: [Om
[15:20:35]: . [35mIn file included from ..../Classes/NetReachManger.h:10: [Om
[15:20:35]: . [35mIn file included from export/Release-iphoneos/Reachability/Reachability.framework/Headers/Reachability.h:11: [Om
[15:20:35]: . [35m/Applications/Xcode.app/Contents/Developer/Platforms/iPhone05.platform/Developer/S0Ks/iPhoneD510.0.sdk/Systemaibrary/Frameworks/SystemConfiguration.framework/Headers/SystemCo nfiguration.h:28:10: fatal module TarwinFoundation. is needed but has not been provided, and implicit use of module files is disabled [Om
[15:20:35]: • [35m26 1 #include [Om
[15:20:35]: • [35m1 ^ [Om
[15:20:35]: • [35m1 error generated. [Om
[15:20:35]: . [35mCompileC build/Objects-'
i try to set autolink_frameworks = yes,allow_nonmodular..=yes,but it didnt work
my code is:
NetReachManager.m
8 #import <Foundation/Foundation.h>
9 #import <os/availability.h>
10 #import <Reachability/Reachability.h>
Reachability.h
9 #import <Foundation/Foundation.h>
10 #import <os/availability.h>
11 #import <SystemConfiguration/SystemConfiguration.h>
12 #import <netinet/in.h>
New contributor
banna is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.