appdelegate Questions

2

Solved

My app is getting a fair number of network errors after I start making requests while transitioning from the background to the foreground. The error looks like this: Error Domain=NSURLErrorDomain C...
Efta asked 27/8, 2020 at 17:11

3

Solved

I'm trying to show a detachable NSPopover by clicking on a button but I'm stuck. I followed tuts how to show NSPopover but they all around Menubar apps. My AppDelegate looks like this final class A...
Quarantine asked 6/8, 2021 at 23:12

0

I have an app which is setting up a VPN connection via Wireguard framework. App is using AppDelegate Lifecycle even if in SwiftUI. I'm using a real device. I need to close my VPN connection started...

2

Not sure why this is so challenging for me, but how can I detect when the user terminates the app? Because from what I'm seeing, Apple provides a lot of functions that might or might not be called ...
Suffolk asked 24/8, 2021 at 17:44

2

Solved

I did a small prototype which uses Firebase Cloud Messaging and the new SwiftUI 2 app life cycle. I added a custom AppDelegate via @UIApplicationDelegateAdaptor(AppDelegate.self) var delegate and d...
Undersheriff asked 11/2, 2021 at 14:40

3

Solved

I'm working with an old Xcode project which is roughly 7/8 years old and I've migrated it to Objective-C 2.0 and to support ARC. The project didn't support Auto-Layout (this was just before it was ...
Adrenal asked 9/7, 2019 at 9:39

3

Solved

Here is a simple AppDelegate that I have made: import SwiftUI class AppDelegate: UIResponder, UIApplicationDelegate { private func application(application: UIApplication, didFinishLaunchingWithO...
Particularity asked 22/8, 2021 at 18:56

21

Solved

In my AppDelegate there is a problem I do not understand. RootViewController initially called ViewController and I changed it name. The application is formed by many ViewController then I have intr...
Brighten asked 4/10, 2012 at 7:42

4

Solved

When using SwiftUI with iOS 13+, the traditional means of determining background state no longer work. For example: AppDelegate methods applicationDidEnterBackground(_ application: UIApplication) ...

3

Solved

I am trying to set up deep linking in my app. I have set up the app as well as the push notifications. However, I am unable to complete the final link from where the AppDelegate receives the user c...
Buncombe asked 26/6, 2021 at 17:21

1

Like title, I'm facing a really strange bug on some my user device. I've search but I cant find any exactly same problem like me. Here's some more detail about this bug: applicationDidBecomeActive...
Schaefer asked 24/8, 2020 at 3:42

15

Solved

I am working on push notifications. I wrote the following code for fetching a device token. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOpt...

1

Solved

I started working on an app for MacOS and got stuck on several issues. One of them is the following. I have a UIElement app. It's initialized in the following way: @main struct MyApp: App { @NSApp...
Dialectics asked 29/5, 2023 at 19:45

1

I have a SwiftUI Menu Bar App with no visible Windows on startup, except an entry in the Menu Bar with a Button showing a View on click. This works great, but sporadically, the App throws an assert...
Messina asked 24/5, 2022 at 11:15

5

When a SwiftUI app is minimized and the dock icon is clicked. The app won't be deminimized and put to the front just like other apps do. import SwiftUI @main struct MyApp: App { @NSApplicationDel...
Zaria asked 17/4, 2022 at 18:18

4

Solved

My app needs to perform some cleanup tasks -delete old data stored locally- every time on startup, before the initial view controller is displayed. This is because that initial view controller loa...
Oleoresin asked 28/1, 2016 at 6:29

2

Solved

In SwiftUI 5.1, I want to use AppDelegate to create an userData object. userData will also contain BLE advertisement data, which will be updated from AppDelegate, too. These data should be availabl...
Joycejoycelin asked 17/7, 2019 at 17:27

1

Solved

This is the error that i am getting when building the app. I am getting this error after upgrading my react-native version from 0.66.2 to 0.68.2 in my Appdelegate.mm file.
Touraco asked 20/7, 2022 at 8:35

10

Solved

I am currently getting a blank screen with Xcode 11, Target iOS 13.0 (the app works fine with all below versions iOS 12.1 till 12.4), I want to make my App work for both iOS users above 12.1 and al...
Prepossess asked 2/10, 2019 at 18:57

1

Solved

How do you do the cast below, in an App with SwiftUI Lifecycle, where AppDelegate is implemented as NSApplicationDelegateAdaptor? let appDelegate = NSApplication.shared.delegate as! AppDelegate //...
Superman asked 31/5, 2022 at 8:9

16

I have following code in my AppDelegate.swift to setup root view controller for an iOS application. But it does not work. It follows Target structure (defined under General tab) and ignores this co...
Op asked 24/9, 2019 at 15:55

7

Solved

Every since i updated xcode i cant seem to change the titleTextAttribute. Now when i use following code i get this error: could not find an overload init that accepts this supplied arguments C...
Coquette asked 11/11, 2014 at 15:51

11

Solved

I am trying to create a push notification which determines which view to open according to information obtained from the push. I have managed to get the information from the push, but I am now str...
Irs asked 2/6, 2015 at 9:41

3

Solved

I'm rebuilding an app without storyboards and the part of it that I'm having the most trouble with is navigating view-to-view programatically. Few things are written out there which don't use story...
Anselm asked 20/6, 2015 at 16:43

3

Solved

How can I detect a device shake in the AppDelegate (across the entire app) in Swift? I've found answers that describe how to do so in a view controller, but looking to do so across my app.
Downhaul asked 13/1, 2016 at 17:20

© 2022 - 2025 — McMap. All rights reserved.