XML parser recommendation for WatchKit extension - xml-parsing

I am building an app that on hourly basis downloads/parses an XML file from internet and displays a specific field on a apple watch / watchkit complication.
My current app within ExtensionDelegate parses (in Swift2 using NSXMLParser) which works well on simulator but does not work on physical device (I assume it times out).
How do you parse in watchkit extension? use any add-ons?

Related

WatchOS - App Store doesn't list localised languages for standalone watch app

I have a standalone Apple Watch app, and localised it to many languages, also localised the App Store product pages.
Everything works great, app and store page shows in the correct language, but the language section on the store only lists English.
This is most likely a problem (wouldn't be the first) with standalone watch apps, but is there something I can do other than adding an iPhone app?
Added the Localizable.string file to the base app target (first one before WatchKit app and WatchKit Extension) and now it works.

Opening Custom UTI in App not working in iOS13

I have been using AirDrop for ages now to allow a document to be passed from/to iPhone users from within my App. The App generates a straightforward CSV file which is then AirDropped (or could be emailed too) to another machine, where my App can open it and import it (the UTI is registered for the csv file type). This has been working fine for a long time, but I now see that devices running iOS13 no longer list my App as being able to import the file. If I run the same code on iOS12.4 (or earlier) it works fine, but on iOS13.1 my App is no longer registered to receive the data. The device can AirDrop to another device perfectly, and provided the destination is not iOS13 the import works fine. Whenever the destination is iOS13 my App simply is not listed as being available to receive. I can't see what might have changed.
The info settings (that work perfectly up until iOS13) are:
I cannot see anything in the iOS release notes that would suggest this has changed at all. Can anybody help with this?
Since you and your app didn't invent the CSV file type, you should use a standard UTI for CSV and not invent your own.
This means you should use the Imported UTIs section to declare the CSV UTI. The Export UTIs section should only be used by new UTIs that are unique to your app.
Here is my Imported UTI for CSV:
Here is my Document Type for CSV:
I have no trouble sending CSV files to my app under iOS 13 with these in place.
Also keep in mind that under iOS 13, you may need to tap on the "More" icon at the end of the list in the share sheet to see your app (and possibly others) as a choice.

Are voice shortcuts for custom SiriKit Intents supported on watchOS?

I’m trying to get a voice shortcut for a custom Siri Intent working as part of an Apple Watch app, but I’m not sure whether that’s possible. Has anyone had success with this or know if it’s supported?
There isn't much code to share in this case, since most of the code is auto-generated by Xcode, but here’s a quick overview of how I have everything set up.
I created a custom Intent with a .intentdefiniton file and separate Intents Extension targets for my iOS app and watchOS app to handle the Intent.
I set up and donate the shortcuts at the appropriate time. I included an INUIAddVoiceShortcutButton in my app so a user can easily add or edit a phrase for the shortcut.
Everything works fine on an iPhone: the shortcut shows up at relevant times throughout iOS, and the Intents Extension in my iOS app handles the shortcut when I say the invocation phrase to Siri.
Since 20% of my app’s users use the Apple Watch app, I want to provide a congruent experience on watchOS. The donated shortcut shows up on the Siri watch face, as expected. I trigger the shortcut from the Siri watch face, and is handled by the Intents Extension that's part of my watchOS app.
When I say the intent’s invocation phrase to my Apple Watch (Series 3 GPS-only), however, it doesn’t work. Siri says:
Checking with the app...
Then a few seconds later:
I do not recognize that command.
I’ve tried this with a separate Intents Extension for my watchOS app, and without. I get the same results in both situations. It works on the simulator, but not on a real device.
I’ve also made sure I have my Watch Extension and Watch App selected under Target Membership for the .intentdefinition file.
I’ve also tried going into Settings > Developer and enabling Display Recent Shortcuts then tapping Force Sync Shortcuts to Watch, but that doesn’t change the behavior.
Are voice shortcuts for these custom intents even supported on Apple Watch? I haven’t been able to tell one way or another with Apple’s documentation. The SoupChef sample project is set up with an Intents Extension for the watchOS app, which makes me think it should be supported. And, since it works on the simulator, that makes me think it should be supported.
However, this page doesn’t list custom intents as being supported on watchOS, so that makes me think they may not be supported: https://developer.apple.com/design/human-interface-guidelines/watchos/user-interaction/siri/
If anyone can help me figure out whether this is supported I’d really appreciate it. I’m not sure if I’m doing something wrong or if this just isn’t supported.
The problem was on my Apple Watch.
I was able to get it working by erasing the watch (Settings > General > Reset > Erase All Content and Settings) then restoring it from a backup.

Whether we can create an App Extension for WatchKit(WatchOS 2) App similar to that of iOS?

I'm developing an WatchKit App (using WatchOS 2).
I have one query whether we can create an App Entension for WatchKit App similar to that of iOS, so that other WatchKit App(host app) can use this extension for sharing purpose (may be a text or an image or a link).
Thanks!

IOS Action Extension Sample Code

i am new to IOS development ,IOS 8 have app extension feature, i have gone through Apple document ,i got some idea what is app extension but i want do sample non UI action extension app example. i tried ui based extension app ,it's working fine.and also i tried non ui base app but it not working. please can any one explain non ui extension with sample code.
just take simple case Host app will send x and y values to extension , extension need to receive that two values and do some manipulation in extension app and send result to host app and host need to display on ui.

Resources