media.selectPhoto on iOS7 shows photo picker from iOS6 + status bar BUG

Hi,

I started a new topic in advanced graphics, but maybe this will be more appropriate forum.

I’m having an issue. When I call media.selectPhoto in iOS7 - it shows iOS6 photo picker window PLUS a status bar shows up on top of that - covering half of the Photos top menu bar (see the attachment). I’m using the daily build 2014.2147, so fairly new one. And yes - I’ve already added: 

 

both UIStatusBarHidden = true,

UIViewControllerBasedStatusBarAppearance = true,

 

to build settings. None of them work when I call media.selectPhoto() - I have to manualy dismiss status bar in onComplete listener again.

 

Are you planning to replace the photo picker to the current iOS7 version? And what about the status bar issue?

 

Thanks,

Olaf

 

21eawch.jpg

Here it is working fine and using the iOS 7 layout. The status bar doesn’t show while picking the photo, even if my app is not hiding it. 

I am using build 2014.2153 but in previous builds were fine also.

Thanks for the reply, but that’s weird - I’ve updated to 2014.2155 daily build and still encounter the problem. Could you write me which iOS 7 version are you using?

7.0.4.

me as well… :expressionless: have no clue what’s wrong now

Did you try to remove that 2 flags (UIStatusBarHidden, UIViewControllerBasedStatusBarAppearance) from your build.settings?

Also, paste here how you are calling the selectPhoto()

now I’ve tried and removed them but it’s the same - I’m still getting iOS6 view with status bar overlaying. This is how I call selectPhoto:

local function onComplete(event) if photo ~= nil then photo:removeSelf( ) photo = nil end photo = event.target group:insert(photo) photo.x = \_W\*0.5 photo.y = \_H\*0.5 local newScale = 320 / photo.width photo:scale( newScale, newScale ) photo:toBack( ) back:toBack( ) end local function pickPhoto(event) if media.hasSource( media.PhotoLibrary ) then media.selectPhoto( { mediaSource = media.PhotoLibrary, listener = onComplete } ) else native.showAlert( "Corona", "This device does not have a photo library.", { "OK" } ) end end local buttonPick = display.newRect(\_W-79,\_H,\_W\*0.5,100) buttonPick:addEventListener("tap", pickPhoto)

I also tried without defining mediaSource - it’s always the same

Allright, I removed some other things from build settings that I pasted from previous project (like unused fonts and plugins declaration) and it works fine now! :slight_smile: iOS7 picker appears with no status bar.

Thanks @Renato - RBG, your answer gave me the clue that it was a problem on my side not a Corona’s build problem.

Hi Renato - RBG, I am having a similar problem on iOS7, but removing those lines doesn’t seem to fix it. Could you post your build.settings setup and how you call select photo so I could try that? thx

Hi @playthisstudios.

I didn’t have that problem, but whammy solved removing some flags from the build.settings. Try to clean your build.settings as most as possible.

Thanks  @Renato - RBG,

Finally tracked it down - I had the older iOS6.1 SDK installed as well as iOS7 SDK, and Xcode was using the 6.1 version. Reinstalled Xcode and it is now working as expected. On iOS 7 it uses the new picker interface and the status bar doesn’t appear, and on iOS6, it uses the older style photo picker interface (and the status bar also stays hidden). Funny thing for me is in my build.settings, I still have the UIStatusBarHidden = true set. Anyway, thanks for your help!

@playthisstudios, that’s good to know you tracked down the problem! I also have two Xcodes installed, so probably that was causing my issue as well. In my case cleaning the build.settings without Xcode reinstalling has helped, but I guess it’s better if I clean it up as well, since I’m still using Developer Preview Xcode5 version :slight_smile:

Here it is working fine and using the iOS 7 layout. The status bar doesn’t show while picking the photo, even if my app is not hiding it. 

I am using build 2014.2153 but in previous builds were fine also.

Thanks for the reply, but that’s weird - I’ve updated to 2014.2155 daily build and still encounter the problem. Could you write me which iOS 7 version are you using?

7.0.4.

me as well… :expressionless: have no clue what’s wrong now

Did you try to remove that 2 flags (UIStatusBarHidden, UIViewControllerBasedStatusBarAppearance) from your build.settings?

Also, paste here how you are calling the selectPhoto()

now I’ve tried and removed them but it’s the same - I’m still getting iOS6 view with status bar overlaying. This is how I call selectPhoto:

local function onComplete(event) if photo ~= nil then photo:removeSelf( ) photo = nil end photo = event.target group:insert(photo) photo.x = \_W\*0.5 photo.y = \_H\*0.5 local newScale = 320 / photo.width photo:scale( newScale, newScale ) photo:toBack( ) back:toBack( ) end local function pickPhoto(event) if media.hasSource( media.PhotoLibrary ) then media.selectPhoto( { mediaSource = media.PhotoLibrary, listener = onComplete } ) else native.showAlert( "Corona", "This device does not have a photo library.", { "OK" } ) end end local buttonPick = display.newRect(\_W-79,\_H,\_W\*0.5,100) buttonPick:addEventListener("tap", pickPhoto)

I also tried without defining mediaSource - it’s always the same

Allright, I removed some other things from build settings that I pasted from previous project (like unused fonts and plugins declaration) and it works fine now! :slight_smile: iOS7 picker appears with no status bar.

Thanks @Renato - RBG, your answer gave me the clue that it was a problem on my side not a Corona’s build problem.

Hi Renato - RBG, I am having a similar problem on iOS7, but removing those lines doesn’t seem to fix it. Could you post your build.settings setup and how you call select photo so I could try that? thx