Posts

Post not yet marked as solved
6 Replies
2.3k Views
Hi there,how do I set up a Build Script Phase so that it gets launched after (or along with) compile files, but before a link?The goal is to add a couple of libraries to the link list. Before compile phase it is too soon — the list would get overwritten later. After a link it is obviously too late.I can't simply add the libraries to the Link With Libraries phase, for I don't know them beforehand — the list of those libraries is generated externally and the script determines which ones are actually needed.So far, I have found only an extremely hackish solution — I can add foo.mysuffix to sources, and add the script as a build rule for *.mysuffix. That seems to work, but is ugly beyond ugly; I would really like to simply add the plain build script phase, if I could do that so that it is run at the right moment.Thanks for any insight,OC
Posted
by OCS1.
Last updated
.
Post not yet marked as solved
0 Replies
672 Views
Not sure whether it really belongs here, but I haven't found a better place; hopefully, somebody with the proper knowledge would be here.I have noticed in the Home application that the camera tile image is refreshed each 10-12 seconds.Is there a way to customise this interval? Sometimes, I would really need to quick it up to ~1-2 s for a specific camera in a specific room.(The rationale is that I am using other accessories through their tiles, and I would need to see how those accessories really behave through the camera tile picture in the same room. Consider e.g., a dumb garage door opener which has no feedback of its own, or something like that.)Thanks and all the best,OC
Posted
by OCS1.
Last updated
.
Post not yet marked as solved
0 Replies
421 Views
Hi there,using this code: NSURL *url=[NSURL URLWithString:@"x-hm://00143ZB11VOLT"]; HMAccessorySetupPayload *pl=[[HMAccessorySetupPayload alloc] initWithURL:url]; NSLog(@"ABOUTTOTRY WITH PLOAD %@ from URL %@",pl,url);I am consistently getting this result:ABOUTTOTRY WITH PLOAD (null) from URL x-hm://00143ZB11VOLTThere are no other logs around, especially no error log from the HomeKit which would explain why the payload was not created.I am testing on iPhone, 13.3 (17C54), against a real HomeKit database, without the simulator. The URL is also real, scanned from a QR sticker on an actual accessory.Any idea what can be the culprit and how to fix the problem? Thanks!OC
Posted
by OCS1.
Last updated
.
Post not yet marked as solved
5 Replies
1.2k Views
Ladies and gentlemen,one of my clients would like an iOS application, which would allow him to control his HomeKit devices in a special way, and which would keep active when the device is in its charging dock, continuously informing him of the current state.I can do most of the things desired, but there are two requirements which I can't find any way how to do:launch/activate my application automatically whenever the device is put to the dock (=starts charging)when in charger, launch/activate my application automatically whenever the device would normally sleep the screen.In other words, the client would want the special HK controller activates whenever the device is put to the charger, and also — only when in charger — whenever he stops using the device in the normal way for the idle interval (whilst, obviously, if not in charger, he wants the device to normally switch off the screen and lock).Is there any trick to do either of these two things or ideally both? Whatever I try, I can't find any. Thanks for any idea!
Posted
by OCS1.
Last updated
.
Post not yet marked as solved
5 Replies
780 Views
Lately, we are experiencing intermittent segfault crashes related to NSRunningApplication: they happen mostly when _fetchDynamicProperties is about to send the _applyPropertyChanges:fromDictionary:. occasionally elsewhere. The problem seems to be related to a concurrent XPC communication (unproven, but probable — so far, it never crashed unless the application was at the same moment communicating through XPC).It happens pretty randomly, alas. Only once I've been able to catch the problem in Xcode; looked like this (inside of _fetchDynamicProperties): 0x7fff2e655188 <+522>: callq 0x7fff2f1b5078 ; symbol stub for: CFRelease 0x7fff2e65518d <+527>: testq %r15, %r15 0x7fff2e655190 <+530>: je 0x7fff2e655206 ; <+648> 0x7fff2e655192 <+532>: xorl %eax, %eax 0x7fff2e655194 <+534>: cmpb $0x0, -0x93(%rbp) 0x7fff2e65519b <+541>: sete %al 0x7fff2e65519e <+544>: leaq 0x2(,%rax,4), %rcx 0x7fff2e6551a6 <+552>: shlq $0x2, %rax 0x7fff2e6551aa <+556>: cmpb $0x0, -0x98(%rbp) 0x7fff2e6551b1 <+563>: cmovneq %rcx, %rax 0x7fff2e6551b5 <+567>: leaq 0x40(%rax), %rcx 0x7fff2e6551b9 <+571>: cmpb $0x0, -0x92(%rbp) 0x7fff2e6551c0 <+578>: cmovneq %rax, %rcx 0x7fff2e6551c4 <+582>: movq %rcx, %rax 0x7fff2e6551c7 <+585>: orq $0x20, %rax 0x7fff2e6551cb <+589>: testb %bl, %bl 0x7fff2e6551cd <+591>: cmovneq %rcx, %rax 0x7fff2e6551d1 <+595>: movq %rax, %rdx 0x7fff2e6551d4 <+598>: orq $0x80, %rdx 0x7fff2e6551db <+605>: testb %r14b, %r14b 0x7fff2e6551de <+608>: cmovneq %rax, %rdx 0x7fff2e6551e2 <+612>: movq 0x5d60ab2f(%rip), %rsi ; "_applyPropertyChanges:fromDictionary:" 0x7fff2e6551e9 <+619>: movq %r13, %rdi 0x7fff2e6551ec <+622>: movq %r15, %rcx 0x7fff2e6551ef <+625>: callq *0x5d2f5eb3(%rip) ; (void *)0x00007fff5b7dd680: objc_msgSend -> 0x7fff2e6551f5 <+631>: movq %r15, %rdi Thread 1: EXC_BAD_ACCESS (code=1, address=0x3eadddadca38) 0x7fff2e6551f8 <+634>: callq 0x7fff2f1b5078 ; symbol stub for: CFReleaseSome crashlogs (and longer copy of the above, which includes also a bt) at http://ocs.cz/CD/NSRunningApp_crash.zipIs it possible that this is caused anyhow by our code? Based on the docst I believe NSRunningApplication should be thread-safe. Can you recommend a work-around? The problem is rather at the inconvenient side.Thanks a lot,OC
Posted
by OCS1.
Last updated
.
Post marked as solved
8 Replies
1.4k Views
Hi there,we implement a custom URL scheme through CFBundleURLTypes and the application:openURLs: delegate method, works perfectly.Now though the requirement is to add the very same support for macOS 10.12, which, alas, does not support the delegate method; CFBundleURLTypes causes our application to be activated all right, but we don't get the URL to process it further. So far, I was not able to find what delegate method has been used previously for this, before application:openURLs: appeared in 10.13. Can anybody help?Thanks a lot,OC
Posted
by OCS1.
Last updated
.
Post not yet marked as solved
1 Replies
1.4k Views
Gentlemen, I'd be grateful for some advice.We have got a pretty standard setup of an application with a login item helper launched through SMLoginItemSetEnabled. Works properly when we test it, works properly for a vast majority of our users — but for a very small number of users for whom the helper does not launch at all.In an attempt to find the culprit, I have added (otherwise unnecessary) LMCopyAllJobDictionaries and in the returned dictionaries am searching for one with a "Label" equal to our bundle ID. The result is logged out.For the unlucky (very rare, but alas sometimes occurring) user case our logs say it works like this:we call SMLoginItemSetEnabled(bundleID, YES), get return value YES;we check LMCopyAllJobDictionaries and do get an item with our bundle ID;the helper does not run though. We wait a long time (a full minute), but the helper still does not launch;then we clean up and retry: we call SMLoginItemSetEnabled(bundleID, NO), get return value YES;now we check again LMCopyAllJobDictionaries and this time do not get an item with our bundle ID;go to 1.It seems the helper does not launch-and-crash; looks like it is not launched at all (or at most, it crashes before its first log, which happens in one of the +load methods, i.e., very very soon; also, the user for whom the problem happens never seen the helper in the Activity Monitor).To be frank, we are out of ideas how to find the culprit. Will be very grateful for any reasonable advice what to do to find (and potentially fix) the issue. Is there e.g., some kind of launchd detailed log which would tell us why precisely the helper is not launched upon SMLoginItemSetEnabled(bundleID, YES)?Thanks!OC
Posted
by OCS1.
Last updated
.