XCode Error itms-90035 - Invalid signature? [duplicate] - ios

This question already has answers here:
Error itms-90035 - Xcode
(16 answers)
Closed 7 years ago.
I've been building with Chrome-Mobile-Apps for the last few weeks in XCode with no problems until this morning, where I'm getting this Erorr itms-90035 when I try to submit my archive to the App Store. It will validate fine, but when I try to submit -- nada. Here is the error I get:
I found this thread that has the same issue, but the highest rated solution is not working for me. The file it points to in my erorr is a Unix Executable File that when I run doesn't do anything and I'm not sure if it's safe to delete. I searched by project for .sh files but only found one that is required to run the project. I'm not sure where the error is actually coming from? Any assistance? I'm incredibly confused here. I think apple changed something on their end.
edit Yes I am aware that there is another thread on this topic, that's where I first checked, as I said in my post. Unfortunately, the solutions in that thread are not related to my issue. I only have one .sh file in my project and it is required to copy the contents of my www folder w/ cordova to the iOS project, I think. If I remove the file my project will not build.
edit2 the only things in my copy bundle resources bit in the build phases tab are all of my icon/splash image files and MainViewController.xib. I don't think these are the issue

You need to delete the .sh file under your bower components folder. So just follow the instruction path for your binary file, find the file end with .sh and delete it. You should be good to go. Apple recently enforce this, and it is super annoying.
Refer the original solution working for me here: Error itms-90035 - Xcode

For me, it was with git. I removed .git file by running rm -rf .git
and the app got submitted successfully.

A similar thing happened to me.
I was using phonegap build for creating my .ipa file.
My Tip is to look at the path of the file mentioned in the error message.
When I looked at it it seemed to refer to a file that was not part of my project at all.
It turned out that my build process did not do a proper cleaning of the folder into which it copied the files to be zipped and sent to phonegap build - so that old files where still included.
Adding a proper cleanup initial step to my build proccess fixed the issue right away.

Please check if you are using crittercsim version prior to 5.2.0, it has a file name dsym_upload.sh which is also causing problem, if that is the case, please update your crittercism source.

For me the error was related to having a file in 'Copy Bundle Resources' that did not belong there. Reading other threads it appears to be a common theme. It's not so much of a particular type of file but more about 'any' file that shouldn't be there. If you go into your app target/Build Phases/Copy Bundle Resources...I expect you will find a file that does not belong there (with the name 'marked'? - assuming you have all your proper Code Signing authorities). Remove the file from the Copy Bundle Resources...(not necessarily from your project - you may need that file for you App to work)...just get it out of 'Copy Bundle Resources'. If you are still uncertain of what file is causing your problem, try Archiving and Validating your App. Although, it will Validate fine it will indicate a file with Zero Entitlements. That file should be the problem.

I fixed this by just removing the entire unix executable file. My project didn't need it apparently. Not a great solution (actually the worst) but it works!

Related

Error itms-90035 - Xcode

I have developed a phonegap application which is running absolutely fine on iPhone. Now, I want to submit the app to the appstore. Following is the procedure I am following to submit my app:
Open Xcode and archive the project
Click on validate (which is successful)
Click on Submit to appstore (which is where I am getting the following error)
Until yesterday night, I wasn't even getting this error and today morning, I archive the project and I get this error. Not sure what the issue is.
This is the final stage which is stopping me from submitting the app and is very frustrating, I tried to search for the same error code on the stackoverflow forum and I could not find one single post which is exactly of the same error code as mine, which is very strange.
Please help :)
I had the same problem, turns out that one of my libraries installed via bower includes a .sh file, which is not needed. I have just deleted the file and everything has been uploaded successfully.
Seems like that Apple now enforces developers to have .sh files in their apps signed. As Cordova/Phonegap app don't need any of them, you can safely delete them.
This happened to me after updating to the latest Xcode (6.3.1). It's not just .sh files, as I was getting these errors about node scripts. It appears that ANY file that starts with #!/usr/bin/env will cause these errors. I was able to cause arbitrary errors by adding a #! to a random file.
Temporarily deleting the #!/usr/bin/env directive from the top of the files will work but you'll want a better long-term solution :)
You'll have to fix it by dealing with each script file case-by-case for what makes sense in your project.
As noted above this could be a temporary problem on Apple's side, not necessarily related to Xcode version.
EDIT: I managed to avoid this error by removing my projects .sh files from my target.
So far I'd say that's a bug on Apple's side.
I submitted an app yesterday without any issue, rejected it today to submit a slightly altered binary today, but like you I'm now encountering the same error.
I thought it was related to Xcode6.3.1 because I installed it this morning so I installed Xcode 6.3.0 again but the error remained. Then I checking everything thoroughly:
Certificates
Provisioning Profiles
iTunes connect application status
But no success so far.
The fact a "itms-90035" Google search returns only 1 result makes me think that may be some temporary incident.
In my case I got this error because the app display name had a special character in it. It escapes me why proper error messages cannot be generated.
As others have said, the problem appears to be due to including files named "upload-dsym.sh" in the app bundle. Here are the steps I took to get past this error:
Went to the project settings in Xcode and selected the "Target" app icon.
Selected the Build Phases tab.
Clicked on "Copy Bundle Resources"
Looked for a file being copied named "upload-dsym.sh".
I removed that file and then the upload went fine.
It has something to do with included .sh files, not that obvious indeed.
In our case, it was the AudioKit library. README says:
In most cases, when building for iOS or tvOS, regardless of how you install the framework, you will need to add a run phase to your project's target with the following script:
"$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH/AudioKit.framework/fix-framework.sh"
Sometimes you don't see them directly in your target's build phases. Some of the 3rd party libraries can cause this error because they are dealing with .sh files as well.
Check your 3rd party libraries/pods README's files for more info.
I have the same issue. Then I delete the .sh file. And I submit my app again. Successful!
This issue has been resolved in CrittercismSDK CocoaPods 5.2.0 : https://github.com/CocoaPods/Specs/blob/master/Specs/CrittercismSDK/5.2.0/CrittercismSDK.podspec.json
You may either upgrade to sdk 5.2.0 or delete the file and remove the following lines from the Pods-resources.sh file:
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_resource "CrittercismSDK/CrittercismSDK/dsym_upload.sh"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
install_resource "CrittercismSDK/CrittercismSDK/dsym_upload.sh"
fi
Thanks
We had a very similar problem today and solved it.
ERROR ITMS-90035: "Invalid Signature. A sealed resource is missing or invalid. The binary at path [MyNiftyApp.app/MyNiftyApp] contains an invalid signature. [...]"
We are using Jenkins-CI for the build process together with the xcode-plugin.
When I reviewed the jenkins build log I found this error message:
file added: /Users/Shared/Jenkins/Home/workspace/RELEASE_STAGE_my-nifty-app/build/MyNiftyApp.app/MyNiftyApp.app
file modified: /Users/Shared/Jenkins/Home/workspace/RELEASE_STAGE_my-nifty-app/build/MyNiftyApp.app/Assets.car
]
Codesign check fails : /Users/Shared/Jenkins/Home/workspace/RELEASE_STAGE_my-nifty-app/build/MyNiftyApp.app: a sealed resource is missing or invalid
After searching for that Assets.car I found this post:
https://issues.jenkins-ci.org/browse/JENKINS-21253
The User had a similar problem, could solve it by deactivating the following plugin option "XCode -> General Build Settings -> Generate Archive? " (it was true before, now it's false).
At least this solved the problem on our side - maybe it will guide you to the correct direction.
I resolved this by simply removing the "binary" file(s) in the error.
For you its www/js/release.sh.
For me it was two redundant bower-files, a .sh-file and a .js-file that was located under a "bin"-folder (maybe thats why it thought it was a binary?).
On a side-note, it seems that you could still continue the upload process by just clicking Send after being presented with the errors in Application Loader.
I received this same error when I tried to upload my app using ApplicationLoader 3.0. Upgrading to ApplicationLoader 3.1 (i.e. the latest), fixed the issue for me.
In the platforms directory run:
grep -r '#!/usr/' *
This will show you all the files that can be executed. Typically this would include .sh and node files.
From the results find the files that are in your project folder (e.g. my project folder was platforms/ios/www/*) and delete them leave the rest.
I had the exact same problem. I was writing a bug on the myApp.app/myApp
Decision:
Look for files that start with special characters or characters other than English. I found, deleted and everything worked!
I had same issue using both xcode 6.3.1 and 6.4 beta. Mine said it was my main.o file. I looked in the copy bundle resources and for some reason my project's main file was there. I removed it and archived it again to send up to itunes connect for testflight and it uploaded fine. Took me 3 hrs to figure out it was that stupid file. Home this helps. Seems you need to really pay attention to what your sending up in that "Copy Bundle Resources" in build phases. Whatever file its telling you is a problem remove taht from this area and give it a try.
In my case, I got the error when submitting a re-signed ipa file. Turns out I had looked at the application package in Finder, and it had created a .DS_Store file (this was after re-signing with codesign, which would have complained if the file were present at the time of signing).
After removing the .DS_Store file, the upload succeeded.
Run the following command (in mac) : codesign --verify -vvvv <your_application>.app
sample:
codesign --verify -vvvv project.app
project.app: a sealed resource is missing or invalid
file missing: /Users/iHTCboy/workspace/Payload/project.app/.DS_Store
Looks like that have a hidden file .DS_Store inside the assets of my app.
Kindly find and remove it and try again.
that is work for me

‘Cloud/CLAPIEngine.h’ file not found

My application has been running fine with the Cloud-iOS.a library for the past few days. However, today, when I used the “Product > Clear Build Folder” command and tried to run the app again, it would give me this error:
‘Cloud/CLAPIEngine.h’ file not found
The Cloud library builds successfully, but the main project gives me that error along with 4 others in both the main project and the XCTest files (that are linked with this one).
I’ve tried removing and re-inserting the file from Build Phases > Headers and Build Phases > Compile Sources and that didn’t do anything (I also have tried to remove the -fno-objc-arc flag from the file to see if it would recognize it, and sure enough, it gave me an ARC error). I’ve tried looking through other SO questions like these:
Restkit/Restkit.h file not found Xcode 6.1
Adding frameworks to project in Xcode 5 and having *relative* paths added
... and nothing worked. I even tried restarting the app itself and nothing happened. I made a test project and included the same library to see if it’s my project, but this project also says the same errors. Both projects also have the file in the "include/" directory. I don’t know why this is happening and I’m starting to get really tired with Xcode’s random problems.
I’ve included the test project in a Dropbox link for others to check out and see why it’s doing this.
https://www.dropbox.com/sh/lu8hntaaww8y6r4/AAA1KJ085YvKjwMR-AZff6Nga?dl=0
What can I do to get this to run again? Thanks in advance.
(After this, I’m not running the “Clear Build Folder" command again.)
Ok. Looks like someone over at Apple Developer Forums was able to give me an answer. I chose the last one that they gave me, which was to change the static library into a framework. Thank goodness Apple made this available on iOS, because (after a bit of tweaking), everything works!

How do i fix this CopyPNG File error?

While reading /Users/user/Desktop/AppProject/PruebaApp/Logo Retina.png
pngcrush caught libpng error:
Read Er Could not find file:
/Users/user/Library/Developer/Xcode/DerivedData/PruebaApp-cblepoaxbqzyopcbcswwqjtftyon/Build/Intermediates/ArchiveIntermediates/MaderoAPP/InstallationBuildProductsLocation/Applications/MaderoAPP.app/Logo
Retina.png
Command
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng
emitted errors but did not return a nonzero exit code to indicate
failure
Im getting these errors while archiving project, at the end it does archive but i want to get rid of it. I had trouble with the app before and i read that i should delete the DerivedData/(myproject)folder so i did. and apparently it is trying to look for the images in that folder how do i fix this??? Help!
Try first by Hard Cleaning your project CMD+OPTION+SHIFT+K, If problem exists apply following method,
Build Phases -> Copy Bundle Resources, Any fileName is red color?
Or
Convert Logo Retina.png or Create it again, maybe it's an encoding\format issue.
Or
Rename "Logo Retina.png" to "LogoRetina.png".
~Good luck~
It also happens when you have multiple images with the same name in TARGET->Build Phases->Copy Bundle Resources. To resolve it -
Search for the image name that you are getting an error for in Build
Phases search bar at the top.
If you get multiple results in Copy Bundle Resources for the search query, just remove others from it by clicking on "-" sign. Make sure you have same images for the multiple results. If not you have to rename the actual files of other entries.
Just compile your code. You are good to go.
Hope it works for you.
Just open image in Preview app and export it as png file. Replace old image with new in Xcode.
Honestly I have had this problem intermittantly many times and clean then rebuild has fixed it.
Since the answers here are either not useful at all or quite complicated I want to add mine:
The error means that Xcode can not find the file, whether it is in the project's folder or not.
If you still need that image, what you can do is to open a Finder view and navigate to your project. Drag the file Xcode was complaining about into the project an uncheck 'Copy to folder'.
if you do not need the file anymore, on the left side of Xcode, find the file, it will be shown in red, simply tap on it and then delete / backspace
Hope that helps some people :)
To solve the issue copy the Image name. Then Filter it (Build Phases -> Filter textfield). Finally I removed it.
Also check that you are not naming the images with only a number like "0.png" I change it to "tuts0.png" and it worked.
I just had this error and honestly I think it was being caused by another error. I had an issue with my Crashlytics framework and I'm convinced it was effect some unassociated pngs with the copypng error. I replaced the Crashlytics.framework with a fresh version and viola, all errors were gone.
Don't ask me how this works, I'm just posting this in case someone else can benefit from it.
I wasn't able to fix this problem. So i delete and reinstalled xcode, this helped for me.
Fixed it by reverting to my old product name (in "Build settings"). Seems that the new product name confused the images path.
I have the same issue with resources. The problem was that I have copied target from another one and just forget to uncheck checkbox at target membership window.
i face this problem and this solution is working form me
you need to remove any reference for that image
Build Phases -> Copy Bundle Resources
after that clean and build and problem will be fixed
I had accidentally deleted the file from the location which was linked to x-code project. I had not copied the file in my xcode project but just the path. Hope it helps someone.
I've had similar issues with pngcrush /libpng crashing with PNGs (checksum errors / freeing object that have been freed etc). These could be reproduced on the command line so I recreated the PNGs, even converted them to other formats then back but the errors persisted. In my case Xcode then rejected the resulting archive for not having iPhone 5 support (as pngcrush killed the Default-568h#2x.png image). The above fix resolved this.
For those who are struggling with this error while building Cordova app.
Please keep the following point in consideration as it may lead to this error.
The images should be tagged as "resource-file" and not as "source-file" in plugin.xml of your Cordova plugin as the former includes the images in "Copy Bundle Resources" (under Build Phase) and the latter to "Compile Sources" of your equivalent xcode project of cordova app.
If non of above answers can fix your problem, try look into Xcode project where you reference your image file, I happened to referenced twice to the same png file. Once I delete one the reference, it worked. The error went away. Good luck.
It also happens when you have multiple images with the same name in TARGET->Build Phases->Copy Bundle Resources. To resolve it -
Search for the image name that you are getting an error for in Build Phases search bar at the top.
If you get multiple results in Copy Bundle Resources for the search query, just remove others from it by clicking on "-" sign. Make sure you have same images for the multiple results. If not you have to rename the actual files of other entries.
clean cmd+option+shift+k and Build Project...
work well for me....

XCode 4.3.1 breaks validation of apps with directories added by reference. Any workaround?

I've discovered that Xcode 4.3.1 has a serious issue validating apps with resources within a directory tree inside an application bundle.
Apps can pass validation within the Xcode "Build for Archive" process - it only fails when the validation is run via Organizer, which is required to save for ad hoc or App Store submittal.
After spending hours trying to trace down the usual code signing entitlement issues, I eventually noticed the following line in the system console when the export fails:
3/10/12 2:32:48.450 PM [0x0-0x261261].com.apple.dt.Xcode: /Users/chris/Library/Developer/Xcode/Archives/2012-03-10/Coverage 3-10-12 2.32 PM.xcarchive/Products/Applications/Coverage.app/Tiles/T-Mobile-roam/4: Is a directory
The "Tiles" directory has been added to my project via "Create folder reference for any added folders".
I discovered that removing the Tiles directory allows the app to build and validate. Adding it back results in this code sign failure.
It seems that adding a multi-level directory tree completely screws up the validation process, and the error messages send developers on a wild goose chase trying to track down code signing and entitlement issues that really aren't an issue.
I never had any issues with prior releases of Xcode - this seems to be a new serious bug in Xcode 4.3.1.
Is there any workaround possible that will allow us to submit updates to our app?
Notes:
This thread seems related: https://devforums.apple.com/message/630800
This question touches on a similar issue as well:
Xcode 4.3: Codesign operation failed (Check that the identity you selected is valid)
I spent a day trying to isolate this bug, and I've finally nailed it.
The code signer in XCode 4.3.1 when validating for the App Store or saving for AdHoc distribution chokes whenever there is a subdirectory in your bundle that has the same name as its parent directory.
For example:
test/test/file.x -- FAIL
test/test2/file.x -- WORKS
This seems to be new in Xcode 4.3.1, and hopefully will be fixed soon.
UPDATE: I have heard back from Apple DTS support confirming the issue, and indicating that there is no known workaround yet other than renaming the directories in the bundle. ugh
Maybe I've found a workaround:
Open Organizer;
Right click on the archive you want to export and select "Reveal in Finder";
Right click on the xcarchive file and select "Show package content";
Go to Products/Applications;
Create a folder and name it Payload;
Drag the .app file into the folder (don't copy it, since it would invalidate the signing);
Zip the folder;
Rename the .zip file to .ipa
It worked for me.
Let me know if it's ok even for you.
I had the same problem. The solution was to remove files beginning by "._".
Be careful, these files are hidden even when you display hidden files !
In my case, I think that these files were generated by Photoshop.
I had the same problem and solved it like this:
There was a script (under Build Phases) which did try to "clean up" frameworks, by removing seemingly unneeded items, such as the Headers.
However, this destroyed the basic structure of the framework, which probably led to it not being detected properly any more, thus failing the signing or verify operation.
For example, the "Headers" folder and symlink should not be removed, only the *.h files inside the Headers folder!
So, check if your .framework folder contains the basic structure that looks like this:
mylib.framework/
mylib -> symlink to Versions/Current/mylib
Headers -> symlink to Versions/Current/Headers
Resources -> symlink to Versions/Current/Resources
Versions/
A/
Headers/
Resources/
mylib
Current -> symlink to A
We just ran into this where somehow, our .app was getting other .apps built into its bundle. Presumably code signing was choking on the nested app.

xcode archive build fails with error Copy .strings file Error : Failed to remove

When building the project for distribution using the Archive build mode, the following error appears. When building in debug or release mode everything works fine. The mentioned directory is empty. The directory permissions are set to full access for the current user. Any ideas?
CopyStringsFile /Users/username/Library/Developer/Xcode/DerivedData/ProjectName-bikjmxotbfpkybhkqwlxysxcibrk/ArchiveIntermediates/ProjectName/InstallationBuildProductsLocation/Applications/ProjectName.app/es.lproj/Localizable.strings ProjectName/Resources/es.lproj/Localizable.strings
cd /Users/username/Coding/proj/game/ProjectName
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin"
builtin-copyStrings --validate --inputencoding utf-8 --outputencoding binary --outdir /Users/username/Library/Developer/Xcode/DerivedData/ProjectName-bikjmxotbfpkybhkqwlxysxcibrk/ArchiveIntermediates/ProjectName/InstallationBuildProductsLocation/Applications/ProjectName.app/es.lproj -- ProjectName/Resources/es.lproj/Localizable.strings
error: failed to remove /Users/username/Library/Developer/Xcode/DerivedData/ProjectName-bikjmxotbfpkybhkqwlxysxcibrk/ArchiveIntermediates/ProjectName/InstallationBuildProductsLocation/Applications/ProjectName.app/es.lproj/Localizable.strings: “Localizable.strings” couldn’t be removed.
This happened to me when I had duplicate references to a folder added to the project. Deleting the duplicate references fixed it.
Ok, i figured it out:
I don't exactly know why Xcode wanted to delete a file that wasn't existent at that location in the first place, but it think it had to do with the project file which was broken for no apparent reason.
The way i fixed it was to just delete all the Localizable.strings files from the project ( i had 6 for different languages each in its own .lproj directory ) and then add them again one by one. –
I also face this type of problem. But what I did is just clean up project "Product -> Clean" and rebuild it fix this problem
I had the same problem ... anyway, these 2 steps definitely solved it:
Make sure the Localizable.strings files are encoded in UTF-16 instead of UTF-8. So if you need to convert them you can do it in XCode by choosing the files and changing the Text Encoding to UTF-16 in the File Inspector
remove the references to the files from your project and re-add them. This should fix the CopyStringsFile error.
I had the same problem and simply cleaning didn't fix it.
I have multiple Build Configurations set up in order to output different apps with different bundle identifiers and a custom script that copies some files. When creating new Build Configurations with new custom files, these files were automatically added to the "Copy Bundle Resources" Build Phase when my script was already taking care of them.
So what I needed to do was simply to remove them from the Copy Bundle Resources list in MyTarget > Build Phases.
Please check this before trying other mentioned steps :-
In my case it was the disk space. I had to free up some space before running it again.
I had same problem: “Localizable.strings” couldn’t be removed. It occurred almost randomly -> when you try to build whole project (after switching git branches or cleaning project) -> Copying Localizable.strings files. I had 4 localisations in my app.
I have tried all mentioned solutions but none of them helped me:
1) project was set up correctly
2) UTF-8 is recommended by Apple itself (https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html).
Finally I found one more thing. It turned out that my generated (used fastlane poeditor_export plugin) Localizable.strings file had no last line (CR symbol). Added LF (new line feed) symbol to the end of file and build process stopped throwing error.
File was not compliment with POSIX standard (http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206).
Hope this will be helpful to someone ;)
BTW, same issue thread: Localizable.strings error - compiler says file is missing
In my case my .string file was referenced at different location in Xcode sidebar but its actual disk location in computer was different. I moved the file to the referenced location (as same in Xcode) in my computer and it worked well.

Resources