I have a strange problem.
Xcode 12.5
In one of my project I cannot use 'import EventKitUI'. When I use this it says 'Could not build Objective-C module 'EventKitUI''
However, when I create a new swift project I can add import EventKitUI without any problem. For some reason the problem exists in this particular project only. Maybe I mess up with settings but I have no idea where to look at.
Post
Replies
Boosts
Views
Activity
I have a widget that need to to be refreshed (Reload timeline) every time a calendar changed (EKEventStore changed). How can I achieve this? I am researching on the background task refresh but has no idea how to listen to the notification.
func onBackgroundURLSessionEvents(matching matchingString: String, _urlSessionEvent: @escaping ((String, @escaping () -> Void) -> Void)) -> someWidgetConfiguration
This func is recommended in Apples's how to keep widget up to date. But cannot understand how to apply this to my case.
Thank you for any suggestions.
I have my app working fine on iOS and now I am extending to mac with Mac Catalyst. In my workflow, I would like to have a window closed or app quitted after some actions. E.g. A user click on a Save button then my app does some works then minimize window or quit app.
How can I do this? I have looked at scene, scene delegate but don't quite understand how to use it or where I should put it in my code.
Thank you.
As per this article https://developer.apple.com/documentation/widgetkit/keeping-a-widget-up-to-date, widgets have a limit on number of timeline reloads (refresh) on a single day.
Does this rule apply to widgets on Mac as well?
I understand that on iPhone/iPad we have limited resources, but on a Mac we have plenty more. I would hope we have no limit on Mac so widgets can be refreshed more frequently, thus better user experience.
Thank you.
I am building a widget on Mac with Mac Catalyst. I notice that when I put my MacBook to sleep for roughly more than 2 hours, then after I wake the MacBook up, click on notification center, my widget shows Failed to Load. Then after a few seconds I click on notification center again, my widget shows up correctly.
My widget uses data from calendar and reminder. So I expect that the widget failed to load because of the data is not available.
I am thinking if I can execute a code (from my app) after MacBook wake up, I might be able to resolve this problem. Of course, this assumes that the app is still open (showing on a dock). Basically if I can detect when MacBook. wake up I can run some codes to refresh data.
Any advice is much appreciated.
Thanks,
Boon
Anyone experience this?
I found out that calendar information on my widgets are displayed in both Today's widget view and in Lock Screen view even if .privacySensitive is set to true.
Then I notice the Apple's calendar widgets also display the event title.
Device: iPhone XR iOS16
Since I upgraded my phone to iOS16.1 I notice that my widget app doesn't refresh timeline as expected. Then I notice that other apps are having this problem as well. As far as I know from my research, iOS 16.1 has a bug regarding widget accessing calendar database.
Then I continue my work on Xcode and also found that I cannot debug widget extension timeline on a simulator.
If I run widget extension on a simulator with iOS16.0, it runs just fine and I can see all the printouts.
If I run widget extension on a simulator with iOS16.1, it doesn't give a printouts at all. And it shows 'Waiting to Attach'
Has anyone experience this?
My widget app was working fine before iOS 16.1. Since upgrading to 16.1 (and 16.1.1) my widgets starts to be buggy. For some reason, it doesn't fetch a new data from calendar/reminder. Sometimes it fetches new data, sometimes it doesn't. Fetching the data from within the app works perfectly fine though. The problem happens only when fetching calendar/reminder is called from widget.
From my research.... I found out that other popular apps have this problem with their widgets as well...
Is this issue really a bug on iOS side, and if there is any workaround for now? My app is purely widget app so this bug is kinda big problem for me.
Thank you.
I would like to change app icon on the dock programmatically. Like how calendar app changes icon from day to day. (This is about icon on the dock only, not the app icon itself.)
I have done some researched and found this 'applicationIconImage' https://developer.apple.com/documentation/appkit/nsapplication/1428744-applicationiconimage But it doesn't say it is available in Mac Catalyst.
Appreciate if you anyone has ideas how to do this. Thank you.
I'm trying to change app icon on Dock in macOS from my app. But couldn't get to work. The setAlternateIconName works fine in iOS simulator, but when I run in on my mac (Catalyst) I got this error: The requested operation couldn’t be completed because the feature is not supported.
Apple Doc - https://developer.apple.com/documentation/uikit/uiapplication/2806818-setalternateiconname
Thank you
I have a hard time figuring out how I can open other apps from my app (either in app or from widget). I'm aware that I can add up to 50 URLS in LSApplicationQueriesSchemes. So I can predefined only 50 apps that users can open. At least this is what I thought.
But, I have tried app like Launcher and a few other apps that offer widgets that can open other apps, like being a launcher.
How can those app do this? They cover so many apps. Like in a case of Launcher, it allows a user to search for app from App Store, and then create a widget that can open that app. I have tried some apps that are very niche and they still work.
Any recommendation is very appreciated.
Thanks!
On Xcocde 14.3.1, I cannot rearrange (move) app icons on iPhone simulators.
Anyone experiences this?
Thank you
I have experienced a strange issue on my iphone test device. (iPhone Xr running iOS 17.0.3)
In my app I ask a user for calendar full access. Once I gave the access permission, the app works as expected. Then somehow the status changed from .fullAccess to .denied. This happens without my interaction in iPhone's Settings. I have doubled checked in Settings app and the permission is still granted. But somehow the status is denied when calling EKEventStore.authorizationStatus(for: .reminder)
Regardless of how bad my code is, the app should not be able to change status from .fullAccess to .denied. Correct?
I have never had this problem until lately. But it happens to both my iOS app and my mac Catalyst app. Which is really strange. (iOS 17.0.3 and Sonoma 14.0)
This problem doesn't happen all the time though. Most of the time my app works fine. But it can happen few times per day. And even more strange, it tends to happen at the same time for iOS and macOS.
I don't know if this problem happens to me because of the fact that I install/uninstall the app many times but currently it just causes me a headache.
I have attached 2 images. These 2 images happen at the same time. The only fix is that I have to turn off then turn on the Full Access again in Settings app. Something for Reminder.
Any advice is much appreciated. Thank you.
Prior to watchOS10, I marked a view that I want to hide sensitive information when not being worn by using .privacySensitive() This had been working just fine.
Comes watchOS10, this doesn't work anymore. Even with this simple code
Text("TEST Privacy")
.containerBackground(for: .widget) {
Color.black
}
.privacySensitive()
The text view is displayed even when not being worn.
Has anyone experienced this? It seems like a bug to me. Any workaround? Thank you.
I use String Catalog to localize my app (built in English) to Japanese.
The app works fine and supports both languages. I have tested on TestFlight, and the live version download from App Store also supports 2 languages.
But the display on App Store only indicates Japanese.
I have no idea why the number for localized files show 0 for both English and Japanese. The Localization of Japanese works fine.
How to fix this?