In a small bowl, sprinkle diced bacon with brown sugar, mix to coat, and set aside.
In a larger mixing bowl, combine diced sweet potatoes, onion, olive oil, rosemary, salt, and pepper. Stir until potatoes are well coated.
Add mixture to preheated air fryer and cook for 8 minutes.
Open basket, stir mixture, and add brown sugar-coated bacon to the hash (just sprinkle it on top). Return to the air fryer and cook for 6 minutes.
Stir again and cook for an additional 6 to 7 minutes, or until the potatoes are lightly crispy on the outside and soft on the inside, and the bacon is crispy and cooked all the way through.
Video
Notes
Vegetarian option: omit bacon and brown sugar.
Substitute 1 teaspoon smoked paprika for rosemary, if desired.