Debugging iOS Safari

Ever have a rendering issue on iOS browsers while you’re working on a website/web app?

Here’s a neat trick that I’ve taught a few people over the past couple weeks: you can use desktop Safari to help debug issues that arise on iOS Safari. You can do this on the iOS Simulator, too, which can help you debug rendering issues on iPhone and iPad, retina and non-retina, even if you don’t have one of those devices.

iOS Simulator

To do this using the iOS Simulator, you’ll want to download and install a recent version of Xcode, first.

To get to the iOS Simulator once you have Xcode installed, open up Xcode and then in the top-right "Xcode" menu (next to the "Apple Menu"), go to Open Developer Tool->iOS Simulator. After a few seconds of loading, an iOS home screen should appear.

Hint 1: You can change devices and iOS versions by going to the Hardware->Device menu. (If you want to test older versions of iOS, go to Xcode, then open the preferences — Xcode menu->Preferences. Then under the "Downloads" tab, you can choose to download various iOS simulators under the "Components section".)

Hint 2: you can trigger the "home button" action by pressing ⌘⇧H, command-shift-H.

In your iOS Simulator, open Settings and go to the settings pane for Safari. Under "Advanced", make sure "Web Inspector" is turned on.

Now open Safari in your simulator and browse to whatever page you wish. (Since the Simulator runs within your own computer, you can even debug sites under without having to worry about port/IP address permissions — it’s just another local web browser.)

Open your Mac’s desktop Safari. In preferences, go to the "Advanced" tab and make sure "Show Develop menu in menu bar" is checked.

Now, under the "Develop" menu, you should see "iPhone Simulator" or "iPad Simulator" a few options down from the top. Select the tab that corresponds with the page you have open and you'll see the standard Safari web inspector acting on the browser in your simulator.

iOS Device

Now, for an even cooler trick, try the above on an actual, physical device. Plug your device into your computer; if you’re on iOS 7 you may have to tell your device to “trust” the machine. Follow the steps above. Magic!

On Fellowship

I’m just about halfway through my OpenNews fellowship at ProPublica.

Plenty has been said about why developers should work in (and would enjoy) the newsroom environment. I had a hand in one piece and many others have chimed in with wonderful stories to that end. As someone who was considering applying for this fellowship last year, I didn’t need these beatitudes, so to speak. I’d been a developer in news for a couple years and I was already hooked on the satisfaction that came from building things that could make a difference in people’s lives — not to mention the interesting people, the pace of work, the variety, etc. (…if you’re a developer who hasn’t yet worked with journalism or civic hacking, then you should read all of those posts, though.)

So I’ve been thinking: what do I know about this now that could’ve enticed me even more a year ago? I very nearly didn’t apply, since I was putting it off and putting it off and putting it off…

Well, it’s a fellowship. Right… but being an OpenNews Fellow doesn’t feel so much like the cut-and-dry “…person appointed to a position granting a stipend and allowing for advanced study or research” or “member of a group having common characteristics.” (Hat-tip to Webster.) No, no, these don’t quite capture the sense of the team and community that you become a part of.

Aside from the easy joke (sorry, Annabel), I’ve heard us cheekily described as “the Wu-Tang of journalism” or a “journalism Justice League.” We obviously have fun with it and I’m not sure what other fellowships are like, but in this case I like to consider this fellowship to mean an “epic team of awesome,” or some (more eloquent) approximation. We’re not just here to do research and better ourselves and the newsrooms we work in — we’re here to foster and advance the overall journalism/code community.

We have backgrounds in programming, statistics, censorship research, cybersecurity, satellite communications, and we’re from nearly every corner of the earth. That range of backgrounds and skills has honestly made collaboration fun and at times surprising (in a good way).

We had a fellowship question-and-answer session in our weekly community call yesterday. Responding to a question about highs and lows in our experiences thusfar, a resounding “high point” for many of us was “any time the fellows get together.” (And this is no slight to the hosting news organizations and the day-to-day work we do and the adventures each of us has encountered. Hell, I work with an amazing and inspiring team that I once idolized and never fathomed I’d be working with.)

Another lesson (and high point) from my first few months: the community of civic-minded programmers and data people is huge now. It’s not just journalists anymore — there are people who want to help improve government, health, education, help make history more accessible, and on and on, outside of the guise of news media. There are communities of people who want to work together to do great things for the world, and these formerly-disparate communities are starting to mingle and work together in interesting. I’ve had the opportunity to visit the MIT Center for Civic Media a couple times and been blown away at the variety and scope of projects there — from free speech to gender to robots to accountability in developing nations. I’ve met the excellent people at the New York Public Library Labs team and had a chance to hack on historic geodata alongside geo developers that created the state of the art.

A lot of the best parts of the fellowship are about inspiration and turning that inspiration into something great. We fellows inspire one another, we inspire other people, and we in turn, are inspired by a lot of the people we get a chance to interact with through the course of our fellowship work.

Maybe what I should have said is less “fellowship as epic team” and more “fellowship as epic community.” (Or…)

The Knight-Mozilla OpenNews program exists at a great time in the journalism/civic code world. There’s an ecosystem of tools and datasets out there, and there’s a whole world of people that are in this space or interested in it. People are starting to get it that transparency and open tools and sharing and collaboration — especially when it comes to data about our governments and our environments — can foster real change and real impact. And it’s part of our mandate to get out there and work in the intersection of these communities — journalism, open source, civic impact — to make all of them better.

I mean, Source, the OpenNews site about “Journalism code and the people who make it”? Well whad’ya know, the site has appeal far beyond journalism — with posts (on crowdsourcing, hardware hacking, data visualization, and so on…) often landing on Hacker News and being discussed far from the walls of journalism institutions.

If working in this amazing community, with these amazing people sounds like something you want to take a part of, you should apply to become an OpenNews fellow. You should join the community. Hop into IRC. Listen in on our community calls. Find a civic-oriented hackday. Build some tools and share them with the world. Figure out how to get an obscure dataset into something usable — and share that knowledge so the next person can do it, too. Get involved and talk to people in the community — you’ll be amazed at how many in the community are not only brilliant developers/journalists/evangelists, but they’re wonderful and nice people, too.

There’s a whole community of people doing epic things to make the world a better place, and you can — and should! — be a part of it, too. It sounds daunting, sure, but the amount of inspiration and support you can find from colleagues and neighbors is equally great.

And seriously, if you’re a developer that wants to work on amazing things and get inspired and work with inspiring people — don’t be afraid to apply for the fellowship. I’m glad I wasn’t.

I’ve been a terrible blogger lately, but I’m going to be catching up on writing very soon. (Yes, I always say that.) I’ve got about as many “blog posts yet to write” as I have projects — and I’ve got an interesting plethora of those as of late.

…Actually, let’s talk about some of those for a minute. I plan on discussing a few of these at length over the next couple weeks (as big news is on the horizon for some), but here’s a collection of some things I’ve been working on since I last wrote:

I’ve probably forgotten something in there… But you’ll hear back from me soon enough.

(Are you a developer-ish person? Do these projects sound interesting to you? You should check out the Knight-Mozilla OpenNews Project, get involved with the gang, and apply to be a 2014 fellow. Seriously, check it out.)