For a recent breast cancer study, epidemiologist Kathryn H. Schmitz of the University of Pennsylvania sent out 60,000 letters—and netted 351 women. Walking each participant through the paperwork took 30 minutes or more. Such inefficient methods of finding test subjects have been the norm for medical research.

Yet there's a wealth of data out there from the billion smartphones and 70 million wearable health trackers we buy every year. Their sensors generate terabytes of data every day about our activity, sleep and behavior. Those data would be fantastically useful to medical investigators—if only they could get at them.

For the first time, there's a way. It's free software from Apple called ResearchKit.

Research Kit lets researchers build apps to do the recruitment and data collection for them. You, the participant, know exactly who's getting this information, and you can opt out of any part at any time. The data go directly to the research institution; Apple has no access.

These apps can incorporate both self-reported data (“How are your symptoms today?”) and information from the phone's microphone, camera, motion sensor, GPS, and so on. So instead of providing updates once every six months, you're generating data hundreds, if not thousands, of times a day.

Before ResearchKit's release in April, Apple worked with leading institutions to develop the first wave of five apps. Cardiologist Michael McConnell and a team at the Stanford University School of Medicine, for example, developed MyHeart Counts, an app for monitoring cardiac health. It tracks your activity (using the phone's motion sensors) and asks you to take a walking test every three months. The app attempts to correlate activity, fitness and risk factors over time; eventually it gives you personalized suggestions—something else traditional studies don't usually do.

Within the first 24 hours, 10,000 participants signed up for the study.

“ResearchKit solves a number of the current challenges to clinical research,” McConnell told me. With it, you can recruit more people, bring costs down and allow for better sharing of research data, he said.

Eric Schadt, a geneticist at the Icahn School of Medicine at Mount Sinai, developed an app called Asthma Health. It surveys you about your condition each day and correlates your responses with your local weather, pollution and pollen counts (via your phone's GPS). Within 72 hours, 5,000 asthma sufferers had enrolled—a number, Schadt says, that would have taken him years to amass in the old days. Other apps developed before the release include GlucoSuccess (for monitoring diabetes), mPower (for Parkinson's disease) and Share the Journey (for breast cancer). They are all free. You can participate in the latter three studies even if you don't have the disease; your data are helpful as controls.

This may all sound wonderful, but what's in it for Apple?

Your first guess might be: “To sell more iPhones, of course.” Except that here's the best part: Apple has made ResearchKit open source. It's free to anyone—even Apple's rivals, such as Google or Samsung—to use, modify or co-opt.

The ResearchKit idea seems promising. But it's worth pointing out that the reliance on a smartphone limits the participant pool to people who have one. Studies that require body scans, fluid samples or hospital-grade precision are off the table, too.

But compared with in-person and even Web-based studies, these apps can be far more present and easier to stick with, and they can generate more kinds of useful data. Studies that used to be slow, small and local can now be fast, huge and global. And that could mean better health and longer lives for us all.