bfoutty
Code is Art
Profile
Posts: 185
Reg: Jun 12, 2011
Youngstown, OH
12,650
01/11/15 10:02 AM (9 years ago)

iOS 8.1.2 push causing app to freeze for 60 secs

I finally updated one of my apps for iOS with push notification fix mentioned here by Chris1: <a href="http://www.buzztouch.com/forum/thread.php?tid=DA308929DBC29D1DB83B7A8&sortColumn=FT.id&sortUpDown=DESC&currentPage=1" target="_blank" rel="nofollow">http://www.buzztouch.com/forum/thread.php?tid=DA308929DBC29D1DB83B7A8&sortColumn=FT.id&sortUpDown=DESC&currentPage=1</a> When you implement this fix in iOS 8.1.2 the app will register for push, the app launches the first time and functions as expected. However, on subsequent launches the app the app freezes on the loading screen for approximately 60 seconds each time. Here is my debug console output for the 2nd launch of the app: 2015-01-11 10:49:56.585 itctc[1055:298250] BT_device: INIT 2015-01-11 10:49:56.587 itctc[1055:298250] BT_device: Unique UUID exists: xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 2015-01-11 10:49:56.587 itctc[1055:298250] BT_device: This device is an iPad. 2015-01-11 10:49:56.587 itctc[1055:298250] BT_device: This device cannot make phone calls 2015-01-11 10:49:56.591 itctc[1055:298250] BT_device: This device can send emails 2015-01-11 10:49:56.598 itctc[1055:298250] BT_device: This device can send SMS (text) messages 2015-01-11 10:49:56.599 itctc[1055:298250] BT_device: This device can report it's location 2015-01-11 10:49:56.619 itctc[1055:298250] BT_device: This device can take still pictures 2015-01-11 10:49:56.619 itctc[1055:298250] BT_device: This device can take videos 2015-01-11 10:49:56.619 itctc[1055:298250] BT_device: Listing custom fonts (UIAppFonts) listed in app's .plist... 2015-01-11 10:49:56.620 itctc[1055:298250] BT_user: INIT 2015-01-11 10:49:56.621 itctc[1055:298250] BT_user: User is not logged in 2015-01-11 10:49:56.621 itctc[1055:298250] BT_application: INIT 2015-01-11 10:49:56.644 itctc[1055:298250] BT_loadConfigDataViewController: INIT 2015-01-11 10:49:56.694 itctc[1055:298250] BT_loadConfigDataViewController: viewDidLoad (super) 2015-01-11 10:49:56.694 itctc[1055:298250] BT_loadConfigDataViewController: viewDidLoad 2015-01-11 10:49:56.703 itctc[1055:298250] itctc_appDelegate: supportedInterfaceOrientationsForWindow 2015-01-11 10:49:56.703 itctc[1055:298250] itctc_appDelegate: supportedInterfaceOrientationsForWindow 2015-01-11 10:49:56.704 itctc[1055:298250] itctc_appDelegate: supportedInterfaceOrientationsForWindow 2015-01-11 10:49:56.704 itctc[1055:298250] itctc_appDelegate: supportedInterfaceOrientationsForWindow 2015-01-11 10:49:56.705 itctc[1055:298250] BT_loadConfigDataViewController: viewWillAppear (super) 2015-01-11 10:49:56.705 itctc[1055:298250] BT_loadConfigDataViewController: configureNavBar (super) for screen with itemId: loadConfigDataScreen 2015-01-11 10:49:56.710 itctc[1055:298250] BT_viewUtilities: getNavBarBackgroundColorForScreen: Screen "(null)" does not use a navBarBackgroundColor 2015-01-11 10:49:56.711 itctc[1055:298250] BT_loadConfigDataViewController: configureBackground (super) for screen with itemId loadConfigDataScreen: 2015-01-11 10:49:56.711 itctc[1055:298250] AK_SnowView: NO SNOW 2015-01-11 10:49:56.711 itctc[1055:298250] BT_loadConfigDataViewController: viewWillAppear 2015-01-11 10:49:56.727 itctc[1055:298250] BT_loadConfigDataViewController: viewDidAppear 2015-01-11 10:49:56.730 itctc[1055:298250] itctc_appDelegate: networkTypeChanged. rootDevice is connected to the network: WiFi 2015-01-11 10:49:56.731 itctc[1055:298250] itctc_appDelegate: applicationDidBecomeActive 2015-01-11 10:49:58.229 itctc[1055:298250] BT_loadConfigDataViewController: loadAppData 2015-01-11 10:49:58.229 itctc[1055:298250] BT_loadConfigDataViewController: Will use the default JSON configuration file "BT_config.txt" if a newer version is not cached on the device. 2015-01-11 10:49:58.229 itctc[1055:298250] BT_fileManager: File does exist in cached directory: "cachedAppConfig.txt" 2015-01-11 10:49:58.230 itctc[1055:298250] BT_loadConfigDataViewController: Parsing previously cached JSON data: "cachedAppConfig.txt" 2015-01-11 10:49:58.230 itctc[1055:298250] BT_fileManager: readTextFileFromCacheWithEncoding: "cachedAppConfig.txt" encoding: -1 2015-01-11 10:49:58.236 itctc[1055:298250] BT_application: validateApplicationData 2015-01-11 10:49:58.248 itctc[1055:298250] BT_application: The application data appears to be valid. 2015-01-11 10:49:58.248 itctc[1055:298250] BT_application: parseJSONData: parsing application data 2015-01-11 10:49:58.259 itctc[1055:298250] BT_application: parsing themes, count: 1 2015-01-11 10:49:58.259 itctc[1055:298250] BT_application: parsing tabs, count: 0 2015-01-11 10:49:58.259 itctc[1055:298250] BT_application: parsing menus, count: 0 2015-01-11 10:49:58.259 itctc[1055:298250] BT_application: parsing screens, count: 95 2015-01-11 10:49:58.260 itctc[1055:298250] BT_fileManager: File does exist in Xcode bundle: "BT_config.txt" 2015-01-11 10:49:58.260 itctc[1055:298250] BT_fileManager: readTextFileFromBundleWithEncoding: "BT_config.txt" encoding: -1 2015-01-11 10:49:58.273 itctc[1055:298250] itctc_appDelegate: reportToCloud 2015-01-11 10:49:58.274 itctc[1055:298250] BT_fileManager: File does exist in cached directory: "appModified.txt" 2015-01-11 10:49:58.274 itctc[1055:298250] itctc_appDelegate: reporting to cloud at : <a href="https://www.buzztouch.com/api/app/?command=reportToCloud&appGuid=xxxxxxxxxxxxxxxxxxxxxx&apiKey=xxxxxxxxxxxxxxxxxxxxDC8&apiSecret=xxxxxxxxxxxxxxxxxxxxxx&deviceId=[deviceId]&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&deviceModel=[deviceModel]&userId=[userId]&currentMode=Live" target="_blank" rel="nofollow">https://www.buzztouch.com/api/app/?command=reportToCloud&appGuid=xxxxxxxxxxxxxxxxxxxxx&apiKey=xxxxxxxxxxxxxxxxxxxxxx8&apiSecret=xxxxxxxxxxxxxxxxxxxxx&deviceId=[deviceId]&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&deviceModel=[deviceModel]&userId=[userId]&currentMode=Live</a> 2015-01-11 10:49:58.274 itctc[1055:298250] BT_strings: mergeBTVariablesInString (before): <a href="https://www.buzztouch.com/api/app/?command=reportToCloud&appGuid=xxxxxxxxxxxxxxxxxxxxxx&apiKey=xxxxxxxxxxxxxxxxxxxxxx&apiSecret=3xxxxxxxxxxxxxxxxxxxxxx&deviceId=[deviceId]&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&deviceModel=[deviceModel]&userId=[userId]&currentMode=Live" target="_blank" rel="nofollow">https://www.buzztouch.com/api/app/?command=reportToCloud&appGuid=xxxxxxxxxxxxxxxxxxxxxx&apiKey=xxxxxxxxxxxxxxxxxxxxxx&apiSecret=xxxxxxxxxxxxxxxxxxxxxx&deviceId=[deviceId]&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&deviceModel=[deviceModel]&userId=[userId]&currentMode=Live</a> 2015-01-11 10:49:58.275 itctc[1055:298250] BT_strings: mergeBTVariablesInString (after merge): <a href="https://www.buzztouch.com/api/app/?command=reportToCloud&appGuid=xxxxxxxxxxxxxxxxxxxxxxC&apiKey=v8&apiSecret=xxxxxxxxxxxxxxxxxxxxxx&deviceId=33542224-54F9-4D39-AE99-AF960278D182&deviceLatitude=0&deviceLongitude=0&deviceModel=iPad&userId=&currentMode=Live" target="_blank" rel="nofollow">https://www.buzztouch.com/api/app/?command=reportToCloud&appGuid=xxxxxxxxxxxxxxxxxxxxxx&apiKey=xxxxxxxxxxxxxxxxxxxxxx&apiSecret=xxxxxxxxxxxxxxxxxxxxxx&deviceId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&deviceLatitude=0&deviceLongitude=0&deviceModel=iPad&userId=&currentMode=Live</a> 2015-01-11 10:49:58.279 itctc[1055:298250] BT_loadConfigDataViewController: configureEnvironmentUsingAppData 2015-01-11 10:49:58.280 itctc[1055:298250] BT_contextMenu: INIT 2015-01-11 10:49:58.303 itctc[1055:298250] BT_loadConfigDataViewController: "Start Location Updates" = "No". NOT starting the location monitor. 2015-01-11 10:49:58.304 itctc[1055:298250] BT_application: buildInterface app interface 2015-01-11 10:49:58.304 itctc[1055:298250] BT_background_view: INIT 2015-01-11 10:49:58.304 itctc[1055:298250] BT_application: building a single navigation controller app 2015-01-11 10:49:58.304 itctc[1055:298250] BT_application: getViewControllerForScreen nickname: "Home v3" itemId: 1F91FC2BA8C5A10055701F3 type: AK_mosaicMenu 2015-01-11 10:49:58.305 itctc[1055:298250] AK_mosaicMenu: INIT 2015-01-11 10:49:58.305 itctc[1055:298250] BT_navController: pushViewController 2015-01-11 10:49:58.305 itctc[1055:298361] BT_loadConfigDataViewController: loadSoundEffects 2015-01-11 10:49:58.307 itctc[1055:298360] BT_loadConfigDataViewController: initAudioPlayer 2015-01-11 10:49:58.308 itctc[1055:298360] BT_audioPlayer: INIT (preparing it for possible background audio) 2015-01-11 10:49:58.313 itctc[1055:298250] BT_application: This app does not use a splash screen 2015-01-11 10:49:58.313 itctc[1055:298250] BT_loadConfigDataViewController: fadeOutLoadView 2015-01-11 10:49:58.313 itctc[1055:298250] BT_loadConfigDataViewController: promptForPushNotifications 2015-01-11 10:49:58.314 itctc[1055:298250] BT_loadConfigDataViewController: registerUserNotificationSettings (iOS 8+) 2015-01-11 10:49:58.320 itctc[1055:298361] BT_fileManager: File does exist in Xcode bundle: "bt_funk.mp3" 2015-01-11 10:49:58.323 itctc[1055:298361] BT_fileManager: File does exist in Xcode bundle: "bt_glass.mp3" 2015-01-11 10:49:58.329 itctc[1055:298250] itctc_appDelegate: didRegisterForRemoteNotificationsWithDeviceToken: Device Token: <acda3446 bb5bf1b2 d2aa6268 1e8ab013 29ea5ed9 2005b3d0 6322094f 534989ac> 2015-01-11 10:49:58.330 itctc[1055:298250] BT_strings: mergeBTVariablesInString (before): <a href="https://www.buzztouch.com/api/app/?command=registerForPush&appGuid=JA9DA64A69ED3569068DFD94C&apiKey=776EBF84B3FAFC3814AFDC8&apiSecret=3B0EA05F66601890402CA85&deviceId=[deviceId]&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&deviceModel=[deviceModel]&userId=[userId]&deviceType=ios&deviceToken=acda3446bb5bf1b2d2aa62681e8ab01329ea5ed92005b3d06322094f534989ac&currentMode=Live" target="_blank" rel="nofollow">https://www.buzztouch.com/api/app/?command=registerForPush&appGuid=JA9DA64A69ED3569068DFD94C&apiKey=776EBF84B3FAFC3814AFDC8&apiSecret=3B0EA05F66601890402CA85&deviceId=[deviceId]&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&deviceModel=[deviceModel]&userId=[userId]&deviceType=ios&deviceToken=acda3446bb5bf1b2d2aa62681e8ab01329ea5ed92005b3d06322094f534989ac&currentMode=Live</a> 2015-01-11 10:49:58.330 itctc[1055:298250] BT_strings: mergeBTVariablesInString (after merge): <a href="https://www.buzztouch.com/api/app/?command=registerForPush&appGuid=JA9DA64A69ED3569068DFD94C&apiKey=776EBF84B3FAFC3814AFDC8&apiSecret=3B0EA05F66601890402CA85&deviceId=33542224-54F9-4D39-AE99-AF960278D182&deviceLatitude=0&deviceLongitude=0&deviceModel=iPad&userId=&deviceType=ios&deviceToken=acda3446bb5bf1b2d2aa62681e8ab01329ea5ed92005b3d06322094f534989ac&currentMode=Live" target="_blank" rel="nofollow">https://www.buzztouch.com/api/app/?command=registerForPush&appGuid=JA9DA64A69ED3569068DFD94C&apiKey=776EBF84B3FAFC3814AFDC8&apiSecret=3B0EA05F66601890402CA85&deviceId=33542224-54F9-4D39-AE99-AF960278D182&deviceLatitude=0&deviceLongitude=0&deviceModel=iPad&userId=&deviceType=ios&deviceToken=acda3446bb5bf1b2d2aa62681e8ab01329ea5ed92005b3d06322094f534989ac&currentMode=Live</a> 2015-01-11 10:49:58.330 itctc[1055:298250] BT_device: registerForPushNotifications: <a href="https://www.buzztouch.com/api/app/?command=registerForPush&appGuid=JA9DA64A69ED3569068DFD94C&apiKey=xxxxxxxxxxxxxxxxxxxxxxx&apiSecret=xxxxxxxxxxxxxxxxxxxxxxx&deviceId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&deviceLatitude=0&deviceLongitude=0&deviceModel=iPad&userId=&deviceType=ios&deviceToken=acda3446bb5bf1b2d2aa62681e8abxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxac&currentMode=Live" target="_blank" rel="nofollow">https://www.buzztouch.com/api/app/?command=registerForPush&appGuid=JA9DA64A69ED3569068DFD94C&apiKey=xxxxxxxxxxxxxxxxxxxxxxx&apiSecret=xxxxxxxxxxxxxxxxxxxxxxx&deviceId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&deviceLatitude=0&deviceLongitude=0&deviceModel=iPad&userId=&deviceType=ios&deviceToken=acda3446bb5bf1b2d2aa62681e8abxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxac&currentMode=Live</a> The app sits at the loading screen for 61 seconds each subsequent launch and then the app launches. The first line of the debug console shows this: 2015-01-11 10:50:59.335 itctc[1055:298250] BT_device: registerForPushNotifications: Response: (null) 2015-01-11 10:50:59.340 itctc[1055:298250] BT_loadConfigDataViewController: fadeInStartView If I comment out the promptForPushNotification code the app launches and then behaves as expected. The 60 second delay makes for a terrible user experience. I know that the delay is due to the communication to the servers to register for push each time. Has anybody else experienced this problem or is this something new?
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.