extract the common classes to the apns gem