Post

Replies

Boosts

Views

Activity

Reply to Inserting SF Symbols in a string ?
To save your time I copy-pasted Michcio's answer from the SO link posted by @Claude31 above: let imageAttachment = NSTextAttachment() imageAttachment.image = UIImage(systemName: "checkmark.circle") // If you want to enable Color in the SF Symbols. imageAttachment.image = UIImage(systemName: "checkmark.circle")?.withTintColor(.blue) let fullString = NSMutableAttributedString(string: "Press the ") fullString.append(NSAttributedString(attachment: imageAttachment)) fullString.append(NSAttributedString(string: " button")) label.attributedText = fullString
Aug ’24
Reply to Xcode 15 beta 7 Previews building issue
Guys, actually, I found an unexpected workaround! If you can isolate the view, that potentially crashes, try to extract it in a separate View file. Make a custom subview that uses the 3d party lib, that causing the crash. In my case it was ACarousel. Then, in the view that you actually need to preview, use this subview. If the 3d party lib isn't imported there, the preview will work. Fantastic! This cost me 6 hours of work.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’24
Reply to LinkDylibError when previewing SwiftUI view from a package.
The accepted answer is not an answer, but a comment. I have the similar issue with ACarousel preview. LinkDylibError: Failed to build PaywallCarousel.swift ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) This discussion is similar and have much more activity: https://forums.developer.apple.com/forums/thread/736152?page=2
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’24
Reply to Xcode 15 beta 7 Previews building issue
I have the same issue with the view using ACarousel in Xcode version 15.3 (15E204a). Sorry Apple, I can't install Xcode 16 right now, I need everything to work predictable. The preview stopped to work suddenly and nothing of the above fixes work. Also, for some reason preview started to fail if XCTest fails to build.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’24
Reply to Could Not Launch Mac (Designed for iPad) App in Xcode
I had the exact same set of errors as @SpaceMan in my macOS app. Here the entire error stack: Could not launch “CloudKitCMS” Domain: IDELaunchErrorDomain Code: 20 Recovery Suggestion: Runningboard has returned error 5. Please check the system logs for the underlying cause of the error. -- Could not launch “CloudKitCMS” Domain: IDELaunchErrorDomain Code: 20 Recovery Suggestion: Runningboard has returned error 5. Please check the system logs for the underlying cause of the error. -- The operation couldn’t be completed. Launch failed. Domain: RBSRequestErrorDomain Code: 5 Failure Reason: Launch failed. -- Launchd job spawn failed Domain: NSPOSIXErrorDomain Code: 153 -- I tried editing apple id but without any success. I noticed that some people refer entitlements, so I inspected by CloudKitCMS.entitlements file and found that several keys there are totally irrelevant to the project: <key>aps-environment</key> <string>development</string> <key>com.apple.developer.applesignin</key> <array> <string></string> </array> <key>com.apple.developer.aps-environment</key> <string>development</string> So I completely removed the above keys and now it runs! I must note that my project doesn't use Push Notifications (aps-related keys) and I don't know how those keys got there, probably Xcode added them automatically. So my recommendation would be to check the entitlements and remove everything that's not enabled for the bundle id.
May ’24
Reply to How to reduce complication extension executable size?
Further investigations. Extended memory growth happens inplaceholder(in:) func of a TimelineProvider. In getSnapshot(in:completion:) and getTimeline(in:completion:) memory doesn't grow. Maybe the key difference here is that placeholder(in:) is a syncrhonous function, while two others use completions. I suppose internal WidgetKit implementation runs a for loop through all the widgets and accumulates placeholder images array. Then writes it to disk and memory decreases.
Topic: App & System Services SubTopic: General Tags:
Feb ’24
Reply to Migrating custom intents to App Intents
Check that intentClassName corresponds to old Siri Intent auto-generated class name. Declare your AppIntent struct as public.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Could not find intent for LiveActivity Button
Try marking the entire MyIntent struct as public. This advice worked for me.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to WidgetKit with Intent on iOS 17
One of GPTs suggested me to make App Intent declaration public. This actually worked.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Inserting SF Symbols in a string ?
To save your time I copy-pasted Michcio's answer from the SO link posted by @Claude31 above: let imageAttachment = NSTextAttachment() imageAttachment.image = UIImage(systemName: "checkmark.circle") // If you want to enable Color in the SF Symbols. imageAttachment.image = UIImage(systemName: "checkmark.circle")?.withTintColor(.blue) let fullString = NSMutableAttributedString(string: "Press the ") fullString.append(NSAttributedString(attachment: imageAttachment)) fullString.append(NSAttributedString(string: " button")) label.attributedText = fullString
Replies
Boosts
Views
Activity
Aug ’24
Reply to Xcode 15 beta 7 Previews building issue
Guys, actually, I found an unexpected workaround! If you can isolate the view, that potentially crashes, try to extract it in a separate View file. Make a custom subview that uses the 3d party lib, that causing the crash. In my case it was ACarousel. Then, in the view that you actually need to preview, use this subview. If the 3d party lib isn't imported there, the preview will work. Fantastic! This cost me 6 hours of work.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to LinkDylibError when previewing SwiftUI view from a package.
The accepted answer is not an answer, but a comment. I have the similar issue with ACarousel preview. LinkDylibError: Failed to build PaywallCarousel.swift ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) This discussion is similar and have much more activity: https://forums.developer.apple.com/forums/thread/736152?page=2
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to Xcode 15 beta 7 Previews building issue
I have the same issue with the view using ACarousel in Xcode version 15.3 (15E204a). Sorry Apple, I can't install Xcode 16 right now, I need everything to work predictable. The preview stopped to work suddenly and nothing of the above fixes work. Also, for some reason preview started to fail if XCTest fails to build.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to Xcode Preview Broken
Turns out this happened to many developers and happens from time to time. Some people solved it by following the button and downloading the SDK, but there's a faster solution: just reboot your Mac.
Replies
Boosts
Views
Activity
May ’24
Reply to Could Not Launch Mac (Designed for iPad) App in Xcode
I had the exact same set of errors as @SpaceMan in my macOS app. Here the entire error stack: Could not launch “CloudKitCMS” Domain: IDELaunchErrorDomain Code: 20 Recovery Suggestion: Runningboard has returned error 5. Please check the system logs for the underlying cause of the error. -- Could not launch “CloudKitCMS” Domain: IDELaunchErrorDomain Code: 20 Recovery Suggestion: Runningboard has returned error 5. Please check the system logs for the underlying cause of the error. -- The operation couldn’t be completed. Launch failed. Domain: RBSRequestErrorDomain Code: 5 Failure Reason: Launch failed. -- Launchd job spawn failed Domain: NSPOSIXErrorDomain Code: 153 -- I tried editing apple id but without any success. I noticed that some people refer entitlements, so I inspected by CloudKitCMS.entitlements file and found that several keys there are totally irrelevant to the project: <key>aps-environment</key> <string>development</string> <key>com.apple.developer.applesignin</key> <array> <string></string> </array> <key>com.apple.developer.aps-environment</key> <string>development</string> So I completely removed the above keys and now it runs! I must note that my project doesn't use Push Notifications (aps-related keys) and I don't know how those keys got there, probably Xcode added them automatically. So my recommendation would be to check the entitlements and remove everything that's not enabled for the bundle id.
Replies
Boosts
Views
Activity
May ’24
Reply to Is an error returned with cursor for CKQueryOperations?
From the docs: CKErrorResultsTruncated. An error that occurs when CloudKit truncates a query’s results. Consider limiting query results count to CKQueryOperation.maximumResults constant. I guess CloudKit also has usage limits, so it can truncate the response in case when the app makes too much requests, for example.
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Search app by bundleID - PARAMETER_ERROR.ILLEGAL
BTW error response really has misspelling: REALTIONSHIP. That's what I receive.
Replies
Boosts
Views
Activity
Apr ’24
Reply to WidgetKit configuration display name?
The problem here is that configurationDisplayName is provided by modifier, not by a property. Since it's a declarative style.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to How to reduce complication extension executable size?
Further investigations. Extended memory growth happens inplaceholder(in:) func of a TimelineProvider. In getSnapshot(in:completion:) and getTimeline(in:completion:) memory doesn't grow. Maybe the key difference here is that placeholder(in:) is a syncrhonous function, while two others use completions. I suppose internal WidgetKit implementation runs a for loop through all the widgets and accumulates placeholder images array. Then writes it to disk and memory decreases.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to Refund Request
I guess it works the same way as the app purchase usually refunded. User should contact Apple support and the Store will handle it for you. You'll see negative transaction in your analytics panel.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Feb ’24
Reply to How to reduce complication extension executable size?
Updates regarding onAppear being called for every complication. Based on the information provided by Apple support: app archives all of the timelines and makes snapshots of all complications.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’24