Post

Replies

Boosts

Views

Activity

Xcode predictive code completion model never finishes downloading
I'm on a hotspot cause I'm traveling and tried like 50 times to download the predictive code completion model, but every time I've had errors saying: The operation couldn’t be completed. (IDELanguageModelKit.IDEModelDownloadAdapter. While it's reportedly downloading the model and that the error doesn't appear yet, the IDELanguageModelKit folder doesn't move a single bit and has stayed at 36 bytes since yesterday. The hotspot is not the quickest but sufficient (5 mb/s) yet I still get the error every time I download the model. I think this would be good if Apple at least added a progress bar to see how much has been downloaded, no clue why they didn't already.
3
0
1.2k
Jul ’24
LookAround « trademark »
I have a LookAroundPrewiew in a frame which itself is already small. On top of that is the LookAroundPreview automatically appended onto the preview. In fact it doesn’t really bother me per se, but it’s that my view doesn’t have much space. So is it possible customize the view by removing the text ? And the Apple Maps text at the bottom of the image which is fairly small isn’t a problem for me.
1
0
451
Feb ’24
git untracked
I'm trying to set up a git repository from Xcode so that me and a friend can work on a project. When he clones the repository in Xcode, he gets the "no editor" error message. On my side, in the source control panel, I see the untracked icon, with a question mark in a blue box, and uncommitted changes. Despite pushing it 20 times, it's still showing the uncommitted message. Also, I have the no editor message too in a rectangle. How can I track these files and fix it ?
2
0
522
Nov ’23
Change Navigation Stack columns dimensions
Hi. I'm writing the following code for a navigation with images and I have an issue: the images don't fit with the automatic rectangle that is created by the NavigationStack view. Here is the code and I'm attaching an image too for you to understand : import SwiftUI struct LycéesListe: View { var body: some View { NavigationStack { List(lycées) { lycée in NavigationLink { LycéeDétail(lycée: lycée) } label: { LycéesRow(lycée: lycée) } } .navigationTitle("Lycées") } } struct LycéesListe_Previews: PreviewProvider { static var previews: some View { ForEach(["iPhone 13", "iPhone 12"], id: \.self) { deviceName in LycéesListe() .previewDevice(PreviewDevice(rawValue: deviceName)) .previewDisplayName(deviceName) } } } } Anyone knows how I could make the images fit with the rectangle border so I just have images with clean rectangles and not these green lines ? I tried to do padding but it didn't help. Any answer appreciated.
0
0
649
May ’23
Binary operator '+' cannot be applied to operands of type '()' and 'String' error
Hi. I'm getting an error on the index 1 of my code : Binary operator '+' cannot be applied to operands of type '()' and 'String'. The code block is the following func addDance (_ sentence: String) {     return addDance(sentence: String) + " and then we dance" } The instruction of the exercise I'm doing is the following : «Create a function addDance that takes a string, appends a phrase about dancing (like "and then we dance!" or "but no dancing", according to your taste), and returns the new string.  Call the addDance function passing in myPlans, and assign the result to friendPlans. »
3
0
2.2k
Aug ’22
Understanding ideal overlaps in Object Capture
Hi, I’ve been watching quite some stuff about Object Capture months afar from now and how it works, and I’m wondering how I am supposed to interpret the ideal overlaps between sequential photos. Apple says it should be at least 70% between each photo, but since the ideal overlap isn’t a tangible concept, how am I supposed to take it into account when I take photos. Any help appreciated. By the way, here’s the article mentioning the overlap, near the end of the latter. https://developer.apple.com/documentation/realitykit/capturing-photographs-for-realitykit-object-capture
1
0
1.7k
Oct ’22
Web Push and Push notifications
Apple recently introduced and presented Web Push, a new Web Kit tool permitting to send notifications to users on your websites and web apps. However, push notifications have been a thing on macOS since Mavericks. Therefore, what is the difference between these two things ?(https://developer.apple.com/notifications/safari-push-notifications/ ) and that new thing (https://developer.apple.com/videos/play/wwdc2022/10098/)
2
1
2k
Jun ’22
Usage of structure in a function with «Value of type 'String' has no member 'artist'»
I'm trying to do the last questions. However, I'm having much difficulty with the last question and I'm unsure of my answers on the previous questions. Structure is actually a new concept for me. let songTitles = ["Ooh yeah", "Maybe", "No, no, no", "Makin' up your mind"] let artists = ["Brenda and the Del-chords", "Brenda and the Del-chords", "Fizz", "Boom!"] let durations = [90, 200, 150, 440] func songInformation(songTitles: String, artists: String, durations: Int) -> String {    return "\(songTitles) by \(artists), duration \(durations)" } for i in 0 ... songTitles.count - 1 {     print(songInformation(songTitles: songTitles[i], artists: artists[i], durations: durations[i])) } /*:  The code above is prone to all sorts of errors. What would happen if your song catalog expanded but you forgot to update one of the three arrays? What if you added star rating data with a new array but forgot to modify the `songInformation` function?    This kind of code is also hard to maintain and read. What if you were tracking thirty properties about songs, instead of just a handful? What would the parameter list of the `songInformation` function look like?    Next you'll perform the same task using a data abstraction: the `Song` struct from the previous page.  */ struct Song {     let title: String     let artist: String     let duration: Int } //:- callout(Exercise): Below, use the `Song` struct from the previous page to simplify your code. /* Create the array of songs here */ let song = [songTitles] /* Declare the songInformation function here */ func songInformation2(songTitles: String, artists: String, durations: Int) -> String {    return "\(songTitles) by \(artists), duration \(durations)" } /* Write a for...in loop here */ for song in songTitles {     songInformation2(songTitles: song.title, artists: song.artist, durations: song.duration) }
3
0
875
Aug ’22
Expected expression
Hi. I'm getting the «Expected expression» for some reason but don't understand why. let index = 3 if index <= devices.count {     print(devices[index])     else {         return "the array is out of range"     } } Any answer appreciated.
4
0
1.1k
Aug ’22
Message "Expected '}' at end of brace statement"
Hi. I am currently following Apple's swift course. However, I get an error saying "Expected '}' at end of brace statement" and I don't really understand why ? Can someone explain why and eventually correct the code ? Thanks ! var question2 = question let lowerQuestion2 = question.lowercased() "hello" == "Hello" func responseTo(question: String) -> String {     if question.hasPrefix("hello") {         if lowerQuestion2.hasPrefix("hello") {             return "Hello there"         } else {             return "That really depends"     } }
3
0
1.1k
Jul ’22
Store a result in a constant
Hi, I am doing the first question of the last exercise on the following screenshot. However, I don't really understand the two questions. How is it possible to store a result in a constant, if the result itself is declared with 'let', making it a constant? I sure am not understanding correctly the question, understandable with the fact I just started learning code. Here's the block of code.     let total = pigsFlying + frogsBecomingPrinces + multipleLightningStrikes     return total } /*:  - callout(Exercise): Update the `impossibleBeliefsCount` function so that instead of printing the value, it returns it as an `Int`. `impossibleThingsPhrase` creates a phrase using string interpolation:  */ func impossibleThingsPhrase(numberOfImpossibleThings: Int, meal: String) -> String {     return "Why, I've believed as many as \(numberOfImpossibleThings) before \(meal)" } impossibleThingsPhrase(numberOfImpossibleThings: 712, meal: "chicken") /*:  - callout(Exercise): Update the `impossibleThingsPhrase` function so that, instead of using its two internal constants, it takes two arguments: `numberOfImpossibleThings` as an `Int` and `meal` as a `String`. Now you have two functions that take parameters and return values.  - callout(Exercise): Call `impossibleBeliefsCount` and store the result in a constant.\ Call `impossibleThingsPhrase`, passing in the result of `impossibleBeliefsCount` as one of the arguments.  */ func impossibleBeliefsCount(pigsFlying: Int, frogsBecomingPrinces: Int, multipleLightningStrikes: Int) {     let total = pigsFlying + frogsBecomingPrinces + multipleLightningStrikes     return total }
2
0
1.3k
Jul ’22
AirPods lost mode in Find My
What’s the point of Lost Mode for AirPods ? Unlike AirTags where once lost mode is activated and these cannot be paired even if resetted, AirPods’ full panel of features can be enabled once they are resetted. We can’t even change the message appearing, and Apple says a message with the phone number appears when the lost AirPods are paired, but it’s false. I really don’t see where Apple is trying to go.
0
0
1.3k
Jul ’22
App Store reviews privacy
If someone gives a review about an app without commenting about it with text, will the review be private ? What I'm wondering is if the owner of the app will be able to see who gave a review, even a just a stars rating without text. Is there no feature such as «Hide my email» like with Sign In with Apple where the user's email is replaced by another one ? If anybody knows, thanks for the answers.
0
0
618
Jul ’22