xcodebuild header files not found in ReskIt - xcode

I am pretty new to Xcode development. We are using command line tools to build the iOS project. We kep on getting the RestKit/RestKit.h file not found error while using command line build. If we use the normal XCode utility build it build without any issues.. There are few more thrid party code being used which may also have the same issue.
The folder struture of the project is like this.
--Project.xcodeproject
-- RestKit
----RestKit.xcodeproject
--SDWebImageKit
-----SDWebImageKit.xcodeproject
-----SDWebImage
---- .h and .m files
What path should we set in header search paths to properly build this in xcodebuild command line utility.

I resolved all the issues by creating a workspace, adding a scheme and building hte workspace using xcodebuild. I didnt have to chnage any of the header settings as being set in XCode GUI.

Related

Compile in Xcode Prefix.pch not found

I am a beginner in react-native. I tried to compile the apps, ran the pod install (because I used cocoapods I have to do this, I guess), and opened the generated xcworkspace. After I hit the compile button, this error show up
Showing All Messages
No such file or directory: '/Users/<username>/Library/Developer/Xcode/DerivedData/<project name>-bvczmgvzvgwjpyfsmvczxliopbfo/Build/Intermediates.noindex/PrecompiledHeaders/SharedPrecompiledHeaders/7446126693023229553/Prefix.pch'
The xcconfig file I used already had GCC_PREFIX_HEADER and targeted on correct file. It stated like this
GCC_PREFIX_HEADER = $(SRCROOT)/ExportedProject/Classes/Prefix.pch;
I checked my project's configurations using target "Release" and it pointed to the correct xcconfig file.
I searched around and found this SO. I checked on my Build Settings > Apple Clang - Language - Prefix Header, and it also targeted on the correct path and has the Precompile Prefix Header filled with "Yes".
I tried to use pod-deintegrate; reimport the project; deleted the project and use react-native upgrade, but nothing works.

GeneratedInfoPlistDotEnv.h file is not found

I have a issue, regarding Xcode, in react-native permission file
in which GeneratedInfoPlistDotEnv.h file is not found.
How to fix this?
Already changed Info.plist Preprocessor Prefix File to
${CONFIGURATION_BUILD_DIR}/GeneratedInfoPlistDotEnv.h
but it did not solve.
issue is:
:1:10: fatal error:
'/Users/DAMAGE/Library/Developer/Xcode/DerivedData/EmployWise-fzbhiywasjfdjnfqjsfnxjbhahzs/Build/Products/GeneratedInfoPlistDotEnv.h'
file not found
Was getting this from react-native-config cocoapod. But its been fixed in v1.4.11. Was due to the older version not writing output script variables, which XCode 14 requires
This issue comes when react native is not able to link to the configuration file like .env file created in your react native environment. If you have used any react native config framework like react-native-config. then make sure this framework is linked for your iOS environment as shown below
react-native link react-native-config
If you are using react-native version >= 0.60 then follow the below steps after linking is done.
Go to ios folder and run pod install.
Next do the following:
1. Remove Derived Data from Xcode
2. Clean Build Folder
3. Build the project again
I had this problem, my solution was to change the Xcode build system from "Legacy Build System" to "New Build System" in the Workspace Settings under the File menu
In my case, I was trying to add a new target for rn-extensions-share and forgot to add all necessary libraries for that new target.

How to fix header file not found when Archive build on Xcode?

Hello I develop this iOS app use Dart language.
recently, Develop completed.
To upload an iOS app to your AppStore, need to set it up on that site.
https://developer.apple.com/
https://appstoreconnect.apple.com/
and I try Build -> Archive click on Xcode
but fail message
ios/Runner/GeneratedPluginRegistrant.m:6:9:
'device_info/DeviceInfoPlugin.h' file not found
How to fix header file not found message on Xcode?
thanks
I just discovered that this class of error can also come about when you inadvertently open the project file Runner.xcodeproj instead of the workspace file Runner.xcworkspace.
Two options
1.Using the command line build your project using "flutter create -i swift appname".
2.If you've already created a project you'll have to add 'use_frameworks!' to your podfile.
Option 2 might not be the best option because there is a cocoapods issue that causes certain packages like OneSignal will cause the app build to fail.

Xbuild can't recognize SignAndroidPackage when using bamboo

I am trying to create a .APK file in Bamboo using the xbuild executable in a command task. The way I thought it should work is like this:
CusomterApp.sln /t:SignAndroidPackage /p:Configuration=Release
This however when I run the build will give this error. Target named 'SignAndroidPackage' not found in the project. I have tried to build it without it but I am getting other errors instead. I have tried changing the order of it and changing the target but it doesn't seem to create the apk file doing this.
I have seen in another question that someone created an apk file using this(not on Bamboo):
xbuild $ANDROID_PROJECT_FILE /t:SignAndroidPackage /p:Configuration=Release
So I thought I should have no problems with using this on Bamboo but the executable doesn't seem to recognize the SignAndroidPackage and doesn't work, any ideas on how to fix this?
I create a .IPA file for an IPhone app using mdtool, with this command -v build -t:Build "c:Release|iPhone" CustomerApp.sln and this works fine for creating the .IPA file so I would have thought that the .APK would be fine too.
I think that the problem is to do with using the solution file for the Android apk file, The bamboo will create a solution folder which has both iOS and Android files in it. The iOS worked and built the IPA file when I used the CustomerApp.sln file. The apk file does not build when I use the CustomerApp.sln. If I use this CustomerApp.Droid/CustomerApp.Droid.csproj file I get a list of error's Are you missing an assembly reference?
When I was doing the IPA I got this error using the CustomerApp.iOS/CustomerApp.iOS.csproj file which I fixed by using the CustomerApp.sln file instead. How can I fix this as the whole folder contains information that is necessary for the creation of the APK file?
I have found a problem that when I try to build the apk file using this: /p:Configuration=Release CustomerApp.sln it gives me the error PCL assemblies not installed and it also has this warning : Unable to find framework corresponding to the target moniker '.NetPortable,Version=v4.5,Profile=Profile78'. Framework assembly references will be resolved from the GAC, which might not be the intended behaviour. I don't know why this is happening as I looked for the profile in the folder specified and it was there.
I had this problem before when trying to use xbuild to create the IPA file but then I used mdtool and it worked fine, I think I need to use xbuild to build the apk file but I can't see how to fix it. I also tried to run it in the terminal of the mac and I got the same error. Why is this happening?
The reason this happens is because you have to specify a .csproj, not a .sln. If you give it a solution file, you'll get an error complaining that it can't find the "SignAndroidPackage" target.

Xcode: How do I change my project folders name, without having building problems?

I would like to change the folder name where my Xcode project is in. But when I do that I can't build my project anymore. It shows me 2 errors that says:
Apple LLVM compiler 3.0 error
file "project name-Prefix.pch" has been modified since the precompiled header was built
Any way to solve this?
Select Product > Clean from the Xcode menu.
Then try and build again by selecting Product > Build.
Your project should build without errors assuming that targets are correct.
Either you have replaced the code to some another machine. Try to commit the explicitly included import in the .PCH file. Compile it once on that specific machine. Now un-comment the those import lines and then compile the code again.
If you are trying to build project from terminal then
execute "$ xcodebuild clean " before execute the build command.
This will resolve the issue.

Resources