In the recent MacOS Sequoia Beta 3 NSTextAttachment initialized with custom data and an Image cell as attachmentCell are shown as a file icon istead of the image cell.
I am creating a NSAttributedString and showing it in NSTextView like this:
NSTextAttachment *attachment = [[NSTextAttachment alloc] initWithData:[text dataUsingEncoding:NSUTF8StringEncoding] ofType:nil];
attachment.attachmentCell = [[NSTextAttachmentCell alloc] initImageCell:img];
NSMutableAttributedString *res = [[NSMutableAttributedString alloc] initWithAttributedString:[NSAttributedString attributedStringWithAttachment:attachment]];
...
Posts under Beta tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Crash when CLLocationUpdate.liveUpdates is called while requesting authorization by CLServiceSession
I watched this video and programmed with this sample code as a reference.
The application crashed when I toggled the switch with the following code.
//
// ContentView.swift
// LiveUpdatesInCoreLocation
//
import os
import SwiftUI
import CoreLocation
@MainActor
final class ContentViewModel: ObservableObject {
private let logger = Logger()
@Published
var updatesStarted: Bool = false {
didSet {
updatesStarted ? self.startLocationUpdates() : self.stopLocationUpdates()
}
}
func startLocationUpdates() {
Task {
let _ = CLServiceSession(authorization: .whenInUse)
for try await update in CLLocationUpdate.liveUpdates() {
guard self.updatesStarted else { break }
logger.debug("update location: \(update.location)")
}
}
}
func stopLocationUpdates() {}
}
struct ContentView: View {
@StateObject private var model = ContentViewModel()
var body: some View {
VStack {
Toggle("Location Updates", isOn: $model.updatesStarted)
}
.padding()
}
}
And this is the error that occurred.
Thread 8: EXC_BAD_ACCESS (code=1, address=0x10)
A bad access to memory terminated the process.
If you remove the below code, the error will not occur.
let _ = CLServiceSession(authorization: .whenInUse)
Therefore, I guess that the problem is in calling CLLocationUpdate.liveUpdates while CLServiceSession is requesting authorization. or am I doing something wrong?
Here is my manifest.json:
"permissions": [
"<all_urls>",
"storage",
"unlimitedStorage",
"activeTab"
]
Despite declaring "unlimitedStorage" in permissions, I encounter the following error when trying to save files exceeding approximately 3MB:
Invalid call to browser.storage.local.set(). Exceeded storage quota.
This issue did not occur in iOS 17. Is this behavior intentional or is it a bug? If it is intentional, is there an alternative method to handle large file?
Hello.
I installed the last 18 update this week, since I installed this my iPad Pro 11-inch (M4) has been very, very hot.
I
’m not sure if it’s just me but i recently updated my phone to ios18.3 beta or something like that, ive had ios18 beta for a while and just updated it last night.
I tried changing my app tint to a purple colour, but every single time i tried to do so, the app tint automatically changed to a very dark blue?? Ive reset my phone, powered it off, i’m not sure why it’s happening but it wont fix. Anyone got any tips?
After downloading the latest beta of iOS 18 my iPhone no longer shows up in locations in finder on my Macbook. Instructions for when it doesn't show up also didn't help.
Error mounting image: 0xe8000105 (kAMDMobileImageMounterTATSUDeclinedAuthorization: The server declined to authorize this image on this device for this user.)
Here is what the detailed error message shows:
The developer disk image could not be mounted on this device.
Domain: com.apple.dt.CoreDeviceError
Code: 12040
Failure Reason: Error mounting image: 0xe8000105 (kAMDMobileImageMounterTATSUDeclinedAuthorization: The server declined to authorize this image on this device for this user.)
User Info: {
DDIPath = "/Library/Developer/DeveloperDiskImages/iOS_DDI.dmg";
DVTErrorCreationDateKey = "2024-07-12 19:06:25 +0000";
DeviceIdentifier = "94430B68-BA12-4F63-9EE5-48EE865738D6";
IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker;
NSURL = "file:///Library/Developer/DeveloperDiskImages/iOS_DDI.dmg";
Options = {
MountedBundlePath = "file:///private/var/tmp/CoreDevice_DDI_Staging_501/94430B68-BA12-4F63-9EE5-48EE865738D6/";
UseCredentials = 0;
};
"com.apple.dt.DVTCoreDevice.operationName" = enablePersonalizedDDI;
}
Error mounting image: 0xe8000105 (kAMDMobileImageMounterTATSUDeclinedAuthorization: The server declined to authorize this image on this device for this user.)
Domain: com.apple.mobiledevice
Code: -402652923
User Info: {
FunctionName = AMDeviceRemoteMountPersonalizedBundle;
LineNumber = 2135;
}
AMAuthInstallRequestSendSync failed: 3194 (kAMAuthInstallTATSUDeclinedAuthorization)
Domain: com.apple.mobiledevice
Code: -402652923
User Info: {
FunctionName = "-[PersonalizedImage mountImage:]";
LineNumber = 2032;
}
Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
"device_identifier" = "00008027-000164500AE2402E";
"device_isCoreDevice" = 1;
"device_model" = "iPad8,12";
"device_osBuild" = "18.0 (22A5307f)";
"device_platform" = "com.apple.platform.iphoneos";
"device_thinningType" = "iPad8,12";
"dvt_coredevice_version" = "397.3.5.2";
"dvt_coresimulator_version" = 980;
"dvt_mobiledevice_version" = "1757.0.0.101.1";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 1332838;
"operation_errorCode" = "-402652923";
"operation_errorDomain" = "com.apple.dt.CoreDeviceError.12040.com.apple.mobiledevice";
"operation_errorWorker" = IDEInstallCoreDeviceWorker;
"operation_name" = IDERunOperationWorkerGroup;
"param_debugger_attachToExtensions" = 0;
"param_debugger_attachToXPC" = 1;
"param_debugger_type" = 3;
"param_destination_isProxy" = 0;
"param_destination_platform" = "com.apple.platform.iphoneos";
"param_diag_113575882_enable" = 0;
"param_diag_MainThreadChecker_stopOnIssue" = 0;
"param_diag_MallocStackLogging_enableDuringAttach" = 0;
"param_diag_MallocStackLogging_enableForXPC" = 1;
"param_diag_allowLocationSimulation" = 1;
"param_diag_checker_tpc_enable" = 1;
"param_diag_gpu_frameCapture_enable" = 0;
"param_diag_gpu_shaderValidation_enable" = 0;
"param_diag_gpu_validation_enable" = 0;
"param_diag_memoryGraphOnResourceException" = 0;
"param_diag_queueDebugging_enable" = 1;
"param_diag_runtimeProfile_generate" = 0;
"param_diag_sanitizer_asan_enable" = 0;
"param_diag_sanitizer_tsan_enable" = 0;
"param_diag_sanitizer_tsan_stopOnIssue" = 0;
"param_diag_sanitizer_ubsan_stopOnIssue" = 0;
"param_diag_showNonLocalizedStrings" = 0;
"param_diag_viewDebugging_enabled" = 1;
"param_diag_viewDebugging_insertDylibOnLaunch" = 1;
"param_install_style" = 2;
"param_launcher_UID" = 2;
"param_launcher_allowDeviceSensorReplayData" = 0;
"param_launcher_kind" = 0;
"param_launcher_style" = 99;
"param_launcher_substyle" = 0;
"param_runnable_appExtensionHostRunMode" = 0;
"param_runnable_productType" = "com.apple.product-type.application";
"param_structuredConsoleMode" = 1;
"param_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "iphoneos18.0";
"sdk_osVersion" = "18.0";
"sdk_variant" = iphoneos;
}
System Information
macOS Version 14.5 (Build 23F79)
Xcode 16.0 (23037.4) (Build 16A5171r)
Timestamp: 2024-07-12T12:06:25-07:00
Here's my code:
font-weight: bold;
font-family: 'PingFangSC-Regular';
When I download and install Xcode-beta 16 I get the following error with the app not opening. Xcode v15.4 opens fine on an Apple M2 Max running Sonoma 14.5.
"Loading a plug-in failed. The plug-in or one of its prerequisite plug-ins may be missing or damaged and may need to be reinstalled.".
Anyone know how to resolve? I am trying to experience Timelines in Reality Composer Pro and need 16 beta+ to try it.
We are experiencing an issue with the Call Blocking and Identification feature in iOS 18 Beta. This feature was functioning correctly in iOS 17, but after updating to the iOS 18 Beta, it no longer works as expected
looks like iOS is blocking the number because we are getting notification but still we are getting the direct calls.
We have attached the
Kindly waiting for you replay.
Thanks.
Hello,
I'm experiencing an issue with iOS 18 Beta 3 and SwiftData.
I have a model with some attributes marked as externalStorage because they are pretty large.
In iOS 17 I could display a list of all my Models and it would not prefetch the externalStorage attributes.
Now in iOS 18 it seems the attributes are fetched even though I don't use them in my list.
It's an issue because the memory use of my app goes from 100mo on iOS 17 to more than 1gb on iOS 18 because of this.
My app is configured to sync with iCloud.
Anyone else experiencing the issue?
Thanks
Gil
I am currently running my Flutter app using macOS 15 beta (I accidentally upgraded and now I can't opt-out) and Xcode 15 beta on my iPhone 11 running iOS 17.5. While the app launches, it gets stuck on a black screen and I encounter the following error in Xcode:
Thread 1: signal SIGABRT
(lldb) bt
• thread #1, stop reason = signal SIGABRT
▪ frame #0: 0x00000001ad9eecd8 dyld__abort_with_payload + 8
frame #1: 0x00000001ad9fa450 dyld_abort_with_payload_wrapper_internal + 104
frame #2: 0x00000001ad9fa484 dyld_abort_with_payload + 16
frame #3: 0x00000001ad987e00 dyld4::halt(char const*, dyld4::StructuredError const*) + 304
frame #4: 0x00000001ad99559c dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 4088
frame #5: 0x00000001ad9b9c48 dyld_start + 1724
Note: This app functions correctly when distributed through TestFlight.
One week before I encountered the problem, I excitedly installed the beta version of iOS 18 to my iPhone XR. Little did I know that that was the beginning of a nightmare for me. A week or so after the installment, my iPhone's screen suddenly went black and in a few seconds into a process that I found other people have described as a boot loop. This means that my iPhone will attempt to start by getting into the logo screen but then either will it start just for a few seconds before it turns off again or will it just go off. and then the process is repeated again and again. I found that this seems to be a common problem for many people out there who also installed the beta version of this software. I also tried to get help in an Apple Store but they just said that my phone was dead and there was nothing they could do. This is just outrageous! Can't believe that a company as rich as Apple will just release software with this kind of deleterious bugs out there and won't try to help their clients after such a huge mess the cause. Will never buy an iPhone again. You should really try to do better.
It’s so frustrating. Every single turn my phone’s crashed. It doesn’t matter what I do. I take a picture, crash. I browse the net, crash. I MAKE A CALL, CRASH. I DO ANYTHING AND IT CRASHES. Not the apps, the whole phone panics. The kind with the spinning logo on a black screen. I’m so over it. I wish I could go back to DB1.
any advice would be appreciated
Hello,
Has anyone encountered issues with CoreBluetooth advertising and scanning between iOS 18/iPadOS 18 Beta 3 ? I'm want to know this is a bug or an intended change in behavior.
Issue Summary:
Central device on iOS 18/iPadOS 18 Beta 3 (foreground) and Peripheral device on iOS 17.5.1 (background) fail to communicate via BLE advertising.
The reverse setup or using non-iOS 18 devices works as expected.
Detailed Description:
I am developing an iOS/iPadOS application using CoreBluetooth for advertising and scanning. Here are the specifics of my setup:
The application uses a fixed BLE service UUID, and scanning is performed with the specified service UUID.
Background Modes Uses Bluetooth LE accessories and Acts as a Bluetooth LE accessory are enabled to allow advertising and scanning even when the app is in the background.
When the Central device is running iOS 18/iPadOS 18 Beta 3 and the app is in the foreground scanning, and the Peripheral device is running iOS 17.5.1 with the app in the background advertising, the Central device cannot receive the advertisements from the Peripheral device. ( CBCentralManagerDelegate.centralManager(_:didDiscover:advertisementData:rssi:) don't work.)
In the reverse scenario (Central on iOS 17.5.1 in the foreground scanning, and Peripheral on iOS 18/iPadOS 18 Beta 3 in the background advertising), the advertisements are received correctly.
Additionally, advertisements are received correctly in cases where both devices are not on iOS 18/iPadOS 18.
I am wondering if anyone else has encountered this issue or if there is any information available regarding whether this is a bug or an intended behavior change in iOS 18/iPadOS 18.
Thank you.
Hello everyone I run into a problem with Xcode I updated my Mac to Mac OS 15 sequoia and I try to get the version 16 of Xcode but It doesn't seem to work is anyone run into the same problem or I'm doing something wrong ? Thank you
I'm getting widespread reports from users trialling iOS 17.6 public beta that Siri Shortcuts are failing whenever they enter any text that looks like a URL.
It's getting reported to me because my app happens to have an app intent with a string parameter which can contain a URL in some circumstances.
However it's easily reproducible outside of my app: just create a 2 line shortcut like the one below. If you change "This is some text" to "https://www.apple.com" the shortcut below will fail:
In iOS 17.5 entering "https://www.apple.com" works fine.
I've raised feedback on this (FB14206088) but can anyone confirm that this is indeed a bug and not some weird new feature of Shortcuts where the contents of a variable can somehow change the type of a variable?
It would be very, very bad if this were so.
Hi everyone, I attempted to use the MultivariateLinearRegressor from the Create ML Components framework to fit some multi-dimensional data linearly (4 dimensions in my example). I aim to obtain multi-dimensional output points (2 points in my example). However, when I fit the model with my training data and test it, it appears that only the first element of my training data is used for training, regardless of whether I use CreateMLComponents.AnnotatedBatch or [CreateMLComponents.AnnotatedFeature, CoreML.MLShapedArray>] as input.
let sourceMatrix: [[Double]] = [
[0,0.1,0.2,0.3],
[0.5,0.2,0.6,0.2]
]
let referenceMatrix: [[Double]] = [
[0.2,0.7],
[0.9,0.1]
]
Here is a test code to test the function (ios 18.0 beta, Xcode 16.0 beta)
In this example I train the model to learn 2 multidimensional points (4 dimensions) and here are the results of the predictions:
▿ 2 elements
▿ 0 : AnnotatedPrediction<MLShapedArray<Double>, MLShapedArray<Double>>
▿ prediction : 0.20000000298023224 0.699999988079071
▿ _storage : <StandardStorage<Double>: 0x600002ad8270>
▿ annotation : 0.2 0.7
▿ _storage : <StandardStorage<Double>: 0x600002b30600>
▿ 1 : AnnotatedPrediction<MLShapedArray<Double>, MLShapedArray<Double>>
▿ prediction : 0.23158159852027893 0.9509953260421753
▿ _storage : <StandardStorage<Double>: 0x600002ad8c90>
▿ annotation : 0.9 0.1
▿ _storage : <StandardStorage<Double>: 0x600002b55f20>
0.23158159852027893 0.9509953260421753 is totally random and should be far more closer to [0.9,0.1].
Here is the test code : ( i run it on "My mac, Designed for Ipad")
ContentView.swift
import CoreImage
import CoreImage.CIFilterBuiltins
import UIKit
import CoreGraphics
import Accelerate
import Foundation
import CoreML
import CreateML
import CreateMLComponents
func createMLShapedArray(from array: [Double], shape: [Int]) -> MLShapedArray<Double> {
return MLShapedArray<Double>(scalars: array, shape: shape)
}
func calculateTransformationMatrixWithNonlinearity(sourceRGB: [[Double]], referenceRGB: [[Double]], degree: Int = 3) async throws -> MultivariateLinearRegressor<Double>.Model {
let annotatedFeatures2 = zip(sourceRGB, referenceRGB).map { (featureArray, targetArray) -> AnnotatedFeature<MLShapedArray<Double>, MLShapedArray<Double>> in
let featureMLShapedArray = createMLShapedArray(from: featureArray, shape: [featureArray.count])
let targetMLShapedArray = createMLShapedArray(from: targetArray, shape: [targetArray.count])
return AnnotatedFeature(feature: featureMLShapedArray, annotation: targetMLShapedArray)
}
// Flatten the sourceRGBPoly into a single-dimensional array
var flattenedArray = sourceRGB.flatMap { $0 }
let featuresMLShapedArray = createMLShapedArray(from: flattenedArray, shape: [2, 4])
flattenedArray = referenceRGB.flatMap { $0 }
let targetMLShapedArray = createMLShapedArray(from: flattenedArray, shape: [2, 2])
// Create AnnotatedFeature instances
/* let annotatedFeatures2: [AnnotatedFeature<MLShapedArray<Double>, MLShapedArray<Double>>] = [
AnnotatedFeature(feature: featuresMLShapedArray, annotation: targetMLShapedArray)
]*/
let annotatedBatch = AnnotatedBatch(features: featuresMLShapedArray, annotations: targetMLShapedArray)
var regressor = MultivariateLinearRegressor<Double>()
regressor.configuration.learningRate = 0.1
regressor.configuration.maximumIterationCount=5000
regressor.configuration.batchSize=2
let model = try await regressor.fitted(to: annotatedBatch,validateOn: nil)
//var model = try await regressor.fitted(to: annotatedFeatures2)
// Proceed to prediction once the model is fitted
let predictions = try await model.prediction(from: annotatedFeatures2)
// Process or use the predictions
print(predictions)
print("Predictions:", predictions)
return model
}
struct ContentView: View {
var body: some View {
VStack {}
.onAppear {
Task {
do {
let sourceMatrix: [[Double]] = [
[0,0.1,0.2,0.3],
[0.5,0.2,0.6,0.2]
]
let referenceMatrix: [[Double]] = [
[0.2,0.7],
[0.9,0.1]
]
let model = try await calculateTransformationMatrixWithNonlinearity(sourceRGB: sourceMatrix, referenceRGB: referenceMatrix, degree: 2
)
print("Model fitted successfully:", model)
} catch {
print("Error:", error)
}
}
}
}
}
Hey,
I have a setup in my app that I am currently building, that uses @Observable router objects that hold the app's entire navigation state, so that I can easily set it globally and let SwiftUI show the appropriate views accordingly. Each view gets passed in such a router object and there is a global "app" router that the app's root view can access as an entry point:
@Observable @MainActor
final class AppRouter {
static let shared = AppRouter() // Entry point used by the app's root view
var isShowingSheet = false // Navigation state
let sheetRouter = SheetRouter() // Router that's passed to the sheet view. This router could contain other routers for sheets it will show, and so on
}
@Observable @MainActor
final class SheetRouter { // Example of a "nested" router for a sheet view
var path = NavigationPath()
var isShowingOtherSheet = false
func reset() {
path = .init()
isShowingOtherSheet = false
}
}
To open a sheet, I have a button like this:
@Bindable var appRouter = AppRouter.shared
// ...
Button("Present") {
appRouter.sheetRouter.reset() // Reset sheet router
appRouter.isShowingSheet = true // show sheet
}
This seems to work perfectly fine. However, this produces tons of "error" logs in the console, whenever I open the sheet for a second time:
Mutating observable property \SheetRouter.path after view is torn down has no effect.
Mutating observable property \SheetRouter.path after view is torn down has no effect.
Mutating observable property \SheetRouter.path after view is torn down has no effect.
Mutating observable property \SheetRouter.path after view is torn down has no effect.
Mutating observable property \SheetRouter.isShowingOtherSheet after view is torn down has no effect.
These errors appear when calling the reset() of the sheet view's router before opening the sheet. That method simply resets all navigation states in a router back to their defaults. It's as if the sheetRouter is still connected to the dismissed view from the previous sheet, causing a mutation to trigger these error logs.
Am I misusing SwiftUI here or is that a bug? It's also worth mentioning that these error logs do not appear on iOS 17. Only on iOS 18. So it might be a bug but I just want to make sure my usage of these router objects is okay and not a misuse of the SwiftUI API that the runtime previously simply did not catch/notice. Then I'd have to rewrite my entire navigation logic.
I do have an example project to demonstrate the issue. You can find it here: https://github.com/SwiftedMind/PresentationBugDemo.
I have also filed a feedback for this: FB14162780
STEPS TO REPRODUCE
Open the example project.
Open the sheet in the ContentView twice by tapping "Present"
Close that sheet
Open it again.
Then the console will show these error logs from above.
I'd appreciate any help with this.
Cheers
The SwiftUI previews have been working fine in Xcode 16.0 beta, but ever since I added Firebase into my app, I've been getting error with previews.
CrashReportError: IshaanCord crashed
IshaanCord crashed. Check ~/Library/Logs/DiagnosticReports for crash logs from your application.
Process: IshaanCord[5651]
Date/Time: 2024-07-04 19:29:51 +0000
Log File: <none>
"Cannot preview in this file"
Does anyone know how to fix this? Thank you.