Post

Replies

Boosts

Views

Activity

"Fonts needed by this application are missing." alert upon opening SF Symbols.
When I was on the 15.1 developer beta, I downloaded the beta version of the SF Symbols app. It worked perfectly throughout the beta, but when 15.1 was released, I downloaded the stable version of SF Symbols as well and removed the beta version. However, now when it launches I am greeted by an alert titled "Fonts need by this application are missing." It goes on to say that fonts may not display properly... etc, but I haven't noticed any issues viewing any symbols I have looked up, and they seem to show up properly when I define them in Xcode. I tried uninstalling and reinstalling the application, as well as following the advice in the alert by downloading "the latest fonts from the Apple Developer website." but the alert still shows up everytime I launch SF Symbols. Any one else experiencing this issue or know of a way to solve it? It's not that big of an issue, it's just one extra click after all, but in case it might be in the future, I just thought I'd check with others. Thanks!
3
2
173
Nov ’24
Create ML Multi-Label Image Classifier will not train, throws error: "Unexpected Error"
Hello everyone, I am new to using Create ML, but am running up against a problem where the error is not descriptive, and I can not figure out what might be causing it. I am fairly sure my data is formatted properly, as in the CreateML software, it detects the images and shows me a bar graph of how many images belong to each label. But when it comes to actually training, the moment I press the "Train" button, it shows an error with the message: "Unexpected Error". I have also attempted to create and train the model programmatically, and that actually works! The framework requires that the JSON be named "annotations.json" instead of "annotation.json" and that the key representing the name of image be changed to "filename" from "image", but other than that, the data is the same. I tried to use the software with the changes I made to the JSON for use in the framework, but if I try that, it won't even parse the data, so I am fairly sure that my data is formatted correctly. I would prefer to use the app rather than do everything programmatically, because it presents the data in a much more digestible way. Has anyone else come up against this issue or a similar issue. I should note that I am running the latest Beta of MacOS Sonoma and Xcode.
7
0
1.8k
Jul ’23
Drag and Drop operations fail when executed from within the same List
I am working on creating a file viewer to browse a network directory as a way to introduce myself to iOS app development, and was trying to implement a feature that would allow users to drag and drop both files and folders onto another folder inside of the app to move items around. However, it seems that if the View that is set to draggable, and then the view that is set as the Drop Destination is in the same List, then the Drop Destination will not detect when the draggable view has been dropped onto it. Here is the structure of my code: List { Section(header: Text("Folders")) { ForEach($folders, id: \.id) { $folder in FolderCardView() .onDrop(of: [UTType.item], isTargeted: $fileDropTargeted, perform: { (folders, cgPoint) -> Bool in print("Dropped") return true }) } } Section(header: Text("Files")) { ForEach($files, id: \.id) { $file in FileCardView() .onDrag({ let folderProvider = NSItemProvider(object: file) return folderProvider }) } } } I have verified that the issue comes down to the list, because if I move both of the ForEach loops out on their own, or even into their own respective lists, the code works perfectly. I have not only tested this with the older .onDrop and .onDrag modifiers as shown above, but also the newer .draggable and .dropDestination modifiers, and the result is the same. Does anyone know if this is intended behavior? I really like the default styling that the List element applies to other elements within, so I am hoping that it might just be a bug or an oversight. Thanks!
3
0
741
Jul ’23
App crashes at runtime when attempting new way of declaring Previews in iOS 17
Hello everyone. I'm pretty new to developing for iOS, I just started a couple of weeks ago, so apologies if I don't use the correct terminology on certain occasions. I also did attempt to search both these forums, as well as the change log for iOS 17 Developer Beta 3 to see if this was a known issue, and I didn't see anything reporting it, so again, apologies if this is known. I was just posting this because, being new, I didn't want to jump to the conclusion that It was an issue with the compiler. I actually already jumped the gun once and submitted a Feedback ticket where an Image was rendering just fine in the Preview of Xcode, but not on device, and was told that it was my code 🤦, so I'd rather not have a repeat 😅. As I'm sure most of you have seen, iOS 17 allows a much shorter way to declare previews: #Preview { ContentView() } Compared to the previous way in iOS 16 and before: struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } However, when I attempt to run my code, if any of my Views are using the new method of declaring Previews, the app will crash immediately at runtime with the following error: dyld[583]: Symbol not found: _$s21DeveloperToolsSupport17UVPreviewRegistryCMn Expected in: /System/Library/Frameworks/DeveloperToolsSupport.framework/DeveloperToolsSupport I have tested this with a brand new project on both an iPhone XR and an iPhone 14 Pro. It actually worked on iOS 17 Beta 1, but ceased working on Beta 2, and still does not function on Beta 3. The only constant is the device that I physically do the developing, my MacBook, as I remember seeing a message about it copying over symbols to each device before it would let me remotely deploy or preview my code to either of my phones, so if this isn't an issue with the betas, I wonder if it could be related perhaps to that. Let me know if you have experienced anything similar! Again, super sorry if this has been reported on already. If you just want to point me in the right direction, then I'll do the reading! Thanks!
3
1
1.6k
Jul ’23
Xcode 15 Beta - Preview is showing remotely loaded Image, however, the development device is not.
Hello, I am relatively new to iOS development and am trying to learn by creating an app to connect to my SMB server to view and manipulate files. I am aware that the built in Files app has SMB capabilities, but I wanted to take a crack at building my own as I saw a few shortcomings and places where it could be improved. Anyway, I am running into a weird issue. I am working on the functionality that would show the user any particular image that they choose in a fullscreen view. The code seems to be streaming in the image and displaying it just fine, and the Xcode Preview would seem to be confirming that. However, my device will not, under any circumstances display the Image! I have tried with multiple images, and also building the app and running it independently of Xcode, which points to an issue with my code. But then why is the Xcode Preview displaying the Image just fine? I also tried adding a Text view just to make sure the view as whole was updating properly and it was, the Text view displayed just fine. I understand that I'm on beta software, so if this is a bug with Xcode itself, or iOS, then no complaints here! I'll just try and find a way to work around it. I'm really only posting this to make sure it's not user error! I'll also attach my code of course, as well as a couple of screenshots just so you know I'm not crazy. Thanks! I tried to take a screenshot of the whole editor for you because usually in these cases, the more information, the better, but for some reason, when I tried to uploaded, it just gave me a generic error response and said try again later. // // ImageView.swift // Akasha // // Created by Dylan on 6/20/23. // import SwiftUI import AMSMB2 import Combine struct ImageView: View { @ObservedObject var imageLoader: ImageLoader @State var image: UIImage = UIImage() init(withUrl url: String) { imageLoader = ImageLoader(urlString: url) } var body: some View { VStack { Image(uiImage: image) .aspectRatio(contentMode: .fill) .onReceive(imageLoader.didChange) { data in self.image = UIImage(data: data) ?? UIImage() } Spacer() Text("Hello World!") } } } class ImageLoader: ObservableObject { var didChange = PassthroughSubject<Data, Never>() var data = Data() { didSet { didChange.send(data) } } let client = AMSMB2(url: URL(string: "smb://10.0.0.2/")!, credential: URLCredential(user: "user", password: "password", persistence: .forSession)) init(urlString:String) { guard let url = URL(string: fetchImage(path: urlString).absoluteString) else { return } let task = URLSession.shared.dataTask(with: url) { [weak self] data, response, error in guard let data = data, self != nil else { return } DispatchQueue.main.async { [weak self] in self?.data = data } } task.resume() } func fetchImage(path: String) -> URL { do { var cacheURLDirectory: URL cacheURLDirectory = try FileManager.default.url(for: .cachesDirectory, in: .userDomainMask, appropriateFor: nil, create: false) let fullCacheURLPath = cacheURLDirectory.absoluteString + path let fullCacheURL = URL(string: fullCacheURLPath)! client?.connectShare(name: "media") { error in if error != nil { print("connectShare Error: ") print(error!) } self.client?.downloadItem(atPath: path, to: fullCacheURL, progress: AMSMB2.ReadProgressHandler(downloadProgressHandler(bytes:total:)), completionHandler: AMSMB2.SimpleCompletionHandler(downloadCompletionHandler(error:))) } return fullCacheURL } catch { print ("Error Setting Cache Directory for Image") return URL(string: "")! } func downloadProgressHandler(bytes: Int64, total: Int64) -> Bool { return true } func downloadCompletionHandler(error: Error?) -> Void { } } } #Preview { ImageView(withUrl: "Old Hard Drive.webp") } And if this turns out of course to be a bug with Xcode itself and NOT user error, I will file it in the Feedback app (if there is a spot in there for Xcode... if not, I will find out where I need to go). Thanks everyone!
2
0
1.2k
Jun ’23
Is there an official component that is part of the SwiftUI framework to allow for a pop-up view such as the one for writing a new message in the stock Mail app on iOS
I am sorry if this has been asked before, I tried searching for a good half hour trying to find out the correct name for what this component might be called if it exists, and I've come up short. This is after spending two hours debugging an unrelated issue with my software, so my nerves aren't quite as fresh as they could be. If I have to do some hackery to get one to display, that's fine. I was just curious if Apple provides an official way to replicate the functionality they provide in their official apps when it comes to that nifty "Slide-Up view" such as the one that appears when writing out a new message in the Mail app. Thanks!
2
0
574
Jun ’23