Run same code after install application - objective-c

My app before first run need execute same code. Is possible move this to installer?

No. iOS apps are installed with Apple's App Store installation process. Apple does not offer any hooks into the installation process to inject code. The app will have to execute this first run code at first run.
If this first run work is significant, and you want to move the work to the install process because it blocks the UI during first run, you can do some things to alleviate the problem. First, you can put this code on its own thread, and let the main thread start the UI. You can then jump to asking for the user to enter settings, or go through help screens explaining the program. While the user is working through these tasks with low computing resource demands, the higher demand setup thread may have plenty of time to do the first run work.

Related

Wrong Auto Login with Automation Anywhere

I have a problem trying to schedule a task with Automation Anywhere 10.5.
I've actually activated the Auto login option at AAE Client but when the computer is locked and the task is suppose to start the computer doesn't login and the task starts normally as in background without unlocking the computer.
The problem with it is that we can only run tasks that normally would run on background (tasks that don't need to activate windows and perform operations like clicks or object cloning).
Example: I schedule a task that shows a simple Messagebox but when apparently it doesn't run. Then, I log in to the computer and I can see the messagebox active.
Do you know how to solve it?
My team has hit a few snags on this previously. If you haven't solved this yet - please utilize the following link:
http://www.automationanywhere.com/techsupport/Customers/Support/Utility/Autologin_Diagnose_Fix_Utility.zip
I received this from an AA employee as well as a best practice document. The utility tool should alert you of any practices you're not currently adhering to and resolve them if it can.
Please let me know if you need additional assistance.

How to stop new fabric.io tabspawn on every Run

I use Fabirc.io as it really adds simplicity to project and SDK management.
The problem is now it is spawning a dashboard tab on every run, even if you leave the previous tab open.
Is there some magic to stop this?
The only way to stop this was to delete Fabric all together and reinstall from zero. Most painful as it requires a verification of the libraries controlled by Fabric and this took half an hour. Given in this project I was working on I only have 4 included, this was exceptionally painful.

inittab respawn of Node.js too fast

So I am trying to keep my Node server on a embedded computer running when it is out in the field. This lead me to leveraging inittab's respawn action. Here is the file I added to inittab:
node:5:respawn:node /path/to/node/files &
I know for a fact that when I startup this node application from command line, it does not get to the bottom of the main body and console.log "done" until a good 2-3 seconds after I issue the command.
So I feel like in that 2-3 second window the OS just keeps firing off respawns of the node app. I see in the error logs too in fact that the kernel ends up killing off a bunch of node processes because its running out of memory and stuff... plus I do get the 'node' process respawning too fast will suspend for 5 minutes message too.
I tried wrapping this in a script, dint work. I know I can use crontab but thats every minute... am I doing something wrong? or should I have a different approach all together?
Any and all advice is welcome!
TIA
Surely too late for you, but in case someone else finds such a problem: try removing the & from the command invocation.
What happens is that when the command goes to the background (thanks to the &), the parent (init) sees that it exited, and respawns it. Result: a storm of new instantations of your command.
Worse, you mention embedded, so I guess you are using busybox, whose init won't rate-limit the respawning - as would other implementations. So the respawning will only end when the system is out of memory.
inittab is overkill for this. I found out what I need is a process monitor. I found one that is lightweight and effective; it has some good reports of working great out in the field. http://en.wikipedia.org/wiki/Process_control_daemon
Using this would entail configuring this daemon to start and monitor your Node.js application for you.
That is a solution that works from the OS side.
Another way to do it is as follows. So if you are trying to keep Node.js running like I was, there are several modules written meant to keep other Node.js apps running. To mention a couple there are forever and respawn. I chose to use respawn.
This method entails starting one app written in Node.js that uses the respawn module to start and monitor the actual Node.js app you were interested in keeping running anyway.
Of course the downside of this is that if the Node.js engine (V8) goes down altogether then both your monitoring and monitored process will go down with it :-(. But its better than nothing!
PCD would be the ideal option. It would go down probably only if the OS goes down, and if the OS goes down then hope fully one has a watchdog in place to reboot the device/hardware.
Niko

What would cause a Windows Installer package to lose its progress status?

I have a WiX installer project which has recently been producing installers that don't show any file installation progress. That stage takes around 30 seconds to complete, and users may think that the install has hung since the progress bar remains empty until the install suddenly completes.
I know there used to be a progress bar for the installation, but not when the change occurred.
I'll start to narrow down what change caused this, but are there any common causes for this problem?
Did you create any custom actions? If so, be aware that you need to implement ProgressText messages and / or pump messages to update the ticks on the ProgressBar control.
Generate a verbose log file. The log file will have timestamps for all the actions (look for Action Start: type messages). A quick script can shred the log file and give you the times between actions. I did this for a few months at the end of Office2003 as we tracked down performance issues in the install. I wish I still had the VBScript (yeah, yeah, I know) that I wrote to get me the numbers.
It almost always comes down to custom acitons.

App launch sequencer

Every morning when I get into work I launch about a dozen apps and whatnot (FF, TB, VSx2-3, Eclipse, SSH, SVN update x2-3). Needles to say this does a good job of warming up my HDD for the day. I rather suspect that it would run a lot faster if they were launched sequentially (not to mention that I wouldn't need to click in 17 different places).
Is there a preexisting product that can kick off a sequence of tasks/apps/etc. where each task is only started after the last app is done hammering the HDD?
It would nerd to be able to kick apps like VS and firefox and also be able to trigger explorer context menu items like SVN update in TortoiseSVN.
Try SlickRun, it's free, I've used it for years, I use it constantly and I'd be lost without it.
Think of it like a configurable Start->Run command, it'll do what you want (you can configure n second pauses between multiple commands), and if you install it you'll use it for a thousand different things before the first week is out.
P.S. I have no stake in SlickRun, I just like it :)
Unfortunately, I don't know of any software that can do this for you automatically.
However, can't you trigger the updates through a console SVN task? If so, can't this be done by creating a batch file? It's low tech, and you might want to add a few pauses between each task, but it should do what you want.
As you mention TortoiseSVN, I'll assume your O/S is windows.
You could launch an Autohotkey script at startup. I don't think it can easily detect HDD activity, but you can at least wait until each window appears with the WinWaitActive command.
If each application has an average time they take to complete, you could simply use Windows' Scheduled Tasks application. Obviously you'll need to be running Windows but Scheduled Tasks can be found in the Control Panel.
Execute "Add Schedules Task", select the program, the frequency and then the specific time.