I had the same problem, here's what fixed it for me in Xcode 11.4:1. explicitly set `type` to `.dynamic` for all `products` in "Package.swift":.library(
name: "***",
type: .dynamic, // add this
targets: ["***"]
),2. re-add SPM libraries in Project / Target / Frameworks and Libraries:- what used to be "***" - "Do Not Embed"- now becomes "***" - "Embed & Sign"After these changes, build & run on device and simulator works, along with archive & export, although I had some errors when exporting until I restarted Xcode and started over, after which it succeeded.Btw, my setup is a workspace which contains:- Single Swift package ("XXKit") with multiple targets (modules), defining multiple products (libraries)- Main project with multiple targets (iOS app, Widget, Extensions) linking libraries from the "XXKit" package- Pods project (for 3rd party stuff which still doesn't support SPM)UPDATE:- with the above solution, Xcode actually can't export IPA without errors- real solution is to leave Package.swift as is, but to add a custom build setting DISABLE_DIAMOND_PROBLEM_DIAGNOSTIC = YES which will prevent incorrectly emitting build errors if both app and embedded app extension statically link the same library- just remember to remove this build setting after this is fixed in Xcode since it might hide the real problems if you don't- source: https://forums.swift.org/t/adding-a-package-to-two-targets-in-one-projects-results-in-an-error/35007/2
Post
Replies
Boosts
Views
Activity
I can also still reproduce this issue in Xcode 12 beta 3.
Hi,
I'm having the same problem when using the new (not deprecated) GameKit API for submitting scores to an existing game which has leaderboards that are already live on the App Store (I'm working on the update ATM).
This has worked for me before (with the old API that is now deprecated) but it doesn't work with new API, same as you described: there's no any error reported, but submitted scores are not visible on Game Center, and when I load scores I always get the old ones.
Currently, I'm not sure if this is happening because of Debug configuration and it would magically start working when Release configuration is used (Test Flight or App Store release).
Also, I think that the new context parameter should be optional instead of required, so currently I'm just using -1 for that, but I also tried with 0 and that didn't have any effect regarding this problem.
If anyone could shed some light on this subject, I'm also interested, since by looking at the docs or related WWDC sessions it's just not clear why is this not working as it's supposed to. Is this a bug in the new GameKit API or we're using it wrong?
I just noticed the same problem is still present on macOS 12.0.1 with Safari Version 15.1 (17612.2.9.1.20).
unfortunately, this still happens in Xcode 13.2.1. are there any known workarounds?
Hello, I'm experiencing this same problem on M1 / Monterey: ZSH killed my simple command line tool which is a basic Swift Package so there's no Xcode project file or Code Signing involved. Btw, this same tool worked before I rebuilt & redeployed it, then it just stopped working.
Any help is welcome, here's the Crash Report:
{"app_name":"ae","timestamp":"2022-06-16 13:11:24.00 +0200","app_version":"","slice_uuid":"1e8b1239-2796-3704-a58b-343506260792","build_version":"","platform":0,"share_with_app_devs":1,"is_first_party":1,"bug_type":"309","os_version":"macOS 12.3.1 (21E258)","incident_id":"C1A590B8-70FA-4780-A849-B9F879CCDCE1","name":"ae"}
{
"uptime" : 1100000,
"procLaunch" : "2022-06-16 13:11:19.7482 +0200",
"procRole" : "Unspecified",
"version" : 2,
"userID" : 501,
"deployVersion" : 210,
"modelCode" : "MacBookPro18,3",
"procStartAbsTime" : 27067662201860,
"coalitionID" : 167059,
"osVersion" : {
"train" : "macOS 12.3.1",
"build" : "21E258",
"releaseType" : "User"
},
"captureTime" : "2022-06-16 13:11:19.7548 +0200",
"incident" : "C1A590B8-70FA-4780-A849-B9F879CCDCE1",
"bug_type" : "309",
"pid" : 86517,
"procExitAbsTime" : 27067662347253,
"translated" : false,
"cpuType" : "ARM-64",
"procName" : "ae",
"procPath" : "\/usr\/local\/bin\/ae",
"parentProc" : "zsh",
"parentPid" : 85668,
"coalitionName" : "com.apple.Terminal",
"crashReporterKey" : "6A3F5130-25F6-E566-AB97-36204E3C3BF1",
"responsiblePid" : 85664,
"responsibleProc" : "Terminal",
"wakeTime" : 10423,
"sleepWakeUUID" : "1B323A9F-8A6B-4888-B901-AB8203ACCF5A",
"sip" : "enabled",
"vmRegionInfo" : "0x104300000 is in 0x104300000-0x10431c000; bytes after start: 0 bytes before end: 114687\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> mapped file 104300000-10431c000 [ 112K] r-x\/r-x SM=COW ...t_id=1b04b8bb\n mapped file 10431c000-104320000 [ 16K] rw-\/rw- SM=COW ...t_id=1b04b8bb",
"isCorpse" : 1,
"exception" : {"codes":"0x0000000000000032, 0x0000000104300000","rawCodes":[50,4365221888],"type":"EXC_BAD_ACCESS","signal":"SIGKILL (Code Signature Invalid)","subtype":"UNKNOWN_0x32 at 0x0000000104300000"},
"termination" : {"namespace":"CODESIGNING","flags":0,"code":2},
"vmregioninfo" : "0x104300000 is in 0x104300000-0x10431c000; bytes after start: 0 bytes before end: 114687\n REGION TYPE START - END [ VSIZE] PRT\/MAX SHRMOD REGION DETAIL\n UNUSED SPACE AT START\n---> mapped file 104300000-10431c000 [ 112K] r-x\/r-x SM=COW ...t_id=1b04b8bb\n mapped file 10431c000-104320000 [ 16K] rw-\/rw- SM=COW ...t_id=1b04b8bb",
"extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":99031,"task_for_pid":584},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
"usedImages" : [
{
"size" : 0,
"source" : "A",
"base" : 0,
"uuid" : "00000000-0000-0000-0000-000000000000"
}
],
"legacyInfo" : {
"threadHighlighted" : 0
},
"trialInfo" : {
"rollouts" : [
{
"rolloutId" : "5fc94383418129005b4e9ae0",
"factorPackIds" : {
},
"deploymentId" : 240000370
},
{
"rolloutId" : "61af99aeda72d16a4beb7756",
"factorPackIds" : {
},
"deploymentId" : 240000213
}
],
"experiments" : [
]
},
"reportNotes" : [
"_dyld_process_info_create failed with 6",
"dyld_process_snapshot_get_shared_cache failed",
"Failed to create CSSymbolicatorRef - corpse still valid ¯\\_(ツ)_\/¯"
]
}
I'm getting the same error when compiling project with Xcode 14 Beta 1 on M1 Pro.
yes, it is possible to fix dismissal in this scenario (when "done" button is tapped), using a Coordinator as SFSafariViewControllerDelegate, here's a full example:
struct SafariView: UIViewControllerRepresentable {
@Environment(\.dismiss) var dismiss
let url: URL
func makeUIViewController(context: Context) -> SFSafariViewController {
let vc = SFSafariViewController(url: url)
vc.preferredControlTintColor = .tintColor
vc.delegate = context.coordinator
return vc
}
func updateUIViewController(_ vc: SFSafariViewController, context: Context) {}
class Coordinator: NSObject, SFSafariViewControllerDelegate {
var dismissAction: DismissAction?
func safariViewControllerDidFinish(_ controller: SFSafariViewController) {
dismissAction?()
}
}
func makeCoordinator() -> Coordinator {
let coordinator = Coordinator()
coordinator.dismissAction = dismiss
return coordinator
}
}
is there a way to do the same on watchOS?