I have installed Sequoia and Xcode 16 and now I can't add packages to my (or any project). I just get a message saying the package can't be resolved. Basically I can't carry on developing.
SORT THIS OUT APPLE
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
The following code compiles ok in one function:
let stop:UnsafeMutablePointerObjCBool
stop.initialize(to: false)
text.enumerateAttribute(kStyleKey,
in: NSRange(location: 0, length: text.string.count),
options: []) { (value, range, stop) in
but the following code which is virtually the same fails the initialise with the error "Constant 'stop' being used before being initialised" :
let stop:UnsafeMutablePointerObjCBool
stop.initialize(to: false)
attributedText.enumerateAttribute(kStyleKey,
in: NSRange(location: selectedRange.location, length: selectedRange.length),
options: []) { (value, range, stop) in
Any suggestions - looks like a compiler issue to me.
I'm suddenly getting this error when distributing an app that uploaded ok a couple of days ago. Nothing had changed. The associated message is: Profile doesn't include the selected signing certificate. I've checked the certificates and they are OK. I am using automatic signing. Any ideas?
The project navigator in my project keeps collapsing for no apparent reason. I've hunted high and low but can't find a setting to keep it expanded. This is not a new project and the issue began recently after an Xcode upgrade. I am currently using Xcode 15.3 release candidate.
If anyone knows how to fix this I'd be very grateful if they could let me know.
I have just upgraded to Sonoma 14. When I launch Xcode 14.3.1 it says I need to update to the latest version and send me to the AppStore where the latest version is 14.3.1? I have beta Xcode 15 installed, but can upload apps compiled with it to the AppStore.
What's going on?
I'm trying to build a Multiplatform app for Mac but get this incomprehensible error. Anyone any idea what this means and how to fix it?
"Driver threw Swift requires a minimum deployment target of iOS 7.0.0 without emitting errors."
If I annotate a class with @Observable I get this error in @Query:
Expansion of macro 'Query()' produced an unexpected 'init' accessor
If I remove @Observable the error goes away.
Elsewhere I have .environment referencing the class. With @Observable this complains that the class needs to be @Observable.
I am mystified. Does anyone have a suggestion?
I have been trying to get an app accepted but the review team has rejected it 4 times now on the grounds that I have selected 'made for kids'. I have never dome this if they mean the checkbox in the age rating thread. I have even sent them a screen shot. They never reply to my requests for an explanation. The stupid thing is that this app in its Mac Catalyst form was accepted a week ago and is on sale. I have lodged an appeal. Has anyone else had to put up with this?
When I assign an NSMutableAttributedString to a NSAttributedString I am getting error
[UICTFont textBlocks]: unrecognized selector sent to instance
There must be something wrong with the string but I cannot find any documentation that might explain this. Does anyone know what the error means?
TextKit 2 looks great. The video demonstrates the sample app on both MacOS and iPad. However the downloaded code only works on MacOS and the documentation says the NSTextViewportLayoutController is only available on MacOS, so when can we expect the IOS versions. And what about integration with SwiftUI?
I am trying to upload app previews for iPad having done so successfully for iPhone. No matter how hard I try the store rejects them claiming "Your app preview contains unsupported or corrupted Audio". I am using Mac OS Ventura. Has anyone else hit this issue?
I just installed Xcode beta 6 and tried compiling the SwiftData sample app. It fails with a couple of dozen compile errors. Clearly this must have worked for WWDC23 so what's gone wrong?
The following says type 'Card' does not conform to protocol 'PersistentModel'
@Model
final class Card: PersistentModel {
This seems pretty basic.
Any suggestions
I have downloaded the latest beta and tried testing Mac OS Catalyst. It consistently fails with a signing error. I tried using an iPhone 17.2 sim but that failed to install throwing up 'Unable to boot device because it cannot be located on disk', so I reinstalled the sim but got the same error. I then tried 17.4 which simply hangs on the install.
So friends, yesterday I was progressing using beta 2, but today I have hit a show stopper. Am I the only one?
I have encountered an issue with nested view updates that I don't understand. Maybe someone can explain what is happening.
In the code below the ContentView loads 2 views in succession. MyView1 followed by MyView2. MyView displays a button while MyView2 displays the value of its first argument. When the button is pressed MyView1 changes the value of its bound first argument. The ContentView is reloaded because of the change to its first argument. This results in MyView1 and MyView2 both being loaded again. Looked at from a procedural point of view this isn't what I was expecting.
import SwiftUI
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
struct ContentView: View {
@State var mydata1:Int = 0
@State var mydata2:Int = 1
var body: some View {
VStack {
Text("Hello world \(mydata1)")
MyView1(v1:$mydata1, v2:$mydata2)
Text(" myData1 = \(mydata1) myData2 = \(mydata2) ")
MyView2(v1:$mydata1, v2:$mydata2)
Text("Bye bye \(mydata1)")
}
}
}
struct MyView1:View {
@Binding var v1:Int
@Binding var v2:Int
var body: some View {
Text("MyView1")
if $v1.wrappedValue == 0 {
Button(action: {
$v1.wrappedValue = 10
}, label: {
Text("OK")
})
}
}
}
struct MyView2:View {
@Binding var v1:Int
@Binding var v2:Int
var body: some View {
Text("MyView2")
if $v1.wrappedValue == 0 {
Text("v1 = \(v1) v2 = \(v2) ")
}
else {
Text("???")
}
}
}
I am trying to update the EditButton after deleting rows in a List, but its title doesn't change. I have sent an update event via a publisher that applies the mode change based on the number of items remaining in the list. Here's the update event handler:
.onReceive(updateViewPublisher, perform: { _ in
self.editMode?.wrappedValue = textFileData.textFiles.count == 0 ? .inactive : .active
update += 1
})```
The edit mode is changed to inactive when the list is empty, but the button continues to display 'done'. If I adda new list item it remains set to 'done' and the delete control is displayed against the new item.
I have seen loads of posts about this on various sites, but no solutions. I am trying this on Xcode 16.2 and IOS 18.2. If someone from Apple sees this, a reply would be most welcome.