What means this Xcode warning?
Warning: The Copy Bundle Resources build phase
contains this target's Info.plist file 'Info.plist'
My be you info.plist file copied in "Copy Bundle Resources". see this image
http://imgur.com/KCrWGIx
simply delete this file.
As the warning states your Copy Bundle Resources contains your applications info.plist file. You need to remove it from there.
For removing it:
Choose your target --> Go to Build Phases --> Check the Copy Bundle Resources tab--> Choose your info.plist from there --> Click on **-** button
Related
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.
I'm new to iOS development, and I was using this guy's oauth implementation:
https://github.com/Christian-Hansen/simple-oauth1,
so I built a project based on his project file for simplicity's sake.
After a while I realised that I didn't like the folder structure, so I changed it by renaming some folders. I had to replace a bunch of files that came up red. Now I get these errors when I try to compile:
- Check dependencies:
Warning: The Copy Bundle Resources build phase contains this target's info.plist file '/Users/Manuel/Desktop/MyApp/MyApp/MyApp-info.plist'
- Precompile MyApp-Prefix.pch ...in /Users/Manuel/Desktop/MyApp/Simple-OAuth1
... a bunch of ProcessPCH stuff here that I can't decipher
clang: error: no such file or directory: '/Users/Manuel/Desktop/MyApp/Simple-OAuth1/MyApp-Prefix.pch
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
I have changed the folder name from Simple-OAuth1 to MyApp. I replaced the prefix file so it's not red anymore. Is there some setting somewhere that I need to change to get it to work? I also tried cleaning the project.
go to 'Build Phases' in your Target and remove the .plist file from 'Copy Bundle Resources'
go to 'BuildSettings' in your Target and search for 'Prefix Header' there you should check if the path is the same as your new/current .pch file
When you rename folders in your project sometimes you have to update the Build Settings in your project, especially when you rename the folders for things like *-info.plist and your *-prefix.pch files. But luckily this is simple to do following the below steps:
Updating *-prefix.pch location
Open your project up in xcode
Navigate to Build Settings for the Target you need to update.
In the Build Settings search bar type in "Prefix Header" or just "pch".
Double click the value field for Prefix Header and enter the new location for your *-prefix.pch file.
Save.
Updating *-info.plist location
Open your project up in xcode.
Navigate to Build Settings for the Target you need to update.
In the Build Settings search bar type in "Info.plist File" or "plist".
Double click the value field for Info.plist file and enter the new location of your *-info.plist file.
Save.
This question is similar if not identical but there is no solution. I've looked inside the archive and there's only one executable, so I am at a loss as to how to proceed. Any ideas greatly appreciates.
Invalid Build Structure
The binary file 'YourApp.app/libYourLibrary.a' is not permitted.
Your app may contain only one executable file.
This error occurs when a static library file is mistakenly copied into the app bundle.
You should link the libYourLibrary.a static library via a Link Binary with Libraries build phase.
It should NOT be added to the target's Copy Bundle Resources build phase.
My app was rejected with the same error message. It turned out that I was copying a third party framework (Fiksu) in the 'Copy Bundle Resources' build phase. The framework contained an executable and was already linked to in the 'Link Binary With Libraries' build phase. I deleted the framework from the 'Copy Bundle Resources' build phase. The framework continued to work normally in a release build. I resubmitted the app and it passed validation. Similar solution was posted here:
https://devforums.apple.com/message/1020254#1020254
In hindsight the error is straightforward. An executable file was accidentally added to the project. In my case "Develop!.app/Xcode" meant that Xcode was the executable. Checking the list of files in the project I found a symlink to Xcode. (Maybe I dragged it from the dock somehow and dropped it into the project).
If you are getting this error look at the files in your project -- there is an executable there somewhere.
I had this issue for the first time on an app I'd submitted over several versions with no issues.
I found that somehow that although I'd linked to one of my own libraries, one of the source files from that same library appeared in the list of files in the "Copy Bundle Resources" list. I have no idea how it got there but removing it meant that my app build, archived and was submitted successfully. :-)
If you are getting error in following format:
"Invalid Bundle Structure - The binary file 'Abc.app/AnyFileName.o' is not permitted.
Build Phases > Copy Bundle Resources > check your file AnyFileName.swift will be added too here. (Remove it)
validate it with XCode. Error gone !!
In my case I tried to remove references but nothing worked for me. Then I uninstall particular pod, remove references as mentioned here and then install that particular pod again. It worked for me.
For those who required elaboration check below:
1)
In Podfile comment the particular pod by adding # in the beginning and save it:
On command line run: pod install // It will uninstall that framework
2) Removed references of that framework from:
Link Binary with Libraries // In Build Phase
Copy Bundle Resources // In Build Phase
Embed Frameworks
3) Now install Pod again, Remove # which you added before and save it.
On command line run: pod install // It will install that framework again
Just delete the exec file from your bundle and delete the "Executable file" key from your bundle resources.
After that archive and validate the the the build it will work.
I have a few plist in my project, and I have added them to the target and "Copy bundle resource".
For some reason, they do not get copied to the app package.
I looked into the package content of the app in the simulator, everything but the plist files is copied.
(They are not in sub-directory; they are directly in the Resources group)
I tried cleaning, reinstalling..
Why is that?
Turns out there are some null scripts in my project build rules which block the plist files from being copied over!
Check that the file is copied in the bundle resources by :
1/ Clic your project name in Xcode,
2/ Go to your target name,
3/ Build Phases,
4/ In the "Copy Bundle Resources", check that your plist is added.
If not, add it with the "+" button.
Turns out there are some null scripts in my project build rules which block the plist files from being copied over!
I get the errors:
Warning: Multiple build commands for output file /Users/me/Library/Developer/Xcode/DerivedData/myapp-csoyvdzaugzkszeagjrtzrfssudr/Build/Products/Debug-iphonesimulator/myapp.app/icon-72.png
Warning: Multiple build commands for output file /Users/me/Library/Developer/Xcode/DerivedData/myapp-csoyvdzaugzkszeagjrtzrfssudr/Build/Products/Debug-iphonesimulator/myapp.app/Default-Landscape#2x~ipad.png
Warning: Multiple build commands for output file /Users/me/Library/Developer/Xcode/DerivedData/myapp-csoyvdzaugzkszeagjrtzrfssudr/Build/Products/Debug-iphonesimulator/myapp.app/Default-Landscape~ipad.png
When I try to run my app in the simulator. I understand this is because of duplicate files. But when I remove either of the duplicates I get the errors:
error: /Users/me/Documents/Cordova27/myapp/myapp/Resources/icons/icon-72.png: No such file or directory
Does anyone know how to fix this at all? Have tried cleaning and restarting XCode to no avail.
open the Copy Bundle Resources Build Phase. find the twice files in that list and Delete the duplicate reference.
Remove both,Add again.[Drag and drop at the icon field in the summary page]
I moved bunch of images to a different folders and hit the same issue. To solve, basically go to build phases >> Copy Bundle Resources and remove earlier references as shown in the picture below.
Note: Another thing to check is to see if you have multiple references of the files in the left panel (you will see 2 files with the same name)
If you set the splash/launch icon from Xcode (Targets -> Summary ...), the Xcode has an annoying feature that will copy your png file into the root folder, and after that you will get the warning for "Multiple build commands". What you need to do is, delete your png file used for splash/launch and also check the copy bundle resources in Target section and make sure your file has been removed from there. It will appear in red if the file is removed from your project and not removed from Copy bundle resources.
My problem was also in Copy Bundle Resources, but my cause was fast lane. All of my fastlane files name.txt, keywords.txt, marketing.txt, etc. were copied from each of my support languages into the bundle.
Go to your target Build Settings. In the search tool, enter the name of each fastlane file. In this case, you can delete all fastlane files. These are used for uploading your bundle to the App Store and so the files don't need to be in the bundle at all.
Add a new image(PNG) only via Copy Bundle Resources. Remove duplicates same way.