Connect with Apple engineers to discuss the latest Apple technologies announced at WWDC21.

Posts under WWDC21 tag

68 Posts
Sort by:
Post not yet marked as solved
3 Replies
1.7k Views
How do we get the appropriate profile to enable Matter support in the developer preview build of iOS 15? The talk mentions that this is required, but I'm not sure where to acquire the profile.
Posted Last updated
.
Post not yet marked as solved
2 Replies
927 Views
Hi, We have an API that I'm trying to prototype some async await extensions for. Most of our asynchronous methods are cancelable by returning an object that implements our AGSCancelable protocol that includes a cancel() method. Here's the code I have to try to extend a geocoding method on our AGSLocatorTask class: extension AGSLocatorTask { func geocode(withSearchText text: String) async throws -> [AGSGeocodeResult] { typealias GeocodeContinuation = CheckedContinuation<[AGSGeocodeResult], Error> var cancelable: AGSCancelable? return try await withTaskCancellationHandler(handler: { cancelable?.cancel() }, operation: { return try await withCheckedThrowingContinuation({ (continuation: GeocodeContinuation) in cancelable = self.geocode(withSearchText: text) { results, error in if let error = error { continuation.resume(throwing: error) } else { continuation.resume(returning: results!) } } }) }) } } This works great, but I have to comment out the cancelable?.cancel() call or else I get a Reference to captured var 'cancelable' in concurrently-executing code static analysis error (see attached screenshot). Could someone explain how to fix this, or is this a bug in the Xcode beta? Many thanks, and thanks for a great WWDC!!
Posted
by nfurness.
Last updated
.
Post not yet marked as solved
1 Replies
2.2k Views
We have a question with respect to the Live Text feature shown in the Keynote. Is there an API or Framework available for this? Also, if there is a Framework/API available can we leverage it on macOS?
Posted Last updated
.
Post not yet marked as solved
6 Replies
3.3k Views
In SOTU, a Focus Status API was announced for communication apps, but I haven't found any session nor documentation about it. Where can I find more information about that new API?
Posted Last updated
.
Post marked as solved
1 Replies
6.4k Views
Hello. I was wondering if there is any way to manually set the Safari 15 tab color-theme color to my website. It seems like Safari automatically choose the color but I find out that this selection occurs during the first seconds of website load and, because of that, the color being choosen is not the right one for my website. Is there any CSS I could add or a metatag that tells safari which color it should pick? I know this is kinda a wierd request, but I want to provide my visitors the richest experience they could get. Thank you.
Posted Last updated
.
Post marked as Apple Recommended
9.3k Views
Hi Team, Attempting to build our app with Xcode 13 / iOS 15, and getting a fail during archive, appearing to come from within the accelerate module. The two errors are: /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/lib/swift/Accelerate.swiftmodule/armv7-apple-ios.swiftinterface:591:6: error: enum cases with associated values cannot be marked potentially unavailable with '@available'   @available(macOS 12.0, iOS 15.0, tvOS 15.0, watchOS 8.0, *)    ^ in a number of places, and the following one, once: /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/lib/swift/Accelerate.swiftmodule/armv7-apple-ios.swiftinterface:1:1: error: failed to build module 'Accelerate'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.5 (swiftlang-1300.0.17.216 clang-1300.0.18.1)', while this compiler is 'Apple Swift version 5.5 (swiftlang-1300.0.19.104 clang-1300.0.18.4)'). Please select a toolchain which matches the SDK. // swift-interface-format-version: 1.0 ^ This is Version 13.0 beta (13A5154h), doing a release build archive (dev build/run succeeds if that helps). Any insights into whats going on would be great? Cheers.
Posted
by crafterm.
Last updated
.
Post not yet marked as solved
3 Replies
1.5k Views
What is the best way to customize rendering of Markdown styles, in both UIKit and Swift? For instance, how should I tell it what font to use for normal and Bold text? This is what kept us from using NSAttributedString+HTML for embedded string formatting in the past, and AttributedString+Markdown looks even better for this use case, so I'm hoping the fact that we use a custom font won't be a roadblock. Is calling .replaceAttributes() the expected pattern, and just doing this for each expected attribute in each string?
Posted
by scier.
Last updated
.
Post not yet marked as solved
4 Replies
1.6k Views
Notifications for native apps was released in 2009. It's now 2021 and we still have no indication when Web App Notifications are being developer let alone released. Service Workers and Notifications are already built and working in desktop safari. Given that the majority of apps require some sort of notification to be useful, is the safari team currently developing this feature and what is the planned release date?
Posted
by Niskraw.
Last updated
.
Post not yet marked as solved
3 Replies
1.6k Views
In the Meet AsyncSequence talk, there's a very cool use case that's shown in one of the slides - the new notifications property on NotificationCenter is an async sequence and the code sample does something like: let notification = await center.notifications(named: ....).first { ... } This seems really intriguing and useful to me but I had a few questions about the details of how this works: What is the type of notification in this snippet? A Task? Where would I store this value? What context should this be invoked in, especially if I want to have a long-running notification filter running that will remain active for the lifetime of the app? Basically, I'm curious to see an example of the code surrounding this snippet.
Posted Last updated
.
Post marked as solved
2 Replies
1k Views
In the session on StoreKit 2 (which looks amazing!), the presenter says: In fact, if your app is running when a purchase is made on another device, you'll be notified about the new transaction. This seems to mean that when an app uses the listener API to be notified of transactions, it will get transactions that happened on other devices. My app offers purchases across other platforms in addition to iOS, and when a purchase happens we register it with our own account system. If a user has the app running on both their iPad and iPhone and makes a purchase on the phone, if the iPad gets notified of it the same way it would of a purchase made on the iPad, both devices will try to report it to our system. This seems undesirable. What's the recommended approach here? Should we just make sure our system will disregard duplicate transaction reports? Or is there a way to know whether a transaction originated on this device? I don't see a property on the transaction type that looks like it could accomplish this. Maybe the deviceVerification properties? But that's seems more like the new edition of transaction receipt verification - failing that check would presumably mean that the purchase is invalid, not that it didn't happen on this device...?
Posted Last updated
.
Post not yet marked as solved
0 Replies
611 Views
Hi Apple is requiring Apps to offer an option to delete user's own account. However, account normally is tied to many different inter linked systems within an organization such as OMS, CRM, Marketing, promotion, 3rd party etc. What happens if someone inadvertently deletes an account but placed an order, or need to return an item.. Is a hard delete required or soft delete is i.e. disabling the account is acceptable to Apple. A prompt response would be greatly appreciated.
Posted Last updated
.
Post not yet marked as solved
0 Replies
591 Views
I can’t seem to create any bot with Xcode 13 on macOS Monterey. The error message was “The server is currently unable to build for any platforms...” The app I was trying to build was the standard macOS SwiftUI application, straight from the template code. What seems to be the problem here?
Posted
by adib.
Last updated
.
Post not yet marked as solved
3 Replies
1.3k Views
On applying the configuration profile(com.apple.applicationaccess - Restriction) with allowEraseContentAndSettings to false in iOS 15 device, the restriction is not imposed on supervised device. Can see restriction applied in Setting->General->VPN&Device management ->MDM profile-> Restriction. But on checking Setting->General->Reset Erase content and setting is shown. On clicking it the device has erased to factory setting. Have attached the mobileconfig and screenshots of the setting. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>PayloadContent</key> <array> <dict> <key>PayloadDescription</key> <string>Configures restrictions</string> <key>PayloadDisplayName</key> <string>Restrictions</string> <key>PayloadIdentifier</key> <string>com.apple.applicationaccess.8DA3EB9B-3C9E-45C1-99BC-B2A900E55628</string> <key>PayloadType</key> <string>com.apple.applicationaccess</string> <key>PayloadUUID</key> <string>8DA3EB9B-3C9E-45C1-99BC-B2A900E55628</string> <key>PayloadVersion</key> <integer>1</integer> <key>allowEraseContentAndSettings</key> <false/> </dict> </array> <key>PayloadDisplayName</key> <string>ContentRestriction</string> <key>PayloadIdentifier</key> <string>C7A744A3-0738-43C9-B962-DEBAABE63F4E</string> <key>PayloadRemovalDisallowed</key> <false/> <key>PayloadType</key> <string>Configuration</string> <key>PayloadUUID</key> <string>4BED8AF1-F1AC-4D2D-8B29-A130453BECB9</string> <key>PayloadVersion</key> <integer>1</integer> </dict> </plist> ![]("https://developer.apple.com/forums/content/attachment/d6e05749-559e-4428-95ad-96f304f36049" "title=IMG_0004.PNG;width=1668;height=2224") ![]("https://developer.apple.com/forums/content/attachment/3d4644b6-c074-486c-8010-1b843dc78c77" "title=IMG_0003.PNG;width=1668;height=2224") ` ![]("https://developer.apple.com/forums/content/attachment/a940b74b-3de0-4b52-b086-5e1102cb6ece" "title=IMG_0002.jpg;width=1668;height=2224") ``
Posted
by fahath.
Last updated
.
Post not yet marked as solved
1 Replies
368 Views
I see in the docs that AsyncImage only takes in a URL, are there plans to expand the API to allow passing in a URLRequest, and possibly the URLSession as well? Our company's image server requires token authentication, which we pass as an HTTP header, so we're always constructing URLRequests and passing them to our custom URLSession.
Posted Last updated
.
Post not yet marked as solved
1 Replies
1.7k Views
I'm using Xcode 12 with iPhone 12 Pro. Everything worked fine on iOS 14. But after I updated my device to iOS 15 I’m getting the app's splash screen for more than a minute every time I build the app. I've also tried to use Xcode 13 with the iOS 15 device, and it also seems to be broken!  Moreover, when I use a breakpoint and it stops I need to wait for 30-50 seconds to step over or to continue program execution. Does anyone have these problems too?
Posted
by yuraist.
Last updated
.
Post not yet marked as solved
2 Replies
5.7k Views
I created a new iOS project targeting iOS 15 using Xcode 13.0 beta (13A5154h) on Big Sur to test some new SwiftUI features.  Xcode shows me the error like "*** is only available in iOS 15.0 or newer" for all new API for iOS 15.  The project target is iOS 15  I tried to create another project again, same problem.  Would you please help to fix it?  Thanks a lot! Philipp
Posted Last updated
.
Post not yet marked as solved
0 Replies
491 Views
For some reason on iOS 15 the app icon banner is missing for the expanded view on rich notifications. Toggling UNNotificationExtensionDefaultContentHidden back to false on the Content Extensions Info.plist causes the app icon to come back, but this isn't what we want since it also shows the original title & message. I've noticed that the Facebook notifications also have the same issues at the moment. I couldn't any documentation on why this changed. Attached is an example of a sample project where the App Icon is missing.
Posted Last updated
.
Post marked as Apple Recommended
4.3k Views
I am testing iOS15 and some new functionalities of UIKit. I've encountered some issues, not sure how to solve them. I did not change that code. This is just a piece of code that worked perfectly with the iOS 14, now after updating my target, it throws an error. Xcode crashes the moment when my custom header for the UICollectionView of type UICollectionElementKindSectionHeader is being returned for the dataSource. Here is my code: private func configureDataSource() { dataSource = UICollectionViewDiffableDataSource<Section, Follower>(collectionView: collectionView, cellProvider: { (collectionView, indexPath, followers) -> UICollectionViewCell? in let cell = collectionView.dequeueReusableCell(withReuseIdentifier: FollowerCell.reuseId, for: indexPath) as! FollowerCell cell.set(on: followers) return cell }) dataSource.supplementaryViewProvider = { (collectionView, kind, indexPath) in let header = collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: FollowersCollectionHeaderView.reuseId, for: indexPath) as! FollowersCollectionHeaderView header.set(with: self.user) return header } } The log says: the view returned from -collectionView:viewForSupplementaryElementOfKind:atIndexPath: does not match the element kind it is being used for. When asked for a view of element kind 'FollowersCollectionHeaderView' the data source dequeued a view registered for the element kind 'UICollectionElementKindSectionHeader'. I did cast UICollectionElementKindSectionHeader to FollowersCollectionHeaderView, therefore I am not sure what is the issue here. I've watched WWDC21 what's new in UIKit but haven't seen any mentioning of any change for that particular code. Any suggestions, what to fix in that code?
Posted
by jmgawe.
Last updated
.