Search results for

“translate scheme”

6,670 results found

Post

Replies

Boosts

Views

Activity

Reply to Electron app with Express + Python child processes not running in macOS production build
First up, I want to be clear that I don’t support third-party tools and libraries. I’m gonna provide general guidance here, but if you need help translating that to your chosen tooling then I recommend that you escalate that via the support channel for that tooling. macOS does let you embed a command-line tool in your app and then spawn it as a child process. However, the exact mechanics of this depend on whether your app is sandboxed or not: Mac App Store apps must be sandboxed. For apps that you distribute directly, using Developer ID signing, sandboxing is optional. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Sep ’25
Reply to View presented as sheet are properly updated to correct color scheme
Someone (Andy) showed me a workaround (i guess?) by using the @Environment(.colorScheme) to update the proper color scheme for sheets (see the updated ContentView) BTW I still think this is a SwiftUI issue. Sheets should behave the same way other views are presented. Here is a working version of the sample: import SwiftUI enum AppTheme: Int { case system = 0 case dark = 1 case light = 2 var colorScheme: ColorScheme? { switch self { case .system: return nil case .light: return .light case .dark: return .dark } } } struct SettingsView: View { @AppStorage(theme) var appTheme: AppTheme = .system var body: some View { VStack(spacing: 8) { Button { select(theme: .system) } label: { Text(System) } Button { select(theme: .dark) } label: { Text(Dark) } Button { select(theme: .light) } label: { Text(Light) } } } func select(theme: AppTheme) { appTheme = theme } } struct ContentView: View { @AppStorage(theme) var appTheme: AppTheme = .system @State var isPresented = false @Environment(.colorScheme) var systemCo
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’25
View presented as sheet are properly updated to correct color scheme
I’m facing an issue and I’d like to know if anyone has already run into this. I have a ContentView that presents a SettingsView as a sheet. SettingsView applies a change to the app’s colorScheme. ContentView reacts correctly to the change, and SettingsView does too (so far, so good). What’s strange is that when I set nil on the preferredColorScheme modifier (which, according to the docs, corresponds to the system color scheme), ContentView correctly picks up the change and refreshes, while SettingsView does pick up the change but doesn’t refresh. (In the video you can clearly see that when I switch from Dark to System, the parent view refreshes properly but not the presented sheet.) I’ve tried everything—switching to UIKit, changing the sheet’s ID… nothing works Another strange thing: if I present SettingsView through a NavigationLink, everything works normally… Here is a sample code to reproduce: import SwiftUI enum AppTheme: Int { case system = 0 case dark = 1 case light = 2 var colorScheme: ColorS
2
0
114
Sep ’25
iOS 18 启动崩溃 main_executable_path_missing
Triggered by Thread: 0 Thread 0 Crashed: 0 dyld 0x1a87922b0 lsl::PreallocatedAllocatorLayout<278528ull>::init(char const**, char const**, void*) + 436 1 dyld 0x1a878ba38 start + 1960 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x2010003030100000 x1: 0x0000000fffffc0d0 x2: 0x0000000000000004 x3: 0x00000001a87607a9 x4: 0x0000000000000000 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000 x8: 0x2010003030100000 x9: 0x2010003030100000 x10: 0x000000016d923dfd x11: 0x00000001a87ccf30 x12: 0x0000000000000050 x13: 0x0000000000000044 x14: 0x0000000000052010 x15: 0x0000000000000000 x16: 0x0000000000000000 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x00000001801d0000 x20: 0x000000016d923b50 x21: 0x000000016d923af8 x22: 0x00000001e6184050 x23: 0x000000016d9237d8 x24: 0x0000000fffffc10c x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000000000000000 x28: 0x0000000000000000 fp: 0x000000016d923870 lr: 0xb0228001a8792130 sp: 0x000000016d9237d0 pc: 0x00000001a87922b0 cpsr: 0x
21
0
4.8k
Jan ’25
Reply to iOS folder bookmarks
It feels you are talking here about withoutImplicitSecurityStore creation option instead of withoutImplicitStartAccessing resolving option. No, I'm talking about withoutImplicitStartAccessing. We explicitly say it does not apply to security-scoped bookmarks: This option causes an implicit call to startAccessingSecurityScopedResource() on the returned URL when it’s ready to use the resource. This option isn’t applicable to security-scoped bookmarks. In my tests, withoutImplicitStartAccessing does pretty much what it says on the tin. You're testing on iOS, not macOS. As I said earlier: If it's feasible, I'd recommend testing your code as a native macOS app (not the simulator or in compatibility mode). macOS is better at enforcing the right behavior, so code that works there will generally work on iOS. I'll state that more directly— the internal implementation of iOS means that some things work that really shouldn't. The right approach here is to use macOS as the guide. Breaking down a few specifics: Create a bo
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’25
Reply to iOS folder bookmarks
First off, as a clarification, withoutImplicitStartAccessing does NOT mean don't call startAccessingSecurityScopedResource for me. It feels you are talking here about withoutImplicitSecurityStore creation option instead of withoutImplicitStartAccessing resolving option.. In my tests withoutImplicitStartAccessing does pretty much what is says on the tin. For example: create a bookmark (without specifying neither withoutImplicitSecurityStore nor withSecurityScope persist it somehow (the above test app writes it to user defaults) restart the app resolve bookmark specifying withoutImplicitStartAccessing access the url - that would fail. call startAccessingSecurityScopedResource on it - it returns true access the url again - that will now work if instead of 4 above you resolve the bookmark without specifying withoutImplicitStartAccessing, then access the url - that would work right away. Behind the scenes, what actually happens when you resolve a bookmark is Thanks a lot for those details, it's really helpful to s
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’25
Reply to iOS folder bookmarks
There must be some reason... otherwise we wouldn't have withoutImplicitStartAccessing in the first place ;) First off, as a clarification, withoutImplicitStartAccessing does NOT mean don't call startAccessingSecurityScopedResource for me. To quote the documentation: Bookmarks that you create without security scope automatically carry implicit ephemeral security scope. ... When using this option, other processes can’t call startAccessingSecurityScopedResource on the resolved URL. Behind the scenes, what actually happens when you resolve a bookmark is: You pass the bookmark data to a daemon (ScopedBookmarkAgent). The daemon validates the security scope, resolves the bookmark, then passes the resolved URL back to you. ...and implicit ephemeral security scope is what then allows your app to call startAccessingSecurityScopedResource on the URL it just got. Your app then calls startAccessingSecurityScopedResource to take ownership of the resource. The open/save panel works exactly the same way, except they happen t
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’25
Force a locale from string catalog
I'm writing an iOS app that shares content with buddies. So my app will run in one language but the shared content will use the locale configured for the buddy. I found this Apple documentation which suggests that locale: (Locale(identifier: is the solution. Apple Documentation But I can't get it to work. Here's sample code. struct LocalizationDemoView: View { @State var isEnglish = true var body: some View { var myLocale: String { isEnglish ? en: de } VStack { Toggle(Switch language, isOn: $isEnglish).frame(maxWidth: 200) HStack { Text((myLocale): ) Text(String(localized: Hello world!, locale: (Locale(identifier: myLocale)), comment: To share)) } } } } And here's the excerpt from the string catalog: { sourceLanguage : en, strings : { Hello world! : { comment : To share, localizations : { de : { stringUnit : { state : translated, value : 🇩🇪 Moin Welt! } }, en : { stringUnit : { state : translated, value : 🇬🇧 Hello world! } } } } } } Has Apple reduced support for string catalogs or is my
4
0
339
Aug ’25
Reply to After submitting the DMG signature, a prompt indicating that it comes from an unidentified developer still appears when downloading and installing.
Sadly, I can’t read Chinese, so I’m answering based on a machine translation. It sounds like your goal is to create a Mac product to distribute directly, using Developer ID signing. If so, there are three basic steps: Created a Developer ID signed version of your product. Submit that for notarisation. On successful notarisation, staple the resulting ticket to your product [1]. We have documentation that covers all of this. A good place to start is: Creating distribution-signed code for macOS Packaging Mac software for distribution Once you’ve done these steps, I recommend that you test your product using the process described in Testing a Notarised Product. If you continue to have Gatekeeper problems, I have lots of advice on how to investigate that in Resolving Trusted Execution Problems. Finally, see the following forums posts for links to even more info: Notarisation Resources Code Signing Resources Trusted Execution Resources. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @
Aug ’25
About region detection in the iBeacon app
We plan to use signals emitted from iBeacon to perform region detection in an app currently under development. We would like to know if region detection (didEnterRegion) can be performed when the app is in certain states. Region detection must be performed reliably. Is it possible to perform region detection in all of the following situations? • When the app is in the foreground • When the app is in the background • When the app is force-closed • When the smartphone is in sleep mode • When the smartphone is restarted Translated with DeepL.com (free version)
2
0
111
Aug ’25
Toolbar tint color with Liquid Glass
I'm adapting a UIKit app to work with Liquid Glass. In pre-Liquid Glass days, the application window had a tintColor that was passed down to all of its descendant views, resulting in toolbar buttons that match the app's color scheme. In iOS 26, my toolbar buttons are always black, no matter what. I've tried setting the UIBarButtonItem#tintColor on the button and setting UIBarButtonAppearanc#tintColor. The buttons are still black. What am I doing wrong? I see a tintColor modifier for SwiftUI toolbar buttons, so it seems like maybe you can do this with SwiftUI. Many of the built-in apps on iOS 26 beta have only black toolbar buttons - is it not possible to change the toolbar button tint color on iOS 26?
Topic: UI Frameworks SubTopic: General
1
0
516
Aug ’25
Reply to Learn to code / beginner
Welcome to the forum. A first comment: edit your text to make each question clear and post easier to read. And avoid asking so many questions on so different topics. Anyway, I'll try to provide some answers. Q1: How should I best start learning? For example, is Swift Playgrounds the right first step? My personal advice: start with tutorials from Apple like 'Develop in Swift fundamentals'. Or go and visit https://developer.apple.com/pathways/. If you want to learn SwiftUI, select it. Q2: How should I continue afterwards to gain further knowledge, possibly in areas like system architecture, cybersecurity, or cloud computing (even though I don’t want to commit too early to one direction)? You will find resources here again: https://developer.apple.com/pathways/. My advice to continue, after step 1, is to imagine and develop a complete (yet simple) app. That's how you will put what you learned in practice. And then, each time you fall on a problem, ask the forum for help. Q3: Can you recommend a learning schedule
Aug ’25
Reply to GKLeaderboard.LoadLeaderboards() return empty when testing on Xcode with local gamekit file (Unity)
I fixed that by enabling Debug mode from Edit Scheme- Options - Enable Debug Mode
Topic: Graphics & Games SubTopic: GameKit Tags:
Replies
Boosts
Views
Activity
Sep ’25
How to exit an app developed on VisionPro using code?
I developed an app on VisionPro and created a button that allows users to exit the app instead of being forced to exit. I use the ”exit (0)“ scheme to exit the application, but when I re-enter, the loaded window is not the initial window, so is there any relevant code that can be used? Thank you
Replies
1
Boosts
0
Views
362
Activity
Sep ’25
Reply to Electron app with Express + Python child processes not running in macOS production build
First up, I want to be clear that I don’t support third-party tools and libraries. I’m gonna provide general guidance here, but if you need help translating that to your chosen tooling then I recommend that you escalate that via the support channel for that tooling. macOS does let you embed a command-line tool in your app and then spawn it as a child process. However, the exact mechanics of this depend on whether your app is sandboxed or not: Mac App Store apps must be sandboxed. For apps that you distribute directly, using Developer ID signing, sandboxing is optional. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Replies
Boosts
Views
Activity
Sep ’25
Reply to View presented as sheet are properly updated to correct color scheme
Someone (Andy) showed me a workaround (i guess?) by using the @Environment(.colorScheme) to update the proper color scheme for sheets (see the updated ContentView) BTW I still think this is a SwiftUI issue. Sheets should behave the same way other views are presented. Here is a working version of the sample: import SwiftUI enum AppTheme: Int { case system = 0 case dark = 1 case light = 2 var colorScheme: ColorScheme? { switch self { case .system: return nil case .light: return .light case .dark: return .dark } } } struct SettingsView: View { @AppStorage(theme) var appTheme: AppTheme = .system var body: some View { VStack(spacing: 8) { Button { select(theme: .system) } label: { Text(System) } Button { select(theme: .dark) } label: { Text(Dark) } Button { select(theme: .light) } label: { Text(Light) } } } func select(theme: AppTheme) { appTheme = theme } } struct ContentView: View { @AppStorage(theme) var appTheme: AppTheme = .system @State var isPresented = false @Environment(.colorScheme) var systemCo
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’25
View presented as sheet are properly updated to correct color scheme
I’m facing an issue and I’d like to know if anyone has already run into this. I have a ContentView that presents a SettingsView as a sheet. SettingsView applies a change to the app’s colorScheme. ContentView reacts correctly to the change, and SettingsView does too (so far, so good). What’s strange is that when I set nil on the preferredColorScheme modifier (which, according to the docs, corresponds to the system color scheme), ContentView correctly picks up the change and refreshes, while SettingsView does pick up the change but doesn’t refresh. (In the video you can clearly see that when I switch from Dark to System, the parent view refreshes properly but not the presented sheet.) I’ve tried everything—switching to UIKit, changing the sheet’s ID… nothing works Another strange thing: if I present SettingsView through a NavigationLink, everything works normally… Here is a sample code to reproduce: import SwiftUI enum AppTheme: Int { case system = 0 case dark = 1 case light = 2 var colorScheme: ColorS
Replies
2
Boosts
0
Views
114
Activity
Sep ’25
iOS 18 启动崩溃 main_executable_path_missing
Triggered by Thread: 0 Thread 0 Crashed: 0 dyld 0x1a87922b0 lsl::PreallocatedAllocatorLayout<278528ull>::init(char const**, char const**, void*) + 436 1 dyld 0x1a878ba38 start + 1960 Thread 0 crashed with ARM Thread State (64-bit): x0: 0x2010003030100000 x1: 0x0000000fffffc0d0 x2: 0x0000000000000004 x3: 0x00000001a87607a9 x4: 0x0000000000000000 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000000 x8: 0x2010003030100000 x9: 0x2010003030100000 x10: 0x000000016d923dfd x11: 0x00000001a87ccf30 x12: 0x0000000000000050 x13: 0x0000000000000044 x14: 0x0000000000052010 x15: 0x0000000000000000 x16: 0x0000000000000000 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x00000001801d0000 x20: 0x000000016d923b50 x21: 0x000000016d923af8 x22: 0x00000001e6184050 x23: 0x000000016d9237d8 x24: 0x0000000fffffc10c x25: 0x0000000000000000 x26: 0x0000000000000000 x27: 0x0000000000000000 x28: 0x0000000000000000 fp: 0x000000016d923870 lr: 0xb0228001a8792130 sp: 0x000000016d9237d0 pc: 0x00000001a87922b0 cpsr: 0x
Replies
21
Boosts
0
Views
4.8k
Activity
Jan ’25
Reply to View presented as sheet are properly updated to correct color scheme
BTW there is a missing word in the title. The correct title should be: View presented as sheet are NOT properly updated to correct color scheme
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to iOS folder bookmarks
It feels you are talking here about withoutImplicitSecurityStore creation option instead of withoutImplicitStartAccessing resolving option. No, I'm talking about withoutImplicitStartAccessing. We explicitly say it does not apply to security-scoped bookmarks: This option causes an implicit call to startAccessingSecurityScopedResource() on the returned URL when it’s ready to use the resource. This option isn’t applicable to security-scoped bookmarks. In my tests, withoutImplicitStartAccessing does pretty much what it says on the tin. You're testing on iOS, not macOS. As I said earlier: If it's feasible, I'd recommend testing your code as a native macOS app (not the simulator or in compatibility mode). macOS is better at enforcing the right behavior, so code that works there will generally work on iOS. I'll state that more directly— the internal implementation of iOS means that some things work that really shouldn't. The right approach here is to use macOS as the guide. Breaking down a few specifics: Create a bo
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to iOS folder bookmarks
First off, as a clarification, withoutImplicitStartAccessing does NOT mean don't call startAccessingSecurityScopedResource for me. It feels you are talking here about withoutImplicitSecurityStore creation option instead of withoutImplicitStartAccessing resolving option.. In my tests withoutImplicitStartAccessing does pretty much what is says on the tin. For example: create a bookmark (without specifying neither withoutImplicitSecurityStore nor withSecurityScope persist it somehow (the above test app writes it to user defaults) restart the app resolve bookmark specifying withoutImplicitStartAccessing access the url - that would fail. call startAccessingSecurityScopedResource on it - it returns true access the url again - that will now work if instead of 4 above you resolve the bookmark without specifying withoutImplicitStartAccessing, then access the url - that would work right away. Behind the scenes, what actually happens when you resolve a bookmark is Thanks a lot for those details, it's really helpful to s
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Aug ’25
Reply to iOS folder bookmarks
There must be some reason... otherwise we wouldn't have withoutImplicitStartAccessing in the first place ;) First off, as a clarification, withoutImplicitStartAccessing does NOT mean don't call startAccessingSecurityScopedResource for me. To quote the documentation: Bookmarks that you create without security scope automatically carry implicit ephemeral security scope. ... When using this option, other processes can’t call startAccessingSecurityScopedResource on the resolved URL. Behind the scenes, what actually happens when you resolve a bookmark is: You pass the bookmark data to a daemon (ScopedBookmarkAgent). The daemon validates the security scope, resolves the bookmark, then passes the resolved URL back to you. ...and implicit ephemeral security scope is what then allows your app to call startAccessingSecurityScopedResource on the URL it just got. Your app then calls startAccessingSecurityScopedResource to take ownership of the resource. The open/save panel works exactly the same way, except they happen t
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Aug ’25
Force a locale from string catalog
I'm writing an iOS app that shares content with buddies. So my app will run in one language but the shared content will use the locale configured for the buddy. I found this Apple documentation which suggests that locale: (Locale(identifier: is the solution. Apple Documentation But I can't get it to work. Here's sample code. struct LocalizationDemoView: View { @State var isEnglish = true var body: some View { var myLocale: String { isEnglish ? en: de } VStack { Toggle(Switch language, isOn: $isEnglish).frame(maxWidth: 200) HStack { Text((myLocale): ) Text(String(localized: Hello world!, locale: (Locale(identifier: myLocale)), comment: To share)) } } } } And here's the excerpt from the string catalog: { sourceLanguage : en, strings : { Hello world! : { comment : To share, localizations : { de : { stringUnit : { state : translated, value : 🇩🇪 Moin Welt! } }, en : { stringUnit : { state : translated, value : 🇬🇧 Hello world! } } } } } } Has Apple reduced support for string catalogs or is my
Replies
4
Boosts
0
Views
339
Activity
Aug ’25
Reply to After submitting the DMG signature, a prompt indicating that it comes from an unidentified developer still appears when downloading and installing.
Sadly, I can’t read Chinese, so I’m answering based on a machine translation. It sounds like your goal is to create a Mac product to distribute directly, using Developer ID signing. If so, there are three basic steps: Created a Developer ID signed version of your product. Submit that for notarisation. On successful notarisation, staple the resulting ticket to your product [1]. We have documentation that covers all of this. A good place to start is: Creating distribution-signed code for macOS Packaging Mac software for distribution Once you’ve done these steps, I recommend that you test your product using the process described in Testing a Notarised Product. If you continue to have Gatekeeper problems, I have lots of advice on how to investigate that in Resolving Trusted Execution Problems. Finally, see the following forums posts for links to even more info: Notarisation Resources Code Signing Resources Trusted Execution Resources. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @
Replies
Boosts
Views
Activity
Aug ’25
About region detection in the iBeacon app
We plan to use signals emitted from iBeacon to perform region detection in an app currently under development. We would like to know if region detection (didEnterRegion) can be performed when the app is in certain states. Region detection must be performed reliably. Is it possible to perform region detection in all of the following situations? • When the app is in the foreground • When the app is in the background • When the app is force-closed • When the smartphone is in sleep mode • When the smartphone is restarted Translated with DeepL.com (free version)
Replies
2
Boosts
0
Views
111
Activity
Aug ’25
Toolbar tint color with Liquid Glass
I'm adapting a UIKit app to work with Liquid Glass. In pre-Liquid Glass days, the application window had a tintColor that was passed down to all of its descendant views, resulting in toolbar buttons that match the app's color scheme. In iOS 26, my toolbar buttons are always black, no matter what. I've tried setting the UIBarButtonItem#tintColor on the button and setting UIBarButtonAppearanc#tintColor. The buttons are still black. What am I doing wrong? I see a tintColor modifier for SwiftUI toolbar buttons, so it seems like maybe you can do this with SwiftUI. Many of the built-in apps on iOS 26 beta have only black toolbar buttons - is it not possible to change the toolbar button tint color on iOS 26?
Topic: UI Frameworks SubTopic: General
Replies
1
Boosts
0
Views
516
Activity
Aug ’25
Reply to Learn to code / beginner
Welcome to the forum. A first comment: edit your text to make each question clear and post easier to read. And avoid asking so many questions on so different topics. Anyway, I'll try to provide some answers. Q1: How should I best start learning? For example, is Swift Playgrounds the right first step? My personal advice: start with tutorials from Apple like 'Develop in Swift fundamentals'. Or go and visit https://developer.apple.com/pathways/. If you want to learn SwiftUI, select it. Q2: How should I continue afterwards to gain further knowledge, possibly in areas like system architecture, cybersecurity, or cloud computing (even though I don’t want to commit too early to one direction)? You will find resources here again: https://developer.apple.com/pathways/. My advice to continue, after step 1, is to imagine and develop a complete (yet simple) app. That's how you will put what you learned in practice. And then, each time you fall on a problem, ask the forum for help. Q3: Can you recommend a learning schedule
Replies
Boosts
Views
Activity
Aug ’25