Questions tagged [appdelegate]

In iOS, the app delegate is responsible for managing the app throughout its lifecycle by responding to events such as launch and termination.

2019 questions
7
votes
1 answer

Silent Push Notification not getting processed in iOS 11.2.6

I am trying to implement Silent Push Notification in my app for periodically i.e. once in a day upload data to server. But on iOS 11.2.6 it's consistently failing to call the delegate method -(void) application:(UIApplication *)application…
Omkar
  • 165
  • 6
7
votes
2 answers

swift ios - How to run function in ViewController from AppDelegate

I am trying to run a function in certain ViewController using AppDelegate func applicationDidBecomeActive(_ application: UIApplication) { ViewController().grabData() } But somehow the function does not seem to run at all when the app has…
Victor
  • 1,603
  • 4
  • 17
  • 24
7
votes
2 answers

How do I handle ios push notifications when the app is in the foreground?

How do I set up my AppDelegate to handle push notifications that occur when the app is in the foreground and in the background with swift 3 and ios 10? Including how to make the phone vibrate while in the foreground if I receive a notifcation.
havak5
  • 714
  • 1
  • 6
  • 20
7
votes
1 answer

Avoid losing notifications sent by a widget because of a spash screen or wrong controller active

I have an widget that calls its corresponding app through NSURL and extensionContext to activate a specific action in the app. In AppDelegate's application:openURL:options: method I have: func application(app: UIApplication, openURL url: NSURL,…
7
votes
1 answer

Getting location for an iOS app when it is in the background and even killed

My app needs to get the user's location when app is active and when it's inactive and killed. When the user's location is near to a store the app has to send a local notification. I'm not sure what exactly is happening, but I'm not able to make my…
Stacky
  • 103
  • 1
  • 7
7
votes
2 answers

StatusBar in searchController and searchResultsController problems : iOS 8

Hi, here is my problem: In my AppDeleagate's didFinishLaunchingWithOptions: method i have a method [self configureUINavigationControllerStlyle]; which configures the status bar and all the navigation bar appearance of my app (I have…
7
votes
3 answers

application openURL in Swift

I am having an issue with the Appdelegate method OpenURL. I have setup my Imported UTI's and Document Type. But when opening my app from a mail attachment, the app crashes immediately when I have the method implemented. The depreciated handleOpenURL…
BassetMan
  • 461
  • 6
  • 13
7
votes
4 answers

Not able to set Interactive Push Notifications on iOS8

I was already able to set Interactive LOCAL notifications, but the Remote notifications aren't working. I'm using Parse.com to send the JSON My AppDelegate.Swift looks like this: // // AppDelegate.swift // SwifferApp // // Created by Training on…
7
votes
2 answers

iOS self.window - when is it created?

when you start your app using single view template, and you add the NSLog(@"self.window = %@", self.window); in your first line of the AppDelegate.m's application: didFinishLaunchingWithOptions: method, you can see that self.window exists in your…
Blaszard
  • 30,954
  • 51
  • 153
  • 233
7
votes
10 answers

Get current view controller from the app delegate (modal is possible)

I know that to get the current view controller from the app delegate, I can use the navigationController property I have set up for my app. However, it's possible in many places throughout my app that a modal navigation controller could have been…
Mason
  • 6,893
  • 15
  • 71
  • 115
6
votes
2 answers

UIView transitionFromView: toView: animation not working.

It's my first post on stackoverflow. I'm a iOS developer newbie and I'm not a native English speaker, so I will do my best to explain my problem. Problem: I have added two views to my AppDelegate window and I want to flip from one to the other…
6
votes
4 answers

Deep Links with AppDelegate and SceneDelegate

I am trying to implement deep links to navigate to posts on an app, it was an older project so I had to add the SceneDelegate class. The deep link implementation works only when the app is active or in background. If the app has not been loaded the…
ShedSports
  • 541
  • 2
  • 7
  • 14
6
votes
1 answer

How to use UIApplicationDelegateAdaptor as ObservableObject?

In my iOS 14 App, I can register the legacy AppDelegate by doing this: @main struct MyApp: App { #if os(iOS) @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate #endif var body: some Scene { ... …
TruMan1
  • 33,665
  • 59
  • 184
  • 335
6
votes
3 answers

"continue userActivity" method not called, despite Firebase deep link successfully opening app

I'm using Firebase's deep linking to try and provide a certain function in my app when a user clicks a link that was sent to them. The deep link is setup properly on the Firebase web portal. Clicking the link sent to the user DOES open my app, but…
m179
  • 89
  • 1
  • 8
6
votes
0 answers

'React/RCTBridge.h' file not found on Xcode Installing MS AppCenter in an ejected CRNA new project

Goal Installing MS AppCenter in an ejected CRNA new project keeping Expokit Environment Description Mac: 10.14.3 NPM: 6.4.1 node-v10.15.2 Summary of what I executed I tried to follow the official guide and a brand new project so all is…