Progress on a minuscule front. I didn't realize the archive action was separate from the -exportArchive option. Once I split them into 2 xcodebuild commands I was able to create an archive.
Along the way I discovered that with the archive action, -archivePath is the name of the archive, not the path as the name implies. However with the -exportArchive option, -archivePath is the path as the name implies.
Moving past that, my xcodebuild -exportArchive option now throws the following error:
Error Domain=IDEFoundationErrorDomain Code=1 "exportOptionsPlist error for key "method": expected one of {}, but found development" UserInfo={NSLocalizedDescription=exportOptionsPlist error for key "method": expected one of {}, but found development}
The gotcha is that I don't have the "method" key in my plist file. According to xcodebuild -help, that is a default value.
{
destination = export;
signingCertificate = "Developer ID Application";
signingStyle = automatic;
teamID = 7**...;
}
Post
Replies
Boosts
Views
Activity
@Quinn - how should should the Xcode archive take to process? It's ben over 24 hours with no feedback.
I also experimented with xcodebuild options for archive (-exportArchive -exportPath ./Build/Release -archivePath ./Build/Archive -exportOptionsPlist exportOptions.plist) and I get this message:
error: archive at path '/Users/ed/Documents/Xcode-Projects/meteorologist/trunk/Build/Archive' is malformed
If it matters, my exportOptions.plist file looks like this:
{
destination = export;
signingCertificate = "Developer ID Application";
signingStyle = automatic;
teamID = 7**...;
}
I've read your article (before) and I'll admit I can't follow it. I'll go back and try again.
That said, how can make this work with xcodebuild?
I hope it's not too late to jump on this thread. I'm having a similar issue (except RC=0). I'm macOS, not iOS.
In Xcode I have WeatherKit included in Signing and Capabilities:
In my developer account, https://developer.apple.com/account/resources/services/list, I have WeatherKit listed.
The one thing I notice, my account key is listed as 7**... whereas in Xcode my signing certificate is listed as 4V7...
The code runs fine in Xcode. However when I move to a Mac does is not registered as a developer machine, I get the error:
The operation couldn’t be completed. (WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors error 0.)
I am building via a shell script using the 7** account:
xcrun notarytool store-credentials --apple-id "..." --team-id "7**..." --password "..." notary-scriptingosx
Thanks.
When I try to launch on 10.15, this is what I see in system.log:
Jan 20 06:53:59 edwardd20 com.apple.xpc.launchd[1] (com.apple.xpc.launchd.oneshot.0x10000002.Meteorologist[6679]): removing service since it exited with consistent failure - OS_REASON_CODESIGNING | When validating /Applications/Meteorologist.app/Contents/MacOS/Meteorologist:
Code has restricted entitlements, but the validation of its code signature failed.
Unsatisfied Entitlements:
Jan 20 06:53:59 edwardd20 com.apple.xpc.launchd[1] (com.apple.xpc.launchd.oneshot.0x10000002.Meteorologist[6679]): Binary is improperly signed.
Thank you Quinn. I will summarize the one step I was missing, from your link https://developer.apple.com/forums/thread/701514, was this (emphasis on the final sentence):
To create a distribution provisioning profile, follow the instructions in Developer Account Help. Make sure to choose a profile type that matches your distribution channel (Mac App Store or Developer ID).
Once you have a distribution provisioning profile, copy it into your program’s bundle. For information about where to copy it, see Placing Content in a Bundle.
...
% cp "ConfigApp-Dist.provisionprofile" "to-be-signed/ConfigApp.app/Contents/embedded.provisionprofile"
Modifying the app in this way will break the seal on its code signature. This is fine because you are going to re-sign the app before distributing it.
IMPORTANT If you’re building your product with Xcode then you might find that Xcode has embedded a provisioning profile within your bundle. This is a development provisioning profile. You must replace it with a distribution provisioning profile.