Discuss the latest Apple technologies announced at WWDC22.

Posts under WWDC22 tag

117 Posts

Post

Replies

Boosts

Views

Activity

Background Assets: Download BAManifestDownload rejected as we are out of download allowance
Background Asset Session: https://developer.apple.com/videos/play/wwdc2022/110403 I create a new project after watching the session. And i add the following in the info.plist: BAMaxInstallSize: 1024000 BAManifestURL: https://xxx.com BAInitialDownloadRestrictions : Dictionary BADownloadAllowance: 1024000 BADownloadDomainAllowList : Array *.xxx.com But when i debug the extension with this command: xcrun backgroundassets-debug -s --app-install -b com.xxx.BADemo1 -d xxxxxxx , i get some error in conslog.app: Download BAManifestDownload - com.xxx.BADemo1.Manifest-xx rejected as we are out of download allowance. Download did fail: BAManifestDownload - com.xxx.BADemo1.Manifest-xx with error: Error Domain=com.apple.backgroundassets.error Code=203 "The requested download will not be allowed due to running out of download allowance." UserInfo={NSLocalizedFailureReason=The requested download will not be allowed due to running out of download allowance.} Rejecting launching extension for <private> because it has already run too long. how i can fix this problem
3
0
1.9k
Apr ’23
How to use "SFProDisplay-Bold" font in Xamarin iOS project.
I want to use the "SFProDisplay-Bold" font in iOS project but without adding the font files in the project as this font file is 2.2 MB and it increases the App size. To see what the default system font is, added the below code in our iOS project: var systemFont = UIFont.SystemFontOfSize(20, UIFontWeight.Bold).Name; Debug.WriteLine($"System: {systemFont.FamilyName}"); This above code gave output from our project as follows -> System: .AppleSystemUIFont and the systemFont is ".SFUI-Bold" . I believe that SFUI and SF Pro Display are different fonts(correct me if wrong) Need more clarity for ways on how to implement specific font "SF Pro Display".
1
0
1.6k
Mar ’23
Get Notification History return no data
We try to get notification history records with endpoint below: https://developer.apple.com/documentation/appstoreserverapi/get_notification_history but it returns no data , example of return: {"notificationHistory":[],"hasMore":false} our app still using the server notification V1, It it we can't get data from the api as long as we don't upgrade to v2? please help, thanks
1
0
904
Feb ’23
Adding Contact to Device Contacts app crashing in macOS ventura
We are using CNSaveRequest in CNContactStore to add contacts to system device contacts. But when calling execute method the app crashing in internal libraries.The code was working fine until macOS Monetery, In macOS Ventura beta we are facing this issue. Sample Code: let store = CNContactStore() store.requestAccess(for: .contacts, completionHandler: { isSuccess,error in guard isSuccess else { return } let contact = CNMutableContact() contact.familyName = "Hello" contact.givenName = "Contact" let request = CNSaveRequest() request.add(contact, toContainerWithIdentifier: nil) do { try store.execute(request) } catch { print(error) } }) Crash:
5
2
2.7k
Feb ’23
NavigationSplitView not working as shown in "What's new with SwiftUI" session
Hey guys I'm trying to follow along with the WWDC session titled "What's new with SwiftUI". They say it's possible to have the detail view of a NavigationSplitView be determined based on a state variable by using the following code: However, and I'm kinda going crazy here, this code does NOT work on iOS whatsoever, the view will remain the one determined by "default" Switch case. It works fine on macOS, but iOS (and iPadOS) simply will not change the detail view no matter what. I have tried working around it for hours but it seems to boil down to the view never being redrawn... has anyone tried this? Is this just a iOS bug??
5
6
7.3k
Feb ’23
XCode 14 & iOS 16 Beta: No AVSpeechSynthesisVoice.speechVoices available
I'm testing my App in the Xcode 14 beta (released with WWDC22) on iOS 16, and it seems that AVSpeechSynthesisVoice is not working correctly. The following code always returns an empty array: AVSpeechSynthesisVoice.speechVoices() Additionally, attempting to initialize AVSpeechSynthesisVoice returns nil for all of the following: AVSpeechSynthesisVoice(language: AVSpeechSynthesisVoice.currentLanguageCode()) AVSpeechSynthesisVoice(language: "en") AVSpeechSynthesisVoice(language: "en-US") AVSpeechSynthesisVoice(identifier: AVSpeechSynthesisVoiceIdentifierAlex) AVSpeechSynthesisVoice.speechVoices().first
15
3
5.1k
Feb ’23
State of the Union video on iOS or Apple TV
When I try to watch the WWDC22 "Platforms State of the Union" video on my Apple TV, iPhone, or iPad, using the Developer app, the video only shows a single frame every few seconds and there is no audio. The video plays fine on the Developer app on my Mac. Has anyone else had this problem? Is there a work around? (I've tried deleting the Developer app on my Apple TV and reinstalling it, but no joy).
1
0
860
Jan ’23
How to implement background asset downloading feature?
I want to use features described in the background assets WWDC22 session (https://developer.apple.com/videos/play/wwdc2022/110403/). In earlier versions of Xcode 14 beta there used to be a background asset extension target type, however this got removed in beta 5 and has still not been put back even though Xcode 14 RC is released. With Xcode 14 beta 4, if the background asset target was chosen then a bunch of template code was created, same as happens with any extension type. But if the background asset extension target type isn't even present in the Xcode 14 RC, how is one supposed to create an extension and use this new feature?
3
0
1.6k
Dec ’22
WWDC example of signal generator outputs files with 0 duration
Using the example from WWDC, with the following command ./SignalGenerator -signal square -duration 3 -output ./uncompressed.wav I can generate an audio file, which is not playable, and its Get Info is: Duration: 00:00 Audio channels: Mono Sample rate: 44,1 kHz Bits per sample: 32 Although for MacOS Preview the duration is zero, this file is playable in VLC and convertible to other formats, so its content is ok. To get more information about the format of an output file I changed the example to print outputFormatSettings: ["AVLinearPCMBitDepthKey": 32, "AVLinearPCMIsBigEndianKey": 0, "AVSampleRateKey": 44100, "AVFormatIDKey": 1819304813, "AVLinearPCMIsFloatKey": 1, "AVNumberOfChannelsKey": 1, "AVLinearPCMIsNonInterleaved": 1] I don’t know how to interpret the “number of AVFormatIDKey": 1819304813. The documentation says: let AVFormatIDKey: String - For information about the possible values for this key, see Audio Format Identifiers Having red this, I still don't know the relation of AVFormatIDKey and listed Audio Format Identifiers. If I knew which file format to expect, it might have helped to guess why the duration of the generated files is always 0? Can you help me with both questions? Thanks.
2
0
1.3k
Dec ’22
How to work with user location in iOS 16 App Intents?
I'm working on an App Shortcut using the new AppIntents framework in iOS 16 and I'm trying to get the user's current location, everything is enabled and set-up correctly with the permissions func perform() async throws -&gt; some IntentResult { //Request User Location IntentHelper.sharedInstance.getUserLocation() guard let userCoords = IntentHelper.sharedInstance.currentUserCoords else { throw IntentErrors.locationProblem } //How to wait for location?? return .result(dialog: "Worked! Current coords are \(userCoords)") { IntentSuccesView() } } And here is the IntentHelper class class IntentHelper: NSObject { static let sharedInstance = IntentHelper() var currentUserCoords: CLLocationCoordinate2D? private override init() {} func getUserLocation() { DispatchQueue.main.async { let locationManager = CLLocationManager() locationManager.delegate = self print("FINALLY THIS IS IT") self.currentUserCoords = locationManager.location?.coordinate print(self.currentUserCoords) } } } extension IntentHelper: CLLocationManagerDelegate { func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) { print(error) manager.stopUpdatingLocation() } } Problem is, this sometimes, very rarely works, most of the times it prints nil, so how would you go about waiting for the location?
0
0
995
Nov ’22
PushToTalk Backend Requirements
I'm looking to see if someone could point me in the right direction in terms of understanding what's needed for to host a backend server for the new Push To Talk API. Additionally, I'm curious to know what type of latency times people are getting. We've ran a mumble server which unfortunately had a considerable amount of latency.
Replies
1
Boosts
1
Views
1.9k
Activity
May ’23
No replacement for MKMaptype globe view in iOS16?
Before iOS16, Map can be displayed as a globe by setting MapType as either SatelliteFlyover or HybridFlyover constant  https://developer.apple.com/documentation/mapkit/mkmaptype With iOS16 the MKMapType is deprecated but I couldn't find any equivalent of a 3d globe view in the new preferredConfiguration of MKMapConfiguration. Is it no longer possible?
Replies
2
Boosts
0
Views
1.9k
Activity
Apr ’23
Background Assets: Download BAManifestDownload rejected as we are out of download allowance
Background Asset Session: https://developer.apple.com/videos/play/wwdc2022/110403 I create a new project after watching the session. And i add the following in the info.plist: BAMaxInstallSize: 1024000 BAManifestURL: https://xxx.com BAInitialDownloadRestrictions : Dictionary BADownloadAllowance: 1024000 BADownloadDomainAllowList : Array *.xxx.com But when i debug the extension with this command: xcrun backgroundassets-debug -s --app-install -b com.xxx.BADemo1 -d xxxxxxx , i get some error in conslog.app: Download BAManifestDownload - com.xxx.BADemo1.Manifest-xx rejected as we are out of download allowance. Download did fail: BAManifestDownload - com.xxx.BADemo1.Manifest-xx with error: Error Domain=com.apple.backgroundassets.error Code=203 "The requested download will not be allowed due to running out of download allowance." UserInfo={NSLocalizedFailureReason=The requested download will not be allowed due to running out of download allowance.} Rejecting launching extension for <private> because it has already run too long. how i can fix this problem
Replies
3
Boosts
0
Views
1.9k
Activity
Apr ’23
How can you convert Xcode (SwiftUI) file to .swiftpm?
I built a project on Xcode on SwiftUI and currently is a file ending with .xcodeproj. I want to run this on iPadOS 16, on Playgrounds. Is there any way I can run this file on Playgrounds? *I want to run this app on iPadOS 16, as this project is more optimized for iPad rather than Mac.
Replies
1
Boosts
1
Views
976
Activity
Apr ’23
3 questions
Can I get tickets to the wwdc if I am under 13? Can I join the developer program without a legal business? Can I enter the swift student challenge if i am under 13?
Replies
5
Boosts
0
Views
1.5k
Activity
Mar ’23
How to use "SFProDisplay-Bold" font in Xamarin iOS project.
I want to use the "SFProDisplay-Bold" font in iOS project but without adding the font files in the project as this font file is 2.2 MB and it increases the App size. To see what the default system font is, added the below code in our iOS project: var systemFont = UIFont.SystemFontOfSize(20, UIFontWeight.Bold).Name; Debug.WriteLine($"System: {systemFont.FamilyName}"); This above code gave output from our project as follows -> System: .AppleSystemUIFont and the systemFont is ".SFUI-Bold" . I believe that SFUI and SF Pro Display are different fonts(correct me if wrong) Need more clarity for ways on how to implement specific font "SF Pro Display".
Replies
1
Boosts
0
Views
1.6k
Activity
Mar ’23
Get Notification History return no data
We try to get notification history records with endpoint below: https://developer.apple.com/documentation/appstoreserverapi/get_notification_history but it returns no data , example of return: {"notificationHistory":[],"hasMore":false} our app still using the server notification V1, It it we can't get data from the api as long as we don't upgrade to v2? please help, thanks
Replies
1
Boosts
0
Views
904
Activity
Feb ’23
Adding Contact to Device Contacts app crashing in macOS ventura
We are using CNSaveRequest in CNContactStore to add contacts to system device contacts. But when calling execute method the app crashing in internal libraries.The code was working fine until macOS Monetery, In macOS Ventura beta we are facing this issue. Sample Code: let store = CNContactStore() store.requestAccess(for: .contacts, completionHandler: { isSuccess,error in guard isSuccess else { return } let contact = CNMutableContact() contact.familyName = "Hello" contact.givenName = "Contact" let request = CNSaveRequest() request.add(contact, toContainerWithIdentifier: nil) do { try store.execute(request) } catch { print(error) } }) Crash:
Replies
5
Boosts
2
Views
2.7k
Activity
Feb ’23
NavigationSplitView not working as shown in "What's new with SwiftUI" session
Hey guys I'm trying to follow along with the WWDC session titled "What's new with SwiftUI". They say it's possible to have the detail view of a NavigationSplitView be determined based on a state variable by using the following code: However, and I'm kinda going crazy here, this code does NOT work on iOS whatsoever, the view will remain the one determined by "default" Switch case. It works fine on macOS, but iOS (and iPadOS) simply will not change the detail view no matter what. I have tried working around it for hours but it seems to boil down to the view never being redrawn... has anyone tried this? Is this just a iOS bug??
Replies
5
Boosts
6
Views
7.3k
Activity
Feb ’23
XCode 14 & iOS 16 Beta: No AVSpeechSynthesisVoice.speechVoices available
I'm testing my App in the Xcode 14 beta (released with WWDC22) on iOS 16, and it seems that AVSpeechSynthesisVoice is not working correctly. The following code always returns an empty array: AVSpeechSynthesisVoice.speechVoices() Additionally, attempting to initialize AVSpeechSynthesisVoice returns nil for all of the following: AVSpeechSynthesisVoice(language: AVSpeechSynthesisVoice.currentLanguageCode()) AVSpeechSynthesisVoice(language: "en") AVSpeechSynthesisVoice(language: "en-US") AVSpeechSynthesisVoice(identifier: AVSpeechSynthesisVoiceIdentifierAlex) AVSpeechSynthesisVoice.speechVoices().first
Replies
15
Boosts
3
Views
5.1k
Activity
Feb ’23
Metal 3 Support?
After WWDC 2022, apple was release Metal 3, a new version of their Graphics API, I use Radeon Pro 560X GPU on my iMac 21.5 4K 2019, does my GPU support for Metal 3?
Replies
3
Boosts
0
Views
3.2k
Activity
Jan ’23
State of the Union video on iOS or Apple TV
When I try to watch the WWDC22 "Platforms State of the Union" video on my Apple TV, iPhone, or iPad, using the Developer app, the video only shows a single frame every few seconds and there is no audio. The video plays fine on the Developer app on my Mac. Has anyone else had this problem? Is there a work around? (I've tried deleting the Developer app on my Apple TV and reinstalling it, but no joy).
Replies
1
Boosts
0
Views
860
Activity
Jan ’23
Unable to add custom menu in PDFKit using "UIEditMenuInteraction"
I'm using PDFKit to render a PDF and I have added custom menus using "UIMenuController". But it is now deprecated from iOS 16 onwards. Any help would be really appreciated. Thanks in Advance.
Replies
1
Boosts
1
Views
1.4k
Activity
Jan ’23
How to implement background asset downloading feature?
I want to use features described in the background assets WWDC22 session (https://developer.apple.com/videos/play/wwdc2022/110403/). In earlier versions of Xcode 14 beta there used to be a background asset extension target type, however this got removed in beta 5 and has still not been put back even though Xcode 14 RC is released. With Xcode 14 beta 4, if the background asset target was chosen then a bunch of template code was created, same as happens with any extension type. But if the background asset extension target type isn't even present in the Xcode 14 RC, how is one supposed to create an extension and use this new feature?
Replies
3
Boosts
0
Views
1.6k
Activity
Dec ’22
Is there a way to disable Stage Manager?
Is there a way to disable Stage Manager? Other than enabling "Requires full screen".
Replies
2
Boosts
1
Views
1.9k
Activity
Dec ’22
Is there/anyone find the Photo Subject extraction API for iOS 16?
specifically: https://www.macrumors.com/2022/06/15/ios-16-remove-subject-from-background/
Replies
2
Boosts
3
Views
1.8k
Activity
Dec ’22
WWDC example of signal generator outputs files with 0 duration
Using the example from WWDC, with the following command ./SignalGenerator -signal square -duration 3 -output ./uncompressed.wav I can generate an audio file, which is not playable, and its Get Info is: Duration: 00:00 Audio channels: Mono Sample rate: 44,1 kHz Bits per sample: 32 Although for MacOS Preview the duration is zero, this file is playable in VLC and convertible to other formats, so its content is ok. To get more information about the format of an output file I changed the example to print outputFormatSettings: ["AVLinearPCMBitDepthKey": 32, "AVLinearPCMIsBigEndianKey": 0, "AVSampleRateKey": 44100, "AVFormatIDKey": 1819304813, "AVLinearPCMIsFloatKey": 1, "AVNumberOfChannelsKey": 1, "AVLinearPCMIsNonInterleaved": 1] I don’t know how to interpret the “number of AVFormatIDKey": 1819304813. The documentation says: let AVFormatIDKey: String - For information about the possible values for this key, see Audio Format Identifiers Having red this, I still don't know the relation of AVFormatIDKey and listed Audio Format Identifiers. If I knew which file format to expect, it might have helped to guess why the duration of the generated files is always 0? Can you help me with both questions? Thanks.
Replies
2
Boosts
0
Views
1.3k
Activity
Dec ’22
Some questions about m1 pad connected to external screen
is there a way let develop know an m1 pad has connected an external display? if this pad is not in mirror-display mode, can I show two different window from one app in two screens?
Replies
1
Boosts
0
Views
948
Activity
Nov ’22
Xcode 14.1 crashing while clicking cmd+Z
while doing storyboard editings app is got crashed please repair it
Replies
1
Boosts
0
Views
1k
Activity
Nov ’22
How to work with user location in iOS 16 App Intents?
I'm working on an App Shortcut using the new AppIntents framework in iOS 16 and I'm trying to get the user's current location, everything is enabled and set-up correctly with the permissions func perform() async throws -&gt; some IntentResult { //Request User Location IntentHelper.sharedInstance.getUserLocation() guard let userCoords = IntentHelper.sharedInstance.currentUserCoords else { throw IntentErrors.locationProblem } //How to wait for location?? return .result(dialog: "Worked! Current coords are \(userCoords)") { IntentSuccesView() } } And here is the IntentHelper class class IntentHelper: NSObject { static let sharedInstance = IntentHelper() var currentUserCoords: CLLocationCoordinate2D? private override init() {} func getUserLocation() { DispatchQueue.main.async { let locationManager = CLLocationManager() locationManager.delegate = self print("FINALLY THIS IS IT") self.currentUserCoords = locationManager.location?.coordinate print(self.currentUserCoords) } } } extension IntentHelper: CLLocationManagerDelegate { func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) { print(error) manager.stopUpdatingLocation() } } Problem is, this sometimes, very rarely works, most of the times it prints nil, so how would you go about waiting for the location?
Replies
0
Boosts
0
Views
995
Activity
Nov ’22