I’m currently doing the StoreSearch tutorial and as of lat it keeps crashing due to following error…
2019-11-19 18:11:32.056113+1000 StoreSearch[3317:436206] [Window] Manually adding the rootViewController’s view to the view hierarchy is no longer supported. Please allow UIWindow to add the rootViewController’s view to the view hierarchy itself.
URL: ‘https://itunes.apple.com/search?term=Doctrine’
Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value: file /Users/iMac2013/OneDrive/_CODING_Drives/Tutorials/iOS_Apprentice/StoreSearch/StoreSearch/SearchViewController.swift, line 67
line 67 (in SearchViewController.swift) is,
// reloads the tableview data
tableView.reloadData()
note - I am using devices (iPhone or iPad, whichever I get my hands on first) rather than the simulator. but the error and crash is exactly the same on both… even if I only checkmark the device I test on.
I don’t think it is a tutorial issue but an Xcode issue as there seems to be similar occurrence when I do a search for it… but can’t work out a fix.
to keep the tutorial going I have found that if I set it to portrait only (in the Xcode app setting) it won’t crash… but strangely you can rotate the tablet/phone and it will rotate and run in landscape even though landscape is unchecked… and it won’t crash/ check the landscape box for an and it crashes in landscape.
is this something that can be addressed within the tutorial code or is this just an apple bug that will keep going till fixed.