Post

Replies

Boosts

Views

Activity

Icon Composer warning "Failed to parse icontool JSON output."
When the Icon Composer file is imported into the project folder, and after building, there is a warning that says: Failed to parse icontool JSON output. Parts of the warnings show this: Entity: line 1: parser error : Start tag expected, '<' not found \211PNG ^ Entity: line 1: parser error : Start tag expected, '<' not found \211PNG ^ Entity: line 1: parser error : Start tag expected, '<' not found \211PNG ^ /* com.apple.actool.notices */ warning: Failed to parse icontool JSON output. Underlying Errors: Description: The data couldn’t be read because it isn’t in the correct format. Failure Reason: The data is not in the correct format. Debug Description: Garbage at end around line 6, column 0. /* com.apple.actool.compilation-results */ I have created the icon with png files in each layer group in icon composer. However the project is able to compile, and running shows the correct icon. What is the issue with this?
4
6
202
Aug ’25
Xcode 26 Beta 4 crashes on closing of project
Does anyone have this issue of Xcode 26 Beta 4 crashing on closing of their project? Currently running on macOS 26 Beta 4 on a MacBook Air M2 with 16GB of ram. Each time i close a project, Xcode 26 Beta 4 will crash. The window pops up to send a report. Opening Xcode 26 Beta 4 will reopen the previous project. If you have multiple projects opened, all these projects will always reopen.
2
0
185
Jul ’25
AlarmMetadata struct
How can AlarmMetadata be implemented? I have referenced the sample code from "Scheduling an alarm with AlarmKit" and used the following: import AlarmKit struct CookingData: AlarmMetadata { let createdAt: Date /* other properties */ init() { self.createdAt = Date() /* other properties here */ } } But it always has the following errors: Main actor-isolated conformance of 'CookingData' to 'Decodable' cannot satisfy conformance requirement for a 'Sendable' type parameter of 'Self' Type 'CookingData' does not conform to protocol 'AlarmMetadata'. However in the sample App, this error is not there. Any other guidance on AlarmMetadata protocol besides the documentation?
Topic: UI Frameworks SubTopic: SwiftUI
2
0
106
Jun ’25
Using App Intents in Live Activity to Pause a Timer
Hello, I am trying to test a concept of a timer stopwatch with Live Activities and integrating buttons like Pause/Resume. When the stopwatch starts, a new Live Activity is created. The stopwatch is managed by the ViewModel, which has functions like start(), pause(), resume(), reset(), and also startLiveActivity(), etc. It uses @AppStorage to store keys like stopWatchModeRaw values, startTimeInterval, etc. The Live Activity state is stored here in the view model using: private var currentActivity: Activity? = nil The Live Activity is started using: private func startActivity() async { guard currentActivity == nil, Activity<StopwatchAttributes>.activities.isEmpty else { if currentActivity == nil { findAndAssignExistingActivity() await updateActivity() } return } let attributes = StopwatchAttributes() let state = StopwatchAttributes.ContentState( .... pass in the content state variables .... ) let content = ActivityContent(state: state, staleDate: nil) do { let activity = try Activity<StopwatchAttributes>.request( attributes: attributes, content: content, pushType: nil ) // Store the activity instance self.currentActivity = activity } catch { print("Error requesting Live Activity: \(error.localizedDescription)") } } and FindAndAssignExistingAcivity does: private func findAndAssignExistingActivity() { if let existingActivity = findActivity(), existingActivity.activityState == .active || existingActivity.activityState == .stale { print("Found existing activity on launch: \(existingActivity.id)") self.currentActivity = existingActivity } else { print("No existing activity found on launch.") self.currentActivity = nil } } UpdateActivity if the activity exists with a guard statement, and then update the activity. This is also used when the user taps Pause in the Stopwatch. The main issue I am facing is with the PauseIntent, it can't find the Live Activity and will always exit at that guard statement. struct PauseIntent: AppIntent { static var title: LocalizedStringResource = "Pause Stopwatch" func perform() async throws -> some IntentResult { guard let defaults = UserDefaults(suiteName: appGroupID) else { return .result() // Simple failure } let currentModeRaw = defaults.integer(forKey: "stopwatchModeRawValue") let currentMode = StopwatchMode(rawValue: currentModeRaw) ?? .reset let startTimeInterval = defaults.double(forKey: "startTimeInterval") // TimeInterval when current running segment started let accumulatedTime = defaults.double(forKey: "accumulatedTime") guard let activity = Activity<StopwatchAttributes>.activities.first else { Self.logger.error("PauseIntent EXIT: No Live Activity found to update. (Activity<StopwatchAttributes>.activities is empty)") return .result() // EXITING HERE, No Live Activity Found, there was nothing found to update... -> It always exits here } followed by rest of the code to update the state of the live activity, but it never executes because the activity = Activity.activities.first always returns false. What seems to be the issue? 1 .Is the method wrong to check for the live activity before attempting to Pause? 2. Can the Live Activity actually Pause the Stopwatch Timer in the main App since the Live Activity is actually a Widget Extension and not the App itself, so it cannot see the data directly?
1
0
108
May ’25