XCODE: The request was denied... (SBMainWorkspace) for reason: Unspecified - xcode

I updated xcode to 10.1 this morning and since then none of my code runs. I am getting the message above (question) which I have researched exhaustively. I have read all the other posts concerning this issue and nothing I have tried seems to work in my situation. The one difference in my message is the reference to "unspecified". I have done the following:
New Provisioning Profile
Automatically managing sign-in
Deleting certain keychain certificates
Project Settings to Legacy
Rebooting/Cleaning
Rebooting Simulator
Mach-O Types to Bundle
Managing/Editing Schemes
Creating new user account on Mac.
New teams/No teams
etc.
(you get the picture!)
I am at my wits end. I have been working on this code for a while and short of wiping my machine and re-installing is there anything else that I can do! I am about to explode!!!

I rebooted the machine and I went back to the Build Settings and changed to Mach-O Type back to Executable and it working ow. Based on all of the previous solutions I have read/tried, this seems about right (unpredictable).

Related

How do I archive/validate a Swift App that uses a framework in Xcode

I have an App that uses Admod and Firebase from Google. Since I am using Swift they want me to use frameworks when loading them from CocoaPods. When I try to archive/validate the App I get the error:
No suitable application records were found. Verify your bundle identifier 'org.cocoapods.GoogleToolboxForMac'
What is the correct way to provision an app that uses someone else's frameworks so it can be uploaded to iTunes Connect? I tried to find something in Apple's documentation but I haven't found anything.
UPDate:
I previously had answered my own question, since I had thought I had found a solution. My reply was:
Problem Solved. Turns out I was using an App-ID that I am having Apple look into as being corrupt. I had already created a new App-ID to prove the one I want to use is not working and retried with that and it Validates. This required a lot of help from the Google Ads Mobile SDK team. Thanks.
So the correct answer is: Now Incorrect
You should not get this error unless you are using a Bundle-ID that is not already registered on iTunes Connect, but, you should never be able to create an archive that does not have a Bundle-ID that is not already registered on iTunes Connect. So this is caused by an abnormal situation.
This is no longer true
I used my new working project and got 4 whole builds out of it and into iTunes Connect. In the process I was trying to clean up the mess caused by trying to solve this problem, like loosing my git history. I tried to modify my old App to get it to work and without modifying my new working project, But my new project started failing with the above error. I even used my time machine and went back to the directory as it was when I made the last build, but no help. So, any answers?
Further Update:
I pulled all the code related to Google Firebase and Admob out of the code and removed the cocoaPods and Archived/Validated and now I get the error:
You must supply a CFBundleIdentifer for this request.
Which is the error message I was getting with my other App-ID that tracked that App-ID in iTunesConnect. This time it does not track the App-ID so it must be something in my project. Will report what I find.
UpDate:
I think Apple has been modifying their code for validation at the same time I was trying different things. At one point it told me I was using CFBundleSignature instead of CFBundlePackageType set to APP and I fixed this and got the code to validate. Understand I am copying complete projects and renaming everything to debug this problem, so this must have come from the original program. I ended up with a project that was renamed from my original but archived/validated but when I went to compile for Test I got errors that I debugged until I got lots of Mach-O link errors. I decided to complete the loop and go back to my original code and try using the new Bundle-ID which points to the new App-ID, the one that works, and add all the knowledge I have learned. But when I get it done I have an project that can test but does not validate. The only difference is this project has the old identifier which has the same name as the suffix of the App-ID that has a bug.
Am I missing something?
Final UpDate?
On a whim I renamed the Scheme file to be the same as my Suffix to the Bundle-ID and I got my original Project to Validate! I have worked on this for over a month and you might not believe the astonishment I feel in this.
Back to Unit Test!
I have come to the conclusion that the Identity of the App, the name at the far top of the right side Utilities window, has something to do with the way iTunes Connect validates the App. This is the name in the left hand column of the Organizer window. It is like it overrides the suffix of the Bundle-ID and since I can't use that Identifier because the associated App-ID is corrupt. Or the name of the Scheme.

Packaging error when switching to arm64 (arm5 was OK)

I just plugged in a new iPhone 6, created a provisioning profile and then I launched the app I'm developing on the device. It compiled fine, but at linking stage it errored out with:
ProcessProductPackaging
...
error: class '(null)' of input object does not respond to either selector writeToFile:options:error: or writeToFile:atomically
I cannot find any information of what that is. I do not get any specific code reference to relate it to. Did anyone experience this?
Personally I was able to solve this issue by rebuilding the project a second time. I think I was only experiencing it after revoking and requesting a certificate.
Odd for it to jump at me and disappear though.
I just restarted Xcode then the error was disappeared
I've tried turning the "Automatically managed signing" off and on again, then the issue disappeared. Note: rebuilding didn't help for me, cleaning either.
I removed an external library and related code I had and it's now working.
I just changed some provisioning setting and then restarted the xcode afterwards the error was disappeared and archived and then uploaded successfully
Rebuilding the project does the job for me. Actually I was making changes in capabilities while Xcode was building that makes build failed.
The error occurred after I made manual changes to the Xcode .entitlements and Info.plist files: I removed some entries. None of the above mentioned solution attempts worked for me. Every try to create an archive failed.
The solution was to go to Xcode's Capabilities section and switched everything on and off again.
I had the same problem specifically on an App Extension we used for Push Notifications, and I was using Automatically manage signing but it seems the App Groups in capabilities were failing, so I just had to make sure the App Groups were retrieved correctly and this fix it.
Also if you have .entitlements files, and you have App Groups there, make sure they are the same you are using in the capabilities configuration.
Restarted XCode and enabled and disabled to Automatically manage signing

Xcode 5 cannot run using selected device on iOS simulator

So this seems to be quite a common question but all the answers I found were related to getting "xcode cannot run using selected device" when trying to run it on a connected device. My issue is getting this error just trying to run it in the iOS simulator.
Some background is that app was running in simulator fine, and then I changed the Project Name, the Target name and the Scheme name and that is when the problems started to occur.
I tried many of the different solutions in some of the other threads such as: Clean, Delete Derived Data, restart Xcode, restart computer, make sure using Default LLVM, remove Info.plist then re-add it into project again. None of them worked.
I finally discovered the problem and was able to get it working and will post my solution below.
What I discovered to be the problem, was that in the Info.plist file the Executable File (CFBundleExecutable) was hard coded as "MyAppName". When I changed the Project name and Target name and Scheme name, this hardcoded value was not changed, but still had the original app name in it.
So I changed Executable File (CFBundleExecutable) in the Info.plist file to be this constant:
${EXECUTABLE_NAME}
And the problem was solved :)
EDIT:
I had the problem occur again on a different project, however the above was already set to ${EXECUTABLE_NAME}.
So I went searching and found that under Build Settings > Build Options > Compiler for C/C++/Objective-C was set to UNSUPPORTED.
I changed this setting to DEFAULT and the problem was solved :)
EDIT:
I had the problem occur again and the above two things did not fix it.
So I went and made sure that the info.plist was removed (unticked) from any Target Membership, and this solved the problem. It seems that there are multiple things that will cause this issue, so try all the solutions!
I ran into this and had to change the deployment target (iOS version) in the general tab of the project options menu. Apparently xcode had been updated to support iOS 8.2, but my simulator had not, therefore nothing appropriate was showing up in the list of simulator targets. Changing the deployment target to 8.1 fixed the issue. I'm sure that keeping my Mac up to date would also help.

Failed to submit app to iTunes Store

I am having some problems when trying to submit my iPhone app to store using Xcode 5 that my app is always failed validation with below errors:
Apple's web service operation was not successful
Unable to authenticate the package: [My app id, ex: 123456789].itmsp
ERROR ITEMS-9000: "The bundle [Bundle ID, ex: com.myapp.mobile] at bundle path 'Payload/[My App Name].app' is not signed using an Apple submission certificate." at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)
I am quite sure about settings (bundle id, certificate, profile, entitlement) because this is not first time I submit app to store, jut don't know why these issues come up, I have tried to search and found some related article but they don't help.
I have this issue for 1 week.
I just selected Standard Architectures in both Project and Target, and it worked for me.
I had the exact the same error, after hours of trying, adjusting all the parameters like the bundle ID or display name, etc. None of them worked.
Finally I got it work. Here is what I did.
I started all over by deleting all the records in keychain, certificates and provision profiles. And just added one certificate and profile for app distribution. There was only one record to make no confusion. And then boom, it uploaded successfully.
I guess my mistake was to submit multiple times of certificates or provision profiles earlier (although I deleted multiple entries but I did see something strange) because I thought the creation process was stuck so I refreshed the browser. Being patient in each steps will eventually saves more time! :) Good luck!
I got the same error today with xCode 7. I resubmitted with no changes and it went through. Probably Apple bug. I am letting you know that sometimes it is not an issue with our project/target settings.
As far as I can tell, this specific error is intermittent and not caused by anything in the app package. I think many of the answers here are people that saw this error, changed something, and saw the error go away, and assumed that their change made it go away.
I would suggest, if you get this error, just try again (worked for me). If it fails in this exact way a second time, and you have some theory about what will fix it, do that and try again. If that works, undo your fix and see if the failure comes back. In this way you will have proven that there was an identified root cause and a fix.
I don't know the cause, but I had the same exact issue crop up this week and just got things to work. I had checked the build, distribution certificate, provisioning profile. I went through all of the troubleshooting steps in Technical Note TN2250 -- no luck! However, I just got it to upload successfully. I happened to have an old Mac Mini that had Application Loader 2.5.1 on it. I created a zip file from the .app within the Payload folder of the .ipa, put this on a USB drive, and watched as it finally uploaded after trying about 50 times with both Xcode organizer and Application Loader v2.9.
Other people have reccomended reverting to a previous Application Loader version. Perhaps the web service endpoint uses a different (and properly working) certificate validation method for older AL versions.
I too have had the same problem and after many hours I managed to solve.
I finally fixed the problem. You needed to download the "Apple Root Certificate Authority" (http://www.apple.com/certificateauthority/) and put it in your login keychain & system, I also put your iPhone disitrbution certified in your system and set all keychian trust values ​​for all certificates to "system default". Finally went through!
For me the problem was in selecting the wrong iOS distribution code signing identity, where I was using a different team as the provisioning profile.
Probably make sure your Code Signing Identity is set to automatic, which will probably fix this issue.
In XCode 6.3, You have connect actual device and selected in the XCode.
I didn't see this listed on here, but I received this issue and realized that I already had a build for this specific Version # waiting for review on iTunes Connect. I rejected the build in ITC and then tried uploading the build again and it uploaded correctly after that. Just in case this could possibly help anyone else out there with this issue!

My monotouch application refuses to compile for distribution with Array index is out of range

I am unable to compile my app in Monotouch when I select the full enterprise distribution profile I have setup. All the other profiles work ok.
To be specific: when I hit the build button I get
Detecting signing identity...
0 errors 0 warnings, just Build failed. Array index out of range
I am guessing this is a provisioning issue and I have failed to do something important.
There are pointers on the web to adhoc ditribution builds but no real documentation on full enterprise distribution.
I have the following:
Monotouch : Enterprise edition
Apple : Enterprise membership, have installed the corp certificate & dev user certificate and downloaded the provisioning certificates for dev, adhoc & enterprise and finally created the App ID.
I have spent 2 days scouring the web for similar problems but have found nothing really close. At one point I scrubbed all my profiles with Apple Dev site and re imported them and this resolved some other issues I was having.
Having the full enterprise rights/certificate means I do not need UDIDs, I just have to sign my life away to prevent illegal ditribution. The only thing other than just plain missing something on the provisioning front is that the UDID's are held in an array in the certificates and as I have none specified for this build it errors out. (But it shouldn't surely!)
If I use the adhoc distribution which as UDID's specified in it I can load it on my machine.
Any pointers would be greatly received
I had a similar situation.
"mtouch failed to build". No other messages.
Had to go through tech support and eventually found it was a compiler bug and they sent me a patch for my particular case. I assume it will come out in the next release.
However, I did learn two things along the way that may help you.
a) in my case the problem went away if I changed the "Linker Behavior" setting for the project. Project-> [project] Options -> Build -> iPhone Build -> Linker Behavior
Try all available options. See if makes a difference.
b) On the same iPhone Build options page you can enter "-v -v -v" to the "extra arguments setting. Now check the build output after compiling. There may be additional details.
Finally, I pulled my hair out for a few days with an error similar to yours. In the end it was a compiler bug. Novell was quite quick to identify and fix the bug. Maybe just log it with them and see what happens.
Good luck
I had this problem when switching between my "test" and "release" builds, which had different app identifiers -- I'd switched to the "release" provisioning profile, but I forgot to fix the app display name and app identifier under Build / iPhone Application. Doubt the display name makes a difference but the app identifier certainly does.

Resources