After updating to Xcode 10.2 I released a build to testflight and it gets a black screen right after the splash screen. No crashes.
Everything works fine debugging on the Simulator.
Not a single line of code is changed and a build released on Xcode 10.1 opens fine on testflight but a build on 10.2 or 10.2.1 it gets stuck right after the splashcreen on a black screen.
Project is entirely on swift 4.2
You where the person that replied to my last thread but now it says that moderator rejected my last thread.
You said that I needed to speak with the creator of the push SDK that I was using but he said that it never happened to him.
didFinishLaunchingWithOptions doesn't get called in the release build. I forced a crash on the first line inside didFinishLaunchingWithOptions and the app doesn't crash.
here is the code:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
setupApp(currentApp: application)
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
// Check if launched from notification
let notificationOption = launchOptions?[.remoteNotification]
if let notification = notificationOption as? [String: AnyObject],
let aps = notification["aps"] as? [String: AnyObject] {
AlliNPush.getInstance().receiveNotification(self, userInfo: ((notificationOption as! NSDictionary).object(forKey: "aps") as? NSDictionary)!)
}
return super.application(application, alliNDelegate: self, didFinishLaunchingWithOptions: launchOptions);
}
func setupApp(currentApp: UIApplication) {
FirebaseApp.configure()
OnBoardCoordinator.main.start(window)
setupNotifications(app: currentApp)
Fabric.with([Answers.self])
Analytics().setup()
}
func setupNotifications(app: UIApplication) {
if #available(iOS 10.0, *) {
// For iOS 10 display notification (sent via APNS)
UNUserNotificationCenter.current().delegate = self
let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
UNUserNotificationCenter.current().requestAuthorization(
options: authOptions,
completionHandler: {_, _ in })
} else {
let settings: UIUserNotificationSettings =
UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil)
app.registerUserNotificationSettings(settings)
}
app.registerForRemoteNotifications()
Messaging.messaging().delegate = self
}
func start(_ window: UIWindow?) {
self.window = (window == nil) ? UIWindow(frame: UIScreen.main.bounds) : window
self.window?.backgroundColor = Colors.shared.system.primary
self.window?.rootViewController = navigation
if let loadingVC = Storyboard.helpers.controller(to: "loadingViewController") {
navigation.setViewControllers([loadingVC], animated: true)
}
ConfigService.shared.loaded.subscribe(onNext: { loaded in
if loaded {
DispatchQueue.main.async {
self.start()
}
}
}, onError: { error in
self.set(stage: .networkError(error))
}).disposed(by: DISPOSABLE_BAG)
self.window?.makeKeyAndVisible()
}
open func application(_ application: UIApplication, alliNDelegate: AlliNDelegate, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
self.alliNDelegate = alliNDelegate;
AlliNPush.registerForPushNotifications();
return true;
}
AppDelegate is declared as such:
@UIApplicationMain
class AppDelegate: AlliNResponder, AlliNDelegate {
then AlliNResponder itself is declarated as such:
open class AlliNResponder : UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {