I want to create an app that work in background. In this first I allows from the user that this app work in background .
After this as the app will go in background that work efficiently and send me information which I want .
So , please tell me how I can execute this in my iPhone application.
Every suggestion will be appreciated.
Thanks,
Cp
You can use the applicationDidEnterBackground method in your UIApplicationDelegate class to react to the event that your app is entering background. There's a corresponding willEnterForeground method.
What you can not do is to create an app whose sole purpose is to run in the background. There's no "start in background" action, from what I know you can't manually force an app to enter background while it's running. And unless you provide some useful user functionality in the app's user interface, Apple will not allow your app on the App Store.
Related
If I want a user fill out something within the app, can I give them a path that leads to the plugin within the app itself? For example when you try to open a google maps link on your phone and you have the google maps app it will just open the app.
If you are looking to deep-link into the app from outside your app, this is achieved through custom schema and a deep-link. So each app is issued a unique schema on the OS. You're used to schemas like "http" or "ftp" and so on. Custom schemas are registered on the OS to let then operating system know if they see this schema/protocol that your app is responsible for consuming it. For example, facebook is "fb://". You can contact customer support to see if your app has been issued one and what is it.
The second part of this is to deep-link to a particular plugin you can find a quick shortcut to it on the control side of your plugin in the Control Panel
.
Once you've gotten the app to open, then made it navigate to the plugin you want. The last step is optional but good to know. YOu can pass query-string parameters to the plugin so it may take further action from within. For example, you can have it prefill information or navigate to a subsection of the plugin.
Here is an example:
app683a5d://plugin/cb705192-fe4c-44e9-8032-34c9ee0a186a-1560793060569?firstName=Daniel&tel=555-555-5555
app683a5d:// Tells the OS which app to open
plugin/cb705192-fe4c-44e9-8032-34c9ee0a186a-1560793060569 tells the app which plugin instance to open
?firstName=Daniel&tel=555-555-5555 passes along data to the plugin to consume
Here are some helpful references:
Deep-Links https://github.com/BuildFire/sdk/wiki/Deep-Links
Navigation from within the app https://github.com/BuildFire/sdk/wiki/How-to-use-Navigation
I write an application using node-webkit. I want to use HTTP for network communication between computers, running my app. Can I change current page without server restart if server was started from the page?
I thought about child process, but I want to shutdown the server with my application. I don't want to use special network request to the server to close it.
Can I change current page without server restart?
Can I save child process object while page changing?
Do you know other way to do this?
P.S. Sorry for my english.
I found the answer in the node-webkit documentation.
In node-webkit, you can basically do the same thing by using
window.location, you can install it in the onclick event of a link and
node-webkit will navigate to a new page when user clicks it. But by
doing this you would lose everything in window context, you can save
everything in cookies like old web pages, or you can save things in
the global variable, which resides in Node.js's context and will live
through your app.
Here is the situation for the app.
My app is calling app.
So from standard or already exist "phone" app of iPhone (which allows us to call )
i want to launch my calling iPhone app if it satisfy certain condition.
how is there any way to do this?
You can launch the built-in phone app from your app, by using the tel: URL invocation. However, there is no way to get the standard phone app to invoke your application.
I am confused of how an iphone app goes when it start running. I mean when I am trying to write a app, I get confused and lost of terms like "viewDidLoad", "viewDidUnload", "dealloc", "applicationDidLoad" etc. I have no idea when one comes first, which one comes later when an app runs. For instance, say, I would like to add a view(or picture) showing my app logo when the app is just opened (just like what most apps would do). So, where (viewDidLoad or applicationDidLoad) should I put my code in?
Well, this is just an example. I will appreciate it if you can tell me the answer. But what I am most concerned is about the life cycle of running a app, i.e at which state, which method will be called. Thanks in advance!
To start, you might want to know this:
the first code you get to run after the application has finished launching, is the one you put in the Application Delegate in the method application:didFinishLaunchingWithOptions. The app delegate is the class that is set to receive general notifications about what's going on with the app, like it finished launching :)
The other kind of 'notifications' of changes in the state of the app, or the life cycle of views are:
-viewDidLoad
-viewWillAppear:animated:
-viewDidAppear:animated:
-viewWillDisappear:animated:
-viewDidDisappear:animated:
-viewDidUnload
Those methods are declared in UIViewController, and you can implement them in your UIViewController subclasses to customize the behaviour of a view in those situations (each method name is self explanatory)
The life cycle of an app is pretty well covered here: http://developer.apple.com/library/ios/documentation/iphone/conceptual/iphoneosprogrammingguide/iphoneappprogrammingguide.pdf page 27
About showing a logo when the app launches, apps achieve that setting a "splash" image by putting its name in the info.plist property-list file, in the UILaunchImageFile key.
I think the official developer guide delivered by apple will help you. This is the link:
http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/ViewLoadingandUnloading/ViewLoadingandUnloading.html
I am programming an iPhone application. My (existing) web-application uses Ruby on Rails (2.3.2) to serve the data. Ruby on Rails backend uses restful-authentication gem to authenticate the users.
To get user data from the server to the iPhone app I use HTTPRiot framework and authenticate user with HTTPBasicAuthentication.
Now everything works fine - user can get and post some data to and from the iPhone app. But when I want to log out the user from the service it seems impossible. From the different topics I understood that logout was just not implemented in HTTPBasicAuthentication and I completely OK with that. I tried to find a work around like implementing a switch in the Settings.app to force my app to display the login screen when user goes back to the app.
The problem is: iOS4 keeps connection kind of "open" when app is entering background. To log out from HTTPBasicAuthenticated connection, this connection needs to be broken. Using this approach my user needs to quit the app, turn the switch on in the Settings.app, delete my app from multitasking and start my app again. This is too dirty.
My question is: is there a cleaner way to logout/change the user without completely leaving the application?
Some references: HTTPRiot, Logout and basic auth, Logout and basic auth 2