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.

Post

Replies

Boosts

Views

Activity

Prevent Apple Watch Screen from Turning Off in Power Saving Mode During Specific App Use
Hello, I am developing an application for the Apple Watch that requires the screen to remain active even when the wrist is moved into a down position. The core functionality of my app involves providing continuous visual and auditory guidance, and it's critical that the screen stays on without going into power-saving mode while the app is in use. Specifically, I am looking for a way to: 1.Disable the screen's power-saving mode when the wrist is moved down. 2.Ensure the screen remains active as long as the app is in the foreground. I understand that certain power management features are built into watchOS for battery conservation, but I would need this behavior to be overridden only while the application is running (the app would not be in the foreground for extended periods of time). Is there an approved method or best practice within Apple's guidelines to achieve either of these functionalities? Thank you for your assistance.
1
0
110
1w
Preventing Apple Watch Screen from Turning Off in Wrist Down Position
Hello, I am developing an application for the Apple Watch that requires the screen to remain active even when the wrist is moved into a down position. The core functionality of my app involves providing continuous visual and auditory guidance, and it's critical that the screen stays on without going into power-saving mode while the app is in use. Specifically, I am looking for a way to: 1.Disable the screen's power-saving mode when the wrist is moved down. 2.Ensure the screen remains active as long as the app is in the foreground. I understand that certain power management features are built into watchOS for battery conservation, but I would need this behavior to be overridden only while the application is running (the app would not be in the foreground for extended periods of time). Is there an approved method or best practice within Apple's guidelines to achieve either of these functionalities? Thank you for your assistance.
1
0
134
1w
Unexpected iOS App foregrounding
I am seeing some unexpected behavior, in particular, is seems that iOS is periodically foregrounding my test app with no user intervention. I am curious why this is. I wrote a simple test app to see how long the app would run to collect location while in the background with only "While in Use" location permission. The app will start location updates when foregrounded and continue in the background. While backgrounded, I see the blue arrow in the dynamic island as expected. What is unexpected is that every few days, I see the UI of the app displayed in the foreground, without having foregrounded it myself (and no, I did not tap the blue arrow). This is using the legacy CoreLocation apis on iOS 17.5.1. My question is how/why does this happen?
4
0
133
1w
v2 Weatherkit REST API documentation release date
Hi. The WWDC video of the v2 weatherkit api showed some examples for the REST API. However, they were very limited. The documentation for the REST API is currently for the v1 weatherkit API. When will the documentation for the v2 API be released? There are some new features of the v2 that I would really like to use, but I can't without knowing the new v2 REST API specifications. Any guidance would be much appreciated. Thanks!
1
0
147
1w
Open iOS Weather App
I am using WeatherKit to display relevant weather information to the User in my App. I also thought it would be helpful to show any time-sensitive WeatherAlert. I would like to direct the User directly into the system Weather app to get more details/information. weather://open ... works... Is this a faux-pas? Is there a approved/proper way of doing this? I know WeatherAlert.detailsURL exists but I figured it may be useful for the User to see all details related to weather right from the source.
0
0
100
1w
Issue with deep linking in iOS applications
Issue: We are currently experiencing an issue with deep linking in iOS applications when Microsoft Edge is set as the default browser on the device. Users, upon receiving an invitation link in their mail and attempting to open the app (if installed) via the link, encounter a problem where the Edge browser opens the app store as a popover. However, it's important to note that this URL functions correctly with Safari. Attempts So far: The integration of deep linking in iOS has been correctly implemented. I have also verified the Apple App Site Association (AASA), which is deployed on the backend site, facilitating redirection to the application on mobile. Testing the same scenario with other browsers revealed that this link does not work with Chrome, Brave, and Edge, excluding Safari. Reviewing the Deep Link URL, it complies with the safe link policy. Removing the safe link policy from the URL and attempting to open it in Edge and other browsers results in seamless functionality. I have tested the safe link with the Amazon product, It’s not working with the Edge browser. I have raised the same concern with Microsoft Learn, Microsoft Community, and Stack Overflow. For reference, I am attaching the safe link (Non-working) and the normal link (Working Link) with this story. **Non-Working Link: ** https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2F<SITELINK (Eg.***.yyy.com)>.%2FteamDay%3FteamDayId%3DHTWmmt7cmYyd7LawwhMq5%2BMyNt%2Bf8eUCz25pzmsTUMo%3D%26domainUrl%3Dhttps%3A%2F%2Fxxx.dev.com&data=05%7C02%7C%40%7Cb6ffab414d034bbceb0108dbfd382f0c%7C454af8f364734bce8aa5f9403e1d1271%7C0%7C0%7C638382189984623308%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=B5rzVQ0alWjIsT7ycI2oZrNjeVPM%2BeoMk0YDpMZk6q4%3D&reserved=0 Working Link: https://***.yyysoftware.com/teamDay?teamDayId=p0RQIAsd4vaTk1yHGuTUdBCDmP0ZK1CuR8Q3JfSPJvU=&domainUrl=https://***.dev.com
0
1
103
1w
Configure autostart of a sandboxed Java app
I have developed a backup application in Java. In it, users can configure whether they want it to autostart or not. If they do, a plist file is being written to ~/Library/LaunchAgents so that my app starts at login. This works perfectly so far. I've not submitted it to the Mac App Store. But for that, it needed to be sandboxed. And with that, I had to add a "com.apple.security.temporary-exception.files.home-relative-path.read-write=/Library/LaunchAgents/" to my entitlements so that the plist file could still be written to ~/Library/LaunchAgents. However, they do not approve this. Is there another solution to launch my application at login? Must work with sandbox-mode Must work from Java/Shell/... (I found "SMAppService", but this seems only available in Swift/Objective-C)
1
0
146
1w
Using bundled applications(.app file) as daemon/Agent
I have a .app file that I want to run as a daemon. Now there are two ways of running .app as a daemon/agent in macOS. using .app file : I can specify this in the daemon plist as: <key>ProgramArguments</key> <array> <string>/usr/bin/open</string> <string>/Applications/myApp.app</string> </array> using unix exe within .app file <key>ProgramArguments</key> <array> <string>myApp.app/Content/MacOS/MyApp</string> </array> Basically I wanted to know what is the Apple recommendation on how we should be creating daemon plist. For point 2, is it appropriate to use the unix executable within bundle?Will it not cause any issue in the running application? Is will be helpful if there is some apple documentation to support this.
1
0
111
1w
NFC TAG IPHONE
I have a client who asked me to create an app that reads nfc data, but this data needs to come from a built in iPhone nfc tag, so the app will read through nfc the SECOND device info. my question is, does the iPhone has a built in nfc tag? if so, can it share any device info?
1
0
116
1w
Usage time tracking is being killed by jetsam
Brief & History Since iOS 17.4 and up we experience a lot of flakyness when it comes to DeviceActivity event thresholds. After a lot of testing and investigations inside system logs and filing countless bug reports we found a reproducible way why the event thresholds are not getting properly called. Findings Apparently when the device reaches near to max memory something called jetsamkills processes left and right. This means that the UsageTrackingAgent that (we think) is responsible for tracking the usage time of the device gets killed and doesn't recover until significant memory is freeing up on the device. How to test it yourself Use a slightly older device with ~ 3 or 4 GB of RAM Open a game or two that is meomry intensive (like Fishing Clash, yes..) and observe In the console logs you see something that only happens then: Process UsageTrackingAgent [39307] killed by jetsam reason highwater This happens often but recovers itself when the UsageTrackingAgent exceeds their 6MB memory limit. Yet the log looks like this: Process UsageTrackingAgent [39307] killed by jetsam reason per-process limit Once you kick the game, the memory is free and sometimes the event thresholds are calling in again. Defeating the purpose However this defeats the purpose of tracking usage time and shielding perhaps the playing app from being played after a certain amount of time! Feedback Assistant Ticket Here is the ticket with sysdiagnose, step by step and more information: FB13884981 Please fix this ASAP, this is such a pain for production users and their kids EVERY DAY.
1
5
409
Jun ’24
Live Activity Widget -
Hi, I'm developing a Live Activity Widget that shows a count down timer. In the current solution I have a stop watch that is responsible for handling the start, stop, resume, reset function. When the stop watch starts I have timer that calls on an updateTime function every 0.2 seconds. This works well. The problems comes when I try to use my stop watch in the Live Activity Widget. I have a timer that updates the live activity attributes with content every 0.5 second. // Start the activity let activity = try? Activity.request(... DispatchQueue.main.async { self.logger.log("Start internal timer") self.timer = Timer.scheduledTimer(withTimeInterval:0.5, repeats: true) { _ in self.logger.log("Update activity widget.") self.updateActivity() } } Is this a correct approach? If not what should I use to implement a stop watch with a count down timer and a corresponding progress bar/view?
1
0
240
Jun ’24
WidgetKit complications won't update
We are migrating ClockKit complications to WidgetKit in our watch app (watchOS 9+). The migration went smoothly, UI part works just fine. However, we've hit the wall with widgets not updating when requested by the watch app. I believe we are missing something very simple and fundamental, but couldn't find what exactly so far. Advice and tips would be very welcome! 🙇‍♂️ Our implementation details: Whenever data is changed in the main app, the updated data is submitted to the watch app via WatchConnectivity framework using WCSession.default.transferCurrentComplicationUserInfo(_:). According to documentation, this method should be used to transfer complication-related data, since it will wake the watch app even if it is in the background or not opened at all. Watch app receives updated data and stores it in UserDefaults shared with Watch Widget Extension hosting WidgetKit complications via App Group. Watch app then request widget timeline reload via WidgetCenter.shared.reloadAllTimelines(). According to documentation, it reloads the timelines for all configured widgets belonging to the containing app, so it seems the appropriate way to reload WidgetKit complications. Widget Timeline Provider class in Watch Widget Extension reads updated data from shared UserDefaults and uses it to provide the updated snapshot for widget views to render. We believe our implementation logic is correct, but it doesn't work, for some reason. Widgets sometimes update when the watch app is opened, but not always. The most definitive way to force widgets to update is to switch to a different watch face, which confirms that the Widget Timeline Provider has access to properly updated data. P.S. We are aware of the daily reload budget imposed on widgets, so we use widgets reload trigger sparingly. Anyway, according to documentation, reload budget is not effective when in DEBUG mode, but widgets won't reload even in DEBUG mode. Thank you!
17
9
3.9k
Aug ’23
Develop Carplay App for fragrance systems and ambient lighting
Greetings, I am currently conceptualizing an application designed to interface with Carplay, enabling control over aftermarket automotive fragrance systems and ambient lighting within vehicles. Having perused your development guidelines, I am interested in understanding how my project might be classified within your framework. Specifically, I am exploring whether it would be appropriate to categorize this endeavor under the 'Driving Task' category, given its direct interaction with the vehicle environment. Your insights on this matter would be greatly appreciated. Best regards!
2
0
129
1w
Unable to invoke the host App in ShareExtension
I developed a Share Extension for my App. Using the following code in the extension, I am unable to invoke the main App; however, I noticed that the Bing App can be invoked normally. Therefore, I have two questions; Is there a bug in the invocation code? I used the extensionContext?.open method to invoke, and the callback flag always returns false; the scheme can be invoked normally in Safari How does the Bing App do it? this my code: extensionContext?.open(URL(string: “myappscheme://”)!, completionHandler: { succ in // print(“open (succ)”) // }) Environment: Mac OS: 15.0 Beta (24A5279h) iPad OS : 18 Beta 1 "
1
0
164
1w