Am I wrong or is it not possible to share Core Data+CloudKit with a keyboard extension?
It works if I set an app group but then I lose the CloudKit sync feature, which is not acceptable for me.
Is there some other way to share the data while keeping sync?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
So I've started using TestFlight for Mac but unlike its iOS counterpart, it seems like every single build uploaded and pushed to testers has to be reviewed by Apple.
This is not how that works on the iOS side.
Ex:
MyApp 4.1 build 1 -> Review required for both iOS and Mac
MyApp 4.1 build 2 -> Review required for Mac, not iOS
Is this a bug or by design? If so, this is crazy!
Like title says. Why make users jump through hoops on macOS to redeem a code while it's trivial on iOS?
At least make the button open the Mac App Store app to the redeem sheet!
FB13202274
It seems like some UI elements just don't use the preferred color scheme of their parent element:
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
Button("Hold Me") { }
.contextMenu(ContextMenu(menuItems: {
Button("I should be dark") { }
}))
}
.padding()
.preferredColorScheme(.dark)
}
}
If you set the device appearance to dark, then the context menu shows the correct color scheme.
Setting .preferredColorScheme(.dark) to Button directly doesn't help.
Aside from context menus, this applies to all sorts of elements: popovers, alerts, tips, ...
Is there a workaround for this?
Apple folks: FB13391355
That's a new one for me. I have submitted 2 IAP along with an update for my app. The Mac binary was approved but then one of the IAP was rejected with this message:
"We have returned your IAP product/s to you as the required binary was not submitted. When you are ready to submit the binary, please resubmit the IAPs with the binary."
I'm not sure what this means as the related binary is actually waiting for review.
What does this error means and how can I fix it?
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Store
App Store Connect
I'm uncertain about the reason behind Transaction.currentEntitlements not returning nil when there are no current entitlements.
The challenge I'm facing is that, in the scenario where a trial period concludes, Transaction.currentEntitlements seems to perpetually withhold any response, leaving me without a means to discern the conclusion of the trial.
I'm puzzled as to why this method doesn't simply return nil when no entitlements are detected. It would be immensely helpful if someone could shed light on the rationale behind this behavior or point out any potential errors in my understanding.
Your insights would be greatly appreciated. Thanks.
I'm trying to apply a glass effect on a circle stroke but all it does is apply it to the circle itself and not the stroke:
import SwiftUI
let kCarouselCircleSize: CGFloat = 150
let kCarouselOpacity: Double = 0.3
let kCarouselStrokeWidth: CGFloat = 60
struct ContentView: View {
@State var showing = false
var body: some View {
VStack(spacing: 60) {
Text("ultraThinMaterial:")
.font(.title)
CarouseCircle(drawProgress: 0.7, isActive: false)
Text("glassEffect()")
.font(.title)
CarouseCircle(useGlassEffect: true, drawProgress: 0.7, isActive: false)
}
.background(content: {
Image(.background2)
})
.padding()
}
}
struct CarouseCircle: View {
var size: CGFloat = kCarouselCircleSize
var strokeWidth: CGFloat = kCarouselStrokeWidth
var useGlassEffect: Bool = false
var drawProgress: CGFloat
var isActive: Bool
var body: some View {
if useGlassEffect {
Circle()
.trim(from: 0, to: drawProgress)
.fill(.clear)
.stroke(.blue, style: StrokeStyle(lineWidth: strokeWidth, lineCap: .round))
.frame(width: size, height: size)
.glassEffect()
.shadow(color: .black.opacity(kCarouselOpacity), radius: isActive ? 4 : 1, x: 0, y: 0)
.rotationEffect(.degrees(-90)) // Start drawing at button 1's position
} else {
Circle()
.trim(from: 0, to: drawProgress)
.fill(.clear)
.stroke(.ultraThinMaterial, style: StrokeStyle(lineWidth: strokeWidth, lineCap: .round))
.frame(width: size, height: size)
.shadow(color: .black.opacity(kCarouselOpacity), radius: isActive ? 4 : 1, x: 0, y: 0)
.rotationEffect(.degrees(-90)) // Start drawing at button 1's position
}
}
}
Here's the result:
Is this supported, a bug or something I'm doing wrong?
I have a list of navigation links that I want to be draggable. However, it seems like onDrag conflicts with mouse clicks on macOS (iOS is fine).
Here's some sample code:
swift
import SwiftUI
struct ContentView: View {
var items = ["Peter", "Mark", "Joe", "Frank", "Tim"]
@State var selected: String?
var body: some View {
NavigationView {
List {
ForEach(items, id: \.self) { item in
NavigationLink(destination: Text(item), tag: item, selection: $selected, label: {
Text(item)
.onDrag { () - NSItemProvider in
return NSItemProvider(object: String(item) as NSString)
}
})
}
}
Text("")
}
}
}
Here's the weird part: if you click on the text, the item doesn't get selected and the link seems disabled. However, if you click on a section of the item that is empty, then it works!
Again, this works just fine on iOS. Is this a SwiftUI bug/limitation or am I doing it wrong?
Thanks!
I'm able to retrieve the URL for iCloud Drive but what I want to do is store my app documents in the "On My iPad" / MyApp.
Using FileManager.default.urls(for: .documentDirectory, in: .userDomainMask) just returns the document folder for the app container.
How can I access the public folder?
Thanks!
As of now, it seems impossible to set focus on a text field that is embedded in an alert on macOS.
struct ContentView: View {
@FocusState private var focusedField: FocusField?
@State private var showingAlert = false
@State private var name = ""
enum FocusField {
case folderName
}
var body: some View {
VStack {
Button {
// focusedField = .folderName // Not working either
showingAlert.toggle()
} label: {
Text("Show alert")
}
.alert("Alert", isPresented: $showingAlert, actions: {
TextField("Name", text: $name)
.font(.body)
.autocorrectionDisabled()
.focused($focusedField, equals: .folderName)
Button("Cancel", role: .cancel, action: {})
})
#if os(macOS)
.defaultFocus($focusedField, .folderName)
#endif
}
.padding()
}
}
When running this code on iOS, the text field does get focus automatically. Is it me that is doing something wrong or it's just a SwiftUI shortcoming on macOS?
It seems like there's no way to set a placeholder in a text field when it is in a form on macOS. This is not an issue on iOS.
import SwiftUI
struct ContentView: View {
@State private var textUp = ""
@State private var textDown = ""
var body: some View {
VStack {
Form {
Text("In a form:")
.fontWeight(.bold)
TextField("placeholder", text: $textUp)
}
Text("Not in a form:")
.fontWeight(.bold)
TextField("placeholder", text: $textDown)
}
.padding()
}
}
Am I missing something or is this just not supported?
I'm trying to display a Label in a TableColumn but the header is not rendered properly:
Here's some code:
struct Computer: Identifiable {
let id: UUID
let name: String
init(_ name: String) {
id = UUID()
self.name = name
}
}
struct ContentView: View {
private var computers = [Computer("iMac"), Computer("MacBook"), Computer("Mac mini")]
@State private var selectedComputers = Set<Computer.ID>()
@State private var sortOrder = [KeyPathComparator(\Computer.name)]
var body: some View {
Table(computers, selection: $selectedComputers, sortOrder: $sortOrder) {
// Header rendered incorrectly
TableColumn("Name", value: \.name) { computer in
Label(computer.name, systemImage: "desktopcomputer")
}
// This works:
// TableColumn("Name", value: \.name)
}
}
}
If I use a Text element instead (or not define any custom view for the TableColumn), the header is rendered properly:
Am I doing it wrong or this is a bug?
Is there no way to hide the pointer with SwiftUI? If so, how?
Calling StoreKit.Transaction.currentEntitlements today just doesn't return. It just sits there.
for await result in StoreKit.Transaction.currentEntitlements {
switch result {
case .verified(let transaction):
currentTransaction = transaction
case .unverified(let transaction, let error):
currentTransaction = transaction
}
}
The for loop never starts.
This is using a Sandboxed user that made a renewal subscription purchase. Everything was working fine yesterday. Nothing on my end has changed since then.
Is something wrong with StoreKit?
Like the title says. Can you submit an app update and release it while the app is in pre-order?
I would assume that yes it is possible but I've never used pre-orders so I'd like to know if anyone here knows...
Thanks!
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Store
App Store Connect
Mac App Store