Problem with mergeAVCam
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 136
- Joined: Fri Oct 14, 2011 6:53 am
Problem with mergeAVCam
Not again!
I'm trying to add a QR reader to my app. For this I use mergeAVCam and it works well, at least until I try to turn off the microphone permission, then the circus begins.
Because Apple does not release apps with incorrect permissions, this will be a big issue for me and for everyone who needs this feature.
I'm already facing this problem with "cameraControlSet" where I reported a bug earlier this year, which is still not fixed.
Solution someone?
///Peter
I'm trying to add a QR reader to my app. For this I use mergeAVCam and it works well, at least until I try to turn off the microphone permission, then the circus begins.
Because Apple does not release apps with incorrect permissions, this will be a big issue for me and for everyone who needs this feature.
I'm already facing this problem with "cameraControlSet" where I reported a bug earlier this year, which is still not fixed.
Solution someone?
///Peter
/*Whats all the fuss with c# ?*/
Re: Problem with mergeAVCam
I'm confused. Have you tried to release it and run into an issue?
mergAV requires both the microphone and the camera for BC scanning (even though it souldn't require the mic), as I think you know.
mergAV requires both the microphone and the camera for BC scanning (even though it souldn't require the mic), as I think you know.
-
- Livecode Staff Member
- Posts: 821
- Joined: Fri Feb 06, 2015 4:03 pm
Re: Problem with mergeAVCam
Hello all,
You have to set the microphone to empty before creating the camera:
Hope this helps,
Panos
--
You have to set the microphone to empty before creating the camera:
Code: Select all
-- so this
mergAVCamSet "microphone", empty
-- before
mergAVCamCreate
Panos
--
Re: Problem with mergeAVCam
Panos,
So the microphone is no longer required for barcode scanning with mergav?
So the microphone is no longer required for barcode scanning with mergav?
-
- Posts: 136
- Joined: Fri Oct 14, 2011 6:53 am
Re: Problem with mergeAVCam
Mikey,
Apple has decided not to release any apps on the App Store that require the user's permission if there is no good reason for it. For example, you must modify the pList to describe in detail why a certain function must be approved by the user.
Because the microphone is not needed to scan, Apple does not approve my app for the App Store.
///Peter
Apple has decided not to release any apps on the App Store that require the user's permission if there is no good reason for it. For example, you must modify the pList to describe in detail why a certain function must be approved by the user.
Because the microphone is not needed to scan, Apple does not approve my app for the App Store.
///Peter
/*Whats all the fuss with c# ?*/
-
- Posts: 136
- Joined: Fri Oct 14, 2011 6:53 am
Re: Problem with mergeAVCam
Panos,
I have tried to set the microphone to empty before I create the camera... and I've tried to set it after ... no difference!
///Peter
I have tried to set the microphone to empty before I create the camera... and I've tried to set it after ... no difference!
///Peter
/*Whats all the fuss with c# ?*/
Re: Problem with mergeAVCam
So you have already received a rejection from Apple, or you anticipate receiving one? I'm just curious.
-
- Posts: 136
- Joined: Fri Oct 14, 2011 6:53 am
Re: Problem with mergeAVCam
Mikey,
I've just had a similar problem with both cameraControlSet (microphone permission) and mobileStartTrackingSensor (incomplete description of permission) for positioning, so I'm pretty sure the "App review Mafia" does not let go of something like this...
///Peter
I've just had a similar problem with both cameraControlSet (microphone permission) and mobileStartTrackingSensor (incomplete description of permission) for positioning, so I'm pretty sure the "App review Mafia" does not let go of something like this...
///Peter
/*Whats all the fuss with c# ?*/
-
- Livecode Staff Member
- Posts: 821
- Joined: Fri Feb 06, 2015 4:03 pm
Re: Problem with mergeAVCam
Hello all,
Two different reasons for rejection are discussed here:
1. Requesting privacy-related permissions (e.g. location, camera, microphone) with a "generic" description
2. Requesting permission for microphone without actually using it.
Issue 1 is worked around if you manually edit the plist and specify a "detailed" description string for the permission usage. For example change the generic "This app requires access to location" to "This app requires access to location to find restaurants nearby"
Issue 2 affects mergAV camera and cameraControl*.
For mergAV, the solution is to set the microphone to empty before creating the camera (see bug https://quality.livecode.com/show_bug.cgi?id=20900, which is now fixed)
For cameraControl, we are planning to implement a similar mechanism. See bug https://quality.livecode.com/show_bug.cgi?id=21438, not fixed yet).
@Mike
Yes the mic is no longer required for barcode scanning
@Peter
What version of LC are you using?
Could you post your script? Setting the mic to empty before creating the camera should not result in a dialog asking for microphone permission.
Best,
Panos
--
Two different reasons for rejection are discussed here:
1. Requesting privacy-related permissions (e.g. location, camera, microphone) with a "generic" description
2. Requesting permission for microphone without actually using it.
Issue 1 is worked around if you manually edit the plist and specify a "detailed" description string for the permission usage. For example change the generic "This app requires access to location" to "This app requires access to location to find restaurants nearby"
Issue 2 affects mergAV camera and cameraControl*.
For mergAV, the solution is to set the microphone to empty before creating the camera (see bug https://quality.livecode.com/show_bug.cgi?id=20900, which is now fixed)
For cameraControl, we are planning to implement a similar mechanism. See bug https://quality.livecode.com/show_bug.cgi?id=21438, not fixed yet).
@Mike
Yes the mic is no longer required for barcode scanning
@Peter
What version of LC are you using?
Could you post your script? Setting the mic to empty before creating the camera should not result in a dialog asking for microphone permission.
Best,
Panos
--
Re: Problem with mergeAVCam
Nice, Panos, thanks for all the detail.
-
- Posts: 136
- Joined: Fri Oct 14, 2011 6:53 am
Re: Problem with mergeAVCam
Panos,
LC Business 9.0.1
I uninstalled the app and tried over and over again with small changes in between, and suddenly the app did not ask for microphone permission. The only thing I changed is the order of the different "mergAVCamSet".
This is the code that now works!
///Peter
LC Business 9.0.1
I uninstalled the app and tried over and over again with small changes in between, and suddenly the app did not ask for microphone permission. The only thing I changed is the order of the different "mergAVCamSet".
This is the code that now works!
Code: Select all
on openCard
if the platform is "iphone"
then
mergAVRequestMediaAccess "video"
mergAVCamSet "microphone", empty
mergAVCamSet "rect",the rect of grc "QR" of this cd
mergAVCamCreate
mergAVCamSet "visible","false"
mergAVCamSet "high"
end if
end openCard
///Peter
/*Whats all the fuss with c# ?*/
Re: Problem with mergeAVCam
I assume the problem with iOS and cameraControl is that the current LC syntax does not provide a way to indicate whether audio is desired or not to the engine before the control is created, and therefore the control gets created by the engine (which includes ability to record audio) causing an insta-ask by iOS for microphone access.
If this is true, and there is no workaround via plist hacking, then wouldn't a true/false as a 2nd parameter to cameraControlCreate, specifying whether audio will be needed or not, give the engine the info it needs upfront when creating the control to either create it WITH audio capability or create the object without audio from the git-go, so that the permission is never triggered if not needed.....or does the underlying iOS api not work in that way? ...and/or is that too much of a bandaid type fix for this problem from LC's point of view.....?
I only ask because at the moment, any iOS app that uses cameraControl without needing audio (such as a stills-only camera app) will get rejected from the store due to the app asking for a permission that it does not really need......of which, of course, is the category that my app falls into
EDIT: *OR* is it simply a matter of manually editing the Info.plist to remove the permission for "microphone"? If so, do I build with LC, then manually edit the Info.plist in the generated .app bundle?
If this is true, and there is no workaround via plist hacking, then wouldn't a true/false as a 2nd parameter to cameraControlCreate, specifying whether audio will be needed or not, give the engine the info it needs upfront when creating the control to either create it WITH audio capability or create the object without audio from the git-go, so that the permission is never triggered if not needed.....or does the underlying iOS api not work in that way? ...and/or is that too much of a bandaid type fix for this problem from LC's point of view.....?
I only ask because at the moment, any iOS app that uses cameraControl without needing audio (such as a stills-only camera app) will get rejected from the store due to the app asking for a permission that it does not really need......of which, of course, is the category that my app falls into
EDIT: *OR* is it simply a matter of manually editing the Info.plist to remove the permission for "microphone"? If so, do I build with LC, then manually edit the Info.plist in the generated .app bundle?