Import #import "FirebaseMessaging.h" instead of @import FirebaseMessaging;
If you are using this code to get token ID:[[FIRInstanceID instanceID] token]
You can get this warning message: 'token' is deprecated: Use instanceIDWithHandler: instead.
For this use this code to get token ID.
[[FIRInstanceID instanceID] instanceIDWithHandler:^(FIRInstanceIDResult * _Nullable result, NSError * _Nullable error) {
    if (error != nil) {
        NSLog(@"Error fetching remote instance ID: %@", error);
    } else {
        NSLog(@"Remote instance ID token: %@", result.token);
        NSString* message = [NSString stringWithFormat:@"Remote InstanceID token: %@", result.token];
        self.instanceIDTokenMessage.text = message;
    }
}];
https://firebase.google.com/docs/cloud-messaging/ios/first-message