Search results for

DTiPhoneSimulatorErrorDomain Code 2

158,456 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.4k
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
735
Feb ’25
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
239
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
3
0
251
Sep ’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
291
Jan ’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
129
Oct ’25
Moving function pointer code to Swift 2
My sqlite code doesn't compile anymore in Swift 2. The problem lines are this:let SQLITE_STATIC = sqlite3_destructor_type(COpaquePointer(bitPattern: 0)) let SQLITE_TRANSIENT = sqlite3_destructor_type(COpaquePointer(bitPattern: -1))Command clicking to Swift's import of sqlite shows this:typealias sqlite3_destructor_type = (UnsafeMutablePointer<Void>) -> VoidComing from the following in sqlite3.h:typedef void (*sqlite3_destructor_type)(void*); #define SQLITE_STATIC ((sqlite3_destructor_type)0) #define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1)Anyone know how to create those two constants in Swift 2.0? Even better if there's some way to import sqlite in Swift 2 without this bridging header stuff.Rob
2
0
726
Jun ’15
EXC_BAD_ACCESS (code=2, address=0x7fff2384c4e1)
I've been developing my MacOS app on OS 10.14~10.15.7 and Xcode 11.3.1. Recently I upgrade my OS version to 11.0.1 but keep Xcode version the same. Run my app I will encounter following exception: EXC_BAD_ACCESS (code=2, address=0x7fff2384c4e1) When I type cmd in lldb: image lookup -va 0x7fff2384c4e1 It shows following information: Summary: AppKit`_OBJC_$_INSTANCE_METHODS_NSSeparatorToolbarItemView + 49 Module: file = /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit, arch = x86_64 Symbol: id = {0x0000f500}, range = [0x00007fff2384c4b0-0x00007fff2384c5c0), mangled=_OBJC_$_INSTANCE_METHODS_NSSeparatorToolbarItemView And I found if I go to Edit Scheme -> Run tab -> info tab -> uncheck Debug executable AP will launch normally. Does someone know how to resolve this issue? Many thanks.
0
0
751
Nov ’20