Post

Replies

Boosts

Views

Activity

Reply to How to draw a line of shapes in swift
@robnotyou, I am sorry that you felt I was being rude, that was not my intention. I can already create the stamp in swift, that's not a problem - its using it to create a continuous "line" of stamps. @OOPer, my question stated that I am using swift a couple of times and I gave the equivalent code in java to illustrate my need - thought that was sufficient info.
Jan ’22
Reply to Objective-C, separating code by architecture
Ok, I have got a bit further. The define is indeed present and the preprocessor skips over the 64bit calls I want to avoid for the simulator/preview. It is now falling over the inclusion of 64bit static libraries which need to be linked with the application, but are not needed when previewing the UI from within Xcode and SwiftUI. Is it possible to have "conditional" linking ? By that I mean, if we are building for arm64, link the libraries in, otherwise ignore them.
Aug ’21
Reply to Code signing of dylib for use under iOS
Hi Quinn, Good news for today. After having thought that I could at last load the dylib - the app crashes without warning = no exception or error message. So ... I wrote a really simple dylib with one really simple function and compiled it. I then signed it with the same bundle identifier as the application I created a framework for it and slotted it in. The application then copies the framework into the applications Library directory I then load the dylib directly from C++ code using dlopen I can then obtain a pointer to the simple function and execute it successfully So, all I need to do now is find what library initialisations are causing the crash. Thank you for all your help.
Feb ’21
Reply to Code signing of dylib for use under iOS
Hi Quinn, Thanks for your reply. In fact, there is only one instance of my dylib, the one inside the Frameworks directory. I have managed to fix the double problem of LC_ID_DYLIB and bit code complaints - it builds all correctly now. However, when loading on the iPad, I am getting an error of code signature invalid - which indicates that the system is trying to load the correct stuff, at least. Both the application and the framework are signed with the same team identifier. However, they obviously do not have the same bundle identifier - fr.teamexpression.irisa.normaliser-fr fr.teamexpression.irisa.SeptemberDemo Both projects are set to do automatic signing, ie XCode manages the generation If I query the system for the signing certificates, I get: $ /usr/bin/env xcrun security find-identity -v -p codesigning 	1) 7E5412AB42D2F6DC955FF8809079E33AAF3ADB8B "Apple Development: team-email@email.com (9KFL2H38SM)" (CSSMERR_TP_CERT_REVOKED) 	2) 78037F819B5AA1522177B06DA8E7C5343DDBC0CF "Apple Development: team-email@email.com (9KFL2H38SM)" 		 2 valid identities found Note : email address changed by security So, logically speaking, only the second certificate would be used for both the application and the dylib. Might you have any idea what is causing the security to choke on the dylib ?
Feb ’21
Reply to Code signing of dylib for use under iOS
You are right, I am indeed calling it with dlopen, but it wasn't clear to me if I should call the dylib directly or via the frameworks executable. Taking into account the framework structure : drwxr-xr-x&#9;3 simon&#9;staff&#9;&#9; 96&#9;4 fév 15:41 Frameworks&#9;<-- contains libnormaliser_fr.dylib drwxr-xr-x&#9;3 simon&#9;staff&#9;&#9; 96&#9;4 fév 15:41 Headersrw-r--r--&#9;1 simon&#9;staff&#9;&#9;763&#9;4 fév 15:41 Info.plist drwxr-xr-x&#9;3 simon&#9;staff&#9;&#9; 96&#9;4 fév 15:41 Modules drwxr-xr-x&#9;3 simon&#9;staff&#9;&#9; 96&#9;4 fév 15:41 _CodeSignaturerwxr-xr-x@ 1 simon&#9;staff&#9;69296&#9;4 fév 15:41 normaliser_fr I was calling : dlopen(<app id path>/Library/normaliser_fr.framework/normaliser_fr); Which was giving the error : dependent dylib '/Users/simon/DevProjects/speech-recognition/ios/lib/libnormaliser_fr.dylib' not found Perhaps you can clarify, please, if this correct, or should I call the dylib directly ? Here are the steps I was taking : Build the dylib Copy it to the XCode framework project Build the framework, which handles the signing It was between steps 1 & 2 that I tried to change the LC_ID_DYLIB entry - so before rebuilding and resigning. It was at stage 3 that XCode complained. Without doing the change, everything compiled correctly, having said that.
Feb ’21
Reply to Code signing of dylib for use under iOS
Some progress made. I have found that I can successfully copy the framework to the apps Library directory, ensuring that file permissions stay the same (ie: read/write/execute permissions). However, when trying to load the framework, I have discovered that my dylib has stored the build directory in the LC_ID_DYLIB entry. Before : Load command 4 &#9;&#9;&#9;&#9;&#9;cmd LC_ID_DYLIB &#9;&#9;&#9;cmdsize 104 &#9;&#9;&#9;&#9; name /Users/simon/DevProjects/speech-recognition/ios/lib/libnormaliser_fr.dylib (offset 24) &#9; time stamp 1 Thu Jan&#9;1 01:00:01 1970 &#9;&#9;&#9;current version 0.0.0 compatibility version 0.0.0 So, I proceeded to update it with : install_name_tool -id "@loader_path/Frameworks/libnormaliser_fr.dylib" libnormaliser_fr.dylib After : Load command 4 &#9;&#9;&#9;&#9;&#9;cmd LC_ID_DYLIB &#9;&#9;&#9;cmdsize 72 &#9;&#9;&#9;&#9; name @loader_path/Frameworks/libnormaliser_fr.dylib (offset 24) &#9; time stamp 1 Thu Jan&#9;1 01:00:01 1970 &#9;&#9;&#9;current version 0.0.0 compatibility version 0.0.0 Now, here is the strange effect - where XCode would generate the framework without any problem before, it now complains saying that the library does not contain bitcode ! I ran KDiff3 on the library before installnametool and after to see if it would remove anything. I just changes what I requested. What am I doing wrong ?
Feb ’21
Reply to Code signing of dylib for use under iOS
Hi, Ok, I have managed to create the iOS Framework project and find where I should add the reference to my dylib. I can do the build to create the framework structure you showed below. My project is entitled, with a lot of originality ... test ! So the output structure is as follows : drwxr-xr-x&#9;3 simon&#9;staff&#9;&#9; 96&#9;1 fév 14:03 Frameworks drwxr-xr-x&#9;3 simon&#9;staff&#9;&#9; 96&#9;1 fév 13:50 Headers drwxr-xr-x&#9;3 simon&#9;staff&#9;&#9; 96&#9;1 fév 13:50 Modules drwxr-xr-x&#9;3 simon&#9;staff&#9;&#9; 96&#9;1 fév 14:03 _CodeSignaturerw-r--r--@ 1 simon&#9;staff&#9;&#9;738&#9;1 fév 14:03 Info.plist rwxr-xr-x&#9;1 simon&#9;staff&#9;68688&#9;1 fév 14:03 test Can you confirm that I call manually put the executable image test onto the iPad, point to it in the app and load it with dylib ?
Feb ’21