Post

Replies

Boosts

Views

Activity

distribution certificate not working
The Apple Distribution certificate is present in the login Keychain, as well as the Development one. In Xcode preferences both are visibile and valid. In Xcode target only the development certificate is present and I'm unable to set the distribution one. For this reason my last app has been refused on the Apple Store Connect. How can I set the distribution certificate on the App target?
0
0
654
Aug ’22
Launch screen images is unpleasant
I agree with Apple Human Interface Guidelines that states "Design a launch screen that’s nearly identical to the first screen of your app", but: A SwiftUI App for both macOS and iOS cannot have a storyboard Launch Screen Images can be scaled only at: 2x/3x, Compact/Regular, iPhone/iPad Launch Screen can have central, top (Navigation bar) and bottom (Tab Bar and Toolbar) images Launch screen images are centered in the screen space Launch screen images are stretched to fill the screen space With the rules above, I'm unable to create launch screens for every screen size. If the image in the asset is sized for a small screen, i.e. an iPhone SE, it will be distorted in a 'long' screen, i.e. an iPhone 14, and viceversa. Have I missed some possibility to better define how to define or manage the launch screen images?
0
0
1.1k
Jan ’23
Substitution for UIPickerView with "Optimised Interface for Mac"
I have a storyboard based project with UIPickerView and I like to port it on the Mac with "Optimised Interface for Mac". My idea was to: In the storyboard disable installation of the UIPickerView for idiom=Mac variation. In the code substitute UIPickerView with SwiftUI Picker. What I obtained is the error: "UIPickerView is not supported when running Catalyst apps in the Mac idiom". This error is caused by the SwiftUI Picker (it is present even if remove UIPickerView and all its references). If both the UIPickerView and the SwiftUI Picker cannot be used in a storyboard based project, how can a generic Picker behaviour be obtained in a storyboard based project compatible with Mac idiom?
1
0
1.9k
Oct ’22
toolbarBackground on macOS full screen
This sample code colorise the navigation bar, but while the window is in fullscreen or in splitView on the Mac, only the left sidebar is colorised. How can be the full navigation bar be colorised also on full screen? var body: some Scene { WindowGroup { NavigationSplitView { ForEach(1..<3) { (i) in Text("\(i)") } } detail: { ForEach(1..<3) { (i) in Text("\(i)") } } .toolbarBackground(.yellow) } }
1
1
666
Apr ’23
Create a template image
I would add a template image at a button to change its color runtime.I used Preview to draw and save it as a pdf.But it is rendered only as a uniform square color (which color I can change runtimne).How can I obtain the template pdf image?Why the pdf saved by Preview is not working?
4
0
4.5k
Aug ’21
Hide StatusBar on iOS 13.5
In iOS 12 and 13, up to 13.4, few lines of codes:navigationController?.navigationBar.isTranslucent = falsenavigationController?.navigationBar.barTintColor = .blacknavigationController?.navigationBar.tintColor = .redallow to hide the status bar under the navigation bar.With swiftUI is perhaps even simpler.statusBar(hidden: hideStatusBar)but it requires to rewrite the whole app from storyboard to swiftUI.Hiding the status bar, or go to full screen, is still be possible without using swiftUI on legacy code?
Topic: UI Frameworks SubTopic: UIKit Tags:
11
0
10k
Oct ’21
iPad document app into Mac app
Since Xcode 11 setting iPad and Mac in General / Deployment Info fo a target enable it to run in iPad as well as in iMac. When I try to run on the iMac a document app, even the very simple one created by the Xcode on its template, it fails with the error: If the app is a document app running it in a Mac fails with the error: [OpenSavePanels] ERROR: Unable to display open panel: your app is missing the User Selected File Read app sandbox entitlement. Please ensure that your app's target capabilities include the proper entitlements. What have to be added in the project to let a document app running on iPad as well as on iMac?
2
2
2k
Apr ’21
bottomBar causes un-satisfied constraints
On Xcode 13.3 and iOS15.4 I don't found a way to add something in the bottom bar without Xcode warning. This sample of swiftUI code: { var body: some View { Text("Hello, World!") .toolbar { ToolbarItem(placement: .bottomBar) { Text("Bottom Bar") } } } } causes: "Unable to simultaneously satisfy constraints." (a long list follows). Am I missing something?
2
0
1.2k
Mar ’22
How to put help book in Xcode project?
I added in the Xcode project: <my App>/ Resources/ <my App>.help/ Content/ Info.plist Resources/ search.helpindex /*localized */ index.html /*localized */ Page1.html /*localized */ And, in the Project's Info.plist: <key>CFBundleHelpBookFolder</key> <string><my App>.help</string> <key>CFBundleHelpBookName</key> <string><project' bundle id>.help</string> But when I archive it, the book help has been moved: <my App>/ Content/ Resources/ Info.plist en.lproj/ search.helpindex index.html Page1.htm So the help book, as is, is missing. If I manually move the files and folders in the Package to reconstruct the help book structure, it works. What I have to do in Xcode to let it archive the Help book?
2
1
1.1k
Jun ’22
SCNNode into SKScene is deformed when hit an object
Into a SKScene, I add a SCNSphere as a child of SKShapeNode, as depicted below. When the sphere hit another node (the fence in the example) the sphere is deformed as it were elastic. I didn't found any information about elastic properties. Someone know a way to avoid the deformation? import SwiftUI import SpriteKit import SceneKit @main struct MyApp: App { var body: some Scene { WindowGroup {SpriteView(scene: GameSceneSK(size: UIScreen.main.bounds.size))} } } class GameSceneSK: SKScene { override func sceneDidLoad() { var fencePoints = [ CGPoint(x: 300, y: 0), CGPoint(x: 300, y: 400), CGPoint(x: 0, y: 400) ] let fence = SKShapeNode(points: &fencePoints, count: fencePoints.count) fence.physicsBody = SKPhysicsBody(edgeChainFrom: fence.path!) addChild(fence) let sphereGeometry = SCNSphere(radius: 20) let sphereNode = SCNNode(geometry: sphereGeometry) let sphereScnScene = SCNScene() sphereScnScene.rootNode.addChildNode(sphereNode) let ball3D = SK3DNode(viewportSize: CGSize(width: 40, height: 40)) ball3D.scnScene = sphereScnScene let ball = SKShapeNode(circleOfRadius: 20) ball.physicsBody = SKPhysicsBody(circleOfRadius: 20) ball.addChild(ball3D) physicsWorld.gravity = CGVector(dx: 0.2, dy: 0.2) addChild(ball) } }
2
0
804
Nov ’24
listRowSeparatorTint not updated
This sample code exhibits two issues: struct ContentView: View { @State private var myColor = Color.red var body: some View { VStack() { List() { Text("Object") Text("Object") Text("Object") .listRowSeparatorTint(myColor) Text("Object") } Button(action:{myColor = Color.green}) {Text("Change color")} } .foregroundColor(myColor) } } the row separator isn't redraws when the @State property change listRowSeparatorTint apply to two lines The first point is really disappointing. Is there anyone which know if this is a bug or there is a more correct way to use listRowSeparatorTint with changing parameter?
2
0
200
Apr ’25
stringsdict doesn't works
The sample code: struct ContentView: View { var count: Int = 0     var body: some View {         VStack { Text("Order \(count) Tickets")         }     } } Apparently don't use the Localizable.stringsdict <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Order %d Tickets</key> <dict> <key>NSStringLocalizedFormatKey</key> <string>%#@Tickets@</string> <key>Tickets</key> <dict> <key>NSStringFormatSpecTypeKey</key> <string>NSStringPluralRuleType</string> <key>NSStringFormatValueTypeKey</key> <string>d</string> <key>zero</key> <string>zero</string> <key>one</key> <string>one</string> <key>other</key> <string>other</string> </dict> </dict> </dict> </plist> What what am I doing wrong?
3
0
1.1k
Dec ’22
swiftui popup opacity in dark mode
On MacOS popups have opacity < 1. in Dark Mode, text on popup over a clear background isn't visible clearly. How to change the opacity of the popup?
Replies
0
Boosts
1
Views
812
Activity
Aug ’22
distribution certificate not working
The Apple Distribution certificate is present in the login Keychain, as well as the Development one. In Xcode preferences both are visibile and valid. In Xcode target only the development certificate is present and I'm unable to set the distribution one. For this reason my last app has been refused on the Apple Store Connect. How can I set the distribution certificate on the App target?
Replies
0
Boosts
0
Views
654
Activity
Aug ’22
Launch screen images is unpleasant
I agree with Apple Human Interface Guidelines that states "Design a launch screen that’s nearly identical to the first screen of your app", but: A SwiftUI App for both macOS and iOS cannot have a storyboard Launch Screen Images can be scaled only at: 2x/3x, Compact/Regular, iPhone/iPad Launch Screen can have central, top (Navigation bar) and bottom (Tab Bar and Toolbar) images Launch screen images are centered in the screen space Launch screen images are stretched to fill the screen space With the rules above, I'm unable to create launch screens for every screen size. If the image in the asset is sized for a small screen, i.e. an iPhone SE, it will be distorted in a 'long' screen, i.e. an iPhone 14, and viceversa. Have I missed some possibility to better define how to define or manage the launch screen images?
Replies
0
Boosts
0
Views
1.1k
Activity
Jan ’23
Full screen without lower line
With "Requires full screen" Split View and Slide Over are disabled but the line on the bottom of the screen remains. How can that line removed as when a video is displayed full screen?
Topic: UI Frameworks SubTopic: General
Replies
0
Boosts
0
Views
276
Activity
Feb ’25
Substitution for UIPickerView with "Optimised Interface for Mac"
I have a storyboard based project with UIPickerView and I like to port it on the Mac with "Optimised Interface for Mac". My idea was to: In the storyboard disable installation of the UIPickerView for idiom=Mac variation. In the code substitute UIPickerView with SwiftUI Picker. What I obtained is the error: "UIPickerView is not supported when running Catalyst apps in the Mac idiom". This error is caused by the SwiftUI Picker (it is present even if remove UIPickerView and all its references). If both the UIPickerView and the SwiftUI Picker cannot be used in a storyboard based project, how can a generic Picker behaviour be obtained in a storyboard based project compatible with Mac idiom?
Replies
1
Boosts
0
Views
1.9k
Activity
Oct ’22
App Store Connect trends has incoherent data
In App Store Connect Trends tab the Sales graph show one sale happened the last day of the period; all other graphs (App Units, Top Apps, Territories) have don't have the corresponding app.
Replies
1
Boosts
0
Views
938
Activity
Oct ’21
toolbarBackground on macOS full screen
This sample code colorise the navigation bar, but while the window is in fullscreen or in splitView on the Mac, only the left sidebar is colorised. How can be the full navigation bar be colorised also on full screen? var body: some Scene { WindowGroup { NavigationSplitView { ForEach(1..<3) { (i) in Text("\(i)") } } detail: { ForEach(1..<3) { (i) in Text("\(i)") } } .toolbarBackground(.yellow) } }
Replies
1
Boosts
1
Views
666
Activity
Apr ’23
Create a template image
I would add a template image at a button to change its color runtime.I used Preview to draw and save it as a pdf.But it is rendered only as a uniform square color (which color I can change runtimne).How can I obtain the template pdf image?Why the pdf saved by Preview is not working?
Replies
4
Boosts
0
Views
4.5k
Activity
Aug ’21
Hide StatusBar on iOS 13.5
In iOS 12 and 13, up to 13.4, few lines of codes:navigationController?.navigationBar.isTranslucent = falsenavigationController?.navigationBar.barTintColor = .blacknavigationController?.navigationBar.tintColor = .redallow to hide the status bar under the navigation bar.With swiftUI is perhaps even simpler.statusBar(hidden: hideStatusBar)but it requires to rewrite the whole app from storyboard to swiftUI.Hiding the status bar, or go to full screen, is still be possible without using swiftUI on legacy code?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
11
Boosts
0
Views
10k
Activity
Oct ’21
iPad document app into Mac app
Since Xcode 11 setting iPad and Mac in General / Deployment Info fo a target enable it to run in iPad as well as in iMac. When I try to run on the iMac a document app, even the very simple one created by the Xcode on its template, it fails with the error: If the app is a document app running it in a Mac fails with the error: [OpenSavePanels] ERROR: Unable to display open panel: your app is missing the User Selected File Read app sandbox entitlement. Please ensure that your app's target capabilities include the proper entitlements. What have to be added in the project to let a document app running on iPad as well as on iMac?
Replies
2
Boosts
2
Views
2k
Activity
Apr ’21
bottomBar causes un-satisfied constraints
On Xcode 13.3 and iOS15.4 I don't found a way to add something in the bottom bar without Xcode warning. This sample of swiftUI code: { var body: some View { Text("Hello, World!") .toolbar { ToolbarItem(placement: .bottomBar) { Text("Bottom Bar") } } } } causes: "Unable to simultaneously satisfy constraints." (a long list follows). Am I missing something?
Replies
2
Boosts
0
Views
1.2k
Activity
Mar ’22
How to put help book in Xcode project?
I added in the Xcode project: <my App>/ Resources/ <my App>.help/ Content/ Info.plist Resources/ search.helpindex /*localized */ index.html /*localized */ Page1.html /*localized */ And, in the Project's Info.plist: <key>CFBundleHelpBookFolder</key> <string><my App>.help</string> <key>CFBundleHelpBookName</key> <string><project' bundle id>.help</string> But when I archive it, the book help has been moved: <my App>/ Content/ Resources/ Info.plist en.lproj/ search.helpindex index.html Page1.htm So the help book, as is, is missing. If I manually move the files and folders in the Package to reconstruct the help book structure, it works. What I have to do in Xcode to let it archive the Help book?
Replies
2
Boosts
1
Views
1.1k
Activity
Jun ’22
SCNNode into SKScene is deformed when hit an object
Into a SKScene, I add a SCNSphere as a child of SKShapeNode, as depicted below. When the sphere hit another node (the fence in the example) the sphere is deformed as it were elastic. I didn't found any information about elastic properties. Someone know a way to avoid the deformation? import SwiftUI import SpriteKit import SceneKit @main struct MyApp: App { var body: some Scene { WindowGroup {SpriteView(scene: GameSceneSK(size: UIScreen.main.bounds.size))} } } class GameSceneSK: SKScene { override func sceneDidLoad() { var fencePoints = [ CGPoint(x: 300, y: 0), CGPoint(x: 300, y: 400), CGPoint(x: 0, y: 400) ] let fence = SKShapeNode(points: &fencePoints, count: fencePoints.count) fence.physicsBody = SKPhysicsBody(edgeChainFrom: fence.path!) addChild(fence) let sphereGeometry = SCNSphere(radius: 20) let sphereNode = SCNNode(geometry: sphereGeometry) let sphereScnScene = SCNScene() sphereScnScene.rootNode.addChildNode(sphereNode) let ball3D = SK3DNode(viewportSize: CGSize(width: 40, height: 40)) ball3D.scnScene = sphereScnScene let ball = SKShapeNode(circleOfRadius: 20) ball.physicsBody = SKPhysicsBody(circleOfRadius: 20) ball.addChild(ball3D) physicsWorld.gravity = CGVector(dx: 0.2, dy: 0.2) addChild(ball) } }
Replies
2
Boosts
0
Views
804
Activity
Nov ’24
listRowSeparatorTint not updated
This sample code exhibits two issues: struct ContentView: View { @State private var myColor = Color.red var body: some View { VStack() { List() { Text("Object") Text("Object") Text("Object") .listRowSeparatorTint(myColor) Text("Object") } Button(action:{myColor = Color.green}) {Text("Change color")} } .foregroundColor(myColor) } } the row separator isn't redraws when the @State property change listRowSeparatorTint apply to two lines The first point is really disappointing. Is there anyone which know if this is a bug or there is a more correct way to use listRowSeparatorTint with changing parameter?
Replies
2
Boosts
0
Views
200
Activity
Apr ’25
stringsdict doesn't works
The sample code: struct ContentView: View { var count: Int = 0     var body: some View {         VStack { Text("Order \(count) Tickets")         }     } } Apparently don't use the Localizable.stringsdict <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Order %d Tickets</key> <dict> <key>NSStringLocalizedFormatKey</key> <string>%#@Tickets@</string> <key>Tickets</key> <dict> <key>NSStringFormatSpecTypeKey</key> <string>NSStringPluralRuleType</string> <key>NSStringFormatValueTypeKey</key> <string>d</string> <key>zero</key> <string>zero</string> <key>one</key> <string>one</string> <key>other</key> <string>other</string> </dict> </dict> </dict> </plist> What what am I doing wrong?
Replies
3
Boosts
0
Views
1.1k
Activity
Dec ’22