Post

Replies

Boosts

Views

Activity

Reply to Xcode 11 breaks custom xclangspec?
Same here: worked for me quite nicely in 11 up to, I believe, .1; far as I recall correctly from .2 up there seems to be no way to make the thing work again: my langspec shows in Editor/Syntax Coloring list all right, but can't be selected, and does not work 😟I'd be really very grateful if anyone can explain how to add a new langspec into Xcode 11.3 (and up) reliably.(Let me also link a loosely related question, how to make Xcode to add a file of some type into compiled sources, instead of into bundle resources: How Xcode decides which build phase to add a file into?)
Jan ’20
Reply to De/activation of an app based on charging state?
Well thanks, but it's a bit more convoluted than that.He obviously does not want to switch the auto-lock completely off; that would clash seriously with the normal usage, when the iPhone is not charging (or he would have to remember to switch is always back on whenever he takes the iPhone from the dock, which is self-evidently absurd).The good news is that this is actually not needed at all! Once my application is active, it can both monitor the charging status (through the batteryState property) and, if the iPhone is being charged, it can easily keep the screen unlocked through idleTimerDisabled.The bad news is that to be able to do this, the app needs to be active. That's why I need a way to automatically launch/activate the application when the device is put into the charger β€” that's one thing whole solution I can't see :/(The other one is to make the app automatically launched/activated if the charging is in process, another app is active, and the idle timer strikes in: normally iPhone would switch off the display in this case, I need it again to activate my app.)Unless I am missing something of importance, that's all I need; all the other requirements I do know how to implement easily.
Jan ’20
Reply to De/activation of an app based on charging state?
> you want to use some notification of charge to launch/activate your app?Essentially, yes. More precisely, I need the app to be launched/activated somehow when charging begins; I do not really care whether the mechanism used for that is a notification or anything else.> Do you want to launch the app or only to activate from background?Well as β€œlaunch/activate” sort of suggest, I would need it to be activated if it happens to be suspended (or runs, which it very probably would not, see below) at bacground; launched if it does not run at all.> As far as I understand, the first is not possibleActually, a local notification (alerting the user who would tap the alert to launch the app) would be quite an acceptable solution β€” provided that notification could come exactly at (or very shortly after, let's say up to a second or two at very worst) the moment when the device starts charging.Is that possible? As always, I can be missing something of importance, but I don't know such a local notification can be requested. Is there a way to do that? All I know are time- and location-based local notifications, none of which helps here the slightest bit.> For the second, you could detect that the iPhone has been plugged / unpluggedAbsolutely, provided my application actually runs at background, which is generally β€” again, far as I understand β€” not possible to achieve.Again do please correct me if I am wrong, but far as I know, Apple does not allow applications to run at background, unless they play a (silent, in this case) audio, which is trick dirty enough for my client to frown upon, not speaking of the Store, which well might reject such a thing. There's also BGTaskScheduler now, but it won't make sure my app gets a few ticks of CPU at least each second, which is roughly what I would need; the new API, far as I understand the thing, might well leave the app dormant for minutes (or hours or days) 😟If there's any other possibility to make my app really run at bacground (well, aside of VoIP which is not a solution for roughly same reasons as the audio-play hack) β€” or, even better, be reliably resumed at background each second or so β€”, I never heard of the thing, and would be grateful if you point it to me.Thanks and all the best,OC
Jan ’20
Reply to Build Script Phase just before link?
Have you tried that and it worked for you? In which Xcode?When I tried that, the link still occurred before the script.In another project for testing purposes I have removed the link-with phase altogether and it still linked. As always I can be wrong, but it seems to me that Xcode does not really interprets this phase as a real build phase; seems to me it just consults its contents to determine which libraries to add, but links automatically at the end of the compile phase, completely regardless of the placement (or even existence) of the link-with phase :/
Feb ’20