class Book: Codable { let name: String var author: Author? init(name: String) { self.name = name } deinit { debugPrint(Deinitialized Book) } } class Author: Codable { let name: String let age: Int weak var book: Book? init(name: String, age: Int) { self.name = name self.age = age } deinit { debugPrint(Deinitialized Author) } } let author = Author(name: Ronit, age: 1) let book = Book(name: Ronit Book) book.author = author author.book = book let encode = try? encoder.encode(author) (Why does this line give EXC_BAD_ACCESS error even though by adding weak we have removed any strong references between objects)
Search results for
DTiPhoneSimulatorErrorDomain Code 2
158,474 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
When opening the first exercise “Keeping Track,” on the 12.9 inch iPad Pro (5th Gen), a pop up appears saying “There Was A Problem During Startup.” Restarting the app/device doesn’t fix the issue.
This error occurs in Apple Pay Wallet In-App Provisioning Flow for Credit / Debit Cards When the data received from the PNO (Visa) is passed to PKAddPaymentPassRequest this error is seen in addPaymentPassViewController, in the finalize stage. Docs provide no clue as to what could be wrong. iOS 18.2.1 XCode 15.2 Error description mentions unsupportedVersionError Is the pass version not supported? Is the wallet version not supported? Is it an app implementation error or error in the data received from the PNO?
In Swift-UI Playgrounds Learn to Code 2 under the Chapter Variables and the exercise Checking for Equal Values, there is no instruction to use the predefined variable numberOfSwitches in the goal instruction.
Topic:
Developer Tools & Services
SubTopic:
Swift Playground
Tags:
Swift Playground
Playground Support
Hi, My app in-app purchase downloading from TestFlight or debug Xcode making purchase works correctly but it reject in apple review because during the test purchase didn’t work and occurred error:SKErrorDomain with code 2. This error in general appear when during the purchase user click Cancel. I have contacted apple board, they said that Your app does not comply with App Store Review Guideline 2.1. So how can i try in production since in TestFlight and debug it works? I really confused how to try solution for it?
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
App Review
In-App Purchase
StoreKit
StoreKit Test
I have have table view and then I have another Table View inside each cell of the first table view. Now whats happening is that the code enters in the cellforrow function of the first table view multiple times and then gives this error: Thread 1: EXCBADACCESS (code=2, address=0x16cebbfc0)
Hello, My App uses NSURLSession to send network requests. Recently, on the iOS 17.0 system version, I've noticed an increase in ENOENT errors. However, I'm unable to identify the cause from the logs. I would like to inquire if there have been any changes to NSURLSession in this version? Why would this error code occur? Error Domain=NSPOSIXErrorDomain Code=2 No such file or directory UserInfo={NSErrorFailingURLStringKey=https://example.com, NSErrorFailingURLKey=https://example.com, _NSURLErrorRelatedURLSessionTaskErrorKey=( LocalDownloadTask <AC10B665-F59A-469C-876C-F88EEAEC26E1>.<11> ), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDownloadTask <AC10B665-F59A-469C-876C-F88EEAEC26E1>.<11>}, response:<NSHTTPURLResponse: 0x280b8d000> { URL: https://example.com } { Status Code: 200 To add on, according to the online logs, I found that the error occurs when users put the App into the background for a minute, then hot restart the App and bring it to
I had Learning to Code 1 on my iPad Air when iOS 10 beta 1 was installed. I installed iOS 10 beta 2 yesterday, and now it is no longer available. Playgrounds says that it's coming soon.Anyone else having this issue?
One of the places I have noticed this on my MBP is in the Swift Playgrounds Learn to Code 2 Moving Further Forward Page. After successfully getting the expert to the end of the maze puzzle a box pops up. It talks about defining a function using parameters to make the function more reusable. To make the function work I wrote: let expert = Expert() func move(distance: Int) { for i in 1 ... distance { expert.moveForward() } } If I try to put moveForward() without expert. as a prefix I get an error. That's OK by me. However, the 'success box' after completing the maze says: Now that you've defined move, you'll be able to use is as a method on the Character and Expert types. For example, expert.move(distance: 4) will move the expert instance forward four tiles. I do not see how to define the function so that I can call it this way in Learn to Code 2. Not knowing the correct words to use in a search on the internet makes it difficult to find an answer. I tried querying define a f
Hello! I was wondering if it would be possible for the developers to post the sample code for the Face Mesh demo that used PencilKit to draw a filter on a user's face.
Hello everyone, I’m experiencing a WeatherKit issue that occurs consistently on both the iOS 26.2 Simulator and a real device running iOS 26.2. Environment: Xcode: latest iOS: 26.2 Occurs on: Simulator AND physical device WeatherKit usage: via WeatherService API (not manual REST) Location Services: authorized (When In Use / Always) Issue: WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 The operation couldn’t be completed. Already verified: WeatherKit capability is enabled for the App ID com.apple.developer.weatherkit entitlement is present Bundle ID matches the App ID App is signed with the correct Team ID Behavior is identical on Simulator and physical device Error occurs before any WeatherKit response is returned Questions: Is this a known issue with WeatherKit on iOS 26.2? Are there any known limitations or requirements for WeatherService related to WeatherDaemon validation? Is there a recommended way to diagnose why WeatherDaemon rejects the request with Code=2
Topic:
App & System Services
SubTopic:
General
example: import Vapor struct MainController: RouteCollection { func boot(routes: RoutesBuilder) throws { routes.get(use: index(req:)) // ↑ there // if i typing `index` and chosen from selection picker, it will display `index(req: <#Request#>)` not `index(req:)` // but when i typing `self.index` and chosen from selection picker, it will work normal } } private extension MainController { func index(req: Request) throws -> EventLoopFuture { req.view.render(index, [title: Hi guys~, md_file: /index.md]) } } Environment: Xcode 13.3 beta 2 Intel chip, MacBook Pro (16-inch, 2019), macOS monterey 12.2.1 (21D62)
import UIKit class MasterViewController: UITableViewController { var objects = [String]() var allWords = [String]() let object = objects[indexPath.row] cell.textLabel!.text = object override func awakeFromNib() { super.awakeFromNib() } override func viewDidLoad() { super.viewDidLoad() func startGame() { allWords.shuffle() title = allWords[0] objects.removeAll(keepCapacity: true) tableView.reloadData() } if let startWordsPath = NSBundle.mainBundle().pathForResource(start, ofType: txt) { if let startWords = NSString(contentsOfFile: startWordsPath, usedEncoding: nil, error: nil) { allWords = startWords.componentsSeparatedByString(n) as! [String] } } else { allWords = [silkworm] } startGame() / self.navigationItem.leftBarButtonItem = self.editButtonItem() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() / } / override func numberOfSectionsInTableView(tableView: UITableView) -> Int { return 1 } override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> I
Greetings! I am making a small application according to the official tutorial from Apple, and I encountered such an error. Please help me solve this problem Error in @main Code import SwiftUI @main struct MeetUpApp: App { @State private var scrums = DailyScrum.sampleData var body: some Scene { WindowGroup { NavigationView { ScrumsView(scrums: $scrums) } } } }
I have been developped this app for almost three years. It worked perfectly fine till I changed my phone to iPhone 16 and upgraded my xcode to the latest version (Version 16.0 (16A242d)). After the app finish building, the app will crash automatically when open. I had this onboarding page to be presented at the very beginning, simple image with an action button. The app kept breaking, and I found the Thread indicating error with ActionLabelView (Thread 1: EXC_BAD_ACCESS (code=2, address=0x16d107fa0)). I commented out the button on my app's onboarding page once, the app could run but to the next step will need the button. The code should be fine I believe, cuz nothing like this ever came up with my old phone and old xcode version. Could some one please help?