3 Replies
      Latest reply on May 15, 2019 5:11 AM by mathew.l
      henrique.ormonde Level 1 Level 1 (0 points)

        Hi,

         

        I've started a thread https://forums.developer.apple.com/message/355767#355767 and it got lost in the limbo withou a solution.

         

        I thought that this might be fixed in the 10.2.1 release of Xcode but it is still happening.

         

        My project works well on the debugger 10.2 and on xcode 10.1 (debug and release) too. This looks like a  Xcode 10.2 issue... only on the release build

         

        I've just updated to 10.2.1 and still this issue continues to happen. I have to keep a copy of Xcode 10.1 to release the builds.

         

        I've foreced a crash on didFinishLaunching to see if the app crashes and it doesn't.. it stays in the blakcscreen after the slpashscreen... so it seams that it doesn't even give back control to me...

         

        Can the Xcode team dig deeper on this issue?

         

        thanks

        • Re: Xcode 10.2.1 still happening same issue (black screen) Xcode 10.2 does
          Claude31 Level 8 Level 8 (5,735 points)

          Your previous thread seems inaccsible.

           

          So please explain again exactly the problem, detail the context (use of external framworks ?)… possibly post code.

            • Re: Xcode 10.2.1 still happening same issue (black screen) Xcode 10.2 does
              henrique.ormonde Level 1 Level 1 (0 points)

              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 {