Jump to content
RonaldK

macOS: ObjectiveC-Class UNUserNotificationCenter not found

Recommended Posts

Running a Delphi 10.4.1 (latest patch) FMX 64bit application on:

 

Catalina : runs fine.

High Sierra: on startup an EObjectiveC raises "ObjectiveC-class UNUserNotificationCenter not found"

 

Does anyone have any idea where to look?

 

Here the call stack:

 

:000000010001C000 @DbgExcNotify
:000000010001C03E System::NotifyReRaise(System::TObject*, void*)
:000000010001C0DA System::_RaiseAtExcept(System::TObject*, void*)
:000000010001C1F5 System::_RaiseExcept(System::TObject*)
:00000001007117F5 Macapi::Objectivec::TOCGenericImport__2<System::DelphiInterface<Macapi::Usernotifications::UNUserNotificationCenterClass>, System::DelphiInterface<Macapi::Usernotifications::UNUserNotificationCenter> >::GetOCClass()
:0000000100713D88 System::Mac::Notification::UserNotificationCenter()
:0000000100712472 System::Mac::Notification::TNotificationCenterCocoa::TNotificationCenterCocoa()
:0000000100715087 System::Mac::Notification::TNotificationCenterCocoa::GetNotificationCenter()
:0000000100711B6E System::Mac::Notification::TPlatformNotificationCenter::GetInstance()
:00000001007173F8 System::Notification::TBaseNotificationCenter::InternalGetInstance()
:0000000100716AEC System::Notification::TCustomNotificationCenter::TCustomNotificationCenter(System::Classes::TComponent*)
:0000000100111B7B System::Classes::TReader::ReadComponent(System::Classes::TComponent*)::CreateComponent(void*)
:00000001000DE01D System::Classes::TReader::ReadComponent(System::Classes::TComponent*)
:0000000100112008 System::Classes::TReader::ReadDataInner(System::Classes::TComponent*)
:0000000100111EEF System::Classes::TReader::ReadData(System::Classes::TComponent*)
:00000001000E8ACF System::Classes::TComponent::ReadState(System::Classes::TReader*)
:00000001000DEC07 System::Classes::TReader::ReadRootComponent(System::Classes::TComponent*)
:00000001000D8F8F System::Classes::TStream::ReadComponent(System::Classes::TComponent*)
:0000000100104900 System::Classes::InternalReadComponentRes(System::UnicodeString, NativeUInt, System::Classes::TComponent*&)
:000000010010C237 System::Classes::InitInheritedComponent(System::Classes::TComponent*, System::TMetaClass*)::InitComponent(void*, System::TMetaClass*)
:000000010010C2DD System::Classes::InitInheritedComponent(System::Classes::TComponent*, System::TMetaClass*)
:000000010058E52D Fmx::Forms::TCommonCustomForm::TCommonCustomForm(System::Classes::TComponent*)
:00000001005963E7 Fmx::Forms::TCustomForm::TCustomForm(System::Classes::TComponent*)
:00000001005898B8 Fmx::Forms::TApplication::CreateForm(System::Classes::TComponentClass, void*)
:0000000100589799 Fmx::Forms::TApplication::RealCreateForms()
:0000000100522D3E Fmx::Platform::Mac::TPlatformCocoa::Run()
:000000010058A195 Fmx::Forms::TApplication::Run()
main(1,0x00007ffeefbffa38,0x00007ffeefbffa48,0x00007ffeefbffaf0)
:00007FFF78D07015 start
:00007FFF78D07015 start

 

Edited by RonaldK

Share this post


Link to post

To reproduce this:

- create simple FMX app with target macOS

- place a TNotificationCenter to the main TForm

- run on Catalina -> run fine.

- run on High Sierra -> Exception on startup

 

The TNotificationCenter online help says to platform support: OSX 10.8+

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×