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!
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.
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
I have a working project that builds ok. (Xcode 6.0.1)
There were images added that were at one folder (/Downloads) and were substituted by new ones (/MyDir/MyProject).
At adding files process copy options, group and add to it's targets were selected.
After a copy and paste at Finder from the root project folder to the new project some images contain references at Targets / Build Phases / Copy Bundle Resources to old folder (Downloads) while they are ok at original project.
I've deleted the .git from initial project to make sure it's not a git problem.
Already tried
rm -rf ~/Library/Developer/Xcode/DerivedData/
Any ideas? Thank you
In the rightmost panel, which contains Identity and Type, check to see if the "Location" field is Absolute Path, Relative to Group, or Relative to Project, and set each file accordingly to what it should be. Xcode seems to create new files with creative ideas on how this should be set.
check in your project build phases if there are some missing references and delete the one you don't need
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.
In my Xcode project, I have it set to copy all the files I need in the "Copy bundle resources" step and it doesn't link to any extra libraries, yet when I compile the project it copies a number of files that aren't even in the project's file references (a number of .dll files that have nothing to do with this version of the app).
The files may have accidentally been added to the "copy bundle resources" step at one point but were since removed. How can I find out why are these files still being copied and how can I prevent it?
Turns out the files were left over from a build before those files were removed. Trashing the app from the products folder got rid of the extra files.