I am unable to run my tests on my OSX app - the project builds fine but when I run Product -> Test in Xcode 8.2. It says :
Message from debugger: unable to attach
How do I get my tests working again?
What solved the problem for me was to enable signing on the test target.
You need to go to your project's settings, go to your target and in general, under Testing, you have the Signing section. Click on the big button "Enable signing" (or something like this). You may have to deal with provisioning profiles but it wasn't the case for me.
I ended up needing to "repot" my Xcode project using these steps which sorted it out.
https://medium.com/#mobilebloke/xcode-8-going-slow-on-swift-3-have-you-tried-repotting-your-project-88d0066d2445#.idcdv2dd3
I know its not necessarily the fix but after trying:
Adding removing certs
Recreating profiles
Deleting and re-adding targets which didn't work...
this at least allowed me to continue
I had the same issue, but for the regular app. For some reason my app was sandboxed. You can check it selecting your Project/Target (your app) and then Capabilities, like in this screenshot (from Xcode 10 beta 4, but the concept should apply to older versions of Xcode):
App Sandbox was on. that also created a file "RSSReaderMac.entitlements". Which I probably messed up trying to keep the app sandboxed just to learn how it works. I disabled App Sandbox, trashed the entitlements file and then my app started running again.
Indeed the real cause was that my app actually crashes, with this error message:
Exception Type: EXC_CRASH (Code Signature Invalid)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
I suppose enabling the sandbox again the entitlements file gets recreated. Otherwise another option could be to check and clean that file first. But I didn't test it.
My error was that I attempted to add an entitlement manually in the [app name].entitlements file. Deleting the added entry fixed the problem, You may have a corrupted ...entitlements file.
My team is planning a large upgrade of our app. Since our last app store submission, we have changed the executable binary file name. This was among several changes to make naming conventions make more sense.
When upgrading our app via Xcode (installing and replacing the old app), we see a very unusual "crash" upon launching it that seems to be on the OS side. There is no app crash log, but see this in the device console:
1) "Application 'XXXXX' exited abnormally with exit status 1" and
2) "posix_spawn("/xxxx/yyy/zz"): Permission denied"
If I rename the executable and target back to what the app store version uses and repeat the upgrade process, I don't see this crash and the app runs normally.
Our concern here is that upon submitting our app to the store, any user who downloads it will experience a crash too and have to delete & re-download the app.
Has anyone else experienced this?
Has anyone successfully submitted an app with a modified executable binary file name and not seen any problems with users upgrading?
As a developer I think everything will be FINE, but I need some evidence that there won't be an issue to present to my product manager. We have a lot of users paying us money that could be upset by this :)
Yesterday have I uploaded 2 builds to iOS beta testing platform - TestFlightApp. Unfortunately none of the testers, including me, can access those builds. It was working for us fine before.
I receive following message:
This device cannot install this build
TestFlight couldn't find the build you are looking for - perhaps it was removed
enter code here or you were sent an incorrect url. Check out your dashboard to see all your installable builds
Anyone received similar message ? Is it internal testflight problem, or something is wrong with my build ? How to fix that ?
It's happened to me as well, I got the message This device cannot install this build and the green button said Contact Developer.
After making sure that the user had register his device with test flight and that the device is also on the provisioning profile, I've removed the profile from the Settings app (by going to Settings>General>Profiles) and removed the Safari browsing data (by going to Settings>Safari>Advanced>Testflightapp.com)
Then I went back to the email and clicked on the link to install the app and that worked.
It may seem counter-intuitive (it was to me anyway) - even if you provision someone's device, you still have to check off each user on the permissions page and click "just update" before they can install an app, EVEN IF you already provisioned their device in the iOS provisioning portal.
I just switched from Xcode 3 to 4. When I attempt to upload an app that I have archived to the organizer, I receive this error:
The archive is invalid.
/var/folders/.../app.ipa does not
exist.
This happens after I log in to itunes connect, select the application to update and select next. I am not sure where to begin trying to figure out what is causing this error. Please let me know if I am leaving out anything that would be useful for diagnosing. Thanks
I just faced this problem myself, and I seem to have found a solution to it.
Even though the correct provisioning profile seems to be selected, it might not be.
Try to manually navigate the list of possible provisioning profiles and select the correct one. Do not leave the setting on automatic selection.
In the "Identity:"-list, make sure it does not say "Currently matches...". Manually select the correct one yourself.
That should fix the problem and you should be able to upload to the AppStore.
Okay, so when you install the Xcode 4 package, make sure you have the "Unix Tools" option selected. This was the problem in my case.
If you are running an Xcode beta version (Apple calls it a "developer preview") you will get this error because you're not allowed to submit apps from a beta version. This restriction is not mentioned in the Read Me file or on the Xcode download page. To submit an app, you will need to uninstall Developer Tools, then reinstall the latest non-beta version, then restart your computer.
Here's the command-line command to uninstall:
sudo /Developer/Library/uninstall-devtools --mode=all
Quit Xcode
With a text editor open the file YourProject.xcodeproj/project.pbxproj
Delete all lines containing PROVISIONING_FILE =
Delete all lines containing CODE_SIGN_IDENTITY =
Save & close project.pbxproj
Reopen your project in Xcode
Clean the project
In the Build Settings pane choose the correct code signing identity
Rebuild
I recently switched to a new MacBook Pro and had XCode 4 installed from a Time Machine drive via the Migration Assistant.
Re-installing XCode 4 with the Unix Tools fixed it.
For some reason those files weren't getting copied across with Migration Assistant.
I had the same issue for both TestFlight and App Store. The solution for me was to archive the app, and in the organizer select "Don't sign" when you try to validate/submit or share (in the case of TestFlight).
Hope this helps.
In my case this has nothing to do with Xcode or the unix tools. Indeed I happend to had too many distribution certificates (Why? I don't know). Deleted all of them but one, code sign with this one, re code sign it while validating and submit it with no errors. I hop this help.
A good way to test is to run the build from the command line. Change to your project folder and run 'xcodebuild' and look carefully at the outputs, especially around the 'codesign' command.
I did this and discovered the following:
architecture armv7 object: /Users/chris/Documents/x/x/build/Release-iphoneos/x.app/x malformed object
object file format invalid or unsuitable
So it isn't a solution, but it at least lets you zero in on what the problem is. Anyway, for me, looks like an architecture config error.
Update - to fix this problem, i replaced the copy of codesign_allocate in my /usr/bin folder with the one in /Developer/somewhere and that fixed it.
I tried most of the ideas above, and they did not work for me, likely because I am using he Appcelerator Titanium platform. I did however delete the Build directory and re-built the product and it passed the validation and I was able to upload the binary to the app store.
The same happened to me. My mistake was I had certificates with similar names (like "Provisioning Profile of Giammy", "Profile for Provisioning of Giammy"...).
Running "Archive" from XCode 4.0 and then "Validate..." from the Organizer I faced the "app.ipa does not exist" issue. The problem was that I selected the wrong certificate from those with similar names. The "Archive" phase worked good but the archive did not pass the validation.
Solution: just picked up the correct provisioning profile in the "Archive" phase.
Lesson learned: check twice the provisioning profile name!
Make sure that you are signing with keys for correct product/bundle ID. If I remember correctly, mixing that up could lead in archiving problems.
Also, go to that temp folder and check what IS created. Maybe xCode is creating the IPA under a different name, that could give you a hint.
I solved this same problem by deleting all of the expired signing certificates from my Keychain. Xcode seems to just grab the first one it finds with the given name, regardless of whether it's still valid.
I tried everything including reinstalling xcode4 with unix tools. NOthing works.
I assume I shouldnt have to do this as I'm able to submit other apps without issues.
I'm just having this issue with a partiular project (coming from xcode3).
I even created a project from scratch, imported all the code over and tried again - failed.
so it's not only my project but something in it.
So I've started the process of creating a new project, adding some files, then submitting, then rejecting to figure out what's causing it. This is working so far.
update: ok - it has something to do with using CorePlot and linking it in as a library. and voila - found the answer here.
Can't submit app with CorePlot using Xcode4
Solution: when submitting select "Don't resign"
I was not able to solve this problem by changing or fixing code signing identities (which should resolve this problem in many cases. Nor did simply reinstalling Xcode. These are the top two solutions as I post this answer.
I found success in uninstalling all the developer tools, and reinstalling from scratch.
Here is how I solved it:
Open Keychain and delete all distribution certificates, both from my "login" and from "system".
Download the latest Distribution certificate from the Dev Center.
Double click the certificate to install on Keychain.
On XCode, make sure the certificate name matches on Build Settings.
Build for Archive (a Keychain popup should ask for permission to sign the app).
Archive (again, Keychain confirmation required).
Validate archived app (again, Keychain confirmation will be required).
Submit app (one more time, Keychain confirmation will be required).
If you are building for Archive and you don't see any Keychain confirmation dialog, you can stop at that point because submission is not going to work.
i did have this very same issue using xcode_4.2_and_ios_sdk_5_beta__snow_leopard, my working solution.
Install the previous (non-beta) version of Xcode in a different location and work with that version, and that's it, it worked i was able to upload my app to the AppStore without any inconvenience.
regards,
Jorge.
Never try to submit using apps you built using beta SDKs as your base SDK.
I got rid of this problem by uninstalling all developer tools with the below command
sudo /Developer/Library/uninstall-devtools --mode=all
and then restarted my system and installed that latest non-beta version of XCode and non-beta iOS SDK.
Have you been playing around with the ENTITLEMENTS_REQUIRED attribute at /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/SDKSettings.plist (let say to create jailbroken applications)?
In this case, please reset ENTITLEMENTS_REQUIRED to YES.
for xcode 4 I tried every thing but I can t solve this error until
install xcode 4.2 for snowleopart
if you cant see your app icon in validation page its can be your xcode have error.
download from apple developer page xcode 4.2 and install. its solved.
you dont need to uninstall your xcode 4 just download new xcode 4.2 and install.
I am very fine now
My solution was:
Open the info.plist file in your project and in product name write your products name instead of $[PRODUCT_NAME]
Had this error in Xcode, but had no such error when using the Application Loader. Get to it via Xcode -> Open Developer Tool -> Application Loader. Very frustrating indeed.
I have only started getting this error.
The application works perfectly when working on the iPhone simulator, and there are now errors like the one above.
The application is being put on a 3.0 iPhone if that is any help.
Have you rebooted? You could try restarting XCode and maybe even power off and back on your iPhone device. If that doesn't work, try rebooting the desktop you're debugging from.
I frequently (well, pretty frequently at least) have weird connectivity issues between XCode and my iPhone and rebooting the phone (power off, back on) will generally solve these.
Check that all paths in your project don't contain '#' simbol.
for example, my project at this path: "/User/alex/Projects/prj_MMH/branches/#19/" causes same error.
I had the same problem. Cleaning the build directory helped.
The answer for me was that it was running with the wrong build configuration. Go to the 'Scheme' at the top of the window, click on the 'App' at the left and Edit Schemas from the menu and select the 'Run Name.App'. Under the Info tab, there is the Build Configuration dropdown. It should be set to 'Debug' - I had it set to 'Ad Hoc Distribution' I think.
The other part which might be needed too, was that under the main project target 'App' in tab Build Settings section Code Signing Identity, the Debug setting should be set to "Don't Code Sign" and the 'Any iOS SDK' set to "iPhone Developer"
Is this in the XCode Debugger console?
You could be running the Release version.
Only the Debug build can pipe stdout/stderr back to XCode.