Archicad C++ API
About Archicad add-on development using the C++ API.

26 Mac Addon-on Framework Errors

Ben Cohen
Advocate

Hi...

 

Me again, trying to get my add-on working for the impending local release (AUS) of Archicad 26.

I have the add-on working great after navigating all the changes in the 26 API..

PC - is fine

but...

Mac.. Is "working" fine.. but I am getting these errors on the launch of Archicad.

Could it be that these frameworks have not been code signed by GS?

I have tried the following to fix.

 

  • Reinstalled the frameworks
  • Re-downloaded and re-installed the frameworks
  • Isolated the frameworks folder using "sudo xattr -d com.apple.quarantine Support/*". (Thanks Bernd)
  • Renewed my signing using terminal "codesign --deep..."
  • I have even managed to Notarize the addon with apple.
  • I have checked my apple developer credentials and they are all fine..

None of the above have worked.

I have spent days on this.. This forum is my last shot

 

Of note: I need to delete the 'build' folder of my addon, each time before compiling, otherwise the addon will not even load... ???

 

Of course I can remove these messages in the "Security & Privacy" system preference.. but that will not stop my users from seeing them... and create havoc

 

Any help on this error would be much appreciated. 

 

Framework error1.png

Framework error2.png

 

Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au
8 REPLIES 8

Hi Ben,

It's very weird, that you get those errors during running your Add-On. So far I've only ever seen them during building of Add-Ons.

This leads me to think, that the libraries you link to might be the "wrong" ones. To my understanding, during running of your Add-On it should link to the libraries shipped with Archicad itself and not with the ones from the API DevKit. And those should be signed by GS.


Please run the following command and post the output (substitute your Add-Ons name):

 

otool -L Add-On.bundle/Contents/MacOS/Add-On

Here's an example output of one of my Add-Ons (note the '@rpath', which means 'runpath search path'):

$ otool -L SaveLayerSettings.bundle/Contents/MacOS/SaveLayerSettings 
SaveLayerSettings.bundle/Contents/MacOS/SaveLayerSettings:
	/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 23.0.0)
	@rpath/GSRoot.framework/Versions/A/GSRoot (compatibility version 0.0.0, current version 0.0.0)
	@rpath/RS.framework/Versions/A/RS (compatibility version 0.0.0, current version 0.0.0)
	@rpath/GSUtils.framework/Versions/A/GSUtils (compatibility version 0.0.0, current version 0.0.0)
	@rpath/InputOutput.framework/Versions/A/InputOutput (compatibility version 0.0.0, current version 0.0.0)
	@rpath/ObjectDatabase.framework/Versions/A/ObjectDatabase (compatibility version 0.0.0, current version 0.0.0)
	@rpath/Graphix.framework/Versions/A/Graphix (compatibility version 0.0.0, current version 0.0.0)
	@rpath/TextEngine.framework/Versions/A/TextEngine (compatibility version 0.0.0, current version 0.0.0)
	@rpath/DG.framework/Versions/A/DG (compatibility version 0.0.0, current version 0.0.0)
	@rpath/Geometry.framework/Versions/A/Geometry (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.23.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1858.112.0)

 

I think the '@rpath' is then subsituted to the matching path of Archicad itself during running the Add-On. And so it should link to the frameworks in the Archicad folder. For example they are located here for my AC26 installation: /Applications/Graphisoft/Archicad 26/Archicad 26.app/Contents/Frameworks.

Hi Bernd

 

Ok.. here are the results.. looks fine to me ?
I had a beta version of 26 installed and thought that could possibly cause a conflict.. no..

 

4DTools_26.bundle/Contents/MacOS/4DTools_26:
	/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 23.0.0)
	@rpath/AnalyticalModelAPI.framework/Versions/A/AnalyticalModelAPI (compatibility version 0.0.0, current version 0.0.0)
	@rpath/Brep.framework/Versions/A/Brep (compatibility version 0.0.0, current version 0.0.0)
	@rpath/BuiltInLibrary.framework/Versions/A/BuiltInLibrary (compatibility version 0.0.0, current version 0.0.0)
	@rpath/CommunicationClient.framework/Versions/A/CommunicationClient (compatibility version 0.0.0, current version 0.0.0)
	@rpath/CommunicationCommon.framework/Versions/A/CommunicationCommon (compatibility version 0.0.0, current version 0.0.0)
	@rpath/DGGraphix.framework/Versions/A/DGGraphix (compatibility version 0.0.0, current version 0.0.0)
	@rpath/DG.framework/Versions/A/DG (compatibility version 0.0.0, current version 0.0.0)
	@rpath/GDL.framework/Versions/A/GDL (compatibility version 0.0.0, current version 0.0.0)
	@rpath/GSMSections.framework/Versions/A/GSMSections (compatibility version 0.0.0, current version 0.0.0)
	@rpath/GSModeler.framework/Versions/A/GSModeler (compatibility version 0.0.0, current version 0.0.0)
	@rpath/GSModeler2D.framework/Versions/A/GSModeler2D (compatibility version 0.0.0, current version 0.0.0)
	@rpath/GSRoot.framework/Versions/A/GSRoot (compatibility version 0.0.0, current version 0.0.0)
	@rpath/GSUtils.framework/Versions/A/GSUtils (compatibility version 0.0.0, current version 0.0.0)
	@rpath/GSXML.framework/Versions/A/GSXML (compatibility version 0.0.0, current version 0.0.0)
	@rpath/GSXMLUtils.framework/Versions/A/GSXMLUtils (compatibility version 0.0.0, current version 0.0.0)
	@rpath/GX.framework/Versions/A/GX (compatibility version 0.0.0, current version 0.0.0)
	@rpath/GXImage.framework/Versions/A/GXImage (compatibility version 0.0.0, current version 0.0.0)
	@rpath/GXImageBase.framework/Versions/A/GXImageBase (compatibility version 0.0.0, current version 0.0.0)
	@rpath/GXMedia.framework/Versions/A/GXMedia (compatibility version 0.0.0, current version 0.0.0)
	@rpath/Geometry.framework/Versions/A/Geometry (compatibility version 0.0.0, current version 0.0.0)
	@rpath/Graphix.framework/Versions/A/Graphix (compatibility version 0.0.0, current version 0.0.0)
	@rpath/HTTP.framework/Versions/A/HTTP (compatibility version 0.0.0, current version 0.0.0)
	@rpath/InputOutput.framework/Versions/A/InputOutput (compatibility version 0.0.0, current version 0.0.0)
	@rpath/JSON.framework/Versions/A/JSON (compatibility version 0.0.0, current version 0.0.0)
	@rpath/JSONConversion.framework/Versions/A/JSONConversion (compatibility version 0.0.0, current version 0.0.0)
	@rpath/LibXL.framework/Versions/A/LibXL (compatibility version 0.0.0, current version 0.0.0)
	@rpath/Model3D.framework/Versions/A/Model3D (compatibility version 0.0.0, current version 0.0.0)
	@rpath/Model3DViewerControl.framework/Versions/A/Model3DViewerControl (compatibility version 0.0.0, current version 0.0.0)
	@rpath/Network.framework/Versions/A/Network (compatibility version 0.0.0, current version 0.0.0)
	@rpath/Pattern.framework/Versions/A/Pattern (compatibility version 0.0.0, current version 0.0.0)
	@rpath/PointCloud.framework/Versions/A/PointCloud (compatibility version 0.0.0, current version 0.0.0)
	@rpath/PointCloudManager.framework/Versions/A/PointCloudManager (compatibility version 0.0.0, current version 0.0.0)
	@rpath/RS.framework/Versions/A/RS (compatibility version 0.0.0, current version 0.0.0)
	@rpath/SecureCommunication.framework/Versions/A/SecureCommunication (compatibility version 0.0.0, current version 0.0.0)
	@rpath/TWClient.framework/Versions/A/TWClient (compatibility version 0.0.0, current version 0.0.0)
	@rpath/TWRoot.framework/Versions/A/TWRoot (compatibility version 0.0.0, current version 0.0.0)
	@rpath/TextEngine.framework/Versions/A/TextEngine (compatibility version 0.0.0, current version 0.0.0)
	@rpath/TransparentWindow.framework/Versions/A/TransparentWindow (compatibility version 0.0.0, current version 0.0.0)
	@rpath/UC.framework/Versions/A/UC (compatibility version 0.0.0, current version 0.0.0)
	@rpath/UD.framework/Versions/A/UD (compatibility version 0.0.0, current version 0.0.0)
	@rpath/VBAttributeList.framework/Versions/A/VBAttributeList (compatibility version 0.0.0, current version 0.0.0)
	@rpath/VBElemDialogs.framework/Versions/A/VBElemDialogs (compatibility version 0.0.0, current version 0.0.0)
	@rpath/VBUtils.framework/Versions/A/VBUtils (compatibility version 0.0.0, current version 0.0.0)
	@rpath/VectorImage.framework/Versions/A/VectorImage (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.23.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1858.112.0)

 

Thanks for the reply, again 👍 

Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au

Yes this looks fine..
Although I'm a bit surprised that you have that many modules listed. Do you include the modules like in the CMakeLists.txt from the AC26 DevKit examples, right? I just checked, and in these CMakeLists.txt files there's a loop in the end to include ALL modules. So maybe you can double check which modules you really need and only include them. In case you get the error message only for the two framework modules for which you posted the screenshots, then this could be your best bet.

 

Here's an example from one of my CMakeLists.txt files:

 

AddGSModule (AddOn GSRoot GSRoot)
AddGSModule (AddOn RS RS)
AddGSModule (AddOn GSUtils GSUtils)
AddGSModule (AddOn InputOutput InputOutput)
AddGSModule (AddOn ObjectDatabase ObjectDatabase)
AddGSModule (AddOn Graphix Graphix)
AddGSModule (AddOn TextEngine TextEngine)
AddGSModule (AddOn DGLib DG)
AddGSModule (AddOn Geometry Geometry)

 

Compared to the CMakeLists.txt in the AC26 DevKit examples:

 

get_filename_component (APIDevKitModulesDir "${AC_API_DEVKIT_DIR}/Support/Modules" ABSOLUTE)
set (GSModules "")
SubDirList (GSModules "${APIDevKitModulesDir}")
  foreach (gsModule ${GSModules})
AddGSModule (AddOn ${gsModule})
endforeach ()

 

 

If this still doesn't work than it might be worth trying to reinstall AC itself or installing a different AC version to see if the problem persists. Maybe try the INT version of AC.


Best, Bernd

Thanks for the suggestions Bernd

 

I waited for the local AUS version to be released thinking this may help.. But no.

I have reinstalled Archicad and the dev kit

I have modified the Cmakelist to not include these frameworks, but then the addon will not load 

I have tried compiling with the offending frameworks removed

 

I can't even get a example project compiled and running in 26 now... 

 

I am at a total loss 😓

Could it be these frameworks are the problem?

 

Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au

In case somebody else was following this topic I just wanted to give a bit of resolution.
Ben and I were in contact per mail and in the end Ben was able to resolve the issue with removing the offending frameworks from his build. Although we weren't able to figure out why they were a problem in the first place. I was never able to reproduce the bug by including those frameworks.

Hi!

1. In the compilation stage, how do you allow all the libraries in bulk in mac security settings? 

2. How does the addon work after removing the (offending) frameworks from the build?

 

Thanks.

Hi dushyant!

1. This is the command I used to allow all libraries:
"sudo xattr -d com.apple.quarantine Support/*"

2. Removing the offending frameworks only would make a problem if you would use functionality which is served via this library. So it depends on which functions, classes etc. you actually use in your Add-On code. Some cmake templates (mainly those in the AC26 DevKit examples) include all frameworks (even those which are not used in the example).

Best,
Bernd

Okay, thanks for sharing that info. So that's how Apple blocks the files, by assigning the com.apple.quarantine attribute to them.