Can not start watch for certain application - google-fabric

I'm tiring to start watch for one of my application in order to receive the daily emails. but every time i start it from https://fabric.io/settings/apps, and leave the page,it automatically disabled. i have no idea whats happening. its just happen for my IOS application. my android application works just fine.

Thanks David. You will need to reach out to support[at]fabric.io for this to be resolved. There is a rare state users can be in that makes it so they are unable to watch apps.
Your repro steps, describe this state exactly.
Thanks!

Related

How to create background location service in Appcelerator Titanium working after restarting device

I want to make an application which will send information to a server about user's location every 30min. It is needed to provide location specific push notifications.
I need such functionality for Android/iOS, which would work in background (also if device is restarted). I found some articles covering background services and I created background service doing that, but after phone is restarted it won't work.
Is it possible with Android and iOS? How can I achieve that?
With iOS, no. With Android, yes.
Apple has gone to great lengths to limit what apps can do. You can do some things in the background for an extended period of time (GPS, play audio, Voip, etc), but after a reboot your app will not be restarted until the user opens it again. There are exceptions to this. Voip apps are allowed to restart after a reboot, but apple will not approve your app for the App Store unless you actually have a place for a user in your app to use the Voip feature. Geofences are a possibility, but I haven't had experience with that feature yet. In my experience, Apple does whatever they can to make sure your app doesn't run forever.
With android, there is more flexibility and what you propose is totally possible. I've listed some important links below, since most of those solutions are far better documented than what I can do here.
Essentially you need to register as a boot receiver and then send an intent to start a titanium android service when the boot event is received. I don't have experience with starting a titanium service, but I'm sure its a simple intent you need to fire. Either way you'll need a module for this native code. I attached a link to a bencoding titanium module that may help you, although there may be some others out there. You may even need to code one yourself.
Samsung is notorious for stopping your app with their SPCM feature. You may want to familiarize yourself with it. I've added a stackoverflow discussion link below.
I don't know all of your system requirements but honestly, for any app I would try my best to not run forever. It will hurt the battery life for your users and will add a lot of complexity. Maybe you could simply have the app check the GPS coordinates when it receives a push notification and decide right there and then whether to present a notification to the user? Just something to consider.
Either way good luck!
How to start an Application on startup?
http://docs.appcelerator.com/platform/latest/#!/guide/Android_Services
https://github.com/benbahrenburg/benCoding.Android.Tools
Dealing with Samsung SPCM killer

Is there a way to update SMLoginItemBookmarks data on launchd overrides.plist

I'm working on an OS X app that most users choose to "launch at login", the kind you'd find at the menu bar.
In order to launch it at login I'm using SMLoginItemSetEnabled to launch a LoginHelper app that will open the main app, as described in this tutorial.
The app is failing to start up at login for just a handful of our users.
I was unable to reproduce this or to track the cause but I found (on a user's machine) that:
Deleting /Root/_com.apple.SMLoginItemBookmarks/[myapp] and /Root/[myapp] on /var/db/launchd.db/com.apple.launchd.peruser.$UID/overrides.plist and then resetting the Launch at login on the app fixed the issue. Also, we diff'd the files and the Data on the bookmark had changed.
For reference, I found about the overrides.plist here.
Since the app has both a Mac App Store and a Direct download version, I'm suspecting multiple copies of the app setting themselves as Launch at login may be the reason for this to fail, maybe these "bookmarks" are trying to open another instance of the app, that may or may not be deleted.
Now the questions, provided that this app needs to remain sandboxed:
Is there a way of updating that Data on the overrides.plist bookmarks?
Is there any way of deleting one self's app from the overrides.plist to start clean?
Is this maybe a known issue?
Any other suggestions on why the bookmark seems to point nowhere or how to fix it will be appreciated.
Note: This is my first question on StackOverflow, please excuse me if I failed to follow some of the suggested etiquette.
I don't know a definitive solution to this, I wasn't even aware of the overrides.plist. It could be related to multiple copies. As far as I understand, adding login through SMLoginItemSetEnabled sets a metadata flag that this Bundle ID should be launched on start. Then Spotlight, on start, will go do a metadata search on the file system and see which Bundle IDs need to be launched. Then, I guess, it will initiate the launch using the bundle ID. In my own application, Trickster, which uses the same technique for launching, I see that if I enable launch-on-login through the app itself, it might pop-up this strange message which refers to a debug build. I'm not even sure why it says about the first time. Very strange.
So, to have them launched, you have to make sure that the relevant bundles are in locations where Spotlight indexes (that the user hasn't disable Spotlight for these locations). Usually users don't disable Spotlight, especially for /Applications/ but I'm just saying.
What I usually suggest when support comes my way (and how I have it set up for me because I have multiple copies), is I to disable launch from within the app and instead add the correct one (from /Applications) manually in Login Items in System Preferences.

Close the application after 10 minutes of inactivity without security enabled (offline application)

I have the requirement to close the application after 10 minutes if the user has not interacted with the application.
All the questions about this are related to the session time out, the problem here is that the application has no security and is a requirement to run it without connectivity.
Any idea about how to implement this?
Thank you.
First of all, as I mentioned in the comments above, this is a really bad user experience. You should tell your customer you just don't do something like this to your users. never.
If I understand you correctly, the application is running offline, meaning it does not connect to the Worklight Server...
So you should probably just maintain some counter... if the user does any action in the application (touch a button, whatever), reset it. If no action was done and 10 minutes have passed, called WL.App.close.
Please note that using WL.App.close in such a manner in iOS can make your application be rejected from the App Store if found.

iTunes Connect doesn't ask for updated screenshots?

I've updated my iPhone app to support the iPhone 5 screen..
I've done this before for another app and I was forced to upload new screenshots taken with the iPhone 5.
This time however, iTunes Connect just displays the status as "waiting for review" and isn't mentioning anything about the screenshots..
I'm slightly worried something has gone wrong? App works great on iPhone 5 and simulator though.
It turns out Apple can block apps during the review process that have something wrong with metadata. If they decide your metadata is wrong they'll just change your app's status to "Metadata Rejected".
Here's the quote from the rules for this status:
Appears when specific metadata items aside from your binary have not
passed review. To resolve the issue, edit the metadata in iTunes
Connect and your existing binary is then reused for the review
process. You receive a communication from App Review in the Resolution
Center regarding the reason for the metadata rejection.
When things change to the AppStore (Apple adds a device) they might require you to get new screenshots. But if nothing changed in their system, it's normal that they don't ask.
Don't worry!
They copy over the screenshots from your last version of the app (or is your Retina4 screenshot section in itunesconnect empty?). So if you donĀ“t want to update them, it should be okay like this.
Chances are your app has not hit review (and now as of the 21st) and won't be reviewed until after the 29th. Once your app hits review, it will become rejected for the missing screenshots. If you want to save yourself some time and pain, update the screenshots while Apple is on their downtime for the Christmas holiday. You'll thank yourself later.
My app got accepted yesterday, no word about the screenshots.
App works fine on iPhone 5, mailed Apple to complain this probably is a bug (iTUnes Connect does not recognize localized Default.png, which is what is checked to verify it is iPhone 5 optimized I believe.)

What is the standard method for writing a continuously running app that is allowed on the Mac App Store

I'm brand new to OS X and mac programming. I'm looking to write an app that runs continuously or is woken up every 30 seconds to do some minor task. It would do something like check the weather via a web service and shoot off an email if the temperature drops below freezing. In Windows I would just use a service or put a repeating task in the task scheduler. Is there a standard way to accomplish this in OS X which the mac app store allows? I would like to write something that I can put in the store but Apple seems to have vague restrictions against running background processes.
I've learned a little about launchd but I can't tell if I am allowed to use it. Ideally the process would get run even when no one is logged in, but it probably won't need root access. If someone does happen to be logged in, it would trigger some popup if it sent an email temperature alert out. I would also have some GUI which the user would be able to modify the configuration files that determine the behavior of the background process. I don't anticipate any app store restriction for that piece of the project though.
I'm pretty sure an app that runs invisibly like that would not be allowed into the App Store. What you're going to want is to create a menubar-only application, which can be enabled by setting a key in your app's info, namely LSUIElement. Although it won't be able to be run unless a user is signed in, it's your only way to get it into the store successfully.
The MAS guidelines have several prohibitions that would impact you. Go to the guidelines and read section 2. In particularly consider 2.15, 2.23, and 2.27. I don't know any way to get your application running prior to login without at some point requesting admin privileges (even if you don't use the privilege when you run).
I would probably make it a Login Item (System Preferences>Users>Login Items), probably as an LSUIElement app as sudo rm -rf suggests. Definitely if it's your first app, I wouldn't go diving into launchd in any case. It is one of the most infuriating system processes I've ever dealt with.