-4

i need methods or solutions that allow my iOS app to meet my Android app to do this list of services

1- Background service that run every 30 sec to fetch new content from API and never to die ( on android i use Activity service that run on boot start and no need to run my app to start background service)

2- If app killed by user i need any way on iOS to keep or rerun my background service without run app by user.

3- My app not support PUSH from outside app just i need to build my own local sync data between app and my own server.

i need perfect solution to mack my iOS app like my Android app that do thats fine without any problem.

1 Answers1

2

As a 3rd-party developer, you can write iOS apps. Apps can, under certain circumstances, perform activities in the background. However, they need to be running first which means that the user needs to have started the app at some point in the past.

You cannot programmatically detect when your app has been terminated and relaunch it, although this was possible many versions of iOS ago.

You cannot write background services or daemons or such as iOS does not support them. Sure, it has them in the background, but since the OS, for the most part, is not user-configurable, you have no control over them. Apple does, though.

Like others have said, you can use push notifications or background fetch, but that will not give you exactly the behavior you described in your question. If you relax your requirements, however, their functionality could be sufficient.

The only way to get exactly what you want is to use a jailbroken device, since there you have complete control over the phone/tablet.

dandan78
  • 13,328
  • 13
  • 64
  • 78
  • thanks, but if user kill my app using (swipe up ) is there any way to keep or rerun sync data between app and server without run app by user? i am using more than one app that support received data after killed Like facebook or whatsapp) i try using background fetch method but its not work fine with me .. any idea ?? – Mohammed Qedama Jan 16 '15 at 11:28
  • @MohammedQedama for notifications you use Push Notifications. Though, when a notification is received, it's handled by iOS itself, and your app doesn't run automatically. It's launched only when the user taps the notification to "read" it. – jweyrich Jan 16 '15 at 11:32
  • You can use the background fetch mode with push notifications - these will be delivered silently to your app without notifying the user or requiring user action – Paulw11 Jan 16 '15 at 12:23