043 iPhreaks Show - Core Location & iBeacons with Josh Johnson

00:00
Download MP3

The panelists discuss core location beacons with Josh Johnson.

Transcript

CHUCK: Hey everybody and welcome to episode 43 of the iPhreaks Show. This week on our panel we have Ben Scheirman. BEN: Hello from Houston. CHUCK: Jaim Zuber. JAIM: By the time you're hearing this, [inaudible] would have reported the spring training. Spring is coming. CHUCK: That’s good news for some people. I'm Charles Max Wood from DevChat.tv, and I'm trying not to have my voice crack, because I've got a sinus infection. Anyway, we also have a special guest this week, and that’s Josh Johnson. JOSH: Hello from Raleigh, North Carolina. Actually Durham – it’s all the same place. CHUCK: So you wanna introduce yourself really quickly for folks who don’t know you? JOSH: Sure. I'm one of the iOS developers at Two Toasters. I've been doing iOS development since the beginning. Before that, I did a lot of AutoCAD, customization programming and some web development, but since 2008 I've focused on iOS. At Two Toasters, we are a consulting firm that does apps for many different clients and fun stuff like that. CHUCK: Cool. We brought you in today to talk about Core Location. JOSH: Yeah, that’s one of my favorite pieces of iOS. CHUCK: So do you never get lost? JOSH: Well, I like to tell myself I have Core Location built into my brain because I feel like I have pretty good directions. I've always been one of those people that – I’ll sit there and stare at a map forever, looking at roads, and if I have to go somewhere I’ll look at the map and get kind of a mental model of where I have to go, then I very rarely pull out a GPS. I guess I like to fool myself into thinking that I have Core Location built in, which means tonight I'm going to get lost on the way home or something. There's a lot of design talks about what is the future of design; I forgot there's one article I meant to look up before we start talking but they're talking about as things change, the technology changes with it and that is implied in design. And I think one of the areas is our phones – it always knows where it is, assuming you’ve allowed it to know, and you can make certain assumptions and preferences happen by knowing the location of the user. I think it’s fascinating, being able to –. It’s one of the few things that we can use in our app development that’s like the Star Trek communicator, right? I'm sorry, the Tricorder. They pull it out, scan the area, and be able to detect life forms. Core Location is one of the few things that we have that we can kinda replicate that; we can know where we are, and I think that’s really cool. So whenever I get to do Core Location stuff, I get excited. JAIM: How does Core Location know where we are? [Crosstalk] I don’t know. JOSH: There's a bunch of little birds that fly around and they locate – I'm sorry, no. JAIM: I knew it! JOSH: And they're all paid by the NSA. CHUCK: I think they have a project on Apple called iStalker. JOSH: That’s right; they have a lot of people that just follow you around and always report where you are. No. Basically, there's multiple levels at how Core Location finds you. It’s kind of optimized for speed and for battery life; obviously, we have limited amount of power in our devices. So it kinda goes through a process of narrowing down where you are using several different things. You can think of it like the first level is the cell tower, I think. Yeah, the first level is the cell tower, and it will – because they know what cell tower you're talking to on your phone, they can infer a large region, at least, of where you are. And then they can triangulate it if you're talking to multiple towers. And that’s quick because they already know that information; they already know what tower you are and that’s lower level than doing what we get to really think about, but then they can continue. So that’s obviously fast, because they know that already. Then the next level is there's the Wi-Fi lookup, so they can – I forget the exact story of how this worked out, but basically there's, I guess, a database of Wi-Fi access points and their locations around the world, mostly around from the US. I'm not sure how well that works around the world, actually, but that uses that information to continually filter down even more information about where you are. And then finally they can get the most battery-draining version of this, which is GPS, where it actually communicates with the GPS satellites that are flying around our planet, which, by the way, is totally cool – because, space. [Chuckling] JOSH: And they can, again, filter it down even further. That’s the most accurate, of course, because that’s finding your location based on multiple GPS satellites. And I think they use – what's the name of it? Is it Navstar? That sounds right, I don’t know. There's also like a Russian one too, I think I remember from some WWBC that they talked about once. But yeah, so that’s basically the rough ideas. I like to think of it like when you find your location on the maps app, you get that large circle. It’s like, ‘okay, we’re definitely in this area,’ and then it starts filtering down, and that kinda go on – I like to think of it as kind of like one of those levels fine-tuning your actual location. Actually, I think as of iOS 6 or 7, they do some stuff with the new vector map stuff. If you're working on a map, they can actually filter your location even closer. I haven't actually played with that part of it yet, of getting that fine-tuned with where I am, but if you're building a path, if you're [inaudible], where you wanna follow, make sure you're on a road, you can get that accuracy and think it’ll even use the vector data from the maps to help improve accuracy so that you know you're on a road; you're not standing in the middle of a building. CHUCK: So you talked about all the different levels of location and how it figures out where you're at. Do you have any control over that, or do you just ask the device where you are? JOSH: Yeah, you have control. You have the accuracy levels, so you can say – this is the type of thing where you kinda decide depending on your application. Like, I want to generally know what region I'm in; I don’t necessarily need to ask for the best accuracy. In many cases, I can say – I forget the [inaudible] specifically, but it’s accuracy low, let’s say, and it might just give me a location really quick from the cell tower lookup, and that’s probably good enough and I can stop looking at that point. Because basically, how it works is you say, ‘start telling me where I am and here’s some settings to configure what the accuracy and [inaudible] we can get the other stuff, like the region stuff later, and background stuff, obviously as well.’ But from a very high level you say, ‘alright, start telling where I am; here are some settings to filter what I'm looking for,’ and it just starts feeding you data to the delegate. “You're here, you're here, you're here. And you can do different things, like if you really care about how accurate you are, you can build your own algorithm to kind of narrow down when you think it’s a good enough accuracy, or if you only care that you're – if [inaudible] says I'm in Durham, that’s probably gonna come back pretty quick and I can accept probably one of the first few calls to the delegate method and that’s good enough depending on my application. JAIM: What are the different levels of accuracy? If you have a GPS, or if you have a cell tower, Wi-Fi – do you have any idea of how accurate that is in meters? JOSH: I think the CLLocationAccuracy is the type that they create, and it has, I think – I'm looking it up as I talk – yeah, it’s a double accuracy, so you can specify it in meters and then they have some specific levels so you can have accuracy to the kilometer. They have one that’s best for navigation that’s probably the most accurate, I think. So yeah, that desired accuracy property that you set on the location manager is going to be the thing that you can use to filter or to narrow down what you're looking for. To answer your question, in meters. JAIM: How many meters? Do you have any idea of that? JOSH: At the very best? JAIM: Yeah, if you had the most accurate, how many meters is that? If you wanted to determine if someone is going to two different stores, is that possible or are we looking at something else? JOSH: I think that we would look at something else for that, specifically. You can get down to I think five meters sounds right – five to ten meters – but I've never actually had that good in many cases. Let’s say I'm [inaudible] or something, it might have to mean the parking lot [inaudible] probably seen and I think if you want specific, like store to store information, that’s where you can get into the more detailed things like – obviously now on iOS 7 we have iBeacons and you can listen for that kind of stuff, or you can use other methods for determining that you're in the store specifically. JAIM: Okay. CHUCK: Now, iBeacons are part of Core Location then? JOSH: Yes, iBeacons is a new thing that comes in iOS 7 where it’s built on the regions port. We didn’t talk about regions. Primary location stuff, I only talked specifically about ‘I wanna know where I am, tell me where I am’ and this will start sending you location updates. But you can also register regions and say, ‘I wanna know when I enter or exit this region,’ and regions are defined as a center with a radius. You get notifications when you enter or exit if you ask for it. Beacons work on that same – where you can register a Beacon region and say, ‘as soon as I get near this, notify me.’ And that’s the type of things that would be – that’s what I was saying, that’s where you can expand on to find what store you're in. CHUCK: Gotcha. JOSH: Obviously, there's a lot more logistics here, right? Because that means the store has to implement that, so it’s not just going to be like – it’s not magical. Not every store has a Beacon, obviously. But there are some cool things happening there, which we can talk about too. Does that answer the question that you're talking about, specifically with the store, like figuring out what store you're in? JAIM: Yeah, it helps me get an idea of what different accuracy ranges they have. BEN: If you're indoors though, it’s going to take a long time to get a GPS signal. You’ve ever had one of those – just GPS? I mean, I feel so archaic talking about it but like the NAVIGON or like the Tomtom – those devices used to exist that had an LCD screen and no phone, no games or anything on it but just GPS and maps. And you'd like set it on your dash, and it would take two or three minutes to find a GPS lock. Nobody’s going to wait that long on the phone, so I think – I can’t remember where I read this – but GPS accuracy is going to give you somewhere between four and eight meters of accuracy, and then the cell triangulation is going to be within a couple hundred meters, depending how many are nearby. JOSH: Right. BEN: But those tend to come back much, much faster and really, I think you'd only rely on GPS if you're going to have it running for a period of time where you might get that resolution. JOSH: Right, and that’s where it comes into – if you care that much to know to get down to that four-meter thing right? That’s where you're going to be deciding, depending on the application how you're going to filter those results that you're getting, because you're getting location. Assuming you’ve [inaudible] the locations that’s going to start saying, ‘you're here, you're here, you're here’ and you can check the accuracy level on that location object that it’s sending you and you can determine, “okay, that’s good enough” and that’s where you kinda focus on what you need. The other thing that you mentioned too is the cell being faster, that’s obviously also good for power, right? I don’t wanna have this radio launched waiting for the GPS if I don’t need it, because as you said, GPS is slower. I think for GPS to actually –. Those old ones, didn’t they used to have to talk to three satellites? They had to wait until three satellites would come into range. BEN: I think it’s still that way. My car has navigation in it and there's a little special key command, you can push a few buttons at once and you get into the secret system menu that techs would use, and it will show you how many satellites you're connected to, which I find fascinating. At any given time, I've got six or seven that can see my car, or my car can see, or whatever. If you only have two, if you think about it, you can’t really be certain because they're so far up in the sky that you need a third to really pinpoint the location. JOSH: Exactly. Also, that’s cool because space, still. JAIM: Everything is amazing, you know. JOSH: Seriously, this is one of those things where it’s like –. My app that I'm writing is getting information from space. Like that’s one of those times where you kinda sit back –. Like you know, when you're in the [inaudible] of writing an app and you're kinda just focused on writing it and you forget all of the cool things and the location stuff is [inaudible] like, there’s something in space telling me things. That’s really cool. JAIM: I must put a comment in my code, to-do: talk to space. JOSH: Yes. Wait for space to notify me. BEN: How much has this changed with iOS 7 and the motion code processor? I remember at WWBC, they were talking about the M7 chip, like caching some of this data so it doesn’t have to wake you up and feed it to you, but you could get access to that data [inaudible]. Is that just a pedometer-type data, or is it going to allow you to, say, launch and have an immediate last-known location? JOSH: It’s not specifically pedometer-type data. I mean, it does cache what your last known location is. It’s been last summer since I've watched the video, so I'm digging deep in my memory. I think the way it is is like anytime any app gets a location, it’s going to use that as a starting point. It’s going to cache that, and that might feel faster because the app, the system might need a location for something, or it might have that –. But that’s not tied with M7 specifically; M7 is mostly specifically for all that motion stuff and core motion and specifics. This might even be before 7; I'm not sure exactly when they came in, but they do cache the location and tell you at some point that previously last known location, as you said. BEN: Is that a new API, or do they just give you a really quick location update? Like, as soon as you –? JOSH: They give you a really quick location update; it’s not a new API. So you would see that come up faster, and it would to you seem like you just got the information faster, but you're not changing code for that. Anyway, I have to – not totally sure about the level of caching that happens and the level of validation – obviously, caching is a hard problem; I only vaguely remember that being a thing, but there's not a new API for that, so, [inaudible]. JAIM: Another thing we can talk about is the significant location updates notification, because before we had that on iOS, apps would want to get continual updates just so that they could know if you’ve left an area, or like for instance Google Now wanted to update your cards based on what they thought was relevant nearby. JOSH: Yup. JAIM: Initially, they launched without the significant location updates, so it was just continually pegging your battery. JOSH: Yes, it was. JAIM: How does that work? JOSH: Funny story on that topic. The first time I ever wrote a Core Location thing, it was [inaudible] and I left it running and I was at a meetup and my pants were on fire and I was like, “What's happening?” It was because [inaudible], it was sitting there running, getting locations and my phone was red-hot. [Chuckles] Anyways. The way the significant-change thing works is instead of saying, ‘start telling me location updates,’ you ask the location –. A little bit more on this set up here, let’s take a step back. You have a location manager which is what drives us, and it’s the CLLocationManager, right? That’s the object that you're going to say, ‘you're going to set yourself as the delegate of,’ that’s the object that you're going to say, ‘start finding a location’ and then once that process happens it’s going to say, ‘okay.’ It’s going to notify your delegate method which I think is LocationManagerDidUpdateLocation and it’s going to have an array of updated locations, and you can then infer, like what you're talking about earlier on, whether it’s a good enough location, or if you want to wait for the next step. The way that it works is you say, if you have your location as you say startUpdatingLocation, stopUpdatingLocation when you're done. As for the significant-change, that’s a different call and you specifically say, startMonitoringSignificantLocationUpdates or Changes and that’s going to go through this different process where it’s going to –. What is it? I think it’s like 500 – it’s in the docs, we’re going to read this. “500 meters or more from the previous notification,” okay. So you're not going to get those continual updates through [inaudible] update locations like the previous method I discussed, when you say startUpdatingLocation, it is going to call it all the time until you tell it to stop. This one will use that significant-change to say, ‘okay, I've already notified them here. Once I've passed that 500-meter mark from the previous ones, I'm going to get another location chain.’ Think of it like, I'm driving down the highway and getting locations at each point down the highway is going to be expensive, right? Just like you brought up. If I ask for significant changes, I'm going to get those more spaced out updates because I'm doing 65 miles an hour down the highway and that obviously is better on battery life. Interestingly, that doesn’t actually use the – there's a distance filter that you can use for the other one that will filter how many updates you get. That’s completely isolated from this; this is specifically using their own internal update system. Does that make sense? JAIM: Yup. So the distance filter allows you to say, ‘hey, I don’t care about smaller, 500-meter changes. I wanna know when we’ve moved a mile or so.” JOSH: Exactly, and that specifically tied to the other way where you're just saying, ‘give me locations.’ Just like what we talked about before about desired accuracy where you can say, ‘I'm only looking for an accuracy level of x.’ Another one, ‘this is the minimum distance of – you told me about an update 10 feet ago, I don’t need another one for another 100 meters’ or something like that. I think LocationDistance is also looking it up as I talk. LocationDistance is also a double, so you can specify that as needed. JAIM: So I guess the common pattern would be to, if you need continual updates, use the distance filter to not be flooded with information, and that allows the iOS to maybe scale back on what it needs to give you. But then there's the other case like with the app I'm working on, I just need to know what city you're in so as soon as we get an update, no matter how inaccurate, we just stop listening. JOSH: Exactly. JAIM: I think some people forget to do – as soon as you get the update that satisfies your needs, you should turn off the location updates. JOSH: Yeah, that’s definitely a patter. Like you said, this is – or we’ve both said now – this is very specific to your application. I've had to do applications where they really cared about – I've been in one where they cared a lot about the distance, because it was like for a shipping company and they would have their iPads in their vehicles and they wanted to keep track of the mileage as much as they could. In that scenario, significant-change – unless I was in the background –. I did significant change when I went to the background. That while the app was running, they were sitting there plugged in, and they want it to be accurate. So for that scenario, I could leave it running. I had, obviously, distance filtered stuff; I wasn’t getting too many updates, but that scenario needed to be more accurate because that’s what that project needed. And then when I went to background I kinda get a little less accurate but still generally get the gist of what I was looking for. JAIM: Is there anything special you have to do for location stuff in the background? JOSH: Yeah, there's a plist key –. JAIM: The UI background modes? JOSH: UI backgrounds, thank you. Yes. You set up one of the UI background modes’ location, the location value, in your plist, in your [inaudible] plist and at that point, you start getting – you will get significant change locations notified to you while you're in the background. Now there is one thing that you have to do. You obviously don’t want your app to be running, right, all the time in the background or you don’t want to do a lot of work in this scenario. So actually, I think iOS 7, actually iOS 6 – they added this whole deferred location thing. You can defer location updates until you wake the app again and then you can get those updates, which obviously helps in battery life, for one. You're not getting your app notified, running through a bunch of logic, just to decide that you didn’t need that location, right? You can defer this to the point to later when you actually need it. So that’s definitely one thing to look into if you're doing a lot of background stuff. JAIM: So that would deliver like one array of lots of updates as soon as you launch the app again? JOSH: I believe that’s how it works. I haven't actually used that API, so I'm just remembering from playing around, but yeah, I think that’s how that works. JAIM: Yeah, I think that would be really handy for a lot of applications. You need to know the location, but I don’t need to be woken up to do that, because in our case we’re only interested in when the user’s looking at the app anyway. JOSH: Right, and since that didUpdateLocation is an array application, you can do – they can pass you all that and you can do what you what you need at that point. JAIM: And I assume it’s ordered, so you could just say, ‘give me the last one.’ JOSH: Yeah, it is. JAIM: Or the first one, I don’t know which one is the most recent. JOSH: And now that we have first object as a real method, we can do that. I think it’s the last object; that actually is what you’d want. I think it’s ordered, but by first in first, last out or whatever. JAIM: Okay. So what about region monitoring? JOSH: We kind of touched on it a little bit before. Much like we had this specific method for saying, ‘I want to be notified for significant changes,’ another method on the CLLocationManager is startMonitoringForRegion. And that’s specific because unlike startUpdatingLocation and startMonitoringSignificantChanges, startMonitoringForRegion requires that you send an actual region that you identify, which you can identify. It’s just a CLRegion object that you create, and I think in iOS 7, because of Beacons, they kind of promoted CLRegion to be kind of an abstract class, and now you have CLCircularRegion and CLBeaconRegion. And of course, CircularRegion is what regions used to be before iOS 7, like I said earlier, you identify the center and the radius, and that kinda creates that region circle and then you can tell the region to notify you when you enter it, will notify when you exit, then you just pass that region onto the system. When you either enter or exit that region, you're notified through locationManager:didEnterRegion. And of course there's also the failed case, right, which you're monitoring – I think it’s the locationManager monitoring didFailForRegion:withError and then you can do things if you need to, but you have the region you were looking for. But yeah, those are really good for scenarios like for reminders apps, when you say, ‘remind me when I get home,’ they can create a region around your home because they know where your home is, and as soon as you get home, that notification [inaudible] happen and they can prompt a [inaudible] notification to tell you about it. That’s kind of a great thing, that I think you can use for that kind of –. It doesn’t go back to [inaudible] before with stores, right? You're saying, ‘can I know what store I'm in?’ You could, but obviously that’s depending on a lot of data, like finding my house – it’s a lot easier than finding which slot in a mall a certain store is, which I think there are some things coming. There's a service coming that does floor plan mapping, but I haven't played with any of that yet. But all that said, you can use all of these things together to kind of – when I enter the mall region, now I know I'm here. And then if the store provided, let’s say, what's a good store? How about the Apple store? So the Apple store broadcasted that at iBeacon, you're going to know that when you're in the store. You can kinda say, ‘Okay, I'm in the mall. Use iBeacon to tell you're in the store,’ and then you just use rest of the location for tracking where you are at any other given point in time. Does that make sense? JAIM: Yeah. BEN: Definitely. JOSH: Cool. JAIM: So we’ve got the circular region, which is the old CLRegion –. JOSH: Correct. JAIM: And we’ve got the CL Beacon region – are there any other types of regions that we have? JOSH: I don’t think so. I've always felt like there's a polygon one at some point, but every time I felt like I went looking for it, I didn’t find it. I think those are the only two right now though. JAIM: Okay. So how does the Beacon region differ from the circular region that we’re all used to? BEN: The Beacon region can move around, right? It’s not fixed in lat/long coordinates. JOSH: Right, it can move around. We can just go straight into the Beacons, because the surrogate’s kinda cool. Beacons have other properties as well; it’s not a region as in – you do have a proximity, I think, but you also have –. Every Beacon has a proximity, has a UI ID. It basically identifies itself and then that’s the Beacon you're looking for, but it also has properties like major and minor. The way I think of it is like if I was Target and I wanted to do different things when a person walks into the men’s department versus the electronics department versus checkout, I'd have one UI ID and that identifies, ‘this is a Target broadcast.’ In my app that presumably would be Target’s app – I make no claim that I worked in Target’s app; I did not work in Target’s app, I'm just using this as an example. Whoever Target’s app developer is, they could say, ‘okay, I'm looking for this UI ID to find other iBeacons that are broadcasting with that same UI ID. And then I can use major and minor to filter that down, so I could identify a major version is the Target in Durham, the other major might be a different Target in San Franciso, whatever, and then minor can get down to like I have a minor ID for shoes, I have a minor ID for check out, and I can then infer on that information when I get into that region and say, ‘now tell me that I'm standing in front of a register,’ and I can do different things with that scenario. That’s obviously kind of extracting a little bit from location, even though this is a part of Core Location, the location isn’t – you're not getting updates like lat and long like you are with the other locations. You're getting, ‘you're at this Beacon, and you're probably within this distance from this Beacon’ and it’s this specific Beacon in this scenario, and that’s where you can infer on the context of what the user is doing at that point. Obviously highly application-specific, but it obviously opened up a lot of things and there's even some company that does – I think it’s Red Bear, something like that. They're actually producing CLBeacons that you can set up and just – you can buy a bunch of them and you can write your app that talks to them and listens when you're near them [inaudible]. JAIM: We’ve been experimenting with Estimotes? The Estimotes, they have kind of like a distinct look; they look like a little kind of colorful rock, and you can stick them on a wall. JOSH: Right, right. JAIM: Yeah, it’s pretty cool. We’ve got a dozen or so that we’ve been working on some internal stuff with, and it’s kind of cool because we have a little dashboard that shows which Beacons different people are near, and so since I have an app in my pocket, when I come in from the restroom, I see my name pop up on the wall. The only downside, I’d say, is that the Beacon updates are not nearly accurate enough. It’s pretty accurate to know, okay, you are pretty close to this thing, but you can’t tell whether or not you're three feet away or 10 feet away sometimes; it depends on if there's a wall in there. And what we’ve noticed is that in order to get that didExitBeaconRegion or what is it? DidExitRegion event? A significant period of time has to pass where it hasn’t received any updates for it to fire that. And so when we were doing some testing with this type of stuff, it wasn’t like an immediate, ‘okay you're in, now you're out, now you're in, now you're out.’ You know? JOSH: There's a way that you can fine tune the –. So you can get the data that the Beacon is putting out with the measured power, and you can tweak in the room that you're in. I think the way it works is like you broadcast a certain power, and then you register that power, and enter that in different areas in the room or something like that and you can kinda tweak the device for the room you're in. I haven't actually done that; it’s something that I'm just curious about if some of you guys have played with it. JAIM: I haven't; people on that team may have. I know that there's a test app that one of the guys uses and he is printing out the power –. JOSH: Yeah, the RSSI, or whatever. JAIM: Yeah. JOSH: Yeah. That’s one bad point about it, and I think that [inaudible] a little scary is Apple hasn’t published the iBeacon spec yet, right? It’s been reverse-engineered, and I think that’s how these – like Estimotes and Red Bear – they figured out what an iBeacon is, because it’s just a low-power Bluetooth. We’ve pitched this to clients before, and they didn’t wanna do it because they were afraid that [inaudible] the spec would change, or something would be different if Apple ever publishes what an iBeacon is. So I think that’s another downside, is there's always cool things like Estimotes sticking around, but they're basically built on reverse-engineered information, and I think that’s kinda scary to some people. JAIM: Yeah. JOSH: So that’s obviously another flaw with –. And I think it makes sense, because I think from Apple’s point of view, they're hoping that iBeacons are, someone puts an iPad like the coffee shop I go to around the corner. They have an iPad as their checkout system, because I think they're using Square, and that’s, I think, what Apple’s looking for. Those can be in iBeacon and then you can infer specifically [inaudible] you can do all that stuff that we talked about earlier by knowing that the users, they're from that point of view. I think they're cool, definitely, like the Estimote and Red Bear Lab – I think those are cool ideas, but you know. I think it’s like everything else – people see something, Apple does something cool and people try to build on top of it, so it’s just a little scary. CHUCK: I've got some ideas that are related to knowing how close somebody is to a Beacon, or adjusting the range of the Beacon so that it only detects people who are close enough. Can you do that? BEN: There's four states that you can get – like, I can see the Beacon but I don’t know, so there's an unknown. There's a far –. JOSH: It’s CLProximity, so you get the unknown, you get the far, you get the near and then the immediate. BEN: Yeah, in my testing, you'll get the far one when you're up to, say, 20 or so feet away. Anything beyond that, you'll start getting unknown. You usually get unknown immediately – that’s usually the first call back you get, is ‘Okay, I can see the Beacon but I don’t know how far away you are until you start ranging it.’ And then near is like, you sitting in front of your laptop, for instance. And then when you're right on top of it, like almost touching, then you get immediate. CHUCK: Do the Beacons get any of this information as well? Do they get any range information or are they just broadcasting? BEN: [Inaudible] dumb ones, like Estimotes or whatever, those are just broadcasting but you can use a phone or a Macbook as a Beacon. So you can have two people – yeah. We did a little hack-a-thon where we were trying to come up with a cool idea for this, and what we wanted to do is infect people with viruses, like the biological kind. So you would craft your virus and then when you're brushed by somebody else who had the app, they would get infected with your virus. And we did that based on the iBeacon proximity stuff. JOSH: That’s awesome. Did you have the same – you mentioned earlier about how the accident happened – did you have that same problem on getting those notifications? BEN: Yeah, especially since we’re doing this right next to each other, we would just never get the exit event. So we started to change it, “Okay, we’re not going to do it where you're just entering the same room; we’re going to do it where you have to be near the person. So what we did was you could wake up the app when you are detected that there's a Beacon nearby, you'll get the didEnterRegion and then you start ranging the region to get the proximity and then if you were near, then we would consider them infected. We would post something to the server, the server would send a push notification to the other app saying, ‘you’ve been infected with Egyptian tongue malaria’ or something. [Chuckles] That was pretty fun. It only sort of works right now, so we just need to pick it up the next time we have some chance to goof around. JOSH: That sounds like the perfect type of hack-a-thon projects; I like that kind of –. BEN: Yeah, I mean, I had no idea about any of the Beacon stuff before I did it, what the dev experience was like, but more importantly, what is the quality of information you get, and frequency, and accuracy, and that sort of thing. JOSH: Yeah, I really like that. So I did the Cocoa Heads here in Raleigh, and we’ve been trying to talk about, figuring out a good hack-a-thon to do it. I think I might steal that idea. JAIM: Cool. CHUCK: That sounds like fun. JOSH: Yeah. So when you get into the broadcasting, that’s obviously not a Core Location thing; that’s a part of core Bluetooth. You actually create a [inaudible] manager, so like you were saying, you can go both ways and you broadcast and receive in your app. CHUCK: Right. JOSH: That was one thing that hit me at first when I first started looking at – I haven't done anything near as extensive as virus transmission, but obviously when this came out, I was like, “I wanna play with this.” So I built a quick little demo app and played around with it, and the first thing that hit me was that when I [inaudible] my broadcast, it wasn’t a part of Core Location. It was obviously in core Bluetooth, because it is a Bluetooth functionality that you're working with. That’s, I guess, one thing to keep in mind if you wanna start digging around that side of it. CHUCK: Alright. Well, if we don’t have anything else to talk about, then we can go ahead and get into the picks? JOSH: Yeah, I don’t have anything else. It’s fun, and then it’s fun to play with – all of it. CHUCK: Alright. It does sound like fun; I'm going to have to play with it too. Well let’s get into the picks. Ben, do you wanna start us with the picks? BEN: Sure. So I'm speaking at some conferences coming up soon. In March, I guess in three weeks, I'm going to speak at CocoaConf Chicago. In April, I’ll be in Austin at CocoaConf Mini, and also in April, I’ll be at Philly Emerging Tech, so if you live in Philadephia, come out and say hi. Also I wanna pick a really cool Mac app for guitarists called Capo. The idea behind Capo is that it will analyze the audio spectrum of your given audio file, and it will try to fill in what notes are being played. It’s really pretty amazing how it looks. So you can just drag a song you wanna play in and it will try and guess what the chords are, and you can even tab out the various notes. You can just click on it and say, this is a guitar note, and you click on it, and it will let you put that in tablature at the bottom of the song. I think it’s really cool if you wanna tab out the song, but really, what I'm using it for is to slow down songs. So if I wanna play a solo of a song that’s way too fast for me right now, I can slow it down to three-quarter speed, or half-speed, and then I can just try and get it that way. So I've really, really been enjoying Capo. And my last pick is a beer pick. I picked up a Karbach Hellfighter, which is kind of a rare beer. It’s made in Houston; it was really expensive. It’s a Bourbon Barrel-Aged Imperial Porter, but it was quite tasty, so. Those are my picks. CHUCK: Awesome. Jaim, what are your picks? JAIM: I've got one pick today. I do consulting and freelance work with iOS, and I've got my hourly rate for when I'm actually doing work, but I didn’t really know how much time I spend on working with clients, answering emails and doing stuff, and doing the whole sales process. So I was looking for a way to kinda keep track of my time, didn’t find anything that good, but I stumbled upon one app that I've actually been using for the past couple of weeks and I like it quite a bit. It’s called Toggl; it lets you switch back and forth if you're sending an email or something [inaudible], so I look forward to seeing what my actual rate is, which is hopefully not the depressing thing, but we’ll see how it goes. Toggl – check it out. CHUCK: Awesome. BEN: Can I rent you like a key can with [inaudible]? Like as soon as your hourly rate drops below $18 an hour, then –. JAIM: 18 hours - $18 an hour? BEN: Yeah! JAIM: You think like I'm an expert or something? CHUCK: [Chuckles] BEN: See, you just publish your numbers and I’ll – what do you call that on Native ES? Ah, spot instances. As soon as your rate goes below x, I’ll start sending you stuff to do. JAIM: Sounds great. CHUCK: [Chuckles] JAIM: “Change the color of this button.” Okay. CHUCK: [Chuckles] Very nice. I don’t have any picks other than antibiotics this week, so. Josh, what are your picks? JOSH: Well, I guess I have to copy Ben a little bit. I'm actually going to be talking at CocoaConf in Raleigh in May, so that’s definitely something if you're in this area. My favorite app right now, I just bought it a couple of days ago, is Bee. We use Jira as our bug tracking, issue tracking, and we do all our sprint planning and stuff in there too, and I absolutely hate the web interface to Jira. It’s a web interface which I hate, so Bee is like a nice little native app that you can use to see what you have to work on. It’s been really nice having it and it ties into Jira’s worklog system, so if you're that type of person who likes to see how much time you’ve spent on a given task, there's a little play button so when you work on a task, you hit play, and it builds up the time. When you close it, you see that whole history, which is really nice. And I'm going to copy the beer pick too, because we have this brewery here in North Carolina called Red Oak. I don’t know if you guys can get it, but Red Oak’s a really good beer. I guess I don’t even know enough about beer to talk about what type it is, but I really enjoy it. BEN: It’s a delicious beer. JAIM: Yeah, that’s like requirement number one. BEN: Tasty. JOSH: My wife and I have gotten really into craft beer lately. We went to [inaudible] Brewery in Nashville. There's not a lot of local breweries here; it’s kind of a big thing happening in this area. Obviously, it’s happening everywhere, but it’s happening here a lot as well, and we have a lot of breweries around here, so it’s fun. JAIM: I do get grumpy when people make beer picks that I can’t get in my local store at Minnesota. You guys are both on my list. BEN: Jaim, I heard a little tip. If you go to Beer Advocate, there's a trading section and I always wondered how this works, but apparently you just – you can mail them cash, which I don’t condone, but then they rate sellers – it’s kinda like eBay. It’s kind of unofficial; you're not supposed to ship beer, but the way they get around it is that you're shipping a collectible piece of glass that happens to have delicious liquid inside. CHUCK: [Laughs] JAIM: [Inaudible] like the Silk Road; did they BitCoin or something? [inaudible] BEN: No, I mean usually you get to say, “Okay, here’s what I have local; who wants something?” And then they’ll trade you something from their region. CHUCK: Is it illegal to ship beer? BEN: No, it’s a legitimate work around. Say, “No, I want to collect the bottle,” and that’s fine. I know somebody who does this all the time, so, I don’t know. I'm eager to try it actually, because I wanna try some – just stuff that I wouldn’t normally get. JAIM: I think I'm far too lazy for that. BEN: Also, just another anti-pick for liquor laws, because they're retarded: Why can’t you just say, “Oh that looks nice. I would like to order that and have it shipped to my door like you can with coffee or wine.” JOSH: Yeah. CHUCK: So technically speaking, shipping beer is against the law, but shipping collectible bottles is not – is that what you're saying? BEN: Do you know why shipping wine is not against the law? CHUCK: No. BEN: Because it’s made of grapes, and it’s an agriculture product, and so there was probably some lobby somewhere where they classified it as something else, so you can order wine and have it shipped. No problem. It makes no sense. JAIM: What [inaudible] liquid green? BEN: Yeah. JOSH: Looks like it makes no sense, kinda like –. Isn’t Jack Daniels made dry county in Tennessee or whatever? BEN: Yes. JAIM: This thing makes no sense, but, whatever. CHUCK: Alright. Well let’s go and wrap up the show, thanks guys for all of your input. Thanks for coming on the show, Josh. JOSH: Yeah, thanks for having me. CHUCK: Definitely. Alright, we’ll wrap this up. We’ll catch you all next week.

Sign up for the Newsletter

Join our newsletter and get updates in your inbox. We won’t spam you and we respect your privacy.