Delve into the world of built-in app and system services available to developers. Discuss leveraging these services to enhance your app's functionality and user experience.

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

Command to open Privacy & Security page in System Settings on Security section
Hello, I'm trying to add a working shortcut to my app that will open a Privacy & Security page in System Settings under Security section where prompts to allow system extension appears. Typically open x-apple.systempreferences:com.apple.settings.PrivacySecurity.extension from the Terminal only open the Privacy & Security page. I want to emulate the button from this system window.
1
0
542
Oct ’24
[iOS18]My apps do not appear in the shortcut apps.
It is no longer displayed as a target for shortcut app actions. It was displayed until iOS 17.7. Tried with iOS 18.0 and 18.0.1 but it does not appear. Shortcuts created when under iOS 18 work fine. Only INPlayMediaIntent is supported and is targeted at iOS 15 and above, so no Extension is used and is handled directly in the app. Is anyone else suffering from the same problem?
1
0
601
Oct ’24
iOS 18.0 and above systems, Control Center Video Effects bug
我的app不是VOIP应用,使用iPad10或者iPad13.18等支持人物居中的设备,系统是iOS18.0,18.1或者18.1.1,进入直播课中,控制中心不显示"人物居中"按钮,必现的,如下图。但是项目中Background Modes勾选Voice over IP,再次运行app,就不会再复现,即便是卸载重装也不会再复现。麻烦帮忙看看什么原因?谢谢
0
0
324
Nov ’24
How to find renamed app using old name in Spotlight?
We are planning on renaming our app. The new name is not like the current name. It will be renamed in the App Store as well as the App display name. Yet, we still want new and existing users to be able to find the app by using the old name in search/spotlight under iOS. A great example of this is entering Twitter to find the X app and it shows up in the App section in the Spotlight search. Are there any guidelines, settings, or tricks for doing this? Some have suggested adding a Spotlight search term but that will not have it show up in the App section I fear.
1
0
541
Nov ’24
EKEventStore on Apple Watch not showing all calendars
I have released a watchOS-specific application that retrieves data from the iPhone calendar app and displays it on the Apple Watch. It uses the calendars function in EKEventStore to retrieve the list of calendars, but it seems that it sometimes fails to retrieve iCloud calendars. Trouble is, this problem only occurs in a very few users‘ environments, the majority of other users’ environments are able to retrieve them without any problems, and I cannot reproduce it at all in my environment. Local calendars and Google calendars seem to be retrieved without any problems. Minimal example code: import SwiftUI import EventKit struct ContentView: View { let eventStore = EKEventStore() @State var success: Bool = false @State var calendarNames: [String] = [String]() func request() async { success = (try? await eventStore.requestFullAccessToEvents()) ?? false } func list() { calendarNames = eventStore.calendars(for: .event).map { $0.title } } var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Access: \(success.description)") ScrollView { ForEach(calendarNames, id: \.self) { name in Text(name) } } } .onAppear { Task { await request() list() } } .padding() } } I asked the user experiencing the problem to try restarting the iPhone and Apple Watch, reinstalling the app and re-pairing them, but there was no change. I would appreciate any information you can provide. Best regards.
1
0
438
Dec ’24
Adding a custom widget to the Capture group in Control Center
I noticed that with iOS 18, when adding a widget to the Control Center, there is now some "grouping system". I'm interested in the Capture group, which contains native widgets from Apple as well as third party apps like Instagram and Blackmagic cam, widgets in this group open the camera. My widget also opens the camera in my app, how can I add it to this group?
1
0
278
Nov ’24
How to add a reoccurring Hebrew Event to a calendar.
Currently Apple has their own calendar called Birthdays which takes the birthdays from contacts and makes it as a regular calendar event along with the birthday number, they even do this for Hebrew Birthdays. I have tried (unsuccessfully thus far) to take the same concept and create a calendar for reoccurring events on a specific date in the Hebrew Calendar. An example of this would be Yahrtzeits, which is observed on the Hebrew date each year after a person dies. I want to add it to the system calendars like how Apple does it this way it can be used with any app not just my own. Currently there isn't a way to specify the calendar (like Calendar(identifier: .hebrew) or even make a custom EKRecurrenceRule, also from some of the debugging of the Birthdays calendar, it seems that the date saved is the Gregorian date and that theres some internal calculations happening. Is there a way to add reoccurring Hebrew Events or do I need to reinvent the wheel?
1
0
379
Nov ’24
Focus more evolved
This message only to know your feeling on my project. Not to discuss what is feasible or not. Just on the interest of the functionality. I use 5 Focus profiles, Do Not Disturb, Holiday, Work, Personal and Sleep. I find that the native solutions for changing modes are not powerful enough. I'd like an app to configure automatically when each Focus profile should be activated. Eg : -Holiday : when holiday is found in my calendar -Work : when I'm not on holiday, when we are not on the weekend, and after 7ham but before 7pm. Personal : when I'm not on holiday when we are on the weekend of after 7pm -Dot Not Disturb: When I'm not in holiday, only on the working week when I have an event in my agenda with the status accepted". These are just some examples. the idea is that everything will be configurable. (my app is almost finished.) What do you think?
0
0
425
Nov ’24
Text To Speech does not work on Iphone 12 simulator
I'm writing an app that uses text to speech. On the physical Iphone 12 it works but on the simulator I don't get any speech from my app. I tried the following to enable. Settings -> Accessebility -> "Spoken Content" -> "Speak Selecton" to ON (green) in Voices I added the German Anna that I use on my Iphone with the downloaded enhancements. The speech test works in this menu but not in my app. What am I missing ? Cheers, Gerhard
2
0
975
Jan ’25
Should new apps use AudioPlaybackIntent or INPlayMediaIntent?
WWDC videos suggest that existing apps should continue using the old SiriKit domains, such as INPlayMediaIntent. But what about new apps for playing audio? Should we implement Siri functionality for audio playback using the old SiriKit domains, or should we create our own AppEntities and trigger them via custom AudioPlaybackIntent implementations? Interactive widgets require an AppIntent and don’t support the old INPlayMediaIntent. To achieve the same functionality as the Music app widgets, it seems logical to adopt the new AudioPlaybackIntent. However, I can't find any information about this in the documentation.
1
0
522
Nov ’24
Foreground issue
Dear Everyone, We are experiencing a crucial issue with our app CERRET where it consistently pauses after being in the background for more than 9 hours. To manage this issue we have implemented background tasks Silent Push Notifications and location updates but the problem persist We have tried enabling Background App Refresh, disabling Low Power Mode, updating the apps and iOS, and even restarting my phone, but the problem persists. Could you please provide guidance on how to resolve this? It is crucial for my use-case to have continuous background operation of CERRET. Thank you for your assistance.
1
0
459
Oct ’24
Problems with Widget buttons not getting pressed
So I have a button on a widget styled as seen below. I want this button to take up the entirety of the width, problem is, when it does so either using a frame(maxWidth: .infinity) or if I increase the horizontal padding, the button still only gets clicked if the user taps near the buttons center. Otherwise, it will open the app. Relevant code: Button(intent: Intent_StartRest() ){ Text("stop") } .buttonStyle(PlainButtonStyle()) .tint(.clear) .padding(.vertical, 6) .padding(.horizontal, 100) .background(RoundedRectangle(cornerRadius: 30).fill(.button)) .foregroundStyle(.buttonText) // Just sets text color .useAppFont(size: 18, relativeTo: .caption, weight: .bold) // Just sets font Any pointers?
0
0
341
Nov ’24
SMJobSubmit works in user domain, but cannot be submitted in system domain
Hi, I'm in the process of creating an App + Helper Tool combo application, and depending on the necessity of root privileges, I'm setting up two paths in the app: If root privileges are not necessary, I'm using SMJobSubmit rather directly: var submissionError: Unmanaged<CFError>? let submissionResult = SMJobSubmit(kSMDomainUserLaunchd, plist, nil, &submissionError) where plist contains these items: Label=com.***.redactedApp.redacted, ProgramArguments=[path/to/helper-tool, commandName, commandArg1, commandArg2] RunAtLoad=1, KeepAlive=0 and it works as necessary, and performs the operations. Now, in the case of privilege escalation being necessary, this call becomes a bit more complex: let authorization = SFAuthorization() var authRef: AuthorizationRef? do { try authorization?.obtain(withRight: kSMRightModifySystemDaemons, flags: [.extendRights, .interactionAllowed]) authRef = authorization?.authorizationRef() } catch let error { // Logging error } var submissionError: Unmanaged<CFError>? let submissionResult = SMJobSubmit(kSMDomainSystemLaunchd, plist, authRef, &submissionError) while using the same plist, same executable at the same path, same Label. However, when using the second path, suddenly SMJobSubmit fails: Error Domain=CFErrorDomainLaunchd Code=2 "(null)" Now, naturally I headed over to system logs in Console.app, and this is the weirdest - there is nothing suspicious near the log item I submit with the above error from the main application. The tool is embedded in the Contents/MacOS folder. However, my problem is that anything that I can think of seems to lead to the same thought: it should be a problem in both cases, not just the privileged one. Is there something extra that must be taken care of when using SMJobSubmit with privileged helper tools?
6
0
668
Jan ’25