Submitting application update to iTunesConnect (madness!) - iphone

iTunes connect keeps rejecting my binary for an application update and it's driving me mad. Usually I can figure it out but I've tried everything I can think of. Maybe someone can lend a hand :)
The error I'm getting is:
The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate.
I am uploading an updated version of my app to the store. The current version is 1.0, this new one is 3.0. Here's what I've tried:
Zipped the app bundle with the
command line (I've heard the Finder
zip utility can be bad sometimes)
Checked my app is signed properly
with $> codesign -vv myApp (says
"Valid on disk)
Checked in the build
log for the correct provisioning junk
to be there
Made sure in my
Info.plist file the CFBundleVersion
and CFShortBundleVersion are
incremented from my current version
That's what I can think of to check so far, and everything looks good as far as I can tell.
Now I've read somewhere in the Portal that says you must sign updates with the same Distribution Cert as before, and I am (I think). However I have to sign with a new provisioning profile because the old one I used for App Store has expired (or something, I don't know it just won't work).
Things to know about my situation
This update is actually a complete re-write from a new template, BUT I've made sure I'm using the exact same App ID (wildcard) and bundle indentifier) so that shouldn't be a problem.
Also, I've switched machines since I last submitted to the App Store but I remembered to export everything (I think) from my old machine. I still have the old one here, with all the same data on it, if that's helpful. I don't think I've forgotten anything).
Thanks in advance for any help :)
Update
So I've decided to try uploading with the Application Loader to see if it will give me any new errors, and it has, it spewed this out into the console. Perhaps someone can find something meaningful there.
Also of note, the Portal Guide says Updates must be signed with the original Distribution Provisioning profile as was used to sign the original app. I've tried using that old one, but Xcode won't let me select it, as there's "No matching key pair" or whatever. Is there a way to remedy this? According to Keychain I've got my Distribution Cert and its private key, it all looks valid. I've made sure to try Repairing the Keychain in case, but no change.

This is always the fun part, isn't it?
Assuming you've double and triple checked the usual stuff (using the right cert, compiling for device, have a proper icon file, app ID, etc.)
One obscure reason I've run into was roughly the same as the one outlined here:
http://discussions.apple.com/message.jspa?messageID=9167082#9167082
To sum up, my project.pbxproj file somehow ended up with two different entries for PROVISIONING_PROFILE (even though the XCode interface only showed one). My file looked a bit different from the one posted in that discussion, but removing the extra entry fixed the problem for me.

It's simple! Just let Finder zip it.

Related

Software Signing and antivirus blocking

I'm a software developer who works as a freelancer, and my question has two parts.
First part:
I was working on a project then out of nowhere while testing on windows 10 VM windows security start blocking my app, I have a legit Bitdeferter and Malwarebytes on my main machine, and when I scanned my app (the EXE file from C# project) everything is clean, yet when I uploaded the file to virustotal.com it shows 5 detections
I start doubting my code and NuGet packages (I use Microsoft.AspNet.WebApi.Client and Newtonsoft.Json) so I removed them and to my surprise, I only got 2 detections out of 5.
I even create an empty Console app and still get those 2 detections, and my main machine still shows nothing as a virus.
So does that mean that my app is good but needs to be signed?
Second part:
If my issue is just a signing certificate, do I need as a developer to obtain that or my client, and then I only sign his/her app under his/her certificate?
Thank you.
Many engines treat VirusTotal samples very harshly, and any new executable has very low reputation (never having been seen before).
Therefore you will get lots of false-positives from VirusTotal when looking at your own new binary.
Signing is likely to help somewhat - at least there's a chance that you can build reputation in your certificate rather than each binary separately.
As far as I know, you get the signing certificate for you as a developer, although that might be different if you are providing source code and the client is building the end executable.

Xcode won't build to device

This problem has been KILLING me. I've been working on this app for 8 Months, and I am so close to finishing, I just can't seem to build for device. Building for the simulator works fine, but device always gives me the SAME 2 errors.
The 1st Error:
"Instruction requires a CPU feature not currently enabled"
From googling, I've found this probably means I'm not linking a binary I should be, but I'm not sure.
The 2nd Error:
If you can't read it, it says: Generating JWFNS.app.dSYM ... error: unable to open executable '/Users/ajr1188/Library/Developer/Xcode/DerivedData/JWFNS-azshgysfabycfagnebotitpcyaww/Build/Products/Debug-iphoneos/JWFNS.app/JWFNS'
This is the big one. I cannot seem to build the .app.dSYM file properly. I went in and deleted the build folder, I looked at EVERY stackoverflow question I could find and tried changing any random thing mentioned in another question, but all of it is to no avail. I'm so suck right now. AHH. PLEASE. Any help would be so appreciated!
Maybe your project has become hopelessly corrupted. One thing to try is to start a brand new project and copy/import all your sources/assets into the new project to see if that fixes the problem.
Another less nuclear (but perhaps more time consuming) approach is to binary search the build. Exclude absolutely everything except main.m and see if that fixes the problem. If it does, include half your sources, and buid again....repeat, trying to narrow in on the problem spot. Maybe a file or group of files has received special build settings that don't belong there.
I've had very similar problems, I cant remember the exact error message but it was very similar. Are you able to make a new project that will run on your device?
if so (and I know this sounds bad but it's worth a try) Create a new project and simply copy all the code and resources across and see if it still works. If it doesn't then there is something wrong with you code and you can continue trying to isolate the problem from there.
Hope this is helpful.
check the frameworks you link to. there's a chance that you linked a framework (say quartz) of osx, instead of ios.
Answering in detail is probably going to take looking at your target settings. But it looks like you may be building for the wrong architecture. (It doesn't link, so there is no .dSYM symbol file.) For example, if you have only recently built for device, you probably created your project under an older Xcode, and it may not have the arm6/arm7 settings right.
To check, show the Build Settings for your target (not the project), and filter on Architecture.
Make sure that in build settings the architectures are armv6 and armv7. Also make sure that in .plist file, the "Application requires iPhone environment" is TRUE. Delete "Required device capabilities" in the .plist if present.

iOS code signing fails: "A sealed resource is missing or invalid."

I have been with this problem already 8 hours unable to solve it.
Whats Cool JLD$ codesign -vvvv build/Distribution-iphoneos/Whats\ cool\?.app
build/Distribution-iphoneos/Whats cool?.app: a sealed resource is missing or invalid
/Users/JLD/Desktop/iOS Development/Whats Cool/build/Distribution-iphoneos/Whats
cool?.app/Whats cool?: resource modified
I have tried the solutions posted on all these threads to no avail:
https://discussions.apple.com/thread/1590980
https://discussions.apple.com/message/9167082
http://www.iphonedevsdk.com/forum/iphone-sdk-development/2256-application-failed-codesign-verification.html
https://forums.macrumors.com/threads/entitlements-plist.584209/
How to solve "Application failed codesign verification" when uploading to iTunes Connect?
I even tried recreating the whole project again redoing all the IB connections and nothing works! It builds everything, but it is unable to code sign it! So I'm unable to upload it through the AppLoader.
I am doing all these following the instructions found at the provisioning profile on the Distribute application page.
https://developer.apple.com/ios/manage/distribution/index.action
I even tried building from another Mac. I have my distribution profile and my distribution certificate both set to WildCard. But it still doesn't work. I made a new app under a different name with another Bundle ID to no avail. I don't know what to try anymore!
Thank you future problem solver! I know you are there so come to my aid, I'll thank you forever!
UPDATE: I tried to make the new project from scratch. Copying the source code and remaking all the connections on IB to no avail. I even followed this link with instructions:
http://techiechok.com/2009/03/30/resolving-iphone-code-signing-error/
Unsuccessful. I don't know what else to do. I'm even considering using one technical incident to solve this problem once and for all.
I just experienced this error trying to sign an archive with Xcode 4 on Lion. The problem turned out to be related to the fact that the archive had been zipped on one machine and transported to another --- the zip utility did not support symbolic links, and the app code signature uses a symlink inside the bundle, so the unzipped archive was invalid.
Possible solutions are:
Use the Finder's contextual (ctrl-click/right-click) menu and choose "Compress" to create the zip file, or:
Use the command line version of zip and provide it with the -y argument to preserve symbolic links.
This isn't a specific answer I'm afraid, but something you may not have thought about.
From your command line snippet, it looks like you're code signing your app bundle after it's been built. Are you moving the bundle (.app folder or maybe an IPA or ZIP file) from another machine, or from another drive? I've had problems with moving app bundles between file systems that don't support symbolic links properly. Are you using a network drive, or have a local drive that's not formatted for Mac OS.
Solved. The problem was a '?' character on the product name. Shouldn't be like that but that's how it is. Nowhere apple says that that makes a codesign verification issue.
Apple's new APFS file system has some bugs to process unicode characters and it is causing the issue.
Moving the whole project to the legacy MacOS Extended volume and archiving again solved the issue.
Another problem could be your app contains image file name with none English characters in your app. Such as 'ş ç ğ'. If you remove those images or change the file name it will proceed.
I passed days on this problem, for me it's because the name of the application contains arabic caracters :(, So apple on xcode 12 doesn't accept arabic caracters ? on xcode 10 i publish without any problem
it's very complicated to be a developper on ios
In my case, I got that error because the disk image I created to distribute my app ran out of space and ditto did not copy all files from the build folder to the disk image. As the script I used generates so much noise, I missed the warning of ditto that it ran out of space in the target disk image. Unfortunately, ditto should have aborted the whole procedure, instead of burying the warning into a myriad of other paths of smaller files that it managed to copy.

Uploading Binary iPhone App "The signature was invalid" again again and again

I'm going crazy! I'm trying to upload the binary of my first application but I have always the same error!
"The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate."
I did everything, EVERYTHING!!
I created the request for the certificate, used it for both developer and distribution certificate, created the provisioning profile (12 times!!!) always cleaning my keychain and my Xcode deleting the old certificates and profiles..
I reboot the machine, reboot Xcode, the log is correct, but... I can't upload my app!!!!
Checked if my iPhone is connected (i tried with iPhone disconneted too).
I checked the certificate in both my project settings "Distribuition" Configuration (duplicate of "Release" configuration) and in my target settings.
Reveal in finder, compress the app and sent the zip...
I tried with Application Loader and iTunes connect online..
but nothing! NOTHING!!
I've spent 8 hours! And again i can't have my app uploaded!!!
I'm really going crazy!
Can anyone help me pleeease?
Thx!
It seems like there are a LOT of causes for receiving this cryptic and mostly unhelpful email. Even after verifying the use of distribution certificates, cleaning & rebuilding my project, and checking with codesign from the command line (and following instructions from the email), no errors showed up—-but I'd get the "invalid signature" email right after uploading. All the solutions seem anecdotal and obviously depend on what secret error is causing the problem. I've spent the last week pulling my hair out, trying to figure it out for my app—-and finally got it successfully submitted today—so let me share my story and see if it's relevant to your situation.
In my case, I seemed to have a complex cause of having my Entitlement.plist set with an incorrect variable along with the holdover of an old provisioning profile (from a previous Xcode version?) buried deep in the project.pbxproj component of my Xcode project file.
The "aps-environment" variable in my Entitlements.plist was set to "distribution" instead of "production" (I swear I read somewhere in the developer docs that it was supposed to be "distribution"!) But fixing that alone wasn't enough to get my app through. (I must have submitted 100 different combinations of app configurations trying different variables!) Starting with the helpful suggestions from this post on another forum, I dug through the distribution profile and found duplicate entries for some variables. The duplicates had empty quotation marks (i.e. nothing set for the variable) or strange variables or old provisioning profiles which seemed to be causing problems (somehow). Cleaning this up and removing the duplicate lines with bad variables worked in my case. YMMV. But carefully examining the project files ("show contents" on the Xcode project file in finder) seems like a good idea for diagnostics. Good luck!
Been there - done that.
Make sure your certificate is in the "login" keychain, and that that i the default keychain (highlighted bold) in Keychain Access
Make sure you have both the private and public keys for your certificates and that they are valid. You will also need the Apple Worldwide Developer Relations Cert Authority installed.
I assume you have dragged the profile into xcode - easiest to drop them onto the xcode icon on the dock.
Make sure as Paul says, that the bundle identifiers all match up
You say you checked the certificate in the distribution configuration. Its not the certificate you need to concentrate on but the provisioning profile.
Select your Release config top left, click on the project under groups & files and do cmd I. Select build tab and then pick distribution in the top left. Then look at the Code Signing Identity. Pull down the dropdown list and make sure you have the right application identifier, the right profile and the right certificate. Don't use the Automatic Profile Selector.
Hope one of those steps helps!
I was getting the same error when I tried to submit a version update from the Organizer. What solved my issue was using the Application Loader found in the directory /Developer/Applications/Utilities. You'll need to compress your .app file and send the corresponding .zip file. I used this for my initial submission as well, I just thought I'd try the new way. What a pain! Go with Application Loader.
Best solution:
Revoke Distribution Certificate
Create new AppStore provisioning profile
This solved my problem. Spent 4hrs+ :( :)
I just had this problem. I resolved it, after hair-pulling, by going back into Keychain Access one more time and discovering the "Show Expired Certificates" menu item. When I did that, one more expired cert of the kind I had (so far, unsuccessfully) replaced showed up! I had deleted a couple of expired certs already, but this menu item caused another to show up, and after deleting it, my upload worked. I was previously aware that expired certs can get in the way of valid ones, and I STILL wasted a lot of time. Hopefully, this helps some people.

Couldn't install Ad-Hoc in iPhone 3.0 OS?

I've created an Ad-Hoc of my iphone app, but i couldnt install it on my iPhone (upgraded to iPhone OS 3.0). And also i created new provisioning file and plist file but it still shows error:
The application was not installed on th iPhone "Unknown" because an unknown error occured (0xE8008017)
Please send me a solution..........
I saw the 0xE8008017 when dragging a .ipa file that I created into iTunes, but NOT when dragging the .app folder directly into iTunes.
Update: There seem to be lots of reasons why this can occur:
1) You should use "ditto" instead of "zip" to create the .ipa file, as that is what gets used if you use Finder and choose "Compress":
ditto -c -k --sequesterRsrc Folder OutputFile.ipa
2) This link has a comment explaining the error is due to stale resources, i.e. you have a file in the .app bundle that has not been code signed. Check that all the files in your binary have a corresponding entry in the CodeResources file (except those explicitly excluded in ResourceRules.plist).
If you are trying to debug this problem you should check if dragging the .app folder into iTunes directly works. If it does, look for a problem with your creation of the .ipa file.
On another occasion when I changed my Info.plist 'Bundle identifier' from com.domain.appname to appid.com.domain.appname it made iTunes report a 0xE8008019 error instead of the 0xE8008017 one (importing the .app still worked directly). I think using appid.com.domain.appname in the Info.plist is wrong, but I mention it here in case somebody is searching for that error code!
I solved one 0xE8008017 error by renaming one of my resources. It was a PNG file with the danish letter 'ø' in it.
I've seen one other report about 0xE8008017 where the fix was about a colon in one of the resource filenames.
I am getting the same error.
I looked for the names of the files in the resources.
But the names have only alphabets a-z and digits 1-9.
Only at couple of places, hyphen - and underscore _ have been used.
I don't think that can cause the issue.
What else can be the reason?
This is a generic error, and often the real error will be reported to the OS X console.
Fire up the Console app (should be in Applications, or use Spotlight to find it automatically), and scroll to the bottom. Look at the timestamps, and see if there's a detailed message.
I've several times used this to fix completely different bugs which use the same error message.
(sadly, Apple is very bad at writing error messages - you often find they didn't bother to write new text for the popup error, and re-use old text, so that you have to read the Console to find out the "real" error)
Alternative answer (I had this problem recently):
"Upgrade to iTunes 9"
A bunch of these "missing" error messages appear to have been added in iTunes v9, including some of the most common ones. I guess Apple just forgot to include them first time around...