Xcode cant find file in explore while file exits in finder - ios

New to this Xcode sh*t(sorry for that, but really pissed off by Xcode)
The thing is I could find there should be a specific file by grep or finder, but in the Xcode project, the file does not exist here:
Here is the result with grep in the project folder
And here is the project hierarchy in Xcode.
They are mismatch!
Can't apple just make this Xcode sh*t right? How could I find this file in Xcode's folder? Thanks

Check if that file exist into Copy Bundle Resources.
Click "Your project name" from Xcode left sidebar then select your main target and go to Build phases tab and inside that go to Copy Bundle Resources and check whether that file exists or not.

Related

unity - xcode build failed with NSUserDefaults.mm file not found message, possibly because com.unity.services.core folder is not in project folder

building an XCode project with an .xcodeproj file generated by unity 2021.3.3f1 fails with the message "Build input file cannot be found: 'users/---/ --project name--/Libraries/com.unity.services.core/Runtime/Device/UserIdProviders/NSUserDefinitions.mm' "
When I look in Finder, I notice that the com.unity.services.core does not exist under the Libraries folder.
Some background. I recently moved to trash many Xcode files to free up disk space. I also did a new remove and Install of XCode, in case I deleted anything important accidentally. Non unity files work fine in XCode.
This might be the first project I used 2021.3.3f1 for. I previously used 2019.4.14f1 without encountering this problem.
Is there something I should set in the IOS Player settings of Unity BuildSettings to avoid this problem? (or something that would force the com.unity.services.core folder to be generated in the output project)?
I am very inexperienced in Mac and infrastructure so I apologize in advance if I am missing something very basic.
Thank you
You should clean your build folders and build anew, should work.
In Xcode you can do this by going to Product > Clean Build Folder, in Unity you just manually delete the whole Build output folder (I hope you created a seperate folder specifically for the Build output and didn't just export to the project directory in that case don't delete your project directory just set a new Build output folder ;).

Library not found for -lRNAppleAuthentication react-native iOS

I have tried deleting "$(inherited)" in library search paths and but it's not working
Have a try with the below solution.
You can go to File > Workspace Settings if you are in a workspace environment or File > Project Settings for a regular project environment.
Then click over the little grey arrow under the Derived data section and select your project folder and close the workspace and Xcode then delete the project directory from the derived data directory.
Open the workspace again in Xcode and clean and rebuild the project.
Also, make sure that you have applied pod install after the package installation.

Validation Error: The bundle contains disallowed file 'Frameworks'

I'm having the same issue as this guy, this guy, and this guy (nota bene, I'm actually not sure if they're all guys, per se).
They all ended up finding their own solutions, but none of them apply to my issue. I'm using Xcode 6.1 in my iOS 8 app with an included extension. The app and the extension both rely on an included framework. When I try to submit the app to the Store, the validation warning I get is "ERROR ITMS-9000: Invalid bundle. The bundle at 'xxxxx.appex' contains disallowed file 'Frameworks'".
I can't even find a file called Frameworks. The shared framework is supposed to be saved at /Library/Frameworks, which is Apple's recommended save location. The project also uses Cocoapods, which strikes me as the only other possible culprit, since it has references in its configuration files to $FRAMEWORK_PATH (though the build folder doesn't include a file or folder with that name).
OK for future viewers here's the fix:
When you create your own iOS framework (I'm using Xcode 6.1) when you build it the final product contains a 'Frameworks' folder in the framework bundle itself. i.e. MyFramework.framework/Frameworks. This happens even if you don't specify a copy files/embed frameworks build phase.
What you have to do is to go into you framework bundle, find the empty frameworks folder and delete it. This should not affect your app's functionality in any way. Then build your app and check that the embedded framework doesn't have a Frameworks folder as planned.
Your archive should now not contain the offending folder and the error should be gone!
I changed build settings > Packaging > Define modules set to YES in my extension and watch app target. Works fine for me.
In my case the solution was the following :
Try to create the script there 'problematic target' -> Build Phases' then click on + and select New Run Script Phase, the run script should go after all others. Insert there :
cd "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/"
if [[ -d "Frameworks" ]]; then
rm -fr Frameworks
fi
Then clean the project and try to create an archive once again. These answer was provided in the following issue :
https://github.com/CocoaPods/CocoaPods/issues/4203
I hope this help you.
Continuing to work with this, I noted that my Share Extension had an "Embed Frameworks" Build Phase, with the Destination set to the "Frameworks" directory. I changed it to "Shared Frameworks" and the error has gone away.
However, another error remains: "... contains disallowed nested bundles". I thought this was a sort of umbrella error warning as a result of the original. I'll open another question for that one.

libsqlite3.dylib framework accidenlty deleted from xcode

libsqlite3.dylib is accidently deleted from my Xcode . It is shown as red in "Link Binary with Libraries" (Build Phases) . Not in Trash too . Do I need to install xcode again ?
While the above answers do tell you how to go about adding the library to Xcode, what happens if you cannot find the library? I noticed this issue, and then did a search in Spotlight for libsqlite3, which did not locate any files. While it is kind of crude, you can jump to a Terminal session to locate files throughout your file system. Spotlight does not index everywhere on your drives, and my suspicion is that it does not include the locations where this file lives. At a terminal prompt, type:
find / -name libsqlite3.dylib -print
This is a UNIX command that will locate the file, starting at the root, and printing out the results it finds. You can press CTRL-C to cancel the search at any time. I actually found it within the Xcode bundle; in this case I am running Xcode 7 Beta, so it was found in:
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib
For convenience, I copied the file from this folder to a Resources folder under Documents, where I keep libraries and other files for easy reference in my projects.
Please note, if you are developing in Swift, then you need to edit your Bridging-Header.h file, and add the line:
#imports <sqlite3.h>
If you don't have the Bridging Header, you can add it to your project, follow the steps:
Create a new file, Bridging-Header.h in your project.
Add the line above.
Go to your Project Build Settings (click on the Project,
click on Build Settings tab).
Locate "Swift Compiler - Code
Generation", "Objective-C Bridging Header" setting, and add the name
of the file above "Bridging-Header.h"
It looks your library is missing libsqlite3.dylib and libsqlite3.0.dylib, so copy these files from any other computer and place these files in your computer.
Procedure:
Open xcode on the computer where these files exists, add libsqlite3.0.dylib in your project from link binary with libraries.
Right click on the libsqlite3.0.dylib and show in finder.
Copy two files libsqlite3.0.dylib and libsqlite3.dylib and place on the same location on other computer where these files are missing.
original post:
XCode 4 - libsqlite3.dylib: No such file or directory

How can I see the asstes copied to the build folder on Xcode 4.3?

I run Xcode 4.3 on a Mac 10.7.4 (Lion).
I have all my resources (images, audio) for my app on a separate folder (something like a DropBox or a sugar Sync folder installed on root) on my system.
I have written a shell script (in run scripts) to copy the resources i need for the app into the bundle when i compile the code.
Is there a way to view the assets (the images and audio) that have been copied in the build folder by my run script? If so, how would i go about doing this?
Select iOS Device as the build target, and build your application. This will generate the product .app file. Expand Products folder from Project Navigator, and right click yourappname.app and select "Show in Finder". Right click the app in your finder and select "Show Package Contents". You will find all your bundled assets there. Please note that you might not be able to open these images.

Resources