cancel
Showing results for 
Search instead for 
Did you mean: 

MDK Calendarview Extension: Cannot find FUICalendarViewControlerBridge

vtschouten97
Explorer
0 Kudos

I have been playing around with the mobile development kit client #Calendarview Extension from the MDK github examples in SAP Service and Asset Manager # 2210. The issue is that the Calendarview Extension was working perfectly up until recently, but now it suddenly cannot find FUICalendarViewControlerBridge when running commatns build ios.

Screenshot 2024-01-30 at 11.46.16.png

What I did to get it working previously was:

Add FUICalendarViewControllerBridge.swift (from the to the MDK github examples) SAM.mdkproject/App_Resources/iOS/src folder of the SAM.mdkproject folder

Screenshot 2024-01-30 at 11.47.32.png

Add ZCalendarViewModule/controls/ZCalendarViewControl.ts to SAM.mdkproject/extensions

Screenshot 2024-01-30 at 11.49.35.png

Add a FormCell Extension to an MDK page

Screenshot 2024-01-30 at 11.50.39.png

When trying to access the page, the application crashes. I have also tried building a plugin from the swift file as discussed in this SAP blog, but still the same issue.

I am unsure what the exact cause is, as I don't seem to recall changing anything related to the calendarview extension in the SSAM client itself. Does anyone know what is happening here? I know MDK 23.12 will introduce a Calendarview control, but understanding what is happening here would aid my future developments regarding SSAM and MDK.

Accepted Solutions (0)

Answers (3)

Answers (3)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

I took the example Github extension and added into my SAM client putting the swift file into the SAM mdkproject and included the extension control in the metadata/Extensions folder and was able to create a page to display the Calendar as expected. 

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

The CalendarControl.ts file from the sample is a metadata extension control.  It should be placed in the metadata/Extenstions/CalendarControl/controls folder not in a folder under .mdkproject/extensions.  Please give this a try and see if that addresses the issue.

 

vtschouten97
Explorer
0 Kudos
I have tried this as well, and the app still crashes on trying to access the page. As before, I have added the swift file to SAM.mdkproject/App_Resources/iOS/src, and have added the typescript file to SAM.mdkproject/metadata/Extenstions/ZCalendarViewModule/controls. I have also added the project defined in the .cim file to the SAM.mdkproject folder, as this is defined for this project. Building and bundling works fine, but still crashing on trying to access the calendar page. I get a similar error as before in the console, but now it refers to SAPFiori.FUICalendarView: Unable to activate constraint with anchors <NSLayoutXAxisAnchor:0x6000019464c0 "SAPFiori.FUICalendarView:0x10e16c800.leading"> and <NSLayoutXAxisAnchor:0x600001946300 "UILayoutGuide:0x600003b4af40'UIViewLayoutMarginsGuide'.leading"> because they have no common ancestor.
bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

What version of MDK client are you using for your test?

Does the CalendarView extension still work as published on the samples repo but not in your SAM app or is it not working in both cases?

vtschouten97
Explorer
0 Kudos
I am using MDK 23.8.4 (with SSAM Plugins 2310.0.2, SSAM2210). The calendar does work on the CalendarViewExtensionApp. But it doesn't work (anymore) in the SSAM application. The tns console says 'NativeScript encountered a fatal error: Uncaught Error: Unable to activate constraint with anchors <NSLayoutXAxisAnchor:0x600001914540 "TNSLabel:0x16a012550.leading"> and <NSLayoutXAxisAnchor:0x600001914700 "UILayoutGuide:0x600003b6d6c0'UIViewLayoutMarginsGuide'.leading"> because they have no common ancestor. Does the constraint or its anchors reference items in different view hierarchies? That's illegal.'
vtschouten97
Explorer
0 Kudos

There are 2 things I am curious about the most:

I am wondering why in the CalendarViewExtensionApp example, the client is able to read the extension from the metadata, while in SSAM it cannot. When I checked in the debugger, it searches for the CalendarControl module in the SSAM client extensions folder. That's why I put it there at first.

Secondly, why it cannot suddenly cannot find FUICalendarViewControlerBridge. I have tried adding the calendarview extension to SSAM on a computer of my colleague, but the same problem occurs.

I have tried everything I can think of to make it work, if you have any insights I would be immensely grateful @bill_froelich