Post

Replies

Boosts

Views

Activity

Multiple subscriptions of the same product
Hello, I have an app where the users can connect their vehicles to an API and record trips and so on. Currently I have one subscription, where the user can add as many vehicles as he wants. But now I want (need) to change this to one vehicle per subscription. So if the user want to add two vehicles, he need to subscribe two times to the same product. How can I handle this? Thanks, Arangoool
0
0
137
Sep ’24
Crash on URLSession in background task
Hi, I try to implement the BackgroundTask handling from this WWDC2022 video: https://developer.apple.com/videos/play/wwdc2022/10142 But it always crashes with this error: *** Terminating app due to uncaught exception 'NSGenericException', reason: 'Completion handler blocks are not supported in background sessions. Use a delegate instead.' So, is the video updated or is this a bug?
3
0
328
Aug ’24
Apple Watch not showing in XCode
I got a new MacBook and set it up as a new one, not transferring any data from the old one. But now the Apple Watch (Series 6) paired with my iPhone (14 Pro Max) ist not shown in Xcode. iPhone and Watch are using the latest RC and also Xcode is the latest RC. But in Xcode I ca only see my iPhone, not the paired Watch. See Screenshots. The first shows the new MacBook and the second the old one. I already tried a lot, but nothing helps: Unpair Watch from Phone and then pair it again Plug the iPhone to different USB ports Restart Watch, iPhone and Mac Delete the iPhone from Xcode Enable and disable Developer Mode on iPhone and Watch What else can I try to get the Watch back?
29
12
9.3k
Mar ’24
Handling reload of Widgets/Complications
I'm trying to find the best way to reload my Widgets and Complications. My App tries to show the current status vehicles. It gets the data using an API. And you don't know when this status changes. So I need to know when it makes sense to reload the widgets and complications. Here is a quote from the documentation: A widget’s budget applies to a 24-hour period. WidgetKit tunes the 24-hour window to the user’s daily usage pattern, which means the daily budget doesn’t necessarily reset at exactly midnight. For a widget the user frequently views, a daily budget typically includes from 40 to 70 refreshes. This rate roughly translates to widget reloads every 15 to 60 minutes, but it’s common for these intervals to vary due to the many factors involved. This is by far the worst "definition" if ever seen :( There is a 24 period, but you don't know when it starts and you don't know how much max refreshes you have and you also don't know how many refreshes you have left. How should someone develop a good solution with such a "definition"? So, I would like to know how you handle this? Perhaps a Apple engineer could light me up here :)
1
0
735
Oct ’23
Async operation in LiveActivity
In my App I use Live Activities that are updated using Push Notifications. This works fine and the Live Activities show the correct data. BUT: The data I get with these Push Notifications contain a geo location (latitude and longitude). And for these I want to display two things: 1.) The address that I want to decode using "CLGeocoder" with function "reverseGeocodeLocation", but this function is async and I can't get the app to start any async function. 2.) I would like to display a small Map with a Pin for this location. I want to use "MKMapSnapshotter" for this. But here the same async problem :( So, is there a way to handle this? Perhaps I just use the wrong point to start the async function. I tried ".task{}" and ."onAppear{}" But both are not working :(
0
0
446
Oct ’23
AppIntentTimelineProvider in iOS17 Beta 4
I'm back from vacation and installed iOS Beta 4 and with that my Widgets stop working :( Funktions func snapshot(for configuration: ConfigurationIntent, in context: Context) async -> MyTeslaWidgetEntry {} func timeline(for configuration: Intent, in context: Context) async -> Timeline<Entry> {} are never called. Instead I get this warnings inside the console: No AppIntent in timeline(for:with:) No AppIntent in snapshot(for:with:) But there are no functions with parameter "for"... What is the problem here?
0
0
729
Aug ’23
My son as a Developer
Hello, I added my son (15) as a developer to my team. He got an invite and accepted that and now is shown in my team... So far so good. But he can't sign in to his developer account, it always say: "Sorry, ...". And with that he can't install iOS 17 on his Phone to help testing our new App Updates... I think, he needs to accept some agreements after login, but they are not shown... How can I fix that? Thanks, Stefan
1
0
1k
Jun ’23
Name Intent Complications
Hello, I try to add a couple of Complications to my App. Most of the Complications needs to be Configurable, so I use an IntentConfiguration for them. I use this recommendations function to create my complications.     func recommendations() -> [IntentRecommendation<ConfigurationIntent>] {         var recommendations = [IntentRecommendation<ConfigurationIntent>]()        for vehicle in vehicleStatusList {             let intent = ConfigurationIntent() intent.vehicleItem = VehicleItem(identifier: vehicle.id, display: vehicle.name)             recommendations.append(IntentRecommendation(intent:  intent, description: vehicle.name))         }         return recommendations     } But with this I get the result from the screenshot... How can I change this to get a better User Experience? When I click one item in the List, I get a correct Complication. But it would be nice to have a change to name them correctly... The first in the List is a StaticConfiguration...
2
0
1.4k
Jan ’23
Working example of Complications with WatchKit and WatchOS 9
Hello, where can I find a working example of Complications with WatchKit and WatchOS 9? So, no ClockKit... I try the sample code from Apple: https://developer.apple.com/documentation/widgetkit/adding_widgets_to_the_lock_screen_and_watch_faces But even with this, there are no complications shown on the Watch or Widgets on the LockScreen. They simple do not show up in the selection :( Where can I find something, that is working? Thanks, Stefan
0
1
1k
Jan ’23
All Complications with the same name
I made some complications for the Apple Watch. I uses Intents for this complications. This code is used to add the complications: func provideVehicleItemOptionsCollection(for intent: ConfigurationIntent, with completion: @escaping (INObjectCollection<VehicleItem>?, Error?) -> Void) {         let vehicleStatusList = VehicleStatus.loadVehicleStatusList()         var list: [VehicleItem] = []         for item in vehicleStatusList {             list.append(VehicleItem(identifier: item.id, display: item.name ?? "No Name"))         }         let collection = INObjectCollection(items: list)         completion(collection, nil)     } But with this all complications show the same name. On the Apple Watch they show an icon in addition to this name, but also with is sometimes not working. How can I change the Title of the complications?
1
0
973
Dec ’22
List in a Tabview always reset after tab change
In my app I have a TabView with lists in there. When I scroll a list and than change tabs forth and back, the list is always reset and starts from the top...But this shouldn't be the case... Is this a bug, or what I'm doing wrong?Here is some example code:struct ContentView: View { var body: some View { TabView { NavigationView { List { ForEach((1...50), id: \.self) { Text("Row in Tab 1 Number: \($0)") } } .navigationBarTitle("Tab 1") }.tabItem { Image(systemName: "bubble.right") Text("Tab 1") }.tag(0) NavigationView { List { ForEach((1...50), id: \.self) { Text("Row in Tab 2 Number: \($0)") } } .navigationBarTitle("Tab 2") }.tabItem { Image(systemName: "bubble.left") Text("Tab 2") }.tag(1) }.edgesIgnoringSafeArea(.top) } }Hope someone can help me on this.Thanks,Stefan
3
0
5.4k
Nov ’19