Hope my scenario is not weird. Here is the description:
1. User runs my app.
2. User hides my app completely (all windows are hidden) so that he/she has no way to accessing the app. (Dont' ask why, user requested this feature and I want to implement it.)
3. Now user rerun my app and I want to use XPC to tell the running instance to show itself.
It sounds very reasonable and I have done most of code. But it is blocked by macOS the system. It seems macOS controls only one instnace of an app can be running at the same time; second try to run the same app (in /Applications) simply does nothing - the app code does not even get executed so that my code in main.m won't have the change to communicate with XPC.
I believe there must be a way to overcome this. Any suggestions will be appreciated. Thanks and Merry Xmas!