Entries for the ‘Objective-C’ Category

For NSPredicate in Swift you have to use NSNumber, not Int

I was writing a fetch request predicate as follows: deleteRequest.predicate = NSPredicate(format: “id != %@”, selectedEventId) This is all well and good except it was aborting the app on the selectedEventId variable saying EXC_BAD_ACCESS. It took me a while to realize this was because I declared selectedEventId as the Int Swift type. Changing selectedEventId to […]

PhoneGap + ChildBrowser – Opening all non-app links in ChildBrowser

I’ve been working on a PhoneGap project with iPad as the target. Most of the app runs from an external site so after presenting local files to handle the login form and authentication the main webview then shifts to an external site where the rest of the code runs. We are using ChildBrowser to handle […]