Under the Bridge

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

RBBAnimation: Extensive UIKit Animation Library Allowing Block Based Animations, Spring Animations And More

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

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

AGGeometryKit-POP: An Open Source Pop Add-On Library Adding A Quadrilateral Property For Amazing Effects bridging hfossli / AGGeometryKit: “Quadrilaterals on CALayer, CGGeometry-functions, UIView/CALayer properties and other invaluable tools.”

POP-MCAnimate: An Add-On Library For The Pop Animation Framework Making The Syntax Much More Concise

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

Top 5 iOS 7 Animations as picked by raywenderlich.com

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

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

Multiple Animations

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

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

VBFJellyView Tutorial

UIKit Dynamics Tutorial: Tossing Views

Add Implicit Animations to Your iOS Views, Part 1 and Part 2

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

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

INTUAnimationEngine: Open Source iOS Animation Library For Creating Advanced Interactive Animations

RZTransitions: Library Providing A Nice Collection Of Custom Transitions And Interaction Controllers

Creating Animations and Interactions with Physical Models

Creating Simple Animations with Facebook’s Pop Framework

The Highlight 2014 — UI Animations

ShapeAnimation-Swift: “Vector animation framework in Swift for iOS.”

Pulsar : “A versatile solution for displaying pulse animations as known from Apple Maps.”

Spring: “A library to simplify iOS animations in Swift.”

CALayer in iOS with Swift: 10 Examples

CoreAnimator is a nifty looking design application with code export.

How To Implement A Circular Image Loader Animation with CAShapeLayer

Twinkle: Open Source Swift Component Allowing You To Add A Neat Twinkling Effect To A UIView

awesome-ios-ui: “A curated list of awesome iOS UI/UX libraries.”

Your Spring Animations Are Bad (And It’s Probably Apple’s Fault)

Creating a Dynamically Sized Progress Animation in Swift with Facebook Pop

Recreating Apple’s Rubber Band Effect in Swift

JHChainableAnimations: Open Source iOS Library For Creating UIView Animations With A Clean Chainable Syntax

EasyAnimation – an open source Swift animation library!

Playing With UIDynamics in iOS 9

Fun with Gradients and Masks

DKChainableAnimationKit: “Easy to read and write chainable animations in Swift.”

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 →
1

Asking Pre-Permission

When you open up a new app and a barrage of permissions dialogs pop up at you, doesn’t that just annoy you?

And when a user gets all bent out of shape when something doesn’t work, and it’s because they said no to those permissions in your app, doesn’t that just annoy you?

So yeah, we should all be telling the user exactly why we want a permission, so they’re less likely to say no; and we should be doing it only when we need to, instead of tossing everything at them on first run just to make absolutely sure their first impression of the app is that it sucks. Maybe you’re conscientious enough to have bothered doing that already. For the rest of us, there’s a good article to be reading here:

The Right Way to Ask Users for iOS Permissions

Over time, we’ve learned to ask our users for permission when, and only when, we absolutely need it and we think the user can clearly relate how this access will benefit them.

We’ve re-engineered Cluster using two methods to only show the system permissions dialog once a user has told us that they intend to say “Allow”…

As stated above, the worst possible thing is for a user to deny permission at the system level, because reversing that decision in iOS is very complicated. But if we ask them before the system does and they say no, we still have the opportunity to ask them again in the future when they are more likely to say yes.

For photos alone, 46% of people who denied access in a pre-permissions dialog ended up granting access when asked at a better time later.

This is simpler than you think…

The code described there can be found at clusterinc/ClusterPrePermissions for contacts and access.

And if you want a complete set, check out jlaws/JLPermissions:

An iOS pre-permissions utility that lets developers ask users on their own dialog for calendar, contacts, location, photos, reminders, twitter, and push notification access, before making the system-based permission request.

That cover everything you need permissions for these days? Hmmm … think microphone needs permissions too, recently. Almost a complete set then. No doubt microphone can be left as an exercise for the reader.

h/t: ManiacDev!

UPDATES:

An Open Source Pre-Permissions Framework With Support For iOS 8 Permission APIs

Why 60% of your users opt-out of push notifications, and what to do about it

PermissionScope: “A Periscope-inspired way to ask for iOS permissions.”

Continue Reading →
0

Wearable Stars Aligning

May 29, 2013: Apple’s Tim Cook On Why The Nike+ FuelBand Works And Google Glass Doesn’t

Mossberg/Swisher: Is the future wearables?

Cook: I think so. I wear this. It’s a FuelBand. I think Nike did a great job with this. It’s for a specific area. It’s integrated well with iOS…

August 19, 2013: Apple Hires Nike FuelBand Guru Jay Blahnik

Fitness industry consultant Jay Blahnik, who played a key role in the development of Nike’s FuelBand, has taken a job at Apple…

February 13, 2014: If Apple Really Is Doing An ‘iWatch,’ It’s A Huge Conflict Of Interest For Tim Cook

The FuelBand isn’t as important to Nike’s business as the iPhone is to Apple’s business. But there’s no way Cook should be getting information about how to make Apple’s wearable computer better than the FuelBand as a board member…

April 18, 2014: Nike Fires Majority of FuelBand Team, Plans to Stop Making Wearables

As the competition in the fitness wearable category has increased with entries from Jawbone and Fitbit, Nike has opted to shift its focus to software. Company spokesman Brian Strong told CNET in an email that Nike continually aligns its resources with business priorities…

as had been predicted on secret.ly

The douchebag execs at Nike are going to lay off a bunch of the eng team who developed The FuelBand, and other Nike+ stuff. Mostly because the execs committed gross negligence, wasted tons of money, and didn’t know what they were doing.

Could be, could be.

Us, we’re going to run with the hypothesis that the douchebag execs at Nike know exactly what they are doing.

Also going to posit the further hypothesis that if you haven’t been bending your thoughts towards coming up with clever things to do with data recorded 24/7 from some Apple M7-embedded device coming to you via Core Motion, right about now might very well be a particularly good time to get on that.

Just sayin’.

Continue Reading →
0

Objective-C Builder Pattern

Well, here’s one of those too obvious to think of — too obvious for us until it was pointed out, anyways — clever programming tricks everyone should adopt: No doubt if you have any non-trivial data model, you’re using something recognizable as the Builder pattern to construct those objects. (And if you’re not, your code’s probably a complete mess, and you should be.) But there’s room for a good bit of error with variable scope, copy paste muck ups, and the like.

Enter this clever spark Klass Pieter, for whom obvious solution is obvious:

The Builder Pattern in Objective-C

… In order to make this pattern fit Objective-C we’re going to apply another pattern. This one comes from Ruby. I don’t know what the official name for it is, I just call it the Ruby configuration block pattern. This is our final idiomatic Objective-C implementation:

Pizza *pizza = [Pizza pizzaWithBlock:^(PizzaBuilder *builder]) { 
   builder.size = 12;
   builder.pepperoni = YES;
   builder.mushrooms = YES; 
}];

We made the interface fluent, the scope of the builder is limited to within the block and as an added benefit the call to build is now implicit. When the block returns the pizzaWithBlock: method knows that configuration is finished and can call build for us. Not only did we make the pattern idiomatic Objective-C, we also removed one of the Java implementation’s major headaches; forgetting to call the sentinel method…

As you may have noticed here and there, we’re big believers in making our code readable and foolproof. And this is a pretty nice advance on that front from our current builder pattern type of practices, yep.

And this Joris Kluivers fellow here was not only as struck with the elegance here as we are, he went ahead and started implementing it:

The Builder Pattern in Objective-C Foundation

In a recent blog post Klaas Pieter Annema wrote about using the builder pattern in Objective-C. Inspired by his post I created two categories that bring similar functionality to NSURL and NSDate.

An example:

NSURL *url = [NSURL URLWithBuilderBlock:^(NSURLComponents *builder) {
  builder.scheme = @"http”;
  builder.host = @"joris.kluivers.nl”;
  builder.path = @"/blog/2014/04/08/the-builder-pattern-in-objective-c/";
}];

My builder categories on NSDate and NSURL are available on github for review. Let me know what you think.

Nice examples there of how exactly to go about implementing this for your own objects.

h/t: ManiacDev!

Continue Reading →
1

Bézier Path Construction

Most excellent article here on conceptualizing how to put together those Bézier path thingamabobbies in code, with by leaps and bounds the best explanation we’ve ever seen of how curves work:

Thinking like a Bézier path

… Once you’ve learnt to break down one path you can apply the same tools and divide it into lines, arc and curves. One by one, in any combination. The more you do the better you’ll get at it. But we missed curves and curves are awesome. Curves are the center of you favorite vector drawing program. They draw a curved line to another point, bending towards two “control points” on its way there. I said bending towards because the curve doesn’t go all the way to neither of the two control points.

There is a little bit of math involved in how the path is drawn between the four points (the start point, 2 control points and the end point) but unless you are interested you will never have to use it. I am interested so I will gladly explain the math. Feel free to skip ahead if you are afraid that you might learn something…

Master that fear and read the whole thing!

h/t: iOS Dev Weekly!

Continue Reading →
1

Wireless Mesh Networking

Hey, this is nifty! If you’d even bothered to notice this new-ish Multipeer Connectivity thing at all, like us you probably didn’t read past

The Multipeer Connectivity framework provides support for discovering services provided by nearby iOS devices using infrastructure Wi-Fi networks, peer-to-peer Wi-Fi, and Bluetooth personal area networks and subsequently communicating with those services by sending message-based data, streaming data, and resources (such as files)…

before skipping to something that looked more interesting, amirite? But no, it actually is interesting:

How an Under-Appreciated iOS 7 Feature Will Change the World

A curious download hit Apple’s app store this week: a messaging app called FireChat.

It’s a new kind of app because it uses an iOS feature unavailable until version 7: the Multipeer Connectivity Framework. The app was developed by the crowdsourced connectivity provider Open Garden and this is their first iOS app.

The Multipeer Connectivity Framework enables users to flexibly use WiFi and Bluetooth peer-to-peer connections to chat and share photos even without an Internet connection. Big deal, right?

But here’s the really big deal — it can enable two users to chat not only without an Internet connection, but also when they are far beyond WiFi and Bluetooth range from each other — connected with a chain of peer-to-peer users between one user and a far-away Internet connection.

It’s called wireless mesh networking. And Apple has mainstreamed it in iOS 7. It’s going to change everything. Here’s why.

It can also extend an Internet connect to a place where none exists — for example, to a hotel basement, cave or to rural areas where cell tower connections are non-existent…

Read the whole thing, as they say!

h/t: @justinlbaker!

UPDATES:

Open Source Swift Library That Simplifies Working With The iOS Multipeer Connectivity API

Objc.io #18, Games: Multipeer Connectivity in Games

Building a Chat App in Swift Using Multipeer Connectivity Framework

Continue Reading →
0

Cross-Platform Mobile Library Development

If you actually need any of the information we’re relaying to you today, our deepest sympathies; but if you are so bedevilled as to have to come up with some plan that makes sense for developing a cross-platform native-requiring library, the nice people at Skyscanner have done an impressive amount of legwork researching and documenting the alternatives for you. Shocking spoiler: They all suck.

Developing a mobile cross-platform library – Part 1. Exploring

Here, I am including the experience I had while exploring solutions for developing a mobile cross-platform library, i.e. a single codebase that could be part of mobile apps running under different platforms. It covers my journey from mobile cross-platform developments tools (PhoneGap, Titanium, and the likes), code porting tools, and WebViews that weren’t up to the task, to C++ and JavaScript engines that did work. There aren’t many resources out there explaining how to approach this problem, so we thought it could be helpful if we shared this experience. This is the first of three parts, which lists all the explored solutions…

TL;DR: C++ sucks the least.

Developing a mobile cross-platform library – Part 2. C++

When the cross-platform development tools failed to provide the functionality we needed (check part one), we decided to try a lower-level solution that is supported by both platforms; C++. In Android, we’re able to interface C++ code through the Android Native Development Kit (NDK) and the Java Native Interface (JNI) framework. As for iOS, this is possible with Objective-C++, a language variant that allows source files to include both Objective-C and C++. Hooray!!

There’s also a promised third part on embedding JavaScript along with an engine, which is the other option that part 1 found to suck little enough to still be somewhat workable; but that seems to us more than a little ridiculous for the library development case … and if you’re doing a full app, well we’d say in that case the choice narrows right down to Apportable!

h/t: @binpress!

Continue Reading →
0
Page 7 of 119 «...56789...»