malloc: *** error: incorrect checksum for freed object – object was probably modified after being freed

I have a big problem with my iOS App: it crashes sometimes without detailed debug error. The stack trace is empty. These are the only two lines in the stack trace: crash start in UIApplicationMain at “symbol stub for: -[_UIHostedTextServiceSession dismissTextServiceAnimated:]”. and report “libsystem_c.dylib`malloc_error_break”. in com.apple.main-thread. The error on Xcode debugger (with connected device): I … Read more

Where is the variable “code” in SKError defined?

I am seeing examples of code using SKError “code” property or variable. I cannot seem to define any definition for this property. How is xcode / Swift able to access this property? I am using SwiftyStoreKit with this issue. Thanks Tried looking in the documentation for SKError, nothing there. Tried debugging in xcode, live, cannot … Read more

CFNetwork SSLHandshake failed (-9824) NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824)

From NSURLConnection to NSURLSession worked for me I was able to solve as following( NSURLConnection is deprecated and you need to use NSURLSession) : converted to: From NSURLConnection to NSURLSession Also included in Info.plist see documentation: Info.plist reference And ultimately Announcement: CFNetwork SSLHandshake failed (-9824) while integrating Login with Amazon SDK for iOS Back to … Read more

Attempt to present UIViewController on UIViewController whose view is not in the window hierarchy

Where are you calling this method from? I had an issue where I was attempting to present a modal view controller within the viewDidLoad method. The solution for me was to move this call to the viewDidAppear: method. My presumption is that the view controller’s view is not in the window’s view hierarchy at the point that it has been loaded … Read more

UITableView example for Swift

The example below is an adaptation and simplification of a longer post from We ❤ Swift. This is what it will look like: Create a New Project It can be just the usual Single View Application. Add the Code Replace the ViewController.swift code with the following: Read the in-code comments to see what is happening. The highlights are The … Read more