Post

Replies

Boosts

Views

Activity

Reply to Share arbitrary struct from HostApp to Extension and get arbitrary result back
When I share both JSON and plain text: ShareButton(title: "JSON", shareItems: [ItemSource(dataToShare: shareInput) ,ItemSource(dataToShare: "sharing some text") ]) I get (iOS 16 vs. iOS 17): where iOS 16 ShareExtension[9236:652213] [ShareSheet] ❗️itemProvider=<NSItemProvider: 0x280afa1b0> {types = ( "public.plain-text" )} and iOS 17 transfer: ❗️itemProvider=<NSItemProvider: 0x300f99e30> {types = ( "public.plain-text" )} Library: ShareExtension | Subsystem: com.myapp.containingdemo.ShareExtensionDemo | Category: ShareSheet So again it's clear that the ShareInput is not transferred, but only the text. For the result, I didn't manage to pass a ShareResult struct to NSItemProvider: I just found NSItemProvider(item: contactData as NSSecureCoding, typeIdentifier: UTType.vCard.identifier) which probably works because contactData is known to iOS... See this thread: https://forums.developer.apple.com/forums/thread/24368 Again, transferring plain text was possible... Main Question: How can I transfer my ShareInput struct from the HostApp to the extension (iOS 16 and later), and then my ShareResult struct from the extension back to the HostApp (iOS 16 and later)? And how can the HostApp limit the possible sharing targets? I want neither persons nor actions to appear in the sharing dialog, just apps - preferably only my ContainingApp. This should be possible with a strict NSExtensionActivationRule, right? (Bummer, it is not possible to upload the zipped demo project. Thus I'll need to upload to github...)
Topic: App & System Services SubTopic: General Tags:
Jul ’24
Reply to Bug: If you have ever made a TestFlight build with a higher version number, you won't get any crash nor feedback reports from users for lower versions!
I ran into almost the same problem. Luckily I didn't increment the major number, but only the minor. However, since we're an Open Source project of course the major is "0" (though we are considering going to 1.0.0 - maybe next year), and thus our minor also had to increase (from 0.9.x to 0.10.0). Since then I really take care to check the version and build numbers before submitting to Testflight...
May ’24
Reply to Xcode 14.2: Cannot preview in this file - Cannot connect to <any simulator>
FB11880907 Added a new user account. Launched Xcode, new project, got the error message:
 Cannot preview in this file - Timed out waiting for connection to DTS… After another reboot of my MacBook, previews worked again in both accounts. You can close this bug, if you think it’s normal to reboot twice or more after an Xcode update to regain all functionality…
Dec ’22
Reply to Share arbitrary struct from HostApp to Extension and get arbitrary result back
When I share both JSON and plain text: ShareButton(title: "JSON", shareItems: [ItemSource(dataToShare: shareInput) ,ItemSource(dataToShare: "sharing some text") ]) I get (iOS 16 vs. iOS 17): where iOS 16 ShareExtension[9236:652213] [ShareSheet] ❗️itemProvider=<NSItemProvider: 0x280afa1b0> {types = ( "public.plain-text" )} and iOS 17 transfer: ❗️itemProvider=<NSItemProvider: 0x300f99e30> {types = ( "public.plain-text" )} Library: ShareExtension | Subsystem: com.myapp.containingdemo.ShareExtensionDemo | Category: ShareSheet So again it's clear that the ShareInput is not transferred, but only the text. For the result, I didn't manage to pass a ShareResult struct to NSItemProvider: I just found NSItemProvider(item: contactData as NSSecureCoding, typeIdentifier: UTType.vCard.identifier) which probably works because contactData is known to iOS... See this thread: https://forums.developer.apple.com/forums/thread/24368 Again, transferring plain text was possible... Main Question: How can I transfer my ShareInput struct from the HostApp to the extension (iOS 16 and later), and then my ShareResult struct from the extension back to the HostApp (iOS 16 and later)? And how can the HostApp limit the possible sharing targets? I want neither persons nor actions to appear in the sharing dialog, just apps - preferably only my ContainingApp. This should be possible with a strict NSExtensionActivationRule, right? (Bummer, it is not possible to upload the zipped demo project. Thus I'll need to upload to github...)
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to Bug: If you have ever made a TestFlight build with a higher version number, you won't get any crash nor feedback reports from users for lower versions!
I ran into almost the same problem. Luckily I didn't increment the major number, but only the minor. However, since we're an Open Source project of course the major is "0" (though we are considering going to 1.0.0 - maybe next year), and thus our minor also had to increase (from 0.9.x to 0.10.0). Since then I really take care to check the version and build numbers before submitting to Testflight...
Replies
Boosts
Views
Activity
May ’24
Reply to Xcode 15, how to uncheck "Connect via network" for physical device?
Same problem here. I still got an SE 1st gen (iOS 15.7) and an XS Max (iOS 16.7.1) which I can use for fast debugging, but my brand new 15 Pro Max is slow as molasses (same app), whether I plug in the cable or not.
Replies
Boosts
Views
Activity
Oct ’23
Reply to Sample app shows error "ServiceUnavailable" when on real device
From the docs: Important Before configuring your app to use Tap to Pay on iPhone, you must set up the necessary entitlement. For more information, see Setting up the entitlement for Tap to Pay on iPhone. https://developer.apple.com/documentation/proximityreader/setting-up-the-entitlement-for-tap-to-pay-on-iphone
Replies
Boosts
Views
Activity
Jul ’23
Reply to Xcode 14.2: Cannot preview in this file - Cannot connect to <any simulator>
FB11880907 Added a new user account. Launched Xcode, new project, got the error message:
 Cannot preview in this file - Timed out waiting for connection to DTS… After another reboot of my MacBook, previews worked again in both accounts. You can close this bug, if you think it’s normal to reboot twice or more after an Xcode update to regain all functionality…
Replies
Boosts
Views
Activity
Dec ’22
Reply to Playgrounds crashes all the time, what do I do?
Playgrounds 4.1 always crashes a few seconds after launch without even showing a window rMBP late 2016 (won't get macOS 13) with macOS 12.6.1 (fresh installation 2 months ago without Migration Assistant, so no old prefs and stuff) Xcode 14.1 incl. command line tools
Replies
Boosts
Views
Activity
Nov ’22