Posts

Post not yet marked as solved
1 Replies
222 Views
This is a complete test case: import SwiftUI import UniformTypeIdentifiers struct TestCase: View { @State private var text = "Waiting" var body: some View { VStack { PasteButton(supportedContentTypes: [.fileURL, .image, .text, .url]) { itemProviders in Task { for itemProvider in itemProviders { if itemProvider.hasItemConformingToTypeIdentifier(UTType.plainText.identifier) { do { let item = try await itemProvider.loadItem(forTypeIdentifier: UTType.plainText.identifier, options: nil) if let data = item as? Data, let txt = String(data: data, encoding: .utf8) { text = txt } else if let text2 = item as? String { text = text2 } else if let url = item as? URL { do { text = try String(contentsOf: url, encoding: .utf8) } catch { print("Error reading file: \(error)") } } } catch { print(error.localizedDescription) } } } } } Text(text) } } } It works well on the macOS, worked well on iOS before 17.2 and even there this PasteButton part would work if it is placed inside the menu. However on the iOS 17.2 iOS seems to send the file URL that generally can't be accessed. The only exception is simulator where this URL can be read by the app and thus the code above would work. This is a huge bug and thus far I couldn't find anything regarding this. Are there any workarounds?
Posted
by ivan.icin.
Last updated
.
Post not yet marked as solved
1 Replies
546 Views
I am using Xcode 14 and multiplatform app project. I have received the CarPlay entitlements from Apple and everything works on iOS. However I do have to share the same entitlements.plist file with macOS (multiplatform project uses the same file) and the CarPlay entitlement crashes the Mac app. If I remove those lines from it everything works fine: <key>com.apple.developer.carplay-audio</key> <true/> How to handle this? I have tried to add iphoneos on the end of the key but it keeps crashing even then.
Posted
by ivan.icin.
Last updated
.
Post not yet marked as solved
0 Replies
282 Views
On the Mac windows restoration in the SwiftUI app works as expected - when the app is reopened the windows from the last session are being reopened and it is up to the app to restore them to the proper state. However on the iPad what I get is that iPadOS persists only number of windows, but not their type. So all windows will be restored as the initial/default WindowGroup even if they were not of those type while the app was running!!! If someone has idea how to persist windows properly that would be great. But if someone has at least idea on how to disable this function (so that windows are not persisted at all) that would be certainly of great hep too. Unfortunately I can't see that it is possible to disable this on the iPad, on the Mac it should be possible, but there it works properly so no need for that...
Posted
by ivan.icin.
Last updated
.
Post marked as solved
1 Replies
479 Views
At the moment when you set the App identifier on the Apple Developer web portal you can't check MusicKit as its capability. At first I thought that it is no longer needed as I made some progress and could authorise the app to use MusicKit on device. However whenever it tries to access something I get: [DataRequesting] Failed retrieving tokens for MusicDataRequest.Context(url: "https://api.music.apple.com/v1/storefronts/us"). Error = .developerTokenRequestFailed. I have tried with one app that was previously set through Apple Developer portal and it works. As soon as I change its bundle identifier (which creates a new app identifier) it has the same problem. And there is no place to check MusicKit anymore, at least not for me.
Posted
by ivan.icin.
Last updated
.
Post not yet marked as solved
1 Replies
554 Views
I have checked everything but this doesn't appear to work. Here is the part of the code used for that - simplified my view looks like this:         ScrollViewReader { scroll in             List(voices) { item in                 Button(item.title) { }                 .fontWeight(item.id == selected ? .bold : .regular)             }             .onAppear() {                 scroll.scrollTo(selected, anchor: .center)             }         } selected is properly shown as bold, so the value is proper. But the app doesn't scroll to it. I have tried various things like dispatching on main thread and even dispatching on main thread after 1 second, but nothing helps. However that scroll code works when being called from the Button. Is this a bug on watchOS?
Posted
by ivan.icin.
Last updated
.
Post not yet marked as solved
0 Replies
337 Views
In the new form to self report privacy aspects of the app by the developer there is the section Customer support. However it is not clear what this relates to. I would assume that it relates only when the users asks for the support inside the app. Technically it could relate to email support and web form support, but then it would be a little strange request. Obviously that you get the email address if someone sends you an email, you can't block that even if you wanted to. Unfortunately developer support doesn't want to provide any further information for this. What is your opinion on this?
Posted
by ivan.icin.
Last updated
.