iOS Build Environment Help Center

fatal error: 'UIKit/UIKit.h' file not found

append delete Mikhail

Building the CocoaPods dependency project BURelyFoundation_Global...
+ Preparing output directory...
+ XCFrameworks: 27 supplied
+ Libraries: 19 supplied, 0 built
+ Frameworks: 8 supplied, 0 built
+ Pre-parsing project files...
+ Building BURelyFoundation_Global for iphoneos (configuration: Release)
+ [arm64] Recompiling Pods/BURelyFoundation_Global/Rely/AFNetworking/BU_AFAutoPurgingImageCache.m (flags changed)...
+ [arm64] Compiling Pods/BURelyFoundation_Global/Rely/AFNetworking/BU_AFHTTPSessionManager.m...
+ [arm64] Compiling Pods/BURelyFoundation_Global/Rely/AFNetworking/BU_AFSecurityPolicy.m...
+ [arm64] Compiling Pods/BURelyFoundation_Global/Rely/AFNetworking/BU_AFURLRequestSerialization.m...
+ [arm64] Compiling Pods/BURelyFoundation_Global/Rely/AFNetworking/BU_AFURLResponseSerialization.m...
+ [arm64] Compiling Pods/BURelyFoundation_Global/Rely/AFNetworking/BU_AFURLSessionManager.m...
+ [arm64] Compiling Pods/BURelyFoundation_Global/Rely/BUNETWork/BUBaseRequest.m...
clang: warning: using sysroot for 'Windows' but targeting 'iPhone' [-Wincompatible-sysroot]
clang: warning: using sysroot for 'Windows' but targeting 'iPhone' [-Wincompatible-sysroot]
+ [arm64] Compiling Pods/BURelyFoundation_Global/Rely/BUNETWork/BUNetworkAgent.m...
In file included from <built-in>:1:
F:/Local_Git/IOS_Proj/Car/Pods//Target Support Files/BURelyFoundation_Global/BURelyFoundation_Global-prefix.pch(2,9): fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
In file included from <built-in>:1:
F:/Local_Git/IOS_Proj/Car/Pods//Target Support Files/BURelyFoundation_Global/BURelyFoundation_Global-prefix.pch(2,9): fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
1 error generated.
clang: warning: using sysroot for 'Windows' but targeting 'iPhone' [-Wincompatible-sysroot]
clang: warning: using sysroot for 'Windows' but targeting 'iPhone' [-Wincompatible-sysroot]
+ [arm64] Compiling Pods/BURelyFoundation_Global/../Target Support Files/BURelyFoundation_Global/BURelyFoundation_Global-dummy.m...
In file included from <built-in>:1:
F:/Local_Git/IOS_Proj/Car/Pods//Target Support Files/BURelyFoundation_Global/BURelyFoundation_Global-prefix.pch(2,9): fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
In file included from <built-in>:1:
F:/Local_Git/IOS_Proj/Car/Pods//Target Support Files/BURelyFoundation_Global/BURelyFoundation_Global-prefix.pch(2,9): fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
clang: warning: using sysroot for 'Windows' but targeting 'iPhone' [-Wincompatible-sysroot]
detected compiler error, aborting multithreaded build.
1 error generated.
1 error generated.
clang: warning: using sysroot for 'Windows' but targeting 'iPhone' [-Wincompatible-sysroot]
clang: warning: using sysroot for 'Windows' but targeting 'iPhone' [-Wincompatible-sysroot]
1 error generated.
In file included from <built-in>:1:
F:/Local_Git/IOS_Proj/Car/Pods//Target Support Files/BURelyFoundation_Global/BURelyFoundation_Global-prefix.pch(2,9): fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
In file included from <built-in>:1:
F:/Local_Git/IOS_Proj/Car/Pods//Target Support Files/BURelyFoundation_Global/BURelyFoundation_Global-prefix.pch(2,9): fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
1 error generated.
In file included from <built-in>:1:
F:/Local_Git/IOS_Proj/Car/Pods//Target Support Files/BURelyFoundation_Global/BURelyFoundation_Global-prefix.pch(2,9): fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
1 error generated.
1 error generated.
clang: warning: using sysroot for 'Windows' but targeting 'iPhone' [-Wincompatible-sysroot]
In file included from <built-in>:1:
F:/Local_Git/IOS_Proj/Car/Pods//Target Support Files/BURelyFoundation_Global/BURelyFoundation_Global-prefix.pch(2,9): fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
1 error generated.
clang: warning: using sysroot for 'Windows' but targeting 'iPhone' [-Wincompatible-sysroot]
In file included from <built-in>:1:
F:/Local_Git/IOS_Proj/Car/Pods//Target Support Files/BURelyFoundation_Global/BURelyFoundation_Global-prefix.pch(2,9): fatal error: 'UIKit/UIKit.h' file not found
#import <UIKit/UIKit.h>
^~~~~~~~~~~~~~~
1 error generated.

:: @Mikhail added on 24 Aug ’22 · 07:56

Windows 10
SDK 15.5
iOS Builder 3.50.1

Reply RSS

Replies

append delete #1. Pierre-Marie Baty

Congratulations, you browsed through all the pages on this forum and clicked through all the alert boxes without reading any single of them.

*hello*, because my mum told me when I was a kid that polite people say hello first, and try to learn about the etiquette before talking (such as, reading the signs on the front door).

Your problem is very simple, but that behavior urges me to simply offer you the possibility of a refund of your asset, and tell you to use your Mac. Have you noted the word "kindly" in point #16 of the documentation ?

Have a nice day,

append delete #2. Mikhail

Hello, I'm sorry if I upset you. I didn't think you were so touchy. I think you can forgive the lack of greetings to those who paid $ 100 for your program, since after paying they expect that they will not have to climb the forums and ask how to fix errors.

I didn't find this problem in the headlines on the forum. I also didn't find a solution in the readme.

Please tell me how to solve the problem if you write that it is simple.

I'm looking for a solution for the second day, so I'm a little angry.

append delete #3. Pierre-Marie Baty

There's no point in helping angry people. Please contact me in private and tell me your Unity invoice ID and I'll ask the Asset Store team to grant you a full refund. Then use your Mac as before.

append delete #4. Mikhail

I don't need a refund. Please tell me how to fix this problem.

append delete #5. Pierre-Marie Baty

The first error in a build log usually informs about the problem.

% build log
clang: warning: using sysroot for 'Windows' but targeting 'iPhone' [-Wincompatible-sysroot]
%

This means the compiler (clang) believes the SDK in use is the one for Windows (default case for a Windows program) whereas it should be using the iOS SDK.

Therefore, this means your iOS SDK is either incorrectly deployed, or the IOSBUILDENV_PATH or IOSUNITYBUILDER_PATH environment variables point to the wrong directory (or don't exist at all).

Please do the two steps of the SDK migration again, starting from your Mac, and notice any possible errors that happen. Do not attempt to proceed further if you see an error in the console window in either step of the migration.

If that doesn't fix the problem, verify that at least one of the two environment variables I mentioned above exist and point to the SDK directory in the builder's install path.

Start by building and deploying an empty project and make sure it works on your device, then move on to your own project.

Also, I assume that you *did* read and understand the message boxes during program installation, and made the proper choices.

:: @Pierre-Marie Baty added on 24 Aug ’22 · 12:44

*edit* sorry, I gave an incorrect information here. The IOSUNITYBUILDER_PATH environment variable should point to the builder's *install path* (i.e. the path where you installed it). It's the build script that figures out later the SDK path out of that install path.

append delete #6. Mikhail

Hello, after reinstalling just a few, the error went away, but another one came. Advertising plugins are not installed, I do not quite understand the proposed solutions. I tried adding frameworks manually, the same thing. Then what is your program with CocoaPods?

These scripts might be non critical - attempting to proceed anyway.
+ Preparing output directory...
+ XCFrameworks: 23 supplied
+ Libraries: 8 supplied, 0 built
+ Frameworks: 1 supplied, 0 built
+ Pre-parsing project files...
+ Building CleverAdsSolutions_SDK for iphoneos (configuration: Release)
+ [arm64] Compiling Pods/CleverAdsSolutions-SDK/CASMediation/AppLovin/CASAppLovinBUnit.swift...
error: your project contains code written in the Swift language, but the Swift compiler hasn't been ported to Windows yet.
Possible workarounds:
- If this source file is part of a third-party dependency, look for an Objective-C/C++ only version of that dependency and use it instead.
- If this source file is part of your project itself, rewrite it in C, C++, Objective-C or Objective-C++.

append delete #7. Pierre-Marie Baty

The purpose of the CocoaPods daemon is that it downloads and installs the Pods source and header files in your Xcode project on Windows, just like the "pod install" command would on your Mac before building with Xcode.

If you want to *not* use CocoaPods and use precompiled frameworks instead (and you *need to*, because some of the Pods your project uses cannot be built using this compiler, the ones written in Swift), you need to delete the Pods directory and move the Podfile away. Else the builder’s master build script still finds your Pods installed and attempts to build them. This is what is happening here, and it stops because it encountered a Pod that’s written in Swift.

Do you need instructions on how to build your project using precompiled frameworks ? There are several examples of that on this forum.

:: @Pierre-Marie Baty added on 25 Aug ’22 · 21:53

Additional note. You say your ad plugins were removed, but the presence of this pod in your source tree attests that it’s not completely the case. If your intent was to remove it then you must have missed something.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Moderators: Pierre-Marie Baty