Why can't I code sign this Mac app? - xcode

I started some days ago a small Mac app for Mac OS X Lion. I've never uploaded a Mac app before, so this is the very first time.
This is what I've already done:
Created App ID
Created Certificate
Installed Certificate
Created a Production Provisioning Profile
Changed the App ID to my generated one
Created a new Configuration based on "Release"
Changed its Code Signing to 3rd Party Mac Developer Application
Selected the "Production"-Configuration which I created for the Archive-Scheme
Archived the Application
Now I wanted to "Share" the Application. Xcode (4.1 btw) said to me, there were no valid signing identities. Does I need to add an Entitlement.plist like in iOS? Have I forgotten something?
Update:
I just figured out, that I have to sign my app twice. I've still selected "3rd Party Mac Developer Application" but I can't select the Installer cert while submitting my app.

Have you installed the WWDR intermediate certificate? I just had the exact same problems and my issue was that the intermediate certificate was not installed on my machine. Granted, nowhere does Apple explicitly say you need it installed, more like suggestions. But, you do need it. You can find it here, or by going to Developer Certificate Utility under the Mac Developer Center.

I got it to work. I deleted my App and created it new.
I didn't create a new Configuration, and I only changed the Code Signing Indentity of the Target to 3rd Party Mac Developer Application. After this, I archived the app and then I was able to select the installer cert.

Related

Xamarin.iOS - Using IPhoneSimulator's Keychain with a free iOS Development certificate

I have troubles with saving an account credentials inside an IPhoneSimulator's Keychain. I cannot use AccountSaver.Create().Save(credentials, "app") without Entitlements.plist. However when I add it to my project, compilation error shows up:
Could not find any available provisioning profiles for iOS.
I've added iOS Development certifcate to my account on Mac and tried to create a free provisioning profile but failed due to a lack of IPhone device.
Suprisingly, when I tried to build dummy project with added Keychain to Entitlements inside Xcode on my Mac and run it on a simulator no compilation errors occured.
My questions are: Do I have to make Apple Developer Account to test my Xamarin.iOS app inside IPhoneSimulator or is it possible without it and I'm doing something wrong? If so, what should I do to be able to compile my app?
I use Visual Studio 2017 on Windows 8 connected to a Mac Agent (Mac Mini).
P.S.: Most posts states, that simulator doesn't need provisioning profile, but according to this thread:
Starting with Xamarin.iOS 8.10, if the Entitlements.plist file is set at all for the iPhoneSimulator build configuration, then codesigning is required and thus an iOS code signing certificate is required to be installed in your keychain. ~ Xamarin Forum
Some time has passed since I asked this question, but I think it deserves an answer not only in the comments.
As #wottle wrote it is required to be enrolled i Apple Developer Program in order to have access to Keychain.
I sugest also to use Xamarin.Essentials' SecureStore instead of AccountSaver.
We have a bunch of Apple Store applications that had their Apple Distribution profiles expired. The issue was gone once we regenerated the Apple Distribution Certificate and created a new Distribution Profile for the impacted Applications.

XCode - Always have to reset signing identities and re-download provisioning profiles

I'm building mobile apps using Xamarin-Visual Studio. I have a MacBook Air that is my iOS build host.
Every day or two I have to reset my XCode signing identities, re-download my provisioning profiles, and then reboot the MacBook. If I don't, I am unable to install the IPA on an iOS device (it creates an IPA file but just won't install to device).
Any ideas why?
XCode version is 7.3.1. My setup was working fine for months. It started doing this for no apparent reason about a week ago. I'll also add that I have another build environment with an iMac that started doing the same thing at about the same time.
Absolutely nothing has changed with my Mac and Windows environments (although I'm not sure Windows/Xamarin have anything to do with this. Seems like more of a glitch on the Mac side).
Thanks in advance!
Making comment above an answer since there has been no activity on this since:
If you are sharing a signing identity with other team members, if another team member needs to use the singing identity, they will need to reset it and redownload the profile. And when they do, you will have to do the same when you need to use it again. Resetting the signing identity basically creates a new certificate (with the same name) and thus invalidates the profile that used the "old" certificate.

One Xcode with 2 developers?

My Xcode used to be registered under my own developer program .
There is a company with their own developer program , that used to upload apps
from their own mac .
I would like to upload a build from my mac and my Xcode, using their developer program.
Do i need to create a new certificate to my Xcode/mac from the beginning for that ?
Can i just download their certificates and provisioning , drag to my Xcode and just upload a build to their program ?
If you have the right combination of certificate, provisioning profile, and bundle id, you can build the app from any Mac using any Xcode (assuming it supports the necessary SDK and device versions).
It would be cleaner to have your developer ID included in their team so that Xcode can manage profile changes and get updates but it's not necessary.
(Note: you use Keychain Access for certificates, not Xcode.)

How to make build from iOS app when Team account missing?

I have installed new inHouse provisioning profiles, however when I archive my build in Xcode, I am presented with a message saying the iOS development team is missing. I have xcode 6.4.
I know that you are able to build and sign an app if you don't have a developer team membership in Xcode.
Anyone know what is wrong?
Also another strange thing when I go into keychain to check if profiles and keys are there, they are not stored under the "Login" section like other profiles, but in "System". Is this ok?
Thanks
In order to archive your build (either for the App Store or Adhoc) it must be codesigned by Xcode. This requires a signing identity. Signing identities are only obtainable through the developer console at http://developer.apple.com/ and requires being a member of the apple developer program to access.
Sorry to break the news but without a developer membership you won't be able to archive your app for a device, but run it in the simulator only.

Distribute App Outside the Mac App Store

I'm a newbie in OSX Development. I built an application in which will be distributed outside the Mac App Store. I have all the other certificates and keys working except for the Developer ID (App and Installer) for production.
I know that this may sound stupid, but for what it's worth, I just wanna make sure.
Will my app still be considered Developer ID - signed if I exported it as a Mac Installer Package instead of selecting Export Developer ID-signed Application, when I install it to its destination devices? Will it be successfully installed or be rejected with GateKeeper-enabled devices?
I have been scratching my head for this since for some weird reason, I cannot add a new Distribution Developer-ID from the Dev Center. I was able to add a Developer ID earlier this week however, I ran into some issues with my private keys. As per suggested by Apple and many other developers, I revoked all the Developer IDs and private keys to start fresh. The problem now is that I can't add any new Developer ID (Distribution). I cannot add in both Dev Center and by requesting through Xcode 5.0.1. I'm stuck.
I have submitted a Bug Report to Apple, but who knows when they'll be able to resolve it.
So now, temporarily, since I don't have any choice (I guess), I'll use the Mac Installer Package, but the question is, will it work?
Any help would be very, very much appreciated.
I've done this recently and have created a third Xcode project configuration to Debug and Release called Archive, which is a copy of Release except the app is signed using the Mac App Distribution / Third Party Mac App Developer and, confusingly there is a third name used for this same certificate.
I then changed the Archive scheme to use the Archive configuration to build.
Before doing this I had errors on some Macs when signing with my Developer ID, in some cases they claimed the app was corrupted, and in other cases I got gatekeeper blocking the app, forcing me to override it in System Preferences > Security & Privacy.
I personally use xcodebuild (from Jenkins) to build the app for distribution to testers, which I package in a .dmg so they only need to drag it to /Applications or ~/Applications and I do all that using a script within the Jenkins configuration. Your experience may differ to mine if you are using the Xcode app instead.

Resources