Posts

Post not yet marked as solved
2 Replies
1.1k Views
Prior to iOS 16, Intent Handlers in SiriKit only had 10 seconds to complete the request. However, i have not come across any mention of a time limit in the documentation for the new AppIntents framework. My own testing revealed this limit to be somewhere between 20-25 seconds. Does anyone know what the official time limit is to complete a request with the new AppIntents framework?
Posted
by nokey4.
Last updated
.
Post marked as solved
8 Replies
2.3k Views
When using just the application name in a phrase, it works great and the shortcut can be invoked via Siri: e.g. "Show books in \(.applicationName)" // This works But introducing a parameter in a phrase fails to create a working shortcut that can be invoked via Siri: e.g. "Show \(\.$book) in (\.applicationName)" // Does not work where $book is a parameter for BookEntity in my intent. i am calling updateAppShortcutParameters() and i only have a single book titled "Frankenstein". When my App is launched after a fresh install, i can see that a shortcut is automatically created in the Shortcuts App but has the following title: "Show %@ in MyAppName" Even though the title looks incorrect, tapping the shortcut works and the correct book title is passed to my Intent. However, i cannot invoke the shortcut using Siri. i.e. saying "Show Frankenstein in MyAppName" does not work. Has anyone run into this particular issue? i am running Xcode 14 Beta 6 and iOS 16 Beta 7 on my iPhone. Also tested in iOS Simulator and got the same results. This is arguably the biggest selling point for App Shortcuts (zero setup required by the user) so i am hoping it is addressed before iOS 16 becomes officially available.
Posted
by nokey4.
Last updated
.
Post not yet marked as solved
2 Replies
1k Views
Our App has a feature that needs to determine if the phone was stationary during the last 10 seconds. For the past several years, we have been using CMMotionActivityManager for this feature and it has worked very reliably. We query motion activity for the past 10 seconds (using queryActivityStarting(from:to:to:) method) and check for any events where the stationary property is false. However, the behavior of CMMotionActivityManager has changed in iOS 16.4 Beta: CMMotionActivityManager no longer reports motion as it did on iOS 16.3 and earlier versions. With iOS 16.4 Beta, CMMotionActivityManager will falsely return events where the stationary property is true (or return no events) even though the phone was in motion during the query interval. There are times when it does return motion events correctly, but that only happens if the phone is in constant motion for a sustained period of time. This behavior is drastically different from previous iOS versions where even the slightest bit of movement would generate motion events. i'm really hoping this is an issue in the beta and will be sorted out soon. Feedback Filed: FB12005598
Posted
by nokey4.
Last updated
.
Post not yet marked as solved
0 Replies
323 Views
Has anyone gotten App Shortcuts Preview to work in Xcode 15? i have never seen it work in any of the Xcode 15 betas, and i just installed the latest beta (Beta 6). All i get is an "Unknown. An unexpected error occurred" alert. The shortcuts themselves are working well.
Posted
by nokey4.
Last updated
.
Post not yet marked as solved
1 Replies
363 Views
Several of the shortcuts in our App show a Snippet View. This is just a regular SwiftUI View with some text and a SF symbol. The preview works fine, tapping the shortcut in the Shortcuts App works fine, and tapping the shortcut in Spotlight works fine; in all these cases, both the text and the SF symbol are shown as expected. But when the shortcut is run by speaking a phrase using Siri, the snippet shows the text but the SF symbol is not shown. Has anyone come across this issue? This is happening on both iOS 16 and the latest iOS 17 beta (Beta 4). There are numerous errors in the logs all repeating the same error message: No symbol named 'exclamationmark.triangle.fill' found in system symbol set Here is the code for the Snippet View: struct StatusSnippetView: View { let status: String var body: some View { VStack { Image(systemImage: "exclamationmark.triangle.fill") .resizable() .aspectRatio(contentMode: .fit) .frame(height: 48) Text(status) .font(.headline) } } } Errors seen in the console: 2023-07-27 00:43:51.407698-0400 Kevo[56745:6956239] [framework] CoreUI: -[CUICatalog namedVectorGlyphWithName:scaleFactor:deviceIdiom:layoutDirection:glyphSize:glyphWeight:glyphPointSize:appearanceName:] 'exclamationmark.triangle.fill' called with scaleFactor == 0.000000 glyphPointSize == 16.000000 at '/System/Library/PrivateFrameworks/SFSymbols.framework/CoreGlyphs.bundle/Assets.car' 2023-07-27 00:43:51.407855-0400 Kevo[56745:6956239] [framework] CoreUI: -[CUICatalog namedVectorGlyphWithName:scaleFactor:deviceIdiom:layoutDirection:glyphSize:glyphWeight:glyphPointSize:appearanceName:] 'exclamationmark.triangle.fill' called with scaleFactor == 0.000000 glyphPointSize == 16.000000 at '/System/Library/PrivateFrameworks/SFSymbols.framework/CoreGlyphs.bundle/Assets.car' 2023-07-27 00:43:51.407944-0400 Kevo[56745:6956239] [framework] CoreUI: -[CUICatalog namedVectorGlyphWithName:scaleFactor:deviceIdiom:layoutDirection:glyphSize:glyphWeight:glyphPointSize:appearanceName:] 'exclamationmark.triangle.fill' called with scaleFactor == 0.000000 glyphPointSize == 16.000000 at '/System/Library/PrivateFrameworks/SFSymbols.framework/CoreGlyphs.bundle/Assets.car' 2023-07-27 00:43:51.407994-0400 Kevo[56745:6956239] [framework] CoreUI: -[CUICatalog namedVectorGlyphWithName:scaleFactor:deviceIdiom:layoutDirection:glyphSize:glyphWeight:glyphPointSize:appearanceName:] 'exclamationmark.triangle.fill' called with scaleFactor == 0.000000 glyphPointSize == 16.000000 at '/System/Library/PrivateFrameworks/SFSymbols.framework/CoreGlyphs.bundle/Assets.car' No symbol named 'exclamationmark.triangle.fill' found in system symbol set
Posted
by nokey4.
Last updated
.
Post not yet marked as solved
3 Replies
1.1k Views
When using @ObservedObject with a Core Data object, my SwiftUI view crashes when the object is deleted. SwiftUI evaluates the body after the object is deleted causing the view to access properties of a deleted object, leading to the crash. The object in question is deleted on a background context as a result of a network call, if that helps (not sure why that would matter). i can avoid the crash by having a giant if condition around the entire body of my view that checks the isDeleted flag of the Core Data object, but doing so seems rather silly. i am really hoping there is a more elegant solution to this issue. Has anyone run into this and is there a better way to avoid the crash?
Posted
by nokey4.
Last updated
.
Post not yet marked as solved
1 Replies
685 Views
i'm using classes from a generated XCFramework (contained in a Swift Package) in my project, and all of the symbols from the framework (classes, types, methods, properties, etc.) appear as Plain Text. Does anyone have a fix for this?
Posted
by nokey4.
Last updated
.
Post not yet marked as solved
0 Replies
1.4k Views
i currently have a Sign Up (registration) view with three text fields: Email Address, Password, and Confirm Password. The email address field has its textContentType set to .username, and both the passwords fields have it set to .newPassword. After entering the email address, tapping into the password field automatically autofills the password field with a strong password, but never autofills the confirm password field. The only way i have seen it autofill both password fields is if the user taps into the password field without entering an email address first. Since the email address field precedes both the password fields on the screen, it is unlikely the user will choose to enter a password first. Has anyone else experienced this, and if so, is there a way to get it to autofill both the password fields? This feature has been around since iOS 12 and i am experiencing this issue on iOS 14.6.
Posted
by nokey4.
Last updated
.
Post not yet marked as solved
3 Replies
1.3k Views
i am seeing a number of SwiftUI crashes that only occur on iOS 13 with a stack trace that ends with a call to AlertBridge.preferencesDidChange(_:). Does anyone have any insight into what might be causing this? Crashed: com.apple.main-thread 0	SwiftUI												0x1f6860ae8 AlertBridge.preferencesDidChange(_:) + 2604 1	SwiftUI												0x1f6458474 _UIHostingView.preferencesDidChange() + 412 2	SwiftUI												0x1f65262cc ViewGraph.updateOutputs(at:) + 180 3	SwiftUI												0x1f67c5e10 closure #1 in closure #1 in ViewRendererHost.render(interval:updateDisplayList:) + 816 4	SwiftUI												0x1f67c52b0 closure #1 in ViewRendererHost.render(interval:updateDisplayList:) + 524 5	SwiftUI												0x1f67bc1b8 ViewRendererHost.render(interval:updateDisplayList:) + 316 6	SwiftUI												0x1f68e2748 _UIHostingView.layoutSubviews() + 160 7	SwiftUI												0x1f68e2774 @objc _UIHostingView.layoutSubviews() + 24
Posted
by nokey4.
Last updated
.
Post not yet marked as solved
2 Replies
1.3k Views
i instantiate a NWPathMonitor when my App launches and noticed that the pathUpdateHandler is invoked every time the App is launched. i am running on a physical device and connected to WiFi at all times. Up until now, my understanding was that pathUpdateHandler is only called when changes occur.  Perhaps i am mistaken and this is the expected behavior. Can anyone else confirm?
Posted
by nokey4.
Last updated
.
Post not yet marked as solved
0 Replies
732 Views
i am presenting a SwiftUI view using UIHostingController which uses an EnvironmentObject that is created when the view is presented: swift let hostingController = UIHostingController(rootView: MyView().environmentObject(ViewModelObject()) present(hostingController, animated: true) i have noticed that after dismissing the presented view, the EnvironmentObject remains in memory; if the view is presented 3 times, 3 instances of the ViewModelObject remain in memory. i expected the ViewModelObject to be deallocated once the view is dismissed, but it remains in memory. What is the best way to ensure that ViewModelObject gets deallocated once the view is no longer onscreen?
Posted
by nokey4.
Last updated
.
Post not yet marked as solved
1 Replies
1.2k Views
i have an existing UINavigationController and i am pushing a UIHostingController with a SwiftUI View that contains a List as its top-level element. The List contains several rows created using NavigationLink where tapping a row navigates the user to a detail view. Upon returning, however, the selected row remains highlighted. The only workaround i have found is the rather ugly piece of code shown below: swift List { ZStack { Button(action: {}) { Text("Detail") } NavigationLink(destination: DetailView()) { EmptyView() } } ... } This feel ridiculous and borderline insane to have to do for each row in the List. is there a better way or are SwiftUI Lists just broken in iOS 14?
Posted
by nokey4.
Last updated
.
Post not yet marked as solved
3 Replies
841 Views
Previously, anytime a new version of Xcode was available, i could download it directly by going to Downloads and then tapping More. Now the newer versions don't show up there. Does anyone know why this is the case?
Posted
by nokey4.
Last updated
.
Post not yet marked as solved
1 Replies
1.2k Views
Hi, i'm working on an App where the original developer inadvertently created a Core Data stack with two store files. Instead of setting persistentStoreDescriptions to a single PersistentStoreDescription, one was appended to persistentStoreDescriptions:let persistentContainer = NSPersistentContainer(name: "AppModel") let storeURL: URL // URL pointing to a file under "Documents" folder let persistentStoreDescription = NSPersistentStoreDescription(url: storeURL) persistentContainer.persistentStoreDescriptions.append(persistentStoreDescription)The above ends up creating two store files, one under "Library/Application Support" and a second one under the "Documents" folder.Is there a way i can combine the two store files into one?
Posted
by nokey4.
Last updated
.