Posts

Sort by:
Post not yet marked as solved
0 Replies
6 Views
Hello, everyone, I have a problem I'm stuck with and have been trying to solve without success for the past 2 weeks. I am developing a SwiftUI application for Apple Watch which for now I am only running on the simulator. This application has to play sounds but unfortunately so far without success for Apple Watch simulator. When I tap the button on the application running on the Series 9 (45mm) simulator with watchOS 10.2. I cannot hear any sounds on my MacBook Pro. This happens for all Apple Watch simulators I have in my MacBook. The same exact code works on the iPhone 15 simulator with iOS 17.2 and I hear the file 1.mp3 from MacBook Pro speakers and also from bluetooth hearphones, if I connect them. The code is this import SwiftUI import AVFoundation struct ContentView: View { @State var audioPlayer:AVPlayer? @State var isPlaying : Bool = false var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") Button("Play"){ if let path = Bundle.main.path(forResource: "1", ofType: "mp3") { let fileUrl = URL(fileURLWithPath: path) do{ try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playback) try AVAudioSession.sharedInstance().setActive(true) audioPlayer = AVPlayer(url: fileUrl) guard let audioPlayer = audioPlayer else { return } audioPlayer.play() } catch { } } } } .padding() } } Thanks for your support!
Posted
by
Post not yet marked as solved
0 Replies
8 Views
My app offers a premium subscription, and all works well locally when I test with a Sandbox tester account. However, in app review, the reviewers are not able to access premium - Apple does not open the subcription/payments modal when the reviewers click the "Get Premium" button. I'm wondering if it's because I haven't "attached" my subscription to my review as described in https://developer.apple.com/help/app-store-connect/manage-submissions-to-app-review/submit-for-review/? The instructions says: "On the right, scroll down to the In-App Purchases and Subscriptions section, then click Select in-app purchases and subscriptions. When submitting a subscription for the first time, it must be submitted with a new app version." But I don't see any "In-App Purchases and Subscriptions" section on this page. Am I missing something or are the docs outdated?
Posted
by
Post not yet marked as solved
0 Replies
11 Views
When I run the following code, the Matchmaker view is populated with me (local player) and my opponent (correct picture and friendly name). however, the "Send Game" button is disabled. I assume that recipients is set correctly. There are errors from loadPlayersForIdentifiers . GKMatchRequest *request = [[GKMatchRequest alloc] init]; request.minPlayers = 2; request.maxPlayers = 2; request.defaultNumberOfPlayers = 2; request.inviteMessage = @"Testing"; [GKPlayer loadPlayersForIdentifiers:@[ playerID ] withCompletionHandler:^(NSArray<GKPlayer *> *_Nullable players, NSError *_Nullable error) { if (error) { NSLog(@"Error loading player: %@", error); } else if (players.count > 0) { request.recipients = players; GKTurnBasedMatchmakerViewController *mmvc = [[GKTurnBasedMatchmakerViewController alloc] initWithMatchRequest:request]; mmvc.turnBasedMatchmakerDelegate = self; mmvc.showExistingMatches = NO; [self presentViewController:mmvc animated:YES completion:nil]; } }]; If I remove the opponent, and then re-add them manually, the "Send Game" button is enabled.
Posted
by
Post not yet marked as solved
1 Replies
18 Views
Hello Everyone, This is regarding recent upgrade issue on my iPhone. I am still struggling to get access to my iCloud storage data for iMessages, Notes with password, Health related stats, etc. I would like to explain chronology of the entire event. There was a recent IOS 17.4.1 update came on April 07th, 2024. I clicked on the update but nothing happened then suddenly my phone passcode wasn’t working. I restarted my phone then the phone was not even accepting my face id. I went to the Apple store. Apple support team have requested me to reset (erase entire data) iPhone which I had already done on next day. I had no others options actually. My phone passcode was not working in reality due to iso update because I haven’t changed my passcode since more than a year. It is also not due to iPhone screen issue which apple team was saying to me initially. Unfortunately, my Apple ID credentials wasn’t working after phone reset so I had to put my Apple ID on recovery mode which took almost 15days to recover even though process is automated as per apple support team which they can’t reduce it. I understand that they are doing for privacy reason but who wants such privacy when even owner can’t access his own account for 15days. I offered them to verify my personal details such as email ID, phone number, passport number and any other details which they can use to expedite the process but they didn’t help on this. At end of the recovery (after 15days), they used same details i.e. my email ID and SMS on my registered number to verify. I don’t understand their logic but if they can take 2-3 business working days for same process then it makes sense to wait rather than 15days. After I regained access to my apple id, I have restored everything using my iCloud storage. I observed that few applications such as contacts, WhatsApp, etc. are restored properly but some of the applications such as iMessage, Notes (specifically locked notes), health data were not restored. iMessage are not synchronizing with iCloud storage when I tried to do it manually too in setting >> apple id>> iCloud >> show all >> messages in iCloud >> sync now. Nothing happens after clicking on it. Locked notes are still showing an error message “Can’t view Note. ‘This note can’t be viewed because encryption key wasn’t found in iCloud keychain. Resetting your end-to-end encrypted data can cause this’”. I have never used custom password to lock note instead I was using Face ID earlier to lock or unlock some of notes. All these things are happening because it is asking for old iPhone passcode to connect with iCloud storage while resetting my iPhone. I am trying to enter all the previous passcodes. a. When I entered correct passcode, then there is no error but still applications are not synchronizing with iCloud storage. b. When I enter incorrect passcodes (multiple passcodes but one at a time) then it gives an error “Verification failed”. It means it is detecting correct passcode as per above point. There is some issue with passcode synchronization with iCloud storage. I have opened a case with apple support team but meanwhile If any one of you had faced similar problem, then kindly suggest ways to me so I will regain access to some important personal information which are present in my iCloud storage. I would like to inform everyone that don’t rely completely on single brand or product. Take multiple backups may be on personal laptops, SSDs, etc. I learnt a lesson that even apple products, software & services are not reliable so think before buying costly products just for sake of brand name.
Posted
by
Post not yet marked as solved
1 Replies
17 Views
Hello, We recently encountered an issue with our app's submission to the App Store regarding missing permissions. Specifically, our app requires access to two categories called: NSPrivacyAccessedAPICategoryFileTimestamp and NSPrivacyAccessedAPICategoryUserDefaults for proper functionality. Although we've managed to resolve the immediate concern, it's important that we address this as soon as possible (to avoid any further complications with future app submissions). As I'm not entirely familiar with app development/coding, I'm reaching out to seek help with this. We also want to know if the issue we're experiencing is related to using pre-release software or our code? Any insights or help with this would be greatly appreciated. Thanks!
Posted
by
Post not yet marked as solved
0 Replies
24 Views
Hey all, I have a very simple view that offsets some view based on the value of a binding. To calculate that offset, I also need to have the previous value of the binding. To have that, am using withAnimation(). I am also using a custom animation. To keep things simple, my custom animation right now is just a linear progression. I added some code to keep track of the number of times animate<>(:::) gets called. Turns out, when I add .background(Color.green) to my Text(), the number of calls gets increased by 60 (per second of animation). If .background(Color.green) gets added last (more precisely, after .offset(x: newOffset)), the background is not animated and the extra calls do not happen. After reading the documentation and watching 'Demystifying SwiftUI', 'Demystifying SwiftUI performance' and various general SwiftUI and SwiftUI animation related WWDC sessions I am still feeling like I miss some basic understanding of SwiftUI animations. Who can explain to me what is happening here and why? Or is the fact that animate<>(:::) gets called a number of times that is increasing linearly with the number of modifiers and number of subviews OK, and I should not be worried at all? Relevant code below: View: struct TestView: View { @Binding var offset: Double @State private var previousOffset: Double = 0 @State private var isAnimatingToNewOffset = false private let valuesInView = 20 var body: some View { GeometryReader { geometry in let headingHeight: CGFloat = 80 let newOffset = isAnimatingToNewOffset ? -(offset - previousOffset) / CGFloat(valuesInView) * geometry.size.width : 0 Text("Some text") .frame(width: geometry.size.width) .frame(height: headingHeight) .offset(y: (geometry.size.height - headingHeight) / 2) .background(Color.green) // moving this around, or removing it will cause the animate<>(:::) to be called a different number if times .offset(x: newOffset) } .background(Color.gray) .onChange(of: offset) { (oldValue, newValue) in /// entering an animated change isAnimatingToNewOffset = true withAnimation(Animation(MyAnimation(duration: 1))) { // before updating, keep the value of the current offset previousOffset = offSet } completion: { // now update the previous offset to be ready for a new animation previousOffset = offset // trigger another update of the body, but now without animation isAnimatingToNewOffset = false } } } } My custom animation: struct MyAnimation: CustomAnimation { /// just for debugging to understand how often this method gets called private static var count = 0 let duration: TimeInterval func animate<V>(value: V, time: TimeInterval, context: inout AnimationContext<V>) -> V? where V : VectorArithmetic { let relativeProgress = CGFloat(time / duration) // print out the number of times this function is called, and with what value print("\(String(format: "%02i", MyAnimation.count)) - \(String(format: "%1.2f", relativeProgress))") MyAnimation.count += 1 guard time < duration else { return nil } // keeping things simple for now, returning linear progress return value.scaled(by: relativeProgress) } }
Posted
by
Post not yet marked as solved
0 Replies
18 Views
I'm working on a tool which parses the output from the command "profiles -P -o" to check that our MDM profile has been deployed correctly, as there has been issues around profiles being misconfigured. It seems that the framework which the profiles command uses is private, so I'm just wondering could there be a way to get information which is similar to the output from the profiles command without having to directly use the command?
Posted
by
Post not yet marked as solved
0 Replies
20 Views
I'm trying to bind a NSProgressIndicator to Progress, but with the following code I only get an indeterminate progress indicator with a blue bar forever bouncing left and right, even after the two timers fire. According to the documentation: Progress is indeterminate when the value of the totalUnitCount or completedUnitCount is less than zero or if both values are zero. What am I doing wrong? class ViewController: NSViewController { let progress = Progress() override func loadView() { view = NSView(frame: CGRect(x: 0, y: 0, width: 500, height: 500)) let progressIndicator = NSProgressIndicator(frame: CGRect(x: 100, y: 100, width: 100, height: 100)) progressIndicator.bind(.isIndeterminate, to: progress, withKeyPath: "isIndeterminate") progressIndicator.bind(.value, to: progress, withKeyPath: "completedUnitCount") progressIndicator.bind(.maxValue, to: progress, withKeyPath: "totalUnitCount") progressIndicator.startAnimation(nil) view.addSubview(progressIndicator) progress.completedUnitCount = 3 progress.totalUnitCount = 10 Timer.scheduledTimer(withTimeInterval: 1, repeats: false) { _ in print(1) self.progress.completedUnitCount = 6 } Timer.scheduledTimer(withTimeInterval: 6, repeats: false) { _ in print(2) self.progress.completedUnitCount = 0 self.progress.totalUnitCount = 0 } } }
Posted
by
Post not yet marked as solved
0 Replies
21 Views
I call transaction information for several apps. And I don't have environment information. So I'm calling the sandbox environment as an official guide. However, unlike the official guide, certain apps sometimes succeed by calling an endpoint using a production URL to receive an error code 401 and calling an endpoint using a sandbox environment. Why does this difference occur unlike the official guide? Because of this difference, sometimes it's a production environment and JWT hasn't expired, but I get a 401 error and call the sandbox environment. 2. Please let me know the solution.
Posted
by
Post not yet marked as solved
0 Replies
24 Views
Steps to reproduce the problem: Have an extension which has a content_scripts section in its manifest that specifies a content script for some URLs. Open a tab at a URL that the extension should inject a content script in. What is the expected behaviour? The content script should execute on the page, and if you open the Developer Tools and go to the Console tab, then the extension should be listed inside of the "Extension Scripts" dropdown (the dropdown immediately to the right of the "Clear console" button). What went wrong? After prolonged inactivity, sometimes the content script doesn't show up in the Extension Scripts dropdown (which it would if it were executing). There's no evidence in the page's Developer Tools that the extension is active. It doesn't execute at all, there's no messages in the console related to it or its non-execution, and its content scripts don't show up in the Sources tab of Developer Tools. When the issue happens, the extension still shows up in the browser toolbar as an option.. The extension's icon shows up and functions normally. The extension background page is inspectable and seems to be running normally. Refreshing the webpage doesn't fix it. But once we open the ios App it starts working again. Safari version: 74 OS Version: OS X 10.14.5
Posted
by
Post not yet marked as solved
0 Replies
26 Views
Today I have tried to add a second archive action for visionOS. I had added a visionOS destination to my app target a while back and can build and archive my app for visionOS in Xcode 15.3 locally, and also run it on the device. Xcode Cloud is giving me the following errors in the Archive - visionOS action (Archive - iOS works): Invalid Info.plist value. The value for the key 'DTPlatformName' in bundle MyApp.app is invalid. Invalid sdk value. The value provided for the sdk portion of LC_BUILD_VERSION in MyApp.app/MyApp is 17.4 which is greater than the maximum allowed value of 1.2. This bundle is invalid. The value provided for the key MinimumOSVersion '17.0' is not acceptable. Type Mismatch. The value for the Info.plist key CFBundleIcons.CFBundlePrimaryIcon is not of the required type for that key. See the Information Property List Key Reference at https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009248-SW1 All 4 errors are annotated with "Prepare Build for App Store Connect" and I get them for both "TestFlight (Internal Testing Only)" and "TestFlight and App Store" deployment preparation options. I have tried to remove the visionOS destination and add it back, but this is not changing the project at all. Any ideas what I am missing?
Posted
by
Post not yet marked as solved
2 Replies
33 Views
How do I download a folder from opensource.apple.com without going inside recursively and downloading individual files? e.g. one from here: "https://opensource.apple.com/source/Libm/" PS. no idea what's the proper tag for this post, and as forum insists on having a non-empty tag field I'm using "Foundation" arbitrarily.
Posted
by
Post not yet marked as solved
0 Replies
31 Views
I have been seeing some crash reports for my app on some devices (not all of them). The crash occurs while converting a CVPixelBuffer captured from Video to a JPG using VTCreateCGImageFromCVPixelBuffer from VideoToolBox. I have not been able to reproduce the crash on local devices, even under adverse memory conditions (many apps running in the background). The field crash reports show that VTCreateCGImageFromCVPixelBuffer does the conversion in another thread and that thread crashed at call to vConvert_420Yp8_CbCr8ToARGB8888_vec. Any suggestions on how to debug this further would be helpful.
Posted
by
Post not yet marked as solved
0 Replies
21 Views
I have built a camera application which uses a AVCaptureSession with the AVCaptureDevice set to .builtInDualWideCamera and isVirtualDeviceConstituentPhotoDeliveryEnabled=true to enable delivery of "simultaneous" photos (AVCapturePhoto) for a single capture request. I am using the hd1920x1080 preset, but both the wide and ultra-wide photos are being delivered in the highest possible resolution (4224x2376). I've tried to disable any setting that suggests that it should be using that 4k resolution rather than 1080p on the AVCapturePhotoOutput, AVCapturePhotoSettings and AVCaptureDevice, but nothing has worked. Some debugging that I've done: When I turn off constituent photo delivery by commenting out the line of code below, I end up getting a single photo delivered with the 1080p resolution, as you'd expect. // photoSettings.virtualDeviceConstituentPhotoDeliveryEnabledDevices = captureDevice.constituentDevices I tried the constituent photo delivery with the .builtInDualCamera and got only 4k results (same as described above) I tried using a AVCaptureMultiCamSession with .builtInDualWideCamera and also only got 4k imagery I inspected the resolved settings on photo.resolvedSettings.photoDimensions, and the dimensions suggest the imagery should be 1080p, but then when I inspect the UIImage, it is always 4k. guard let imageData = photo.fileDataRepresentation() else { return } guard let capturedImage = UIImage(data: imageData ) else { return } print("photo.resolvedSettings.photoDimensions", photo.resolvedSettings.photoDimensions) // 1920x1080 print("capturedImage.size", capturedImage.size) // 4224x2376 -- Any help here would be greatly appreciated, because I've run out of things to try and documentation to follow 🙏
Posted
by
Post not yet marked as solved
2 Replies
28 Views
I encountered a problem while using ScrollView in SwiftUI. When I perform a refresh, the app crashes. I access the array using an index in a ForEach loop. This is done to create new data from the array in a commonly used view. The function to create data is adopted from a protocol in the view model. I access it by index because the type of the array is not specified; each view using it may have a different data type. Below is an example code. Is it possible to access data from the array using an index? Every time I refresh, I get an "index out of range" error. import SwiftUI struct ContentView: View { @StateObject var viewModel = ViewModel() var body: some View { ScrollView { if !viewModel.testValues.isEmpty { LazyVStack(spacing: 20) { ForEach(Array(zip(viewModel.testValues.indices, viewModel.testValues)), id:\.1) { index, data in test(index: index, data: data, viewModel: viewModel) .onAppear { if !viewModel.isLoading, viewModel.testValues.count - 2 == index { viewModel.fetch() } } } } } else { Text("tesetsetsetsettse") } } .onAppear { viewModel.fetch() } .refreshable { viewModel.refresh() } } } struct test: View { let index: Int let data: String @ObservedObject var viewModel: ViewModel var body: some View { VStack(spacing: 8) { test1(index: index, data: data, viewModel: viewModel) Text("------------------------") } } } struct test1: View { let index: Int let data: String @ObservedObject var viewModel: ViewModel var body: some View { VStack { Text(viewModel.testValues[index]) .font(.system(size: 12)) .foregroundStyle(Color.red) .padding(.horizontal, 40) .padding(.vertical, 50) .background { RoundedRectangle(cornerRadius: 20) .fill(Color.blue) } } } } class ViewModel: ObservableObject { @Published var isLoading = false @Published var testValues: [String] = [] func fetch() { DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { self.testValues += [ UUID().uuidString, UUID().uuidString, UUID().uuidString, UUID().uuidString, UUID().uuidString, UUID().uuidString, UUID().uuidString, UUID().uuidString, UUID().uuidString, UUID().uuidString, ] } } func refresh() { testValues = [] fetch() } }
Posted
by
Post not yet marked as solved
0 Replies
22 Views
Hello Apple Developer Community, I am encountering an issue with my iOS app submission on the App Store Connect platform. After testing the app extensively on various devices, including iPhones and iPads using Xcode, the app appeared to be functioning correctly with all screens visible. However, upon submission, Apple rejected the app, citing that it launched a blank page specifically on the iPad Air (5th generation) running iOS version 17.4.1. I have thoroughly reviewed the app's code and conducted additional testing, but have been unable to replicate the issue on my end. I am reaching out to the community for assistance in troubleshooting and resolving this issue. Has anyone encountered a similar problem before, or does anyone have suggestions on how to address this issue effectively? Any insights or advice would be greatly appreciated. Thank you in advance for your help.
Posted
by
Post not yet marked as solved
1 Replies
25 Views
I am using Screen Capture Kit to capture the windows and record it. But from macOS Sanoma onwards I see a wired behaviour when I try to capture the window which is in Full screen mode. The CMSampleBuffer returned by Screen capture kit has empty space at the top of the full screen window content. The ContentRect attachment in CMSampleBuffer includes this empty space. So there is no way to know what is the actual window content in the CMSampleBuffer. In the CaptureCample sample code provided by Apple it does not enumerate the Full screen windows. I made a change in that to enumerate full screen windows. The issue is reproduced in that also. Attaching the Image of showing the empty space. Has anybody encountered this issue?
Posted
by
Post not yet marked as solved
0 Replies
34 Views
I'm trying to implement the playback of an HLS content with FairPlay, and I want to insert it into a RealityView using a VideoMaterial of a sphere. When I use unencrypted HLS content everything works correctly, but when I use FairPlay it doesn't. To initialize FairPlay I am using the following in the view: let contentKeyDelegate = ContentKeySessionDelegate(licenseURL: licenseURL, certificateURL: certificateURL) // Create the Content Key Session using the FairPlay Streaming key system. let contentKeySession = AVContentKeySession(keySystem: .fairPlayStreaming) contentKeySession.setDelegate(contentKeyDelegate, queue: DispatchQueue.main) contentKeySession.addContentKeyRecipient(asset) Has anyone else encountered this problem? Note: I'm testing in Vision Pro directly because the simulator hasn't support for FairPlay.
Posted
by
Post not yet marked as solved
0 Replies
30 Views
When accessing the REST API, If you apply "include=albums" to a 'catalog//songs' endpoint requests with a filter on ISRC, the API will, without fail, return a 504 error status. If you remove the 'include=albums' and/or replace it with something like 'include=artists' it works fine. This has been like this for months and we need to get album details back with these requests. Could the Apple team please respond and verify the issue as it's blocking production for us. Thanks.
Posted
by
Post not yet marked as solved
0 Replies
23 Views
Am using Beta Software 14.5 Beta (23F5064f) and I cant see m to update the recovery contact details,, cant remove it the icon sits in the cormer of my screen and wont go when clicking x as it opens up the recover page and view also doe the same but cant update or remove contacts, HELP its driving me insane. Come up as cant communicate with helper application. I have reported it, done another update and itrs still there
Posted
by

TestFlight Public Links

Get Started

Pinned Posts

Categories

See all