MyLocations only crashes on physical iPad6 when you try and capture an image, however a physical iPhone8 and all the simulators work fine and provide the selection/choice to use camera or use image from library. I think I have tracked it down to when the code checks for “.camera”. is there a different call to see if a camera is available on iPad6… ie .“widecamera” etc?
I have redone the complete chapter (chapter 30) 3 times, and have even copied in and checked code line by code line directly from the completed supplied code for the chapter and it still won’t work on the iPad6 only… I really cant understand why.
help would be appreciated as there is no point in going to final chapter (31) if I cant work out why it wont work on only one device type.
@fahim Can you please help with this when you get a chance? Thank you - much appreciated! :]
There is no separate source type for the iPad 6 camera. What leads you to believe that the issue is specific to iPad 6 only?
Is it possible that the issue is iPad specific (and not iPad 6 specific) and could be the issue mentioned in the following StackOverflow thread?
Not sure if only iPad 6 or all physical iPads crash on the camera check, however physical iPhones and all simulator iPads work. I think it may be the camera call/check is the problem as prior to doing the check (to bring up the options dialog) the camera worked and took pictures… once I give it the option to search for “.camera” it stops working… can’t really work out what else it could be as it is at that precise call it stops to work. I’ll keep testing, but am ready to give up on this tutorial as even a direct copy of the full code provided as the completed chapter code provided with book purchase does exactly the same thing… crash, so it can’t be me typing in errors.
Will try and find another physical iPad version and see if it works some time next week. Any help in the meantime would be appreciated
Did you take a look at the StackOverflow link I provided? It explains what happens on an iPad and why it (probably) crashes. My apologies for this not having been tested on an iPad and I will make sure that this is fixed for the next release but for the time being, following the instructions on the StackOverflow thread should fix the crash for you - if it is the issue that they mention on that thread.
Do note that you will not see a crash on actual iPhone devices if the above is the issue since iPhones do not present dialogs/alerts the same way that iPads do. Also, since a simulator does not have an actual camera, you will not see this issue on iPad simulators.
thanks for reply and link, however in all honesty it loses me. the link is for Objective-C (for Xcode 4) and my problem is that i am trying to learn iOS Apprentice (latest edition) with Swift 4.2. i kind of need to work out “step by step” as i am self learning, so wouldn’t even know what to change, where to add or delete without structured steps provided.
might just have to give up on this tutorial until it is updated/fixed in next edition. hopefully the 4th (last) tutorial in book works on iPads and i can get back to this one when fixed for physical iPads.
This topic was automatically closed after 166 days. New replies are no longer allowed.