Post

Replies

Boosts

Views

Activity

Opening native app from a web extension
Is it possible to open the native app from a web extension? I have tried creating a new tab that uses the app's URL scheme but the UI asking the user to open the app is not shown until the new page UI is dismissed. Creating a tab with an HTTPS URL that the app is setup to handle does not work and always the link in a new tab. I tried sending a message to the app extension and using NSExtensionContext.open(_:completionHandler:) but the URL is not opened and the closure received false, indicating it was not handled. Having the option to link back to the native app would be very useful.
3
0
2.0k
Mar ’25
Unable to view individual non-crash reports: Please provide a valid value
I have been unable to view individual reports for some time now. I can view crash reports and I can view the list of all the other report types (Disk Writes, Energy, Hangs, and Launches), but all individual reports (which would contain the backtrace etc.) show an error: Failed to Download Energy Logs An error occurred while downloading energy reports. Please provide a valid value. This happens on macOS 14.7, macOS 15.0.1, Xcode 15.1, Xcode 15.3, Xcode 16.0, Xcode 16.1, and Xcode 16.2 beta 1, across 2 different Macs. Other people on my team can view the same reports. I'm starting to think this is something to do with how my account is setup. I'm an admin on the App Store Connect account so I don't think it's a permissions issue.
2
0
975
Oct ’24
Hang Reports Don't Add up to 100%
We have noticed that the hang reports provided in Xcode include the percentage of hang time, which are used to sort from high to low (effectively sorting by priority). However when adding these percentages up we do not get 100%. For newer releases the total may be quite low (5-20%) but even for older releases we only get up to around 85%. Are there reports we are missing? Is there a threshold or something that lower percentage reports are not hitting? Any level of understanding here would be appreciated!
0
0
690
Sep ’24
Is using @Published in a Sendable type safe?
Is the following code accurate/safe? final class ObjectWithPublished: @unchecked Sendable { @Published var property: Int? } I've tried testing this with the following test, which passes: final class PublishedThreadSafetyTests: XCTestCase { func testSettingValueFromMultipleThreads() { let object = ObjectWithPublished() let iterations = 1000 let completesIterationExpectation = expectation(description: "Completes iterations") completesIterationExpectation.expectedFulfillmentCount = iterations let receivesNewValueExpectation = expectation(description: "Received new value") receivesNewValueExpectation.expectedFulfillmentCount = iterations var cancellables: Set<AnyCancellable> = [] object .$property .dropFirst() .sink { _ in receivesNewValueExpectation.fulfill() } .store(in: &cancellables) DispatchQueue.concurrentPerform(iterations: iterations) { iteration in object.property = iteration completesIterationExpectation.fulfill() } waitForExpectations(timeout: 1) } } There are also no warnings when using the address sanitizer, so it seems like subscriptions and updating @Published values is thread-safe, but the Published type is not marked Sendable so I can't be 100% sure. If this isn't safe, what do I need to protect to have the Sendable conformance be correct?
2
0
3.0k
Jul ’22
Opening native app from a web extension
Is it possible to open the native app from a web extension? I have tried creating a new tab that uses the app's URL scheme but the UI asking the user to open the app is not shown until the new page UI is dismissed. Creating a tab with an HTTPS URL that the app is setup to handle does not work and always the link in a new tab. I tried sending a message to the app extension and using NSExtensionContext.open(_:completionHandler:) but the URL is not opened and the closure received false, indicating it was not handled. Having the option to link back to the native app would be very useful.
Replies
3
Boosts
0
Views
2.0k
Activity
Mar ’25
Unable to view individual non-crash reports: Please provide a valid value
I have been unable to view individual reports for some time now. I can view crash reports and I can view the list of all the other report types (Disk Writes, Energy, Hangs, and Launches), but all individual reports (which would contain the backtrace etc.) show an error: Failed to Download Energy Logs An error occurred while downloading energy reports. Please provide a valid value. This happens on macOS 14.7, macOS 15.0.1, Xcode 15.1, Xcode 15.3, Xcode 16.0, Xcode 16.1, and Xcode 16.2 beta 1, across 2 different Macs. Other people on my team can view the same reports. I'm starting to think this is something to do with how my account is setup. I'm an admin on the App Store Connect account so I don't think it's a permissions issue.
Replies
2
Boosts
0
Views
975
Activity
Oct ’24
Hang Reports Don't Add up to 100%
We have noticed that the hang reports provided in Xcode include the percentage of hang time, which are used to sort from high to low (effectively sorting by priority). However when adding these percentages up we do not get 100%. For newer releases the total may be quite low (5-20%) but even for older releases we only get up to around 85%. Are there reports we are missing? Is there a threshold or something that lower percentage reports are not hitting? Any level of understanding here would be appreciated!
Replies
0
Boosts
0
Views
690
Activity
Sep ’24
Is using @Published in a Sendable type safe?
Is the following code accurate/safe? final class ObjectWithPublished: @unchecked Sendable { @Published var property: Int? } I've tried testing this with the following test, which passes: final class PublishedThreadSafetyTests: XCTestCase { func testSettingValueFromMultipleThreads() { let object = ObjectWithPublished() let iterations = 1000 let completesIterationExpectation = expectation(description: "Completes iterations") completesIterationExpectation.expectedFulfillmentCount = iterations let receivesNewValueExpectation = expectation(description: "Received new value") receivesNewValueExpectation.expectedFulfillmentCount = iterations var cancellables: Set<AnyCancellable> = [] object .$property .dropFirst() .sink { _ in receivesNewValueExpectation.fulfill() } .store(in: &cancellables) DispatchQueue.concurrentPerform(iterations: iterations) { iteration in object.property = iteration completesIterationExpectation.fulfill() } waitForExpectations(timeout: 1) } } There are also no warnings when using the address sanitizer, so it seems like subscriptions and updating @Published values is thread-safe, but the Published type is not marked Sendable so I can't be 100% sure. If this isn't safe, what do I need to protect to have the Sendable conformance be correct?
Replies
2
Boosts
0
Views
3.0k
Activity
Jul ’22