Post

Replies

Boosts

Views

Activity

Reply to Creator Codes
What code do you mean precisely ? Now, all apps which are published or notarised get a unique ID. This ID "knows" about the developer identifier. So, AFAIU, that contains somehow the "creator code". PS: why do you mind ?
Oct ’24
Reply to My macOS game was rejected because it requires login. iOS app approved. It is a multiplayer game and a user has to be identified to play the game
My response: Which features are not account-based? Only you can tell.   You need an account to play the game. That's the problem. The rule is that user must be able to test the app before creating an account (even more if it is a paying app). We don't know your game, so it's just a guess. Could you allow user to play as guest, with limitations : level of gold always restarts at 0, you can only jump from level 1 to 2… ? And finally, did you request a 30-minute online meeting with an App Review expert to discuss the guidelines and best practices for a smooth review process.
Oct ’24
Reply to preferredColorScheme not working with Xcode 16
@GRALInfo Thanks for this additional testing. Using AppStorage (for a simple Bool) was an early design decision as the property isDarkMode is used in many views. So I could effectively use an environment variable and initialise in .onAppear or in an init(). I'll go this way if the bug is not corrected (I now definitely think it is an Xcode 16 regression). But falling on such issues in development environment is making me a bit nervous, wondering what else may be broken ? @VisionPro Thanks for the link. It is another way of doing it, but that denies the simplicity of AppStorage. If it is not corrected in a future Xcode release, does it mean that AppStorage is on obsolescence path ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to preferredColorScheme not working with Xcode 16
@GRALInfo, thanks for the test and the information. Effectively that could be an incompatibility with MacOS < 15. Which nevertheless is an issue, if we cannot keep the apps running correctly on not so older OS versions. To fully assess the point, would you have the opportunity to test the app produced by Xcode 16 on an older OS ? I'll post the answer if I get from FB.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to preferredColorScheme not working with Xcode 16
I created a minimal project in Xcode 15.3 to reproduce the issue (run on MacOS 14.7). When compiled with Xcode 15.3, the toggle switches from light to dark mode. When compiled with Xcode 16 (16.0 or 16.1ß3), the toggle has no effect. I attached the complete project to FB report. import SwiftUI @main struct DarkModeTest_MacApp: App { @AppStorage("isDarkMode") private var isDarkMode = false var body: some Scene { WindowGroup { ContentView() .frame( minWidth: 300, maxWidth: .infinity, minHeight: 200, maxHeight: .infinity) .preferredColorScheme(isDarkMode ? .dark : .light) } .windowResizability(.contentSize) } } import SwiftUI struct ContentView: View { @AppStorage("isDarkMode") private var isDarkMode = false var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") Button(action: { isDarkMode.toggle() }) { Text("Toggle") } } .padding() } } #Preview { ContentView() } Additional information: It works on iPad (simulator).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to preferredColorScheme not working with Xcode 16
I tried with 16.1ß3, same issues. However, if I set the background manually on a view (with colors that mimic the preferredScheme), it works: .background(isDarkMode ? Color.veryDarkGray : `Color.lightGray)` But having to do it on any subview is not a viable solution. So for the time being I stay with 15.3, but that's not a sustainable option either. Could it be a compatibility issue between Xcode 16.x and MacOS 14.y ?   Also, are you able to try with macOS 15.1? This is a Mac app, right? I cannot try with MacOS 15 at this time. And in any case, app has to run on versions below (down to MacOS 12 in fact), so that would not solve the problem. The app (SwiftUI) runs on MacOS and iOS I also tested the app by setting the Mac to dark mode. App does not adapt to dark. So it is just as if, with Xcode 16, preferredColorScheme was ignored. Could it come from AppStorage (but once again, it worked in Xcode 15).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to preferredColorScheme not working with Xcode 16
I tried to change the colorScheme as exposed here: https://stackoverflow.com/questions/61912363/swiftui-how-to-implement-dark-mode-toggle-and-refresh-all-views Or to create a State var from the AppStorage… But I understood that AppStorage is already a State var, so that should not be needed. To no avail. The View background remains unchanged but some subviews get changed… And anyway, that would not explain the difference between Xcode 15 and 16… Tested in Xcode 16.1ß1 without success.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to SwiftUI conditional modifier depending on OS type and version
I found a simple answer here: https://stackoverflow.com/questions/74300019/how-to-use-if-available-in-main-in-a-documentgroup-application Just enclose in a func: struct TheApp: App { var body: some Scene { conditionalScene() } #if os(macOS) func conditionalScene() -> some Scene { if #available(macOS 13.0, *) { WindowGroup { ContentView() .frame( minWidth: 1200, maxWidth: .infinity, minHeight: 600, maxHeight: .infinity) } .windowResizability(.contentSize) // Only here } else { WindowGroup { ContentView() .frame( minWidth: 1200, maxWidth: .infinity, minHeight: 600, maxHeight: .infinity) } } } #else // iOS func conditionalScene() -> some Scene { if #available(iOS 17.0, *) { WindowGroup { ContentView() .frame( minWidth: 1200, maxWidth: .infinity, minHeight: 600, maxHeight: .infinity) } .windowResizability(.contentSize) // Only here } else { WindowGroup { ContentView() .frame( minWidth: 1200, maxWidth: .infinity, minHeight: 600, maxHeight: .infinity) } } } #endif // test of OS } // App
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to Creator Codes
What code do you mean precisely ? Now, all apps which are published or notarised get a unique ID. This ID "knows" about the developer identifier. So, AFAIU, that contains somehow the "creator code". PS: why do you mind ?
Replies
Boosts
Views
Activity
Oct ’24
Reply to Button icon in List to match style?
The mechanism for style in containers is deep into Swift design. So it is unlikely to change. Replacing List by ScrollView should give you what you're looking for.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Rejected Due to 4.3(a) Design - Spam
Did you explain this very clearly in the comments to reviewer ? With proof that you were effectively the owner of the other account ?
Replies
Boosts
Views
Activity
Oct ’24
Reply to XCode 16.0 : An Internal Error Occurred Editing functionality may be limited
Welcome to the forum. Please explain when and how this occurs. Is is UIKit, in storyboard ? SwiftUI ?
Replies
Boosts
Views
Activity
Oct ’24
Reply to preferredColorScheme not working with Xcode 16
@Vision Pro engineer So, would this statement be correct ? To work properly, SwiftUI with Xcode 16 requires at least macOS 15 If so, it should be in the release notes, at least as a known issue.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to My macOS game was rejected because it requires login. iOS app approved. It is a multiplayer game and a user has to be identified to play the game
My response: Which features are not account-based? Only you can tell.   You need an account to play the game. That's the problem. The rule is that user must be able to test the app before creating an account (even more if it is a paying app). We don't know your game, so it's just a guess. Could you allow user to play as guest, with limitations : level of gold always restarts at 0, you can only jump from level 1 to 2… ? And finally, did you request a 30-minute online meeting with an App Review expert to discuss the guidelines and best practices for a smooth review process.
Replies
Boosts
Views
Activity
Oct ’24
Reply to preferredColorScheme not working with Xcode 16
@GRALInfo Thanks for this additional testing. Using AppStorage (for a simple Bool) was an early design decision as the property isDarkMode is used in many views. So I could effectively use an environment variable and initialise in .onAppear or in an init(). I'll go this way if the bug is not corrected (I now definitely think it is an Xcode 16 regression). But falling on such issues in development environment is making me a bit nervous, wondering what else may be broken ? @VisionPro Thanks for the link. It is another way of doing it, but that denies the simplicity of AppStorage. If it is not corrected in a future Xcode release, does it mean that AppStorage is on obsolescence path ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Xcode 15 without apple.
Welcome to the forum @calmnight. Yes you can. You will find any version of Xcode for download here, as well as useful information: https://xcodereleases.com
Replies
Boosts
Views
Activity
Oct ’24
Reply to preferredColorScheme not working with Xcode 16
@GRALInfo, thanks for the test and the information. Effectively that could be an incompatibility with MacOS < 15. Which nevertheless is an issue, if we cannot keep the apps running correctly on not so older OS versions. To fully assess the point, would you have the opportunity to test the app produced by Xcode 16 on an older OS ? I'll post the answer if I get from FB.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to preferredColorScheme not working with Xcode 16
I created a minimal project in Xcode 15.3 to reproduce the issue (run on MacOS 14.7). When compiled with Xcode 15.3, the toggle switches from light to dark mode. When compiled with Xcode 16 (16.0 or 16.1ß3), the toggle has no effect. I attached the complete project to FB report. import SwiftUI @main struct DarkModeTest_MacApp: App { @AppStorage("isDarkMode") private var isDarkMode = false var body: some Scene { WindowGroup { ContentView() .frame( minWidth: 300, maxWidth: .infinity, minHeight: 200, maxHeight: .infinity) .preferredColorScheme(isDarkMode ? .dark : .light) } .windowResizability(.contentSize) } } import SwiftUI struct ContentView: View { @AppStorage("isDarkMode") private var isDarkMode = false var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") Button(action: { isDarkMode.toggle() }) { Text("Toggle") } } .padding() } } #Preview { ContentView() } Additional information: It works on iPad (simulator).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to app审核被拒绝回来,提示这个要怎么解决
So, what is your question ? Just do what reviewer asked to do.
Replies
Boosts
Views
Activity
Oct ’24
Reply to preferredColorScheme not working with Xcode 16
I tried with 16.1ß3, same issues. However, if I set the background manually on a view (with colors that mimic the preferredScheme), it works: .background(isDarkMode ? Color.veryDarkGray : `Color.lightGray)` But having to do it on any subview is not a viable solution. So for the time being I stay with 15.3, but that's not a sustainable option either. Could it be a compatibility issue between Xcode 16.x and MacOS 14.y ?   Also, are you able to try with macOS 15.1? This is a Mac app, right? I cannot try with MacOS 15 at this time. And in any case, app has to run on versions below (down to MacOS 12 in fact), so that would not solve the problem. The app (SwiftUI) runs on MacOS and iOS I also tested the app by setting the Mac to dark mode. App does not adapt to dark. So it is just as if, with Xcode 16, preferredColorScheme was ignored. Could it come from AppStorage (but once again, it worked in Xcode 15).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Guideline 3.2.2
Guideline is very clear. As the issue was detected during review, you have to comply and remove the ads. The fact that other apps do it is never an argument for the reviewer. And may be those apps will fail a future review.
Replies
Boosts
Views
Activity
Oct ’24
Reply to preferredColorScheme not working with Xcode 16
I tried to change the colorScheme as exposed here: https://stackoverflow.com/questions/61912363/swiftui-how-to-implement-dark-mode-toggle-and-refresh-all-views Or to create a State var from the AppStorage… But I understood that AppStorage is already a State var, so that should not be needed. To no avail. The View background remains unchanged but some subviews get changed… And anyway, that would not explain the difference between Xcode 15 and 16… Tested in Xcode 16.1ß1 without success.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to SwiftUI conditional modifier depending on OS type and version
I found a simple answer here: https://stackoverflow.com/questions/74300019/how-to-use-if-available-in-main-in-a-documentgroup-application Just enclose in a func: struct TheApp: App { var body: some Scene { conditionalScene() } #if os(macOS) func conditionalScene() -> some Scene { if #available(macOS 13.0, *) { WindowGroup { ContentView() .frame( minWidth: 1200, maxWidth: .infinity, minHeight: 600, maxHeight: .infinity) } .windowResizability(.contentSize) // Only here } else { WindowGroup { ContentView() .frame( minWidth: 1200, maxWidth: .infinity, minHeight: 600, maxHeight: .infinity) } } } #else // iOS func conditionalScene() -> some Scene { if #available(iOS 17.0, *) { WindowGroup { ContentView() .frame( minWidth: 1200, maxWidth: .infinity, minHeight: 600, maxHeight: .infinity) } .windowResizability(.contentSize) // Only here } else { WindowGroup { ContentView() .frame( minWidth: 1200, maxWidth: .infinity, minHeight: 600, maxHeight: .infinity) } } } #endif // test of OS } // App
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24