How to run a timer in the Background - ibm-mobilefirst

I wanna create a mobile apps using IBM MobileFirst Platform Foundation. The app should have a timer, and when I close the application, timer still running. So if the apps has not been used for long time, it will uninstall itself. I hope can get a draft idea how to make it, now I cannot find any material about it (API or others....). Thanks in advance.

It is not possible in MobileFirst Platform Foundation, and in general, to have an application uninstall itself. At the very least you could write a service in Android to do the timer, but not in iOS (maybe only in iOS 8 with app extensions), but still - your scenario is not valid. An application cannot uninstall itself.

Related

Can i develop react native IOS apps on windows pc

Can i able to develop react-native IOS apps in my windows pc, if possible then please reply with what are the requirements and setup require to develop and run react-native ios apps in windows pc
No, you can't.
Check the official 'getting started guide' here:
https://facebook.github.io/react-native/docs/getting-started.html#requirements
Requirements OS X - This guide assumes OS X which is needed for iOS
development.
You need to run xCode in order to build app on Simulator or iPhone.
It is possible to build, package, and deploy IOS apps from a pc or linux machine using a couple different methods.
One would be using a service like BuddyBuild (https://www.buddybuild.com/). You can just point them at the git repo you want to package, give them your certificate, and go from there.
Your other option would be to rent a cloud machine running some version of OS X. They are typically pretty cheap and you wouldn't need to do it very often.
You can use a cloud build service like Mobile Center or Circle CI, or run a "hackintosh" virtual machine image in VirtualBox.
The latter breaks the Apple MacOS EULA, and the former has longer feedback cycles to learn if your code builds or not.

How to detect a MobileFirst iOS app's new version in app store and direct updating programatically?

We would like to make a version checking function by clicking a version checking button inside our MobileFirst app. So how to do a detecting of new version of a MobileFirst iOS app for both appstore version and DirectUpdate version.
For direct updating, it's easy to trigger when client is first loaded (now it works great in our initOptions.js file). But also it seems that wl_directUpdateChallengeHandler.handleDirectUpdate works only when the app is loaded. To trigger it, we have to quit the app and re-initialise it. Can we do it programatically anywhere/anytime within app?
And for appstore version update checking (in fact, this won't be frequent), there are many native ways but is there a hybrid or MobileFirst way to do it ?
For the App Store version check you can implement a Cordova plug-in: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.0/adding-native-functionality/
For Direct Update, you cannot change its mode during runtime. You can however change its mode to perRequest in authenticationConfig.xml: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.0/advanced-client-side-development/using-direct-update-quickly-update-application/

Cordova Plugin to be used in Worklight, for geofencing in Background even if the app is suspended/terminated and also when the phone restarts

I have been investigating in this feature for a long time. All I can find is a pure iOS native code that checks for the key "UIApplicationLaunchOptionsLocationKey" from the LaunchOptions, if it is found it calls the LocationManager to start it and keep on listening to the location updates.
You can find this code in this github:
https://github.com/voyage11/GettingLocationWhenSuspended
I need the same concept, but with a way to integrate it in Worklight, through cordova plugin or something. As I'm already creating the geofencing triggers using the hybrid Worklight APIs, I need to keep the geofencing alive even when the app is suspended/terminated and also if the phone is restarted.
Please I need you support urgently. Thanks
Worklight provides the ability to create Cordova plug-ins.
You could implementing your own native code then, mimicking that from the Xcode project you've found on GitHub.
Read more here: Adding native functionality to hybrid applications

Installing iOS apps without Apple Developer Program on iOS 7

I'm trying to install my iOS app on to devices running iOS 7.0. I can install them on my iPhone 4 with iOS 5.1 jailbroken. But currently I'm not able to do so on a friend iPad 4 with iOS 7.0.
For installing them on JB devices I'm using JailCoder .
It works without any problem and I can code and compile my test apps, and put them on JB devices without any effort.
Recently trying to investigate possibilities I found an application named PP25 for Windows, it is a chinese application and it is said to be able to install cracked apps on NON-JB devices.
So i tried to see ig it works somehow, I was able to get my apps converted as ipas from my phone and download them to desktop with it, and i can then upload on other JB devices, thanks to a Cydia application named AppSync, pretty good indeed, but I tried and wasn't able to install them on iOS 7.
That was disappointing, I made additional tests and it appears that the PP Assistant application is able to install cracked apps on iOS 7.0 too, but not my unsigned apps (fails to verify the app rights).
Indeed there is a section in the chinese application where you can download and install commercial apps on iOS 7.0, so there must be a trick they use to re-sign the apps to make it appear as it's a legit app and thus be able to upload to the device even if not jailbroken.
If someone has any idea of what they actually do to make this happen, this would be very useful to know to test apps without JB on every device.
Non-jailbroken devices require valid code-signing to execute binaries. Either wait for a jailbreak to surface for iOS7.X, or find a code-signing service (they are available out there).
Using Xcode 7, you can install your app to your device using a freely available Apple ID.
Free On-Device Development
Now everyone can run and test their own app on a device—for free. You can run and debug your own creations on a Mac, iPhone, iPad, iPod touch, or Apple Watch without any fees, and no programs to join. All you need to do is enter your free Apple ID into Xcode. You can even use the same Apple ID you already use for the App Store or iTunes. Once you’ve perfected your app the Apple Developer Program can help you get it on the App Store.
See Launching Your App on Devices for detailed information about installing and running on devices.
Source

How to re-install all the old SDKs(softwares) for iOS developemnt using Titanium?

I'm very new to the Apple Laptop usage and iOS App development using Titanium. Currently I'm developing an iOS Application using Titanium in an Apple MacBook(Mac OS X Version 10.6.6) with the help of Titanium Developer for testing my App.
Now a days my Titanium Developer is frequently crashing in the middle of my application execution even without any error message, after gone through many threads I decided to go with Titanium Studio instead of Titanium Developer. For using this Titanium Studio I need to upgrade my Titanium SDKs and may be iOS SDKs also.
Previously all the required SDKs(Software) have been installed by one of my colleagues who started this iOS App, now I want to uninstall all the old SDKs and planing to develop the App using the new version SDKs. I'm not sure how to uninstall and install the SDKs again in Mac OS X, can anybody please help me to uninstall all the old SDKs and freshly start the iOS application development from the scratch, if possible please list down the step by step procedure for handling this scenario.
Your help is really appreciable...
Thanks in advance,
Siva
If you are using Titanium Studio, you don't need to remove all the SDKs. Titanium Studio gives the option for selecting any of your installed SDKs. For updates it shows the notifications for availability of new versions of SDKs.