Self answering for the sake of posterity.
[SOLVED] with xcodebuild -downloadPlatform iOS
More Context:
This blog gave me a clue.
https://mokacoding.com/blog/xcodebuild-destination-options/
When adding -destination generic/platform=iOS to the xcodebuild command, it gave a different error message.
xcodebuild build -workspace getting\ started.xcworkspace -scheme "getting started" -configuration Release -destination generic/platform=iOS
Command line invocation:
/Applications/Xcode-15.app/Contents/Developer/usr/bin/xcodebuild build -workspace "getting started.xcworkspace" -scheme "getting started" -configuration Release -destination generic/platform=iOS
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
Resolve Package Graph
Resolved source packages:
...
2023-10-18 11:55:34.334 xcodebuild[14094:86335] Writing error result bundle to /var/folders/c1/5nv1jx_s5ddcp_3l378t8_500000gn/T/ResultBundle_2023-18-10_11-55-0034.xcresult
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ generic:1, platform:iOS }
Ineligible destinations for the "getting started" scheme:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 17.0 is not installed. To use with Xcode, first download and install the platform }
I therefore download the iOS 17 simulator with xcodebuild -downloadPlatform iOS
And run the xcodebuild command again. It works.
Post
Replies
Boosts
Views
Activity
One possible solution to this is to use composition instead of inheritance. The approach is detailed here https://stackoverflow.com/a/77250029/663360 and it works.
However, for my own understanding, I still wonder how an inheritance pattern would work. I understand Swift resolves types at compile time (vs Objective-C, Java, Python, Typescript) and that prevents using existential types. Is there a way to solve my problem through inheritance and protocols ?
Follow up for history and archives. The Examples directories having a Package.swift file do not show up in Xcode.
I guess Xcode tries to avoid package conflict. It does not handle sub-projects very well.
I am trying to make this work on macOS13 with Xcode 14.1
Even with two columns and a Label. It does not work for me.
I am using Xcode 14 and Monterey
var body: some View {
VStack {
List(podcast.episodes!) { episode in
EpisodeView(podcast: podcast, episode: episode)
.swipeActions(edge: .trailing) {
Button (action: { self.deleteEpisode(episode) }) {
Label("Delete", systemImage: "trash")
}
.tint(.red)
}
}
}
}
I found the solution - self replying for the sake of history.
In the Identifiers screen of the developer portal, I selected "Services Id" from the top right side drop down menu. There was a service registered with the app bundle !
I deleted the service, then I was able to delete the app identifier.
Hello @eskimo
I have the same problem as @mjharper above.
I tried the steps you proposed and this worked (I am using Xcode 14.0.1)
Nevertheless I have "older" tests, that were never submitted to the App Store for which identifiers are lying around and can not be removed.
Error message is : "The bundle 'F36WHU2A76' cannot be deleted. Delete all the Apps related to this bundle to proceed."
I have only a few Apps on the AppStore, I triple checked none are using this test identifier.
Any other suggestion to clean up our list of identifiers ?
Thanks
I have the same issue with APFS encrypted drives. I use Monterey 12.4
I found a workaround but I don't understand the root cause.
Instead of installing the Apple WWDR G3 intermediate certificate in the keychain I am building dynamically at run time with
if [ ! -f $CERTIFICATES_DIR/AppleWWDRCAG3.cer ]; then
echo "Downloadind Apple Worlwide Developer Relation GA3 certificate"
curl -s -o $CERTIFICATES_DIR/AppleWWDRCAG3.cer https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer
fi
echo "Installing Apple Worlwide Developer Relation GA3 certificate"
security import $CERTIFICATES_DIR/AppleWWDRCAG3.cer -t cert -k "${KEYCHAIN_NAME}" "${AUTHORISATION[@]}"
I now install the certificate in the System keychain. This is the only extra certificate I do install. When in System keychain, it is correctly picked up by codesign, not when it is in my custom (unlocked) keychain.
if [ ! -f $CERTIFICATES_DIR/AppleWWDRCAG3.cer ]; then
echo "Downloadind Apple Worlwide Developer Relation GA3 certificate"
curl -s -o $CERTIFICATES_DIR/AppleWWDRCAG3.cer https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer
fi
echo "Installing Apple Worlwide Developer Relation GA3 certificate into System keychain"
SYSTEM_KEYCHAIN=/Library/Keychains/System.keychain
sudo security import $CERTIFICATES_DIR/AppleWWDRCAG3.cer -t cert -k "${SYSTEM_KEYCHAIN}" "${AUTHORISATION[@]}"
The error lies in security set-keychain-settings -t 0 dev
I read somewhere (can not find the source) that -t 0sets the lock timeout to infinite (no timeouts) while the correct way to remove timleouts is to omit the -tparameter at all.
Correct command is security set-keychain-settings dev
I tried with 10.14.x, 10.15.x and 11.6. They all behave the same. How to unlock a keychain without initiating a GUI session ?
Thank you, that helped me to. This is not intuitive at all
@maikschulze what is the Xcode and macOS version you're using ?
For me "security unlock-keychain" does not work on global context (when I SSH to the instance, no GUI session whatsoever)
I Tried with macOS 11.5, 11.6 and Xcode 12.5.1 and Xcode 13
Using Xcode 12.5 and 13, unlocking the keychain from a non GUI session (i.e. SSH) does not work anymore. codesign fails with errSecInternalComponent
I filed a RADAR report to Apple
https://feedbackassistant.apple.com/feedback/9642986
Done Thanks
https://feedbackassistant.apple.com/feedback/8651022