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?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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
So I installed the latest OS update from Settings not realising that it wasn’t a Monteray update, but Ventura beta. But then when I tried running XCode I get a message that it won’t work with Ventura. So I’m stuck because I was about to release an App, but can’t because the App Store won’t accept stuff built with beta software.
So thanks Apple. Of course it’s all my own fault for not reading the Release notes where it is buried in the detail.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Review
App Store Connect
Xcode
Beta
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 can't get my app's document icon to appear for my document extension. I have tried different ways of configuring it based on Apple's documentation and various solutions posted on the internet.
At first I tried adding the icon to the imported type identifier box where it says 'Add imported type identifier icons here' nothing happens when I select an icon (.png) stored in the project. I have checked the info.plist source and there is nothing there.
I have since tried editing the source directly. Here are the relevant pieces of my latest attempt. Can anyone tell me where I'm going wrong. Thanks.
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<string>writingshed.png</string>
<key>CFBundleTypeName</key>
<string>Writing Shed Data</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>wsd</string>
</array>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeDescription</key>
<string>Writing Shed Data</string>
<key>UTTypeIconFiles</key>
<array>
<string>writingshed.png</string>
</array>
<key>UTTypeIdentifier</key>
<string>WritingShedData</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>wsd</string>
</array>
</dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
</dict>
</array>
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>UTTypeConformsTo</key>
<array/>
<key>UTTypeDescription</key>
<string>Writing Shed Data</string>
<key>UTTypeIconFiles</key>
<array>
<string>writingshed.png</string>
</array>
<key>UTTypeIdentifier</key>
<string>WritingShedData</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>wsd</string>
</array>
</dict>
</dict>
</array>
After installing beta 8 I'm suddenly getting the following:
ld: warning: building for 'macCatalyst', but linking in dylib (/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa.tbd) built for 'macOS'
Any help gratefully received.
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.
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?
If I call
let font = UIFont.preferredFont(forTextStyle:.body)
Then font.pointSize has value 17
If, however, I call this with a font such as Arial
let font = UIFont.fontWithNameAndTraits(fontName,
size: styleAttributes.fontSize ?? 12,
bold: styleAttributes.bold ?? false,
italic: styleAttributes.italic ?? false)
let fontMetrics = UIFontMetrics(forTextStyle: .body)
let scaledFont = fontMetrics.scaledFont(for: font)
Then scaledFont.pointSize has value 12. I was expecting 17, so I must be doing something wrong. Any suggestion?
The function fontWithNameAndTraits is:
class func fontWithNameAndTraits(_ name:String, size:CGFloat, bold:Bool, italic:Bool)-UIFont {
let fontRef = UIFont.getFontRefForNameAndTraits(name, size:size, bold:bold, italic:italic)
let fontNameKey = CTFontCopyName(fontRef , kCTFontPostScriptNameKey)! as String
return UIFont(name: fontNameKey as String, size:CTFontGetSize(fontRef ))!
}
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'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?
I tried coding along with the WWDC23 'Dive Deeper into SwiftData' video but can't get the sample code to compile.
For example the Card class fails with lots of errors associated with @Model. The first of these is: Type 'Card' does not conform to protocol 'PersistentModel'
import SwiftUI
import SwiftData
@Model
final class Card {
var front: String
var back: String
var creationDate: Date
init(front: String, back: String, creationDate: Date = .now) {
self.front = front
self.back = back
self.creationDate = creationDate
}
}
On the other hand the following stand alone code (in it's own project) compiles without error. So I am confused and a little fed up with Apple publishing sample code that doesn't compile.
import SwiftData
@Model
final class Card {
var front: String
var back: String
var creationDate: Date
init(front: String, back: String, creationDate: Date = .now) {
self.front = front
self.back = back
self.creationDate = creationDate
}
}
struct ContentView: View {
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
}
.padding()
}
}
#Preview {
ContentView()
}
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("???")
}
}
}
Where can I download the code for this app? I know its listed on the video page, but I would like a link to somewhere to download it
I'm getting a fatal error in a preview:
fatalError in Environment+Objects.swift at line 34.
Anyone any idea how to find this file