I have used
[[NSDistributedNotificationCenter defaultCenter] addObserver
in process AA to listen notification from other process BB, It works fine.
But when make the observer process AA as a launch daemon (which is started by launchd), It found below difference.
If run process BB as root privilege, AA can not receive notification posted by BB.
If make process BB as a launch daemon, AA can receive notification posted by BB.
What was happened in above difference, It can not find any document about this, Thanks.
Post not yet marked as solved
Hi All:
I use dlopen to load a dylib on macOS, It woks fine.
Recently, I received one customer report bug, After checked the log, I found that dlopen failed on customer's environment(macOS 13.5.2 22G91) as below
load xxxx failed: dlopen(/***/yyy/zzz.dylib, 0x0001): tried: '/***/yyy/zzz.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/***/yyy/zzz.dylib' (no such file), '/***/yyy/zzz.dylib' (no such file)
I use full file path to dlopen dylib, and the file is located at there
I checked dylib signature, notarization, dependency frameworks, all are valid
I got copy and replace customer's dylib into myself environment, It woks fine
Customer tried several mac computers, others do not have this problem
I am confused about this issue and do not know how to investigate further.
Any comments is appreciated.
Post not yet marked as solved
I want to embed Info.plist into a dylib target, then I can set some build information in Info.plist for dylib,
However, after I build the dylib, I found there is no Info.plist section in dylib, When I do some in a command line binary, it works.
Why dylib binary can not embed Info.plist in section?
Thanks for your suggestion.
Post not yet marked as solved
Hi.
I have use xcodebuild to do some UT testing. It works fine.
xcodebuild test -workspace "zzz" -scheme "aaa" -destination "platform=macOS,arch=x86_64" -only-testing "***" -resultBundlePath "yyy"
But when I trigger this command from jenkins. It will output below errors, I do not how to fix this issue, Please give some suggestions. Thanks.
Underlying Error: Couldn’t communicate with a helper application. Try your operation again. If that fails, quit and relaunch the application and try again. The connection to service on pid 0 named com.apple.testmanagerd.control was invalidated.))
PS. I found this link https://stackoverflow.com/questions/67688130/run-macos-test-cases-on-the-jenkins-pipeline, our jenkins build is already use JNLP authentication. but still have this problem.
Post not yet marked as solved
Hi.
I am following apple document (https://developer.apple.com/library/archive/documentation/Security/Conceptual/SecTransformPG/EncryptionandDecryption/EncryptionandDecryption.html#//apple_ref/doc/uid/TP40010801-CH3-SW1) to implement the encrypt/decrypt with public/private key on macOS.
when I add below to set padding SecTransformSetAttribute(
														 encrypt,
														 kSecPaddingKey,
														 kSecPaddingPKCS7Key,
														 &error);
		if (error) { CFShow(error); exit(-1); }
The SecTransformExecute will fail as below.
Error Domain=NSOSStatusErrorDomain Code=-2147415748 "The operation couldn’t be completed. (OSStatus error -2147415748 - CSSMERRCSPINVALIDATTRPADDING)" UserInfo=0x6080002750c0 {NSDescription=CSSMERRCSPINVALIDATTRPADDING} Please give some suggestion about this. Thanks.
Post not yet marked as solved
Hi All: I have implemented a personal VPN on macos. I use NEVPNProtocolIKEv2 to configure IKEv2 protocol. When I set parameter, I am a bit confused with Apple developer documents.As below shown, I set authentication method to certificate, and passed p12 certificate data and password.ikev2.authenticationMethod = NEVPNIKEAuthenticationMethodCertificate;
ikev2.identityData = [NSData dataWithContentsOfFile:certificatePath];
ikev2.identityDataPassword = password;However, from Apple documents.In macOS, this property is ignored for NEVPNProtocolIKEv2 and NETunnelProviderProtocol objects. On iOS, this property is ignored for NETunnelProviderProtocol objects. In cases where this property is ignored, the identity should be set using the identityReference property.Even I do not set identityReference, I found I can still connect successful with remote VPN server on MacOS 10.14.6 and MacOS 10.15.3.I have also tried to set all (identityData, identityDataPassword, identityReference) value, It still can connect to server. so what is the meaning document here, should it correct or not?Even current code is work, I think use identityReference is still suggested. Please give your suggestions. Thanks.