Unity app hangs / crashes upon Firebase Messaging token event initialization

I have an IOS build of my mobile app made in the Unity engine which always hangs when I test on any apple device I have available. By hang, I mean the Unity splash logo appears as normal but then my first scene does not load, instead presenting just black. Closing the app presents a crash report dialogue.

There is also a released android version which functions without issues including this one and firebase cloud messaging works fine there.

I have followed the official documentation to the letter and the issue occurs when the below code are included:

public void Start()
{
    Firebase.Messaging.FirebaseMessaging.TokenReceived += OnTokenReceived;
    Firebase.Messaging.FirebaseMessaging.MessageReceived += OnMessageReceived;
}
    
public void OnTokenReceived(object sender, TokenReceivedEventArgs token) => Debug.Log("Received Registration Token: " + token.Token);
    
public void OnMessageReceived(object sender, MessageReceivedEventArgs e) => Debug.Log("Received a new message from: " + e.Message.From);

This code is included in a class that exists in the first scene loaded and is run as soon as the Start method is called automatically.

Additional details:
Unity Version – 2022.3.29 (Running on and built with Windows 11)
Firebase SDK Version – 12.0.0 (Also tested 11.6.0)
Firebase packages installed – Analytics, Crashlytics & Messaging

IOS build folder copied to a Macbook running MacOS Sonoma 14.5 with Xcode.

IOS Testing devices = Iphone 12 Pro Max (IOS 17.4) & Ipad 8th Gen (IpadOS 17.5)

Testing using TestFlight.

As soon as I remove the two likes in the Start method, the app will run normally, however then notifications do not work.

I also have a custom push notifications authorization class which appears to work fine as the notification authorization dialoge appears when the app starts and that code still runs normally when the above is removed without hanging.

IOS build process involves building the app in Unity with IOS as build target, copying to Macbook, installing pod file from terminal with Cocoapods then opening in Xcode with newly generated project file. I then sign with my provisioning profile, include the capabilities (Push Notifications, Background Modes with remote notifications checked). I also add UserNotifications.Framework to the correct assembly. Then I archive to AppStoreConnect to access in TestFlight.

I have set up the APN key, certificates and profile and linked to Firebase Console which is also reporting the analytics normally.

I am unable to obtain any logs from Xcode or run the app in Xcode as I do not have physical access to the Macbook. It is stored in a remote location andonly used for signing and building. I am limited to debugging mostly through trial and error, in which I narrowed it down to the FirebaseMessaging TokenReceived and MessageReceived lines.

I have already spent a lot of time scouring the internet for solutions, similar questions etc. Any help would be extremely appreciated!

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật