Search results for

“DTiPhoneSimulatorErrorDomain Code 2”

165,589 results found

Post

Replies

Boosts

Views

Activity

What Does the .2 in print(statistics.2) in This Code?
Hi. What does .2 mean in print(statistic.2) in this code:func calculateStatistics(scores: [Int]) -> (min: Int, max: Int, sum: Int) { var min = scores[0] var max = scores[0] var sum = 0 for score in scores { if score > max { max = score } else if score < min { min = score } sum += score } return (min, max, sum)}let statistics = calculateStatistics(scores: [5, 3, 100, 3, 9])print(statistics.sum)print(statistics.2)Thank you in advance.God bless, Proverbs 31
2
0
9.7k
Nov ’18
Bug in learn to code 2
Hey,I was using the learning to code 2, and I was in the Parameters sections in the last challenge Twin Peaks, I tried every possible option to solve the challenge using pseudocode and all other things that we learn throw the lessions, but my character is jumping off the world, and walking into empty space, I would like to know if that is a bug or the developers plan that so we can magically figure out a way to solve that challenge. I am using the swift playground app in an iPad mini 3. Regards.
12
0
6.5k
Oct ’16
PKPassKitErrorDomain Code 2
We have integrated the card provisioning in Apple wallet for quite sometime now through an external processor and we got the App Entitlement for the same. Now we are building the card provisioning in Apple Wallet flow in our app. Though everything seems to work fine (including issuer certificates, nonce etc.) but when we are clicking on ADD button on card details screen, I am getting an error saying Could Not Add Card. When I inspect the error from didFinishAddingPaymentPass, it reads The operation couldn’t be completed. (PKPassKitErrorDomain error 2.). Though the Apple documentation suggests it as an unsupportedVersionError but it does not say anything beyond that. I want more detailed explanation because of which I am getting this error
8
0
1.6k
Feb ’25
StoreKit 2 – AppStore.sync() fails with StoreKitError.unknown (code 2) in TestFlight**
Subject: StoreKit 2 – AppStore.sync() fails with StoreKitError.unknown (code 2) in TestFlight Hello Apple Developer forum We are investigating a reproducible issue with StoreKit 2's AppStore.sync() in our iOS application, Elins Nystan. Environment App: Elins Nystan Bundle Identifier: poworg.ElinsNystan-2 TestFlight version: 1.43 (build 8) Device: iPhone 16 Date: November 10, 2026 Environment: TestFlight / App Store sandbox StoreKit: StoreKit 2 Problem The app correctly recognizes an existing subscription and grants Premium access to the account associated with the original purchase. Premium remains active after restarting the application, and subscription-dependent functionality works correctly. However, when the user selects “Restore Purchases,” the app calls AppStore.sync(). An Apple account authentication dialog appears and the user enters their password. After approximately 26 seconds, AppStore.sync() throws an error. Captured device logs All timestamp
0
0
60
2w
SKErrorDomain Code 2 Problem
We are facing a serious issues with in app purchases in our app. We offer 3 IAP: auto-renewable subscription 1W, auto-renewable subscription 1Y, non-consumable one-time purchase (LifeTime access) In our case 90-95% of transactions fail and we mostly get SKError code=2 . Sometime purchase fails several times for the same user so it’s very hard to believe that user intentionally cancels transaction for the same product 4 or even 5 times in a row. It happens regardless iOS version, device model, our app version. We've checked multiple threads with the same issue but coudn't find any solution. We do not offer any promotions, product identifiers are valid... Some users are able to make a purchases without any issues.
1
0
332
Jul ’25
EXC_BAD_ACCESS (code=2, address=0x16d0f3ff0)
Hi!I am developing an app (in XCode Version 11.2 and Swift 4.2) in which I fill in a LinkedList and after working with it, removing the elements that compose it produces the Thread 1 error: EXC_BAD_ACCESS (code = 2, address = 0x16d0f3ff0). The error occurs even without working with the items in the list, simply by adding them and trying to eliminate them the error already occurs. The tests I am doing with an iPhone with IOS version 11.4.1The method that eliminates the elements of the LinkedList is removeAll.The error occurs in the first line:public func removeAll() { self.head = nil //Thread 1: EXC_BAD_ACCESS (code=2, address=0x16d0f3ff0) self.tail = nil self.count = 0} // removeAllthe definition of the variables 'head', 'tail', 'count': private var head: Node<T>? private var tail: Node<T>? public private(set) var count: Int = 0And the type Node<T>:public class Node<T> { var value: T var next: Node<T>? weak var previous: Node<T>? init(val
7
0
25k
Nov ’19
CallKit requestTransaction error code 2
Hello, In production, a large number of users experience outgoing call reporting fails with the following error: com.apple.CallKit.error.requesttransaction Code=2 The iOS version doesn't matter, errors are present in v15-26 Details My CXProvider held as a global singleton, so it’s unlikely to be deinited. There is no explicit call to CXProvider.invalidate() in the app. If I manually invalidate the CXProvider, I observe the expected failure when trying to create an outgoing call (com.apple.CallKit.error.requesttransaction error 2). However, If I recreate the CXProvider after the error, outgoing calls are reported correctly. Many users trigger the providerDidReset delegate method (CXProviderDelegate) before this error. According to the documentation, providerDidReset can be called by the system, and we are supposed to end all active calls, but the documentation doesn't suggest recreating the CXProvider. Question Should I recreate CXProvider after providerDidReset and forget about that
5
0
1k
Sep ’25
DeviceActivityReport failing to load "Code = 2"
Hi! For some reason my DeviceActivityReport sometimes fails to load. I've tried setting up a very simple mock views and displaying a report with a simple Hello world but even that won't work. It prints the following error message in the terminal but doesn't show anything else or any context as to what has gone wrong. Failed to update the client's configuration: Error Domain=DeviceActivityReportService.ReportViewController.ClientError Code=2 (null) It seems like the makeConfiguration method for the report isn't even being invoked. That may though just be an issue with printing messages in the extension. Any help on what could be the issue, or even just a message that you're being the same thing would be greatly appreciated!
0
0
216
Oct ’25
Same Device Code in 2 apple phones
Hi, We came accross with 2 devices, iPhone 12 and iphone16 pro. the both have same device code. Both the devices have same apple id and belongs to same user I had understanding that device codes are unique to device. How this can happen? Any remediation? Thanks, Veena
1
0
344
Jan ’25
WeatherKit fails with WDSJWTAuthenticatorServiceListener.Errors Code=2
WeatherKit consistently fails with the following error: WDSJWTAuthenticatorServiceListener.Errors Code=2 This happens on a physical device regardless of the troubleshooting steps I try. After the error occurs, the app uses a third-party fallback provider successfully. The issue appears similar to failures reported by other developers on iOS 26, even though the WeatherKit entitlement and signing configuration seem valid. I have verified the following: • The signed application binary contains the WeatherKit entitlement. • The embedded provisioning profile contains the WeatherKit entitlement. • The application identifier and team identifier match the provisioning profile. • The WeatherKit capability was disabled, saved, enabled again, and saved. • Xcode automatic signing generated a new provisioning profile after resetting the capability. • The project was cleaned and a fresh build was installed on the physical device. • Both the application and the device were restarted. • Location permission
2
0
535
Aug ’26
What Does the .2 in print(statistics.2) in This Code?
Hi. What does .2 mean in print(statistic.2) in this code:func calculateStatistics(scores: [Int]) -> (min: Int, max: Int, sum: Int) { var min = scores[0] var max = scores[0] var sum = 0 for score in scores { if score > max { max = score } else if score < min { min = score } sum += score } return (min, max, sum)}let statistics = calculateStatistics(scores: [5, 3, 100, 3, 9])print(statistics.sum)print(statistics.2)Thank you in advance.God bless, Proverbs 31
Replies
2
Boosts
0
Views
9.7k
Activity
Nov ’18
APNS error code - 2
Hi,I'm currently trying to figure out the cause of the error in the title. I can't find any information about it anywhere. Has anyone come across it before ?Full error : Failed to deliver notification with error code -2. Error name is UNKNOWN.Thanks.
Replies
0
Boosts
0
Views
408
Activity
Jun ’17
Bug in learn to code 2
Hey,I was using the learning to code 2, and I was in the Parameters sections in the last challenge Twin Peaks, I tried every possible option to solve the challenge using pseudocode and all other things that we learn throw the lessions, but my character is jumping off the world, and walking into empty space, I would like to know if that is a bug or the developers plan that so we can magically figure out a way to solve that challenge. I am using the swift playground app in an iPad mini 3. Regards.
Replies
12
Boosts
0
Views
6.5k
Activity
Oct ’16
PKPassKitErrorDomain Code 2
We have integrated the card provisioning in Apple wallet for quite sometime now through an external processor and we got the App Entitlement for the same. Now we are building the card provisioning in Apple Wallet flow in our app. Though everything seems to work fine (including issuer certificates, nonce etc.) but when we are clicking on ADD button on card details screen, I am getting an error saying Could Not Add Card. When I inspect the error from didFinishAddingPaymentPass, it reads The operation couldn’t be completed. (PKPassKitErrorDomain error 2.). Though the Apple documentation suggests it as an unsupportedVersionError but it does not say anything beyond that. I want more detailed explanation because of which I am getting this error
Replies
8
Boosts
0
Views
1.6k
Activity
Feb ’25
StoreKit 2 – AppStore.sync() fails with StoreKitError.unknown (code 2) in TestFlight**
Subject: StoreKit 2 – AppStore.sync() fails with StoreKitError.unknown (code 2) in TestFlight Hello Apple Developer forum We are investigating a reproducible issue with StoreKit 2's AppStore.sync() in our iOS application, Elins Nystan. Environment App: Elins Nystan Bundle Identifier: poworg.ElinsNystan-2 TestFlight version: 1.43 (build 8) Device: iPhone 16 Date: November 10, 2026 Environment: TestFlight / App Store sandbox StoreKit: StoreKit 2 Problem The app correctly recognizes an existing subscription and grants Premium access to the account associated with the original purchase. Premium remains active after restarting the application, and subscription-dependent functionality works correctly. However, when the user selects “Restore Purchases,” the app calls AppStore.sync(). An Apple account authentication dialog appears and the user enters their password. After approximately 26 seconds, AppStore.sync() throws an error. Captured device logs All timestamp
Replies
0
Boosts
0
Views
60
Activity
2w
SKErrorDomain Code 2 Problem
We are facing a serious issues with in app purchases in our app. We offer 3 IAP: auto-renewable subscription 1W, auto-renewable subscription 1Y, non-consumable one-time purchase (LifeTime access) In our case 90-95% of transactions fail and we mostly get SKError code=2 . Sometime purchase fails several times for the same user so it’s very hard to believe that user intentionally cancels transaction for the same product 4 or even 5 times in a row. It happens regardless iOS version, device model, our app version. We've checked multiple threads with the same issue but coudn't find any solution. We do not offer any promotions, product identifiers are valid... Some users are able to make a purchases without any issues.
Replies
1
Boosts
0
Views
332
Activity
Jul ’25
EXC_BAD_ACCESS (code=2, address=0x16d0f3ff0)
Hi!I am developing an app (in XCode Version 11.2 and Swift 4.2) in which I fill in a LinkedList and after working with it, removing the elements that compose it produces the Thread 1 error: EXC_BAD_ACCESS (code = 2, address = 0x16d0f3ff0). The error occurs even without working with the items in the list, simply by adding them and trying to eliminate them the error already occurs. The tests I am doing with an iPhone with IOS version 11.4.1The method that eliminates the elements of the LinkedList is removeAll.The error occurs in the first line:public func removeAll() { self.head = nil //Thread 1: EXC_BAD_ACCESS (code=2, address=0x16d0f3ff0) self.tail = nil self.count = 0} // removeAllthe definition of the variables 'head', 'tail', 'count': private var head: Node<T>? private var tail: Node<T>? public private(set) var count: Int = 0And the type Node<T>:public class Node<T> { var value: T var next: Node<T>? weak var previous: Node<T>? init(val
Replies
7
Boosts
0
Views
25k
Activity
Nov ’19
CallKit requestTransaction error code 2
Hello, In production, a large number of users experience outgoing call reporting fails with the following error: com.apple.CallKit.error.requesttransaction Code=2 The iOS version doesn't matter, errors are present in v15-26 Details My CXProvider held as a global singleton, so it’s unlikely to be deinited. There is no explicit call to CXProvider.invalidate() in the app. If I manually invalidate the CXProvider, I observe the expected failure when trying to create an outgoing call (com.apple.CallKit.error.requesttransaction error 2). However, If I recreate the CXProvider after the error, outgoing calls are reported correctly. Many users trigger the providerDidReset delegate method (CXProviderDelegate) before this error. According to the documentation, providerDidReset can be called by the system, and we are supposed to end all active calls, but the documentation doesn't suggest recreating the CXProvider. Question Should I recreate CXProvider after providerDidReset and forget about that
Replies
5
Boosts
0
Views
1k
Activity
Sep ’25
DeviceActivityReport failing to load "Code = 2"
Hi! For some reason my DeviceActivityReport sometimes fails to load. I've tried setting up a very simple mock views and displaying a report with a simple Hello world but even that won't work. It prints the following error message in the terminal but doesn't show anything else or any context as to what has gone wrong. Failed to update the client's configuration: Error Domain=DeviceActivityReportService.ReportViewController.ClientError Code=2 (null) It seems like the makeConfiguration method for the report isn't even being invoked. That may though just be an issue with printing messages in the extension. Any help on what could be the issue, or even just a message that you're being the same thing would be greatly appreciated!
Replies
0
Boosts
0
Views
216
Activity
Oct ’25
Same Device Code in 2 apple phones
Hi, We came accross with 2 devices, iPhone 12 and iphone16 pro. the both have same device code. Both the devices have same apple id and belongs to same user I had understanding that device codes are unique to device. How this can happen? Any remediation? Thanks, Veena
Replies
1
Boosts
0
Views
344
Activity
Jan ’25
WeatherKit fails with WDSJWTAuthenticatorServiceListener.Errors Code=2
WeatherKit consistently fails with the following error: WDSJWTAuthenticatorServiceListener.Errors Code=2 This happens on a physical device regardless of the troubleshooting steps I try. After the error occurs, the app uses a third-party fallback provider successfully. The issue appears similar to failures reported by other developers on iOS 26, even though the WeatherKit entitlement and signing configuration seem valid. I have verified the following: • The signed application binary contains the WeatherKit entitlement. • The embedded provisioning profile contains the WeatherKit entitlement. • The application identifier and team identifier match the provisioning profile. • The WeatherKit capability was disabled, saved, enabled again, and saved. • Xcode automatic signing generated a new provisioning profile after resetting the capability. • The project was cleaned and a fresh build was installed on the physical device. • Both the application and the device were restarted. • Location permission
Replies
2
Boosts
0
Views
535
Activity
Aug ’26