Why my application is started automatically after install - ios

I'm new to iOS programming.
Currently working on an Enterprise Application which is downloaded from the web and suppose to be activated with a URL schema.
When the download and install process is completed the application is started automatically by iOS without the URL schema and without the user activating the application.
At this stage the application is asking the user to activate it with a schema but this Alert is not being displayed, nighter the application main view.
Double click the home button display the splash screen of my application together with other running apps.
When the user press the registration link:
applicationWillEnterForeground is being called.
openURL is being called.
didFinishLaunchingWithOptions is NOT being called.
The application display the register with link (the alert that was not displayed earlier) and exit.
My questions:
Why my application is starting automatically?
[edit] Forgot to mention that this is a VOIP application so iOS gives us a chance to set up the connection.
How come the AlertView is not being displayed?
Is there a way to prevent it?
If there is no way to prevent it, is there a way to detect this state?
I'm using XCode 5 and iOS7 on iPhone 4 (but saw this behaviour on other devices as well).
Thanks,
Yaron

Related

How to build an IOS application that works even when the user closes it

I'm new to the world of iOS programming.
My goal is to build an application that works even when it's in the background and even when the user eventually closes it, as its purpose is to send data to my web page.
After building the application and making it work in the background, I started searching on the Internet how to make the application work for iOS even when the user closes it.
Starting from the fact that I also developed in Android, I started to do research with the following keywords (service / swift / ios) and I learned that in iOS it is not possible to have an application that works as a 'service' as it happens on Android.
So I wonder, how do applications like Gmail, WhatsApp, iMessage, Telegram work even when they are not active in iOS multitasking?
If the user merely "closes" an app by switching to another app, or locking their iPhone, then iOS APIs such as URLSessionDownloadTask will continue to download data in the background. Apps that play background audio also continue to run when an app is merely closed (but not killed).
However, none of these app tasks will run if a user force closes an app (swipes up in the Springboard launcher).

App freezes several seconds before start on device

I'm a free developer and I use my swift application on my iPhone 7. I'm using Swift 3 and iOS 10.
So the problem is, sometimes (like 2 of 10 times) when I start the app, iOS freezes like 5 seconds before my app actualy comes to the screen. In this time I only see the app icon is in the highlighted state. This only happens with my own app, not with other apps.
My app also does nothing special on startup and this only happens on the real device, the debugger in Xcode always starts immediately.
So is this a normal behavior? And does it work properly when I decide to put it on the App Store?
Thanks in advance.
I have had this happen to me before. No, this does not happen when it is put out on the App Store. One way to get around this is to use TestFlight. You can upload your archive to apple and select on the 'TestFlight' tab of your app. Click on internal testing and then click on your email and the version of the app you want to test. You should then get an email on your Apple ID telling you to test the app, and it will let you download it. Good question :)
To test the same version which would have been uploaded to the store quickly, change the build configuration to release. To do so, click on your app's name (top left), press edit schema, click the build configuration dropdown, also deselect debug executable. (make sure to turn it back when you're going to debug, or create a new schema with the above settings to let you switch quickly in the future)
You might also try using instruments, that lag on startup might happen if you're trying to load many things in memory on your initial view controller's viewDidLoad or app delegate's didFinishLaunchingWithOptions load, especially when trying to load big files such as images, videos or large plists. You might want to try using instruments (the time profiler instrument specifically) in order to check it out.

iOS Application hangs up when started from TestFlight or AppStore

I have developed an iOS application, which has signup process. When started in debug the application is working as expected.
When the application is installed trough TestFlight or AppStore the following scenario occurs:
When starting from the application icon on the home screen everything works as expected.
When starting from TestFlight or AppStore via the "Open" button the application hangs after the signup process is successfully completed.
The application can be downloaded from the following URL: https://itunes.apple.com/us/app/treffn-we-make-meeting-up-easy/id1137059844?ls=1&mt=8
The two outcomes can be observed if you reinstall the application. The application doesn't crash so I don't have any crash reports.
I'm looking for a way to simulate such launch in debug so I can trace what is happening or any ideas on what might be causing the issue.
While asking some of friends around. I understood that the Launch Options are providing additional parameters when launching the application directly from the AppStore or trough TestFlight.
I have found a similar question, which helped me solve my issue.
https://stackoverflow.com/a/34118249/1913174
When you are handling the launch options parameter you should always handle only the cases, which matter to you. In all other cases you should allow your application to behave as started from the icon. In my case I'm handling start from push notification and start from Quick Action. I was storing the launch options each time the application was not started from a Quick Action, which lead to the point when I was trying to handle Push Notification data, which didn't existed.

How create LocalNotification on a System Application in a jailbroken device iOS 8

I'm making a application for jailbroken devices, and my application is in /System/AppForTest for example.
I tried to use UILocalNotification like usually with no success. The same code is working in a normal application. In a normal application first prompt dialog for Accept notifications from the app, but in a system application the prompt never shows.
Pulling notifications manually could help too. Any help?
Best regards!!!

how to check whether a hybrid app is executing in background?

I have an oracle APEX app on ipad as hybrid ipad app built with html5,jquery and uses PhoneGap.
1.Now when I save details on one of the form page->page save process is executing
2.Lock my ipad without waiting to check whether details are saved or not OR goto home and browse through other apps.
3.When i again visit my app,I still see the page as loading.My app freezes.
4.Now I have to close my app and open it newly to check whether details entered are saved or not. This is bit annoying.
The details don't get saved.
What exactly happens to a running app when an ipad is locked OR when we move from running app to any other app?
Can we check if process is getting executed in background?
Can we capture this switch from running app to another OR ipad lock as a jquery/javascript event?
Can we relaunch an app after switch/lock interruption automatically?

Resources