Grease 9x13 pan and preheat oven to 350 degrees. Ensure butter and cream cheese are at room temperature for cream cheese frosting.
Chop apples.
Be sure the coconut oil is soft, so heat it a little bit if needed. Blend with the sugars, then add eggs one at a time. Beat until light and fluffy.
3/4 cup coconut oil, 3/4 cup granulated sugar, 3/4 cup brown sugar, 2 eggs
Add cinnamon, nutmeg, 1 teaspoon salt, 1 teaspoon vanilla, and baking soda. Mix again. Add half the flour, mixing on low. Pour in cut up apples and stir by hand. Add remaining flour and stir until just incorporated.
Use a spatula to scoop up batter and drop around the pan. Use spatula to carefully distribute.
Bake at 350 degrees for 45 to 50 minutes, until cake tester comes out clean. Let cool completely before frosting.
Start cream cheese frosting while cake cools. Beat butter and cream cheese until uniformly distributed. Reduce mixer speed to low and add last 1/2 teaspoon salt and powdered sugar one cup at a time.