Archive for 'Programming'

CloudKit On The Horizon

So we’ve previously observed with some amusement the insurmountable opportunities associated with Core Data iCloud synchronization, and noted some valiant efforts to redress the situation that unfortunately seem to have not set the world on fire; and, well, it seems that Apple’s pretty much given up on that. You may have noticed that the “What’s New in Core Data” WWDC 2014 was a little … thin, yes? Like the iCloud news segment was one slide,

  • Transitioning to new infrastructure
  • Reliability improvements
  • Performance enhancements
  • Transparent to developers

Hmmm. When the year’s news can be comprehensively enumerated as “sucks less”, that’s not the best investment signal, is it now.

But wait! We have a new hotness in the data sync world, or at least the Apple fiefdoms therein, as posted at iCloud For Developers:

CloudKit

Leverage the full power of iCloud and build apps with the new CloudKit framework. Now you can easily and securely store and efficiently retrieve your app data like structured data in a database or assets right from iCloud. CloudKit also enables your users to anonymously sign in to your apps with their iCloud Apple IDs without sharing their personal information.

With CloudKit, you can focus on your client-side app development and let iCloud eliminate the need to write server-side application logic. CloudKit provides you with Authentication, private and public database, structured and asset storage services — all for free with very high limits.

Introducing CloudKit

Advanced CloudKit

What’s New in Core Data

iCloud Design Guide (Pre-release)

CloudKit Framework Reference (Pre-release)

And although they list ‘What’s New in Core Data’ there, we’d like to bestow our 2014 WWDC Unintentional Deadpan Humour Award to Melissa Turner for her commentary on that session’s single CloudKit slide:

… I don’t know what either of those means. You should probably go watch the video of their session. Somebody gave me these slides. And asked me please to talk to you guys about it.

Why, she reminds us of our own style of following orders under protest! And just in case you missed that subtle hint, the only related session mentioned at the end was “Introducing CloudKit”. So, y’know, it’s not like the signposts here are anything other than completely obvious.

The general industry reaction is represented nicely here,

What does Apple’s CloudKit mean for mBaaS

Architecting an application around CloudKit locks your data into the Apple ecosystem. This means no access to this data for your Android application that half your users use. No access for your web application, no access for your web app, and no access to the data for your analytics engine to crunch the numbers.

Apple has yet to release any details of a REST API or export mechanism for this data. While the appeal when writing a simple application might be to use the out-of-the-box cloud APIs made available by Apple, in the longer term will prove very limiting. When extending this application to other platforms mobile or otherwise, there’s no way to utilise the same database elsewhere.

Apple of course has an agenda here – they’re trying to encourage developers, and thus in turn users, into their closed ecosystem – and a fantastic ecosystem it is. Unfortunately, that’s not the reality of the market. Users access applications across disparate platforms, made by disparate vendors. That should make CloudKit a non-runner for most applications.

Sounds about right. But for those with more modest initial goals, it’s pretty cool yes? Some commentaries worth reading:

Notes on CloudKit

But I still bet that lots of apps will benefit from this. Somewhere people are thinking about their existing apps and how they’d benefit — and people are planning new apps that they wouldn’t have otherwise been willing to try.

I think this is going to be a huge deal. I think it’s the first time Apple has really nailed a web service for developers. And I tip my hat to the team (or teams) behind all this. Good job, folks.

Did CloudKit Sherlock Ensembles?

First, let me say, I think CloudKit is awesome. It probably should have been iCloud 1.0 three years ago. Apple have done a great job, and I fully expect this to succeed. It’s particularly useful for apps that not only need cloud storage, but also have social aspects.

CloudKit is basically Apple’s take on schema-less cloud storage. Think Parse.com or Azure Mobile Services, and you’ve pretty well grasp CloudKit. You can store data records in the cloud — not just files — and don’t have to write any networking code. You can insert records, form relationships, and perform search queries, much like a cloud variant of Core Data (though not as powerful).

As good as it seems to be, there are limitations. CloudKit is not cross platform, so you can forget Android, and there is no web access to the data. But there should be plenty of smaller companies happy just to ‘win’ the Apple market, so I think it will get adopted.

Certainly makes sense to us to ship an economical iOS-only minimum viable product and rearchitect for cross-platform once it’s clear the investment is merited, so even in the current state CloudKit looks like a pretty big win. And we think it’s a fairly good bet that API and/or export mechanisms are on the roadmap too; it’s rather stretching credulity to think Apple believes they can wall their garden quite that high and still expect developers to enthusiastically embrace the technology. Check back after WWDC 2015, and we’ll see how well placed that confidence turned out to be!

UPDATES:

CloudKit: The raywenderlich.com Podcast Episode 9

Choosing CloudKit brings up the point of data security, at least the user perception of such, that might be not insignificant depending on your intended app:

They will not need to setup another account with yet another set of credentials to manage. More importantly, their data will be stored with Apple, a vendor they have already choosen to trust. It will be stored in siloed, private data stores that not even the developer can access. That cannot be said for apps using Azure, Parse or other backend services.

Web Services, Dependencies, and CloudKit

CloudKit: The fastest route to implementing the auto-synchronizing app you’ve been working on? with Get up and Running with iOS 8′s CloudKit

Beginning CloudKit Tutorial

Continue Reading →
0

Dringend: Xcode On Your iPad

OK, this one wins top honours in the “Just Because We Can” category: How would you like to develop your Xcode project … on your iPad?

Dringend – The development environment for your iPad

Dringend is a fast and easy to use iOS and Mac app development environment for your iPad. Program and build your apps on the go from your iPad (Mac also required) using a beautiful and intuitive code editor and all your changes will be synced back to your Mac when your done. Wherever you may be in the world, whether on a beach or sitting at a cafe you can continue to develop your apps and even build and run them…

  • Build and run your iOS projects on your iPad (Mac app, Dropbox account & registration as official iOS developer required to run project)
  • Full syntax highlighting (including Logos support)
  • Find and replace
  • Auto-indentation
  • Code structure list to view methods and pragma marks in files
  • Additional keys to make accessing commonly used programming keys easier
  • Project syncing with Dropbox
  • Full keyboard dock and bluetooth keyboard support
  • Import Xcode projects from Dropbox
  • Export Xcode projects from iPad to Dropbox
  • Import files from Dropbox
  • Creating new Xcode projects from templates (same as in Xcode)
  • Create new files from Xcode templates
  • Delete, move and generally edit the Xcode project structure

Check out video and details on the website here; setup instructions are pretty easy,

Dringend allows you to build and run apps by connecting to your development Mac at home and using your Mac to build the app and send the output back to Dringend.

To enable this simply download The Constructor.app which acts as the build server for Dringend. All you need to select is the code signing identity you wish to use (this can be found in Keychain Access.app) and the provisioning profile. From there the app will handle everything.

The build server also automatically sets up port forwarding on your router so that no matter where you are in the world you will be able to build and run your apps from Dringend…

Not completely sure that this is the most practical idea compared to just carrying a laptop, but hey, if you want to travel really light and still get work done, check it out!

h/t: ManiacDev!

Continue Reading →
0

PaintCode 2.1 with SWIFT!

So we’ve mentioned in passing the existence of PaintCode the premier code-producing vector drawing program out there, but we’d never got into it particularly deeply; but with the serious upgrades with version 2,

Our goals for PaintCode 2

  1. Super simple integration of the generated code into your projects. (with StyleKits)
  2. Ability to easily create parametric drawings. (with Variables & Expressions)
  3. Much better drawing tools.

we finally decided, ok this is seriously worth getting into to see just how much it’ll help with this Apportable-fuelled Android port we’re working on right now. And the wonderful PaintCode folk are fantastically supportive — we’ll have a complete report, um, just as soon as we actually get anything done worth reporting, gulp — but in the meantime we’d like to make sure none of you Dear Readers miss how fast out of the gate they were with version 2.1 feat. SWiFT!

After Apple introduced Swift at WWDC, it became clear that this is the future of Apple software development. We started to work on Swift code generation for PaintCode immediately.

Today, we’re very excited to finally make PaintCode 2.1 available. Here is a video of PaintCode 2.1 running the Swift code generator.

Our experience with Swift has been very positive so far – congratulations to Chris Lattner and his entire development team for this great work!

… To learn more about PaintCode 2, visit our website. We have prepared video tutorials that show PaintCode 2 in action. To catch all PaintCode-related news, follow us on Twitter and Facebook.

So while you’re patiently waiting for whenever we might get around to actually using it and reporting on how it and Apportable play together, we very strongly indeed encourage you to check it out for yourself!

Continue Reading →
0

DZone’s Guide to Mobile Development

And just as a break from all the WWDC news, here’s a report worth reading to remind yourself that there are, in fact, other players in this industry:

DZone’s 2014 Guide to Mobile Development

This free guide includes:

  • In-depth articles written by industry experts
  • Key findings from our survey of over 1000 mobile developers
  • Profiles on 39 mobile development tools and frameworks
  • “Game of Phones” Infographic
  • Glossary of common mobile development terms
  • “Step-by-Step Mobile Application Development Checklist”
inforgraphic_0.png

Good read just to be vaguely aware of how people not completely Apple-focused are thinking. And we’d say that even if we weren’t leading off the ‘Special thanks to our topic experts’ acknowledgements. No, we would, seriously, DZone Research is doing a good job with these surveys, these were the first two in case you missed them:

  • The 2014 DZone Cloud Platform Research Report brings together worldwide cloud providers into one free, exclusive report that offers impartial insight into 39 specific cloud platform providers.
  • DZone’s next research guide covers the benefits of Continuous Delivery and DevOps and the strategies organizations use to adopt these practices. This guide also provides comparison data for choosing the right technology for your Continuous Delivery toolchain.

Good stuff to have handy when management needs some friendly guidance with their decisions!

Continue Reading →
0

Swift Reactions

So yeah, that yesterday. That was a thing, wasn’t it? Most of the plethora of announcements we found more along the lines of good show and thank you yes that’ll certainly help shut up the fandroids, but kinda obvious that was a good idea and not any too soon either; but on the scale of 1 to Did Not See That Coming, at “Asteroid Impact” level with this one, pretty much:

Screen Shot 2014-06-03 at 5.14.19 AM.png

Swift is an innovative new programming language for Cocoa and Cocoa Touch. Writing code is interactive and fun, the syntax is concise yet expressive, and apps run lightning-fast. Swift is ready for your next iOS and OS X project — or for addition into your current app — because Swift code works side-by-side with Objective-C.

Woah. Right then, time to get started earning your Swift merit badge, folks.

We’ll be adding good links as we find them, but just to get you started:

Welcome to the brave new Swift world! Especially to those Kotlin fans in the audience, as apparently the Swift designers were [EDIT: Nope, just common inspirations, so it appears…]

UPDATES:

10 Early Thoughts on the Swift Programming Language

Swift Language Highlights: An Objective-C Developer’s Perspective

Michael Tsai’s Swift Links

Learning Swift: Ordered Dictionaries

Say Hello to Cocos2D-Swift!

Swift Initializers

GoshDarnClosureSyntax and GoshDarnSwiftBlockSyntax and GoshDarnSwiftSyntax channel a popular Objective-C reference

Erica Sadun’s Swift postsplaygrounds, operator snippet, type conversions, …

Subclass UIApplication with Swift

Unit Testing in Swift

Terrible Swift Ideas!

@mhm500’s Swift Cheat Sheet gitbook

DaveWoodCom/XCGLogger: “A debug log framework for use in Swift projects.”

Mike Ash’s Friday Q&A 2014-06-20: Interesting Swift Features and Friday Q&A 2014-07-18: Exploring Swift Memory Layout and Friday Q&A 2014-08-01: Exploring Swift Memory Layout, Part II

jas/swift-playground-builder: “Create your own interactive Swift playgrounds with embedded documentation compiled from Markdown.”; iOS 8: Interactive Playgrounds

Playground has never been so fun — bundle playground and library in workspace; XCode 6: How To Add Image Assets To Your Playground

We ❤ Swift on How to make awesome UI components in iOS 8 using Swift and XCode 6

Swiftly Typing on Error Handling

Inside Swift

Advanced Swift – Part 1 and Part 2

Ray Wenderlich’s Swift Tutorial: A Quick Start and Part 2: A Simple iOS App and Part 3: Tuples, Protocols, Delegates, and Table Views

Introducing the raywenderlich.com Swift Style Guide

SwiftDevs.co has tutorials, examples, etc…

CodingInSwift.com collects resources for forum discussions

Understanding Optionals in Swift; A Beginner’s Guide to Optionals in Swift; A Morning with Swift Optionals; Swift Optionals; Unwrapping Multiple Optionals; Implicitly Unwrapped Optionals In Depth; Understanding Optional Chaining; Optionals Case Study: valuesForKeys; Swift Optionals: When to use if let, when ? and !, when as? and as

Swift Sequences and Lazy Evaluation; Lazy by name, lazy by nature; Randomly Lazy

Follow @SwiftStack_ for Swift StackOverflow questions. (And @ObjectiveCStack for Objective-C.)

Subscribe to Swift Coder Weekly for a weekly digest, archives here; also Swift Dev Weekly

Dollar and Cent: “Dollar is a functional tool-belt and Cent is an extension for missing methods in Swift.”

pNre/ExSwift: “A set of Swift extensions for standard types and classes.”

Swift Toolbox “is a community-supported catalog of iOS and OSX libraries written in the Swift Programming Language.”

Making Multiplayer Games using AppWarp in Swift

The Core Data Stack in Swift; Open Source Library Providing A Core Data Query Language For Swift

Developing iOS8 Apps Using Swift – Create a To-Do Application, Connect to the iTunes Search API, Best Practices, Adding Interactions, Async image loading and caching, Interaction with multiple views, Animations, Audio, and Custom Table View Cells

Sign up for video tutorials starting July 1 from @SwiftCastTV

Swift Language Google Group

Swift & Cocoapods: “How to integrate Cocoapods into a vanilla Swift project.”

Swift Standard Library: “Documented and undocumented built-in functions in the Swift standard library – the complete list with all 74 functions.”

modocache/Quick: “A behavior-driven development test framework for Swift and Objective-C.”

We ❤ Swift: One month of Swift

Swift Programming — Medium link collection

Enough About Swift Closures to Choke a Horse

Custom Threading Operator in Swift; duemunk/Async: “Syntactic sugar in Swift for asynchronous dispatches in Grand Central Dispatch.”

Nil-coalescing Operator in Swift

Tutorial: Using Generics To Implement KVO In Swift

Programming Challenge: Are You a Swift Ninja? Part 1

MVVM, Swift and Reactive Cocoa — It’s All Good!

How to Use UIViews With Autolayout Programmatically

Swiftris: Build Your First iOS Game with Swift

Alamofire/Alamofire : Elegant Networking in Swift

Swift: Use for-in loops with your own sequence types

Algorithms & Data Structures with Swift

Getting started with UIKit Dynamics in Swift Part I and Part II

Learn -> Swift: “A no-frills introduction to Swift for busy and/or curious people.”

Instance Methods are Curried Functions in Swift; Swift Function Currying; Closure Expressions in Swift; First Class Functions and Delayed Evaluation in Swift

Locking in Swift: Helping Protect Me from Myself

Swift Operators; Operator Overloading in Swift Tutorial

that thing in swift – “How do the Objective-C patterns we already know translate into Swift?”

Protocols in Swift: Blueprints for success; Swift Default Protocol Implementations

Apples to apples, Part II

Arrays and their Methods in Swift; Array extension to calculate summary statistics; Custom Subscripts in Swift

Swift Literal Convertibles for Foundation

Replace Magic Strings with Enumerations in Swift; Tuples, Structs and Enums; Raw​Option​Set​Type

Functional Wish Fulfillment; Maps… Wait, They Don’t Love You Like I Love You; Flattenin’ Your Mappenin’

NSNotifications with userInfo in Swift

Filling Table Views demonstrates using switch on tuples

Swift Dictionary Quick Reference

Swift Comparison Protocols

Prototyping Animated Transitions in Swift and Transitions in Swift (Part II)

objc.io #16 Swift

Functional Swift and Memoization

Continue Reading →
3

Cancelling Shutter Sound

Well, the 2014 “Seriously, that WORKS?” award can be given out early, we figure, can’t see anybody beating this one:

AVFoundation, how to turn off the shutter sound when captureStillImageAsynchronouslyFromConnection?

… Then I used third-party app to extract photoShutter.caf from Documents directory (DiskAid for Mac). Next step I opened photoShutter.caf in Audacity audio editor and applied inversion effect, it looks like this on high zoom:

mzFez.png

Then I saved this sound as photoShutter2.caf and tried to play this sound right before captureStillImageAsynchronouslyFromConnection:…

And this really works! I runs test several times, every time I hear no shutter sound :)

… woah. Sure, that’s how noise cancelling headphones work, but we wouldn’t have guessed you could fake it programmatically. These Russian hackers, gotta love ‘em.

h/t: iOS Dev Weekly!

Continue Reading →
0

WWDC Student Submissions

Here’s a little something to take a look at as a break from all the entail-reading, wishful thinking, and outright nuttery that’s going around while we all wait for this year’s shoes to drop next week: check out TosinAF/WWDC-2014-Submissions for a list of all the WWDC Student Scholarship submissions people felt like sharing — 63 so far! And browser demo people app.io are powering a showcase of all the videos in one place. Here’s three we found particularly interesting at first glance:

Gold star for niftiness to neerajbaid/WWDC2014 who did his résumé map-based. That’s such a neat idea, think we’ll steal it.

img1.png

And top “interesting idea…” marks to BalestraPatrick/WWDC-2014-Scholarship who made the background a blur of the front camera feed.

And some particularly cool node dynamics in conradev/WWDC2014.

Lots of nice work in the other five dozen too; check them all out and prepare to be impressed.

Now, back to applying ourselves even harder to our own proficiencies — clearly we’re going to have our work quite cut out for us in the coming years to keep ahead of these little whippersnappers. And we wouldn’t have it any other way!

Continue Reading →
1

HelpStack: In-App Support

We don’t seem to generally get around much to putting any more end user support in our apps than an email link, but next time somebody asks for more, this HelpStack thing sure looks like a front of the line choice:

Screen Shot 2014-05-15 at 8.08.32 AM.png

Source is on github, and out of the box it’s ready to hook up with an account on

Presumably if you were motivated you could check out those implementations and figure out how to adapt them to the various other support solutions we’ve mentioned a long time ago and before that a really seriously long time ago, or whatever other solution it might be that the cool kids use these days. Us, we tend to work more on the poor kids end of the spectrum, so even the cup of coffee a month price most of these services have a starter service for is pretty much right out. But look, HelpStack is even good for that too:

4. Email gear

If you do not use any of the help desk solutions, you can still use HelpStack to provide efficient customer support by configuring with just your email. You can configure email support in Helpstack by including the below lines of code in your App delegate…

HAGearEmail* emailGear = [[HAGearEmail alloc] initWithSupportEmailAddress : @"support@example.com" articlePath : @"<pList file name>”];
HSHelpStack *helpStack = [HSHelpStack instance];
helpStack.gear = emailGear;

You can provide your FAQs as a local pList file and provide the pList file name in place of pList file name…

Well, that’s a pretty darn low barrier to entry for including at least a minimal FAQ in your app. We’ll definitely give that at least a rustle at the next opportunity!

Continue Reading →
0

All About Animation

Just on the off chance you haven’t subscribed to objc.io yet, issue #12 “Animations” is out with the accustomed assortment of must-reads:

Animations Explained goes over the basics of motion, paths, etc.

Animating Custom Layer Properties has particularly clever applications of interpolation functionality: “…by overriding the -display method, we can use those properties to control anything we like, even something like sound volume….”

Custom Container View Controller Transitions goes over how to reusably package up your cool transition code.

View-Layer Synergy gets right down into the guts of how the magic actually works.

Animating Collection Views is great for sussing out how to do layout transitions.

Interactive Animations goes over how to make your animations interactive (most importantly, interruptible) via UIKit Dynamics.

While we’re on the subject of animations, you checked out Facebook’s POP framework yet? Worth a look if you haven’t. Also don’t forget that Canvas library, and the little pieces from the last little while we collected here.

UPDATES:

Adding Bounce to Your UIViews: The Joy of Damped Harmonics in iOS 7 Development

hfossli/AGGeometryKit: “Quadrilaterals on CALayer, CGGeometry-functions, UIView/CALayer properties and other invaluable tools.”

Open Source iOS Library Allowing You To Easily Apply Animated Mesh Transforms To A View Hierarchy — check out math in Mesh Transforms!

Open Source iOS Library Providing Some Nice UIDynamic Based View Controller Transitions

An Open Source Pop Add-On Library Adding A Quadrilateral Property For Amazing Effects

DynamicXray “is a UIKit Dynamics runtime visualisation and introspection library.”

Top 5 iOS 7 Animations as picked by raywenderlich.com

An Open Source Library Providing Many Pre-Built Animations For User Interfaces Built On Pop

Open Source Animation Library Based On Pop Featuring Animation Creation In Storyboards

Multiple Animations

itsmeichigo/ICGTransitionAnimation “is a library to customize transition animation in iOS 7.”

Open Source iOS Component Providing A UIView Subclass That Automatically Bends On Position Changes

VBFJellyView Tutorial

Open Source iOS Component Allowing You To Create Morphing Effects Between Text Label Values

Open Source iOS Component For Morphing UILabel Text Created In Swift

UIKit Dynamics Tutorial: Tossing Views

Add Implicit Animations to Your iOS Views, Part 1

Open Source Animation Library For Interactive Animations, Carousels, Animated Gifs

Open Source iOS Library Making It Easier To Create Custom Shaped And Animated Components

Continue Reading →
0

External Actions: Choosy

One of the mildly frustrating things about iOS programming is that none of the various URL scheme handling schemes have managed to get enough traction to be all that widely useful. But here’s a new one that’s certainly the best put together we’ve seen yet, and we’d strongly encourage everyone to get on board with:

Choosy

People will love your app even more if it helps them use their other favorite apps. We’re essentially solving the iOS’ lack of default app selection mechanism.

Once Choosy is widely implemented, end users will be able to traverse the iOS ecosystem using just the apps they love, be they built-in ones or not…

Screen Shot 2014-05-04 at 7.01.55 AM.png

Thanks to UIApplication’s canOpenURL method and iOS forcing unique url schemes. Basically, we store a list of URL schemes for each app on the server, and categorize apps. Choosy downloads that info as needed.

Choosy caches network data, so the traffic footprint is small. It also instantly knows when a new app from same category is installed, or the default app is deleted, and lets user re-select the default app. Choosy is non-intrusive – if there’s no connection and the default app hasn’t been selected yet, it just opens the default iOS app…

Looks like a big whack of user-pleasing functionality for no particularly large effort. Check it out on github today!

Continue Reading →
0
Page 3 of 96 12345...»