Apple has reversed its decision to bar marijuana from the App Store, at least for one app. Months following the removal of MassRoots, a marijuana social app, the tech firm has allowed the app back into its digital store, under one condition.

The MassRoots app will now use geofencing, a GPS-based technology, to restrict app access to the 23 U.S. states where medical marijuana is legal. The app, first launched in July 2013, was pulled in November as part of a larger crackdown by Apple on a number of marijuana-related apps. Though, despite the crackdown, some marijuana apps remained in the store.

MassRoots Screenshot The MassRoots app now uses geofencing to only allow its use by users residing in the 23 states where medical marijuana is legal Photo: Screenshot/MassRoots

Following the removal of MassRoots from the App Store, the company started a social campaign and petition to get the app restored by Apple. And it was joined by a number of marijuana advocacy groups and publications, including the National Cannibis Industry Association, ArcView Group, Whaxy and the Cannabist. MassRoots added the geo-restriction feature to its app before it was eventually restocked in the App Store.

“A few hours ago, an Apple representative called to notify us that our efforts were successful: The App Store is permitting cannabis social apps that are geo-restricted to the 23 states that have legalized medicinal cannabis. MassRoots is available for download in the App Store,” MassRoots founder Isaac Dietrich told the San Francisco Chronicle.

In the coming weeks, MassRoots plans to add additional protections to go beyond the current requirements of the App Store, according to the company blog. And it expects to roll out the same geofencing feature to the Android version of app and its website in the near future.

While MassRoots was able to make it back on the App Store, the dozen companies that had their marijuana-related apps pulled are reportedly still in discussions with Apple.