2,025 questions
1
vote
1
answer
137
views
How to refresh APNs token automatically after device restore without requiring the user to open the app?
When an iOS device is restored from another device (e.g., Device A → Device B), the old APNs token becomes invalid. The token is only refreshed once the app is opened and ...
0
votes
0
answers
105
views
Firebase Phone Auth on iOS with Silent APNs Doesn't Work - Still Opens Safari (reCAPTCHA)
I’m trying to implement Firebase Phone Authentication on iOS using silent APNs verification, so that users don’t have to deal with the fallback reCAPTCHA flow.
Despite following all Firebase and Apple ...
1
vote
0
answers
99
views
Live Activity Dismiss on Termination
I just kill live activity on application Termination with the code below.
func applicationWillTerminate(_ application: UIApplication) {
let semaphore = DispatchSemaphore(value: 0)
Task....
-2
votes
1
answer
504
views
React Native 0.78 iOS build fails with Undefined symbols for architecture x86_64: '_main' after upgrade from 0.68
I'm upgrading a React Native project from 0.68.6 to 0.78.0 and followed all steps on React Native Upgrade Helper.
✅ yarn install and pod install both complete successfully.
❌ But when I try to build ...
1
vote
2
answers
1k
views
Enabling DeepLinks in iOS AppDelegate.swift for the latest version of react native
I'm trying to add the necessary code to support deep links in my React Native 0.78.1 app (not using Expo). 0.78.1 created an AppDelegate.swift, not an AppDelegate.m like older versions of RN. ...
0
votes
0
answers
164
views
Flutter app_links not detecting deep links when MobileMessaging is installed on iOS
I am using the app_links package to handle deep links in my Flutter app, and it works perfectly on iOS. However, when I integrate the MobileMessaging SDK and call ...
1
vote
1
answer
199
views
App Crashes with "Thread 1: signal SIGTERM" When Quitting from Dock
I am using a main file and an AppDelegate with the code below. The issue occurs when I try to quit my app from the Dock. When I right-click on the app icon and choose "Quit", it crashes with ...
1
vote
1
answer
216
views
Expo Prebuild for React Native ios
I've noticed a behavior when running expo prebuild in my React Native project using Expo. For the iOS platform, it completely replaces the AppDelegate.mm file and regenerates new icons. However, on ...
1
vote
1
answer
200
views
Xcode: Hide GoogleService-Info.plist when Building IPA iOS
Im new to Flutter and iOS, and Im currently building a Flutter IOS with Firebase Cloud Messaging integrated into the application. I have a GoogleService-Info.plist for two flavors (UAT and Production) ...
3
votes
2
answers
96
views
iOS Flutter App Directly Opens Home Screen After Reinstall
Problem:
While developing my Flutter app for iOS, I encountered an issue where, if a user uninstalls the app while logged in, upon reinstalling, the app would skip the login screen and directly ...
0
votes
0
answers
100
views
How to handle the conflicting orientation masks between UIViewController and AppDelegate
I noticed that the Apple official documentation for UIViewController describes handling view rotation as follows:
The intersection of the app’s orientation mask and the view controller’s orientation ...
2
votes
1
answer
2k
views
How can I retrieve the APNs before the FCM token in Firebase specifically?
Before encountering the error, I was using Xcode which had Firebase installed. At around 12pm today, I began encountering an error that looked like this
APNS device token not set before retrieving FCM ...
2
votes
1
answer
100
views
macOS 15: Clicking Dock Icon Opens Two Windows
Prior to macOS 15, when the user closed all windows and then clicked the Dock icon, the app wouldn't reopen a window. To handle this, I added the applicationShouldHandleReopen method in the ...
0
votes
0
answers
88
views
SwiftUI Window not draggable
I made a custom AppDelegate which should remove the window toolbar and add a corner radius of 10px which all works very well hoeever now, you can't drag the window around.
I am also very new to AppKit ...
0
votes
0
answers
259
views
Method in Appdelegate applicationWillTerminate not being called using SwiftUI iOS
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 ...
1
vote
2
answers
2k
views
How can I define a SwiftData modelContainer in an "AppDelegate" rather than an "App"?
I have a working project using SwiftData that is entirely built with UIViews. Essentially, the user will tap an answer on a UIView, and add a row to my SwiftData output. This works as expected. I ...
0
votes
0
answers
58
views
Is it possible to pass data from the View Hieracrchy to the App Delegate without using a Singleton?
I want to access data that is populated into Environment Objects during the lifetime of my application in my AppDelegate's applicationWillTerminate() function.
I've looked around Stack Overflow and ...
-2
votes
1
answer
119
views
Implementing Facebook App Events in Legacy iOS Project Without Scene Delegate
I'm working on a legacy iOS project where the AppDelegate file exists, but there's no SceneDelegate. I need to implement Facebook App Events following the guidelines provided here:
Facebook App Events ...
1
vote
1
answer
556
views
'RNAppAuthAuthorizationFlowManager.h' file not found
I'm getting the error "'RNAppAuthAuthorizationFlowManager.h' file not found" on AppDelegate.h every time I build my app after migrating from react-native 0.61.5 to 0.69.12.
AppDelegate.h:
#...
0
votes
1
answer
65
views
The code of the AppDelegate class in Xcode suddenly became colorless
all of a sudden, the code within the AppDelegate class in Xcode lost its color. There are no color issues in other classes, only in the AppDelegate class.I have no idea how to solve it. I restarted ...
0
votes
1
answer
531
views
How to block screenshot in flutter ios application?
I am trying to block screenshot in my flutter ios app but it's not working. User is still able to take screenshot in his device. Could you please help me to implement blocking screenshot in my flutter ...
0
votes
2
answers
117
views
Swift webview device token
I am testing in Swift to send notifications with Firebase and in general it's working. When i will send a notification to one user, i need the device token of this user. I guess this is not the same ...
0
votes
1
answer
152
views
Swiftui redirect to another view from SceneDelegate
When a specific url is opened we enter to this function
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
I need to go to a specific screen. What I tried to do ...
1
vote
1
answer
1k
views
How to write the new RCT AppDelegate interface with User Notifications in ios on react-native
I've recently upgraded my react-native SDK version to 0.73,
But according to the Upgrade Helper here the AppDelegate interface definition changed from
@interface AppDelegate : UIResponder <...
0
votes
1
answer
246
views
Random Issues with AppDelegate File related to move from Intel to M1 Chip
I've been having a hell of a time moving a code base from an old intel macbook to a newer m1 chip macbook. I've jumped through many hoops and finally got the code to compile after removing all ...
0
votes
1
answer
697
views
Universal links not working after upgrading React Native to 0.0.72
We had universal links working for our react native app when we were on the previous React native version 0.0.67. We are now upgrading to React Native version 0.0.72 and universal links are no longer ...
0
votes
0
answers
66
views
Pass custom URL scheme data from AppDelegate to ViewController in Xcode 14
Custom URL scheme starts my app, this part works!
Now I need to pass custom URL scheme data from AppDelegate to ViewController
It always be a empty string, why?
in AppDelegate:
var window: ...
1
vote
0
answers
470
views
Carplay scenedelegate never called in SwiftUI
I am facing one issue where I have created a car play scene delegate file but it never gets executed.
Here is my code for the app
@main
struct FredScannerProApp: App {
@...
1
vote
1
answer
88
views
iOS Swift application instance time alive
I have created an application that uses location services and bluetooth services.
Inside AppDelegate using significant location changes I am assigning a new instance of CBCentralManager like this:
...
0
votes
1
answer
596
views
Microsoft Graph: Delegate Login asks for "Consent on behalf of your organization"
I am using the msal acquire_token_interactive() method to login the user. I have User.Read and Presence.Read defined as scopes, both in the API permissions tab and in the acquire_token_interactive ...
1
vote
1
answer
1k
views
No visible @interface for 'EXAppDelegateWrapper' declares the selector 'application:openURL:options:'
I am upgrading an Expo app from react native 0.63 to 0.71 and am running into this error in my AppDelegate.m file.
// Linking API
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url ...
0
votes
1
answer
183
views
Unable to pass information from local notification in AppDelegate to a view in SwiftUI
I have a scheduled notification that works and I am attempting to get information from that notification to open another view, but right now I'm unable to get that information passed into my main view ...
2
votes
0
answers
109
views
How to create unit test for UISceneConnectionOptions?
Is there a way to set the launch URL and source application property of connectionOptions/UISceneConnectionOptions for testing SceneDelegate? I see that the properties of UISceneConnectionOptions are ...
0
votes
1
answer
68
views
Passing UIImage data to another View Controller using Delegate
[Update]
My way to passing UIImage was wrong. It is impossible because I would never know the instance of view controller which I have to pass an UIImage data.
Instead of Using protocol, I share ...
1
vote
1
answer
59
views
Open MapViewController and center on Lat/Long when user taps notification banner
So I'm having a tough time. I'm new to Swift but have been getting better. I have an app where users will receive a notification when something is placed on the map. What I'm trying to do is launch ...
0
votes
1
answer
510
views
MarketingCloudSDK Crashes SwiftUI App in Beta TestFlight: "_dispatch_once"
MarketingCloudSDK Crashes SwiftUI App in Beta TestFlight
We've implemented Push Notifications through SalesForce Marketing Cloud and after some beta testing with internal testers it seems the SFMCSDK ...
5
votes
1
answer
2k
views
Open a window from menu bar (SwiftUI, MacOS)
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 {
@...
2
votes
1
answer
2k
views
How to use dart defined variables inside of AppDelegate.swift file
I am using Google Maps for Flutter to access a map in my application. To make it usable for iOS I need to provide the API key inside of AppDelegate.swift as:
GMSServices.provideAPIKey(...
-1
votes
1
answer
218
views
How to use EnvironmentObjects in AppDelegate with SwiftUI?
I am trying to access some environment objects in my AppDelegate. I am using an addStateDidChangeListener to see if the Firebase user's token is valid or not.
func application(_ application: ...
0
votes
0
answers
173
views
registerForRemoteNotifications() blocks mainthread when called from testflight
I have a weird bug in my iOS-app. First of all: the bug only appears using Testflight, not when compiling the app through xCode and running it on a device.
I have a simple onboarding TabView with ...
1
vote
0
answers
160
views
Playground App Could not cast value of type 'LLAppDelegateProxy' to 'SwiftUI.AppDelegate'
Getting a crash with this error in my playground app. Not sure what's happening or how to fix this
Thread 1: signal SIGABRT
@main
struct PlaygroundApp: App {
@UIApplicationDelegateAdaptor(...
0
votes
1
answer
109
views
Is there any way to show error msg to user from worker thread in IOS from Appdelegate before root view controller is instantiated/created?
I want to show user a alert in case my application stop before creating a window to show root view controller and i want to do this from a worker thread which will be running in a cpp file and will be ...
0
votes
1
answer
2k
views
iOS Property 'reactDelegate' not found on object of type 'AppDelegate' won't Build
Property 'reactDelegate' not found on object of type 'AppDelegate *'
Expo bare workflow project. Not able to get through this issue even after updating the AppDelegate.h file. Any luck here anyone?
0
votes
0
answers
607
views
Lock and unlock rotation between screens in Swift
I have the following situation (this is just a demo application with that functionality). I have a screen with a single button (navigation link) where only portrait mode is allowed. When I click the ...
-1
votes
1
answer
373
views
Which folder to put the App and Scene Delegate files in Swift?
I am having a problem to decide on which folder to put the app and delegate in.
My project structure is like this.
Should I create a folder for each of them with their names or create a folder called ...
2
votes
1
answer
661
views
How can I create mainMenu and menu items in AppDelegate for Cocoa macOS?
I am trying build my mainMenu from AppDelegate, I already did disconnect my Storyboard file and I am using a main.swift file for loading my app as @mainI tried this codes for building my menu, but it ...
-2
votes
1
answer
84
views
How can I update my Window via AppDelegate in macOS Cocoa?
I am using ViewController for my app content, I want be able to update my app window in AppDelegate. I know that I can update my window from ViewController but for this question I want update my ...
6
votes
4
answers
3k
views
iOS App not using full height of the screen
I created a sample iOS app, where I removed the storyboard, the launch screen, the SceneDelegate and created a blank UIViewController
MainViewController:
class MainViewController: UIViewController {
...
1
vote
0
answers
3k
views
Expo build for iOS AppDelegate.m issue
I am having a problem to build react native iOS app via expo. It is throwing errors in AppDelegate.m
What do you think it might be the issue?
I was trying various modifications, but nothing really ...
0
votes
1
answer
661
views
SwiftUI AppDelegate UIWindow redeclaration
I'm using SwiftUI so the AppDelegate is added by
@UIApplicationDelegateAdaptor(MyAppDelegate.self) var myAppDelegate
All delegate callbacks work fine, but var window: UIWindow? can't be redeclared.
...