FTP file upload with non-ascii characters in filename

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

FTP file upload with non-ascii characters in filename

Alejandro Tejada via use-livecode
Hi,

i need to upload files with non-ascii characters in the filename and this has to work on Win and Mac OS X.
 
My script works fine when uploading files with ascii filenames, but as soon as i select a file with non-ascii characters in its filename i get an error

What do i have to do with the filenames/filepath (target and source) before doing the upload?

My script looks like this:

answer tFile "select file..."
if it is empty then exit to top
put it into tFilePath
replace backslash with slash in tFilePath
set the itemdelimiter to slash
put item -1 of tFilePath into tFile
replace " " with "_" in tFile
put "ftp://username:[hidden email]/ <ftp://username:[hidden email]/>"& tFile into tURL
liburlftpupload tFilePath,tURL

I´ve tried to urlencode tDatei.


I am pretty sure there is something more.

Regards,

Matthias
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FTP file upload with non-ascii characters in filename

Alejandro Tejada via use-livecode
Hi

First I am not sure why your code replaces spaces with underscores in tFile.

Next I have an application that displays lists of filenames in a folder.  The user clicks on a filename and it is displayed in a browser object on the card.  In order to get this to work I had to convert the displayed and selected file name to one that the OS actually uses at a lower level by using these lines of code:

put GetSourcefolder() & "/" & tFilename into tMyFilePath

replace " " with "%20" in tMyFilePath

replace "|" with "%7C" in tMyFilePath


I make no claims that the problem is restricted to these two characters but this might be a starting point.  Also different OS’s have different rules on the characters used in file names, so you need to account for the OS the server is running and google for character substitutions used in file names.

Skids


> On 28 Feb 2017, at 08:23, Matthias Rebbe via use-livecode <[hidden email]> wrote:
>
> Hi,
>
> i need to upload files with non-ascii characters in the filename and this has to work on Win and Mac OS X.
>
> My script works fine when uploading files with ascii filenames, but as soon as i select a file with non-ascii characters in its filename i get an error
>
> What do i have to do with the filenames/filepath (target and source) before doing the upload?
>
> My script looks like this:
>
> answer tFile "select file..."
> if it is empty then exit to top
> put it into tFilePath
> replace backslash with slash in tFilePath
> set the itemdelimiter to slash
> put item -1 of tFilePath into tFile
> replace " " with "_" in tFile
> put "ftp://username:[hidden email]/ <ftp://username:[hidden email]/>"& tFile into tURL
> liburlftpupload tFilePath,tURL
>
> I´ve tried to urlencode tDatei.
>
>
> I am pretty sure there is something more.
>
> Regards,
>
> Matthias
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FTP file upload with non-ascii characters in filename

Alejandro Tejada via use-livecode
Thanks Simon, but this does not fix the problem.
> Am 28.02.2017 um 10:59 schrieb Simon Knight via use-livecode <[hidden email] <mailto:[hidden email]>>:
>
> Hi
>
> First I am not sure why your code replaces spaces with underscores in tFile.
>
Because i do not like spaces in URLs. I know, that i could replace it with %20, but i prefer “_” instead.

Regards,
Matthias

> Next I have an application that displays lists of filenames in a folder.  The user clicks on a filename and it is displayed in a browser object on the card.  In order to get this to work I had to convert the displayed and selected file name to one that the OS actually uses at a lower level by using these lines of code:
>
> put GetSourcefolder() & "/" & tFilename into tMyFilePath
>
> replace " " with "%20" in tMyFilePath
>
> replace "|" with "%7C" in tMyFilePath
>
>
> I make no claims that the problem is restricted to these two characters but this might be a starting point.  Also different OS’s have different rules on the characters used in file names, so you need to account for the OS the server is running and google for character substitutions used in file names.
>
> Skids
>
>
>> On 28 Feb 2017, at 08:23, Matthias Rebbe via use-livecode <[hidden email] <mailto:[hidden email]>> wrote:
>>
>> Hi,
>>
>> i need to upload files with non-ascii characters in the filename and this has to work on Win and Mac OS X.
>>
>> My script works fine when uploading files with ascii filenames, but as soon as i select a file with non-ascii characters in its filename i get an error
>>
>> What do i have to do with the filenames/filepath (target and source) before doing the upload?
>>
>> My script looks like this:
>>
>> answer tFile "select file..."
>> if it is empty then exit to top
>> put it into tFilePath
>> replace backslash with slash in tFilePath
>> set the itemdelimiter to slash
>> put item -1 of tFilePath into tFile
>> replace " " with "_" in tFile
>> put "ftp://username:[hidden email]/ <ftp://username:[hidden email]/> <ftp://username:[hidden email]/ <ftp://username:[hidden email]/>>"& tFile into tURL
>> liburlftpupload tFilePath,tURL
>>
>> I´ve tried to urlencode tDatei.
>>
>>
>> I am pretty sure there is something more.
>>
>> Regards,
>>
>> Matthias
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email] <mailto:[hidden email]>
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email] <mailto:[hidden email]>
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>


Matthias Rebbe
Bramkampsieke 13
32312 Lübbecke
Tel +49 5741 310000
    +49 160 5504462
Fax: +49 5741 310002
eMail: [hidden email] <mailto:[hidden email]>

BR5 Konverter - BR5 -> MP3 <http://matthiasrebbe.eu/portfolio/produkte/brx/>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FTP file upload with non-ascii characters in filename

Alejandro Tejada via use-livecode
On Tue, Feb 28, 2017 at 4:07 AM, Matthias Rebbe via use-livecode <
[hidden email]> wrote:

> Because i do not like spaces in URLs. I know, that i could replace it with
> %20, but i prefer “_” instead.
>

I live by the adage that *any* punctuation in a filename other than space
or underscore is borrowing trouble.


--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FTP file upload with non-ascii characters in filename

Alejandro Tejada via use-livecode
In reply to this post by Alejandro Tejada via use-livecode
Is the need because the files already exist, or is it because you cannot control the source of the files? If possible, the files should probably be renamed on the other end to make them "compatible" with all file systems. If not, then maybe urlEncode/urlDecode or the ISO functions may work for you.

Bob S


> On Feb 28, 2017, at 24:23 , Matthias Rebbe via use-livecode <[hidden email]> wrote:
>
> Hi,
>
> i need to upload files with non-ascii characters in the filename and this has to work on Win and Mac OS X.
>
> <snip>
>
> Regards,
>
> Matthias
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FTP file upload with non-ascii characters in filename

Alejandro Tejada via use-livecode

> Am 28.02.2017 um 16:36 schrieb Bob Sneidar via use-livecode <[hidden email] <mailto:[hidden email]>>:
>
> Is the need because the files already exist, or is it because you cannot control the source of the files? If possible, the files should probably be renamed on the other end to make them "compatible" with all file systems. If not, then maybe urlEncode/urlDecode or the ISO functions may work for you.
>

Thanks Bob. That´s what i am doing right now.

As i cannot guarantee that my customer won´t use such filenames, i will implement a function that removes and replaces all characters that are non-ascii.

Although, i am wondering how ftp clients like transmit are able to handle such non-ascii characters. Anyway.

Regards,

Matthias

> Bob S
>
>
>> On Feb 28, 2017, at 24:23 , Matthias Rebbe via use-livecode <[hidden email] <mailto:[hidden email]>> wrote:
>>
>> Hi,
>>
>> i need to upload files with non-ascii characters in the filename and this has to work on Win and Mac OS X.
>>
>> <snip>
>>
>> Regards,
>>
>> Matthias
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email] <mailto:[hidden email]>
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email] <mailto:[hidden email]>
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>



Matthias Rebbe
Bramkampsieke 13
32312 Lübbecke
Tel +49 5741 310000
    +49 160 5504462
Fax: +49 5741 310002
eMail: [hidden email] <mailto:[hidden email]>

BR5 Konverter - BR5 -> MP3 <http://matthiasrebbe.eu/portfolio/produkte/brx/>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FTP file upload with non-ascii characters in filename

Alejandro Tejada via use-livecode
Maybe textDecode(filename) would work.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



On February 28, 2017 10:01:47 AM Matthias Rebbe via use-livecode
<[hidden email]> wrote:

>
>> Am 28.02.2017 um 16:36 schrieb Bob Sneidar via use-livecode
>> <[hidden email] <mailto:[hidden email]>>:
>>
>> Is the need because the files already exist, or is it because you cannot
>> control the source of the files? If possible, the files should probably be
>> renamed on the other end to make them "compatible" with all file systems.
>> If not, then maybe urlEncode/urlDecode or the ISO functions may work for you.
>>
>
> Thanks Bob. That´s what i am doing right now.
>
> As i cannot guarantee that my customer won´t use such filenames, i will
> implement a function that removes and replaces all characters that are
> non-ascii.
>
> Although, i am wondering how ftp clients like transmit are able to handle
> such non-ascii characters. Anyway.
>
> Regards,
>
> Matthias
>
>> Bob S
>>
>>
>>> On Feb 28, 2017, at 24:23 , Matthias Rebbe via use-livecode
>>> <[hidden email] <mailto:[hidden email]>> wrote:
>>>
>>> Hi,
>>>
>>> i need to upload files with non-ascii characters in the filename and this
>>> has to work on Win and Mac OS X.
>>>
>>> <snip>
>>>
>>> Regards,
>>>
>>> Matthias
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email] <mailto:[hidden email]>
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode 
>>> <http://lists.runrev.com/mailman/listinfo/use-livecode>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email] <mailto:[hidden email]>
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode 
>> <http://lists.runrev.com/mailman/listinfo/use-livecode>
>
>
>
> Matthias Rebbe
> Bramkampsieke 13
> 32312 Lübbecke
> Tel +49 5741 310000
>     +49 160 5504462
> Fax: +49 5741 310002
> eMail: [hidden email] <mailto:[hidden email]>
>
> BR5 Konverter - BR5 -> MP3 <http://matthiasrebbe.eu/portfolio/produkte/brx/>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FTP file upload with non-ascii characters in filename

Alejandro Tejada via use-livecode

It seems it´s not a problem with non-ascii in general.

If i first put the content of the file, which i want to upload and which contains non-ascii chars in its filename,
into a variable and urlencode the filename of the target file, then i am able to upload the file using "liburlftpupload tData, tTargetURL" without problems.

But if i use "liburlftpfileupload tSourceFilePath, tTargetURL” to upload the same file using source file path and target URL, then i get an error.
It works with files wihtout non-ascii chars in their filenames.

Is it possible that there is a problem with libURL and non-ascii filenames?

Regards,
Matthias


> Am 28.02.2017 um 17:14 schrieb J. Landman Gay via use-livecode <[hidden email] <mailto:[hidden email]>>:
>
> Maybe textDecode(filename) would work.
>
> --
> Jacqueline Landman Gay         |     [hidden email] <mailto:[hidden email]>
> HyperActive Software           |     http://www.hyperactivesw.com <http://www.hyperactivesw.com/>
>
>
>
> On February 28, 2017 10:01:47 AM Matthias Rebbe via use-livecode <[hidden email] <mailto:[hidden email]>> wrote:
>
>>
>>> Am 28.02.2017 um 16:36 schrieb Bob Sneidar via use-livecode <[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>>:
>>>
>>> Is the need because the files already exist, or is it because you cannot control the source of the files? If possible, the files should probably be renamed on the other end to make them "compatible" with all file systems. If not, then maybe urlEncode/urlDecode or the ISO functions may work for you.
>>>
>>
>> Thanks Bob. That´s what i am doing right now.
>>
>> As i cannot guarantee that my customer won´t use such filenames, i will implement a function that removes and replaces all characters that are non-ascii.
>>
>> Although, i am wondering how ftp clients like transmit are able to handle such non-ascii characters. Anyway.
>>
>> Regards,
>>
>> Matthias
>>
>>> Bob S
>>>
>>>
>>>> On Feb 28, 2017, at 24:23 , Matthias Rebbe via use-livecode <[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> i need to upload files with non-ascii characters in the filename and this has to work on Win and Mac OS X.
>>>>
>>>> <snip>
>>>>
>>>> Regards,
>>>>
>>>> Matthias
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> [hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>
>>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode> <http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>>
>>>
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode> <http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>>
>>
>>
>>
>> Matthias Rebbe
>> Bramkampsieke 13
>> 32312 Lübbecke
>> Tel +49 5741 310000
>>     +49 160 5504462
>> Fax: +49 5741 310002
>> eMail: [hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>
>>
>> BR5 Konverter - BR5 -> MP3 <http://matthiasrebbe.eu/portfolio/produkte/brx/ <http://matthiasrebbe.eu/portfolio/produkte/brx/>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email] <mailto:[hidden email]>
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email] <mailto:[hidden email]>
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FTP file upload with non-ascii characters in filename

Alejandro Tejada via use-livecode
My problem is solved now.

I found out that
1. it works w/o problems under Windows
2. it works under Mac OS X if i unload/disable tsNET

So i contacted Charles Warwick. This is his answer
—>
"OS X / Linux filesystems are all UTF-8, so you need to convert the filename to UTF-8 format before calling libUrlFtpUploadFile.
Try changing the end of your mouseUp handler to look like this:

...
        libURLSetStatusCallback "uploadProgress", the long ID of me
        put textencode(tSourceFile, "UTF-8") into tSourceFile
        liburlftpuploadfile tSourceFile,tURL ,”uploadComplete"
...

Let me know if that resolves your issue or not.  It seemed to fix the issue on my Mac.
If it does - since this seems to only be an issue with tsNet loaded - I will modify the libUrl wrapper for tsNet so it automatically does that conversion on those platforms in the next LC version to keep compatibility with those not using tsNet.”
<—


I´ve added now a switch that  textencodes the source file if the OS is MacOS or Linux. And now it works perfectly.

I know, i know...
Jacqueline already suggested to use textEncode. I did, but for the target file. ;)
I´ve never  have assumed that i have to do it with the source file.

Regards,

Matthias



> Am 28.02.2017 um 18:10 schrieb Matthias Rebbe via use-livecode <[hidden email] <mailto:[hidden email]>>:
>
>
> It seems it´s not a problem with non-ascii in general.
>
> If i first put the content of the file, which i want to upload and which contains non-ascii chars in its filename,
> into a variable and urlencode the filename of the target file, then i am able to upload the file using "liburlftpupload tData, tTargetURL" without problems.
>
> But if i use "liburlftpfileupload tSourceFilePath, tTargetURL” to upload the same file using source file path and target URL, then i get an error.
> It works with files wihtout non-ascii chars in their filenames.
>
> Is it possible that there is a problem with libURL and non-ascii filenames?
>
> Regards,
> Matthias
>
>
>> Am 28.02.2017 um 17:14 schrieb J. Landman Gay via use-livecode <[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>>:
>>
>> Maybe textDecode(filename) would work.
>>
>> --
>> Jacqueline Landman Gay         |     [hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>
>> HyperActive Software           |     http://www.hyperactivesw.com <http://www.hyperactivesw.com/> <http://www.hyperactivesw.com/ <http://www.hyperactivesw.com/>>
>>
>>
>>
>> On February 28, 2017 10:01:47 AM Matthias Rebbe via use-livecode <[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
>>
>>>
>>>> Am 28.02.2017 um 16:36 schrieb Bob Sneidar via use-livecode <[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>> <mailto:[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>>>:
>>>>
>>>> Is the need because the files already exist, or is it because you cannot control the source of the files? If possible, the files should probably be renamed on the other end to make them "compatible" with all file systems. If not, then maybe urlEncode/urlDecode or the ISO functions may work for you.
>>>>
>>>
>>> Thanks Bob. That´s what i am doing right now.
>>>
>>> As i cannot guarantee that my customer won´t use such filenames, i will implement a function that removes and replaces all characters that are non-ascii.
>>>
>>> Although, i am wondering how ftp clients like transmit are able to handle such non-ascii characters. Anyway.
>>>
>>> Regards,
>>>
>>> Matthias
>>>
>>>> Bob S
>>>>
>>>>
>>>>> On Feb 28, 2017, at 24:23 , Matthias Rebbe via use-livecode <[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>> <mailto:[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> i need to upload files with non-ascii characters in the filename and this has to work on Win and Mac OS X.
>>>>>
>>>>> <snip>
>>>>>
>>>>> Regards,
>>>>>
>>>>> Matthias
>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> [hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>> <mailto:[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>>
>>>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode> <http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>> <http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode> <http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> [hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>> <mailto:[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>>
>>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode> <http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>> <http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode> <http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>>>
>>>
>>>
>>>
>>> Matthias Rebbe
>>> Bramkampsieke 13
>>> 32312 Lübbecke
>>> Tel +49 5741 310000
>>>   +49 160 5504462
>>> Fax: +49 5741 310002
>>> eMail: [hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>> <mailto:[hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>>
>>>
>>> BR5 Konverter - BR5 -> MP3 <http://matthiasrebbe.eu/portfolio/produkte/brx/ <http://matthiasrebbe.eu/portfolio/produkte/brx/> <http://matthiasrebbe.eu/portfolio/produkte/brx/ <http://matthiasrebbe.eu/portfolio/produkte/brx/>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email] <mailto:[hidden email]> <mailto:[hidden email] <mailto:[hidden email]>>
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode <http://lists.runrev.com/mailman/listinfo/use-livecode>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email] <mailto:[hidden email]>
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

iOS app rejected five times because of background audio setting

Alejandro Tejada via use-livecode
In reply to this post by Alejandro Tejada via use-livecode
I have gone back and forth with Apple five times in an attempt to get
this setting correct. I made the mistake originally of enabling the
background audio option in the iOS standalone settings area. I was
trying to prevent the app from exiting when the user switched to a
different app. I know that this setting solves that issue, but it also
caused Apple to reject my app because I was not including any background
audio.

I have since realized that the correct way to deal with this is to
modify the "exit on suspend" clause in the livecodescript file. But
after creating a new standalone and submitting it to Apple, they keep
telling me I am still referencing the backgroundaudio option. I tried
making changes to the info.plist and settings.plist files, but I can't
seem to get this right.

I just downloaded a fresh copy of LC 9.0 and created a new standalone.
When I look at the info.plist file in the standalone, this is what I find:

<key>UIBackgroundModes</key>
     <array>

     </array>


Is this correct? Is this the way the code should read when the
background audio option is not being used?

Thanks for any help with this,
Richard Miller
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: iOS app rejected five times because of background audio setting

Alejandro Tejada via use-livecode
Richard,

Been down this road. Ticking the "Background Audio" option sets
UIBackgroundModes key to "audio" as well as setting
UIApplicationExitsOnSuspend=False to keep you app active. If you are not
actually playing background audio then you will get rejected. The way to do
this is to edit the app.

1) In Tools/Runtime/iOS... set all the folders to read/write.
2) Edit the setting.plist in each of the folders and change
UIApplicationExitsOnSuspend key value to "False" (or like I do...delete the
key all together)

That's it! Apple will not complain. If you need to have some apps with it on
and some with it off then make a copy of the app and change the
setting.plist's in the copy.

I only change the devices(only 2) and leave the simulators as is (I have 5
of them). If I want to test this behavior I just put the app on a device.

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]


-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf
Of Richard Miller via use-livecode
Sent: Monday, April 03, 2017 3:52 PM
To: How to use LiveCode
Cc: Richard Miller
Subject: iOS app rejected five times because of background audio setting

I have gone back and forth with Apple five times in an attempt to get this
setting correct. I made the mistake originally of enabling the background
audio option in the iOS standalone settings area. I was trying to prevent
the app from exiting when the user switched to a different app. I know that
this setting solves that issue, but it also caused Apple to reject my app
because I was not including any background audio.

I have since realized that the correct way to deal with this is to modify
the "exit on suspend" clause in the livecodescript file. But after creating
a new standalone and submitting it to Apple, they keep telling me I am still
referencing the backgroundaudio option. I tried making changes to the
info.plist and settings.plist files, but I can't seem to get this right.

I just downloaded a fresh copy of LC 9.0 and created a new standalone.
When I look at the info.plist file in the standalone, this is what I find:

<key>UIBackgroundModes</key>
     <array>

     </array>


Is this correct? Is this the way the code should read when the background
audio option is not being used?

Thanks for any help with this,
Richard Miller
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: iOS app rejected five times because of background audio setting

Alejandro Tejada via use-livecode
In reply to this post by Alejandro Tejada via use-livecode
After reading closer:
1) Make sure that the "Background Audio" is un-ticked.
2) Do the "plist hack" as enumerated in my last email.
3) This is all I do and have never been rejected for the "Background Audio"
issue.
4) I have never tried to submit to the store with v9. This might be a v9
issue.

<key>UIBackgroundModes</key>
     <array>

     </array>

Seems to be correct.

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]


-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf
Of Richard Miller via use-livecode
Sent: Monday, April 03, 2017 3:52 PM
To: How to use LiveCode
Cc: Richard Miller
Subject: iOS app rejected five times because of background audio setting

I have gone back and forth with Apple five times in an attempt to get this
setting correct. I made the mistake originally of enabling the background
audio option in the iOS standalone settings area. I was trying to prevent
the app from exiting when the user switched to a different app. I know that
this setting solves that issue, but it also caused Apple to reject my app
because I was not including any background audio.

I have since realized that the correct way to deal with this is to modify
the "exit on suspend" clause in the livecodescript file. But after creating
a new standalone and submitting it to Apple, they keep telling me I am still
referencing the backgroundaudio option. I tried making changes to the
info.plist and settings.plist files, but I can't seem to get this right.

I just downloaded a fresh copy of LC 9.0 and created a new standalone.
When I look at the info.plist file in the standalone, this is what I find:

<key>UIBackgroundModes</key>
     <array>

     </array>


Is this correct? Is this the way the code should read when the background
audio option is not being used?

Thanks for any help with this,
Richard Miller
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: iOS app rejected five times because of background audio setting

Alejandro Tejada via use-livecode
Thanks for the info, Ralph. I had figured out the exit-on-suspend issue previously. In my last app submission, I completely removed the entire section in the info.plist file which referenced UIBackgroundModes, but they still rejected it on the same claim that background audio was enabled. This tells me one of two things: there is some other file in the standalone that is referencing this function, or, by completely removing it from info.plist, this effectively defaults to enabling that function.

I am hoping that the precise code I included in my previous email is the correct way to disable background audio in info.plist, and that there is no other file other than the info.plist that needs to be addressed.

Richard


Sent from my iPhone

> On Apr 3, 2017, at 5:03 PM, Ralph DiMola <[hidden email]> wrote:
>
> After reading closer:
> 1) Make sure that the "Background Audio" is un-ticked.
> 2) Do the "plist hack" as enumerated in my last email.
> 3) This is all I do and have never been rejected for the "Background Audio"
> issue.
> 4) I have never tried to submit to the store with v9. This might be a v9
> issue.
>
> <key>UIBackgroundModes</key>
>     <array>
>
>     </array>
>
> Seems to be correct.
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> [hidden email]
>
>
> -----Original Message-----
> From: use-livecode [mailto:[hidden email]] On Behalf
> Of Richard Miller via use-livecode
> Sent: Monday, April 03, 2017 3:52 PM
> To: How to use LiveCode
> Cc: Richard Miller
> Subject: iOS app rejected five times because of background audio setting
>
> I have gone back and forth with Apple five times in an attempt to get this
> setting correct. I made the mistake originally of enabling the background
> audio option in the iOS standalone settings area. I was trying to prevent
> the app from exiting when the user switched to a different app. I know that
> this setting solves that issue, but it also caused Apple to reject my app
> because I was not including any background audio.
>
> I have since realized that the correct way to deal with this is to modify
> the "exit on suspend" clause in the livecodescript file. But after creating
> a new standalone and submitting it to Apple, they keep telling me I am still
> referencing the backgroundaudio option. I tried making changes to the
> info.plist and settings.plist files, but I can't seem to get this right.
>
> I just downloaded a fresh copy of LC 9.0 and created a new standalone.
> When I look at the info.plist file in the standalone, this is what I find:
>
> <key>UIBackgroundModes</key>
>     <array>
>
>     </array>
>
>
> Is this correct? Is this the way the code should read when the background
> audio option is not being used?
>
> Thanks for any help with this,
> Richard Miller
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: iOS app rejected five times because of background audio setting

Alejandro Tejada via use-livecode
I just looked at the info.plist from my last app that Apple approved.

1) The UIApplicationExitsOnSuspend key is not there.
2) the UIBackgroundModes key looks like what you see.
<key>UIBackgroundModes</key>
     <array>
 
     </array>

What does your info.plist in the app look like?

OPTION 2: You bumped up against an less than expert reviewer. If your plist
looks correct then challenge them. I have done that in the past when I was
sure they were wrong and they acquiesced. If that does not work then go to
arbitration.

I feel your pain... Let us know how it ends.

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]


-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf
Of Richard Miller via use-livecode
Sent: Monday, April 03, 2017 5:31 PM
To: [hidden email]
Cc: Richard Miller
Subject: Re: iOS app rejected five times because of background audio setting

Thanks for the info, Ralph. I had figured out the exit-on-suspend issue
previously. In my last app submission, I completely removed the entire
section in the info.plist file which referenced UIBackgroundModes, but they
still rejected it on the same claim that background audio was enabled. This
tells me one of two things: there is some other file in the standalone that
is referencing this function, or, by completely removing it from info.plist,
this effectively defaults to enabling that function.

I am hoping that the precise code I included in my previous email is the
correct way to disable background audio in info.plist, and that there is no
other file other than the info.plist that needs to be addressed.

Richard


Sent from my iPhone

> On Apr 3, 2017, at 5:03 PM, Ralph DiMola <[hidden email]>
wrote:
>
> After reading closer:
> 1) Make sure that the "Background Audio" is un-ticked.
> 2) Do the "plist hack" as enumerated in my last email.
> 3) This is all I do and have never been rejected for the "Background
Audio"

> issue.
> 4) I have never tried to submit to the store with v9. This might be a
> v9 issue.
>
> <key>UIBackgroundModes</key>
>     <array>
>
>     </array>
>
> Seems to be correct.
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> [hidden email]
>
>
> -----Original Message-----
> From: use-livecode [mailto:[hidden email]] On
> Behalf Of Richard Miller via use-livecode
> Sent: Monday, April 03, 2017 3:52 PM
> To: How to use LiveCode
> Cc: Richard Miller
> Subject: iOS app rejected five times because of background audio
> setting
>
> I have gone back and forth with Apple five times in an attempt to get
> this setting correct. I made the mistake originally of enabling the
> background audio option in the iOS standalone settings area. I was
> trying to prevent the app from exiting when the user switched to a
> different app. I know that this setting solves that issue, but it also
> caused Apple to reject my app because I was not including any background
audio.
>
> I have since realized that the correct way to deal with this is to
> modify the "exit on suspend" clause in the livecodescript file. But
> after creating a new standalone and submitting it to Apple, they keep
> telling me I am still referencing the backgroundaudio option. I tried
> making changes to the info.plist and settings.plist files, but I can't
seem to get this right.

>
> I just downloaded a fresh copy of LC 9.0 and created a new standalone.
> When I look at the info.plist file in the standalone, this is what I find:
>
> <key>UIBackgroundModes</key>
>     <array>
>
>     </array>
>
>
> Is this correct? Is this the way the code should read when the
> background audio option is not being used?
>
> Thanks for any help with this,
> Richard Miller
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: iOS app rejected five times because of background audio setting

Alejandro Tejada via use-livecode
Apple just rejected my app again, for the same reason, complaining that
my code regarding background audio Is incorrect, even though it is
identical to yours. This time, I have challenged them to discuss this
issue on the phone.


On 4/3/17 5:51 PM, Ralph DiMola wrote:

> I just looked at the info.plist from my last app that Apple approved.
>
> 1) The UIApplicationExitsOnSuspend key is not there.
> 2) the UIBackgroundModes key looks like what you see.
> <key>UIBackgroundModes</key>
>       <array>
>  
>       </array>
>
> What does your info.plist in the app look like?
>
> OPTION 2: You bumped up against an less than expert reviewer. If your plist
> looks correct then challenge them. I have done that in the past when I was
> sure they were wrong and they acquiesced. If that does not work then go to
> arbitration.
>
> I feel your pain... Let us know how it ends.
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> [hidden email]
>
>
> -----Original Message-----
> From: use-livecode [mailto:[hidden email]] On Behalf
> Of Richard Miller via use-livecode
> Sent: Monday, April 03, 2017 5:31 PM
> To: [hidden email]
> Cc: Richard Miller
> Subject: Re: iOS app rejected five times because of background audio setting
>
> Thanks for the info, Ralph. I had figured out the exit-on-suspend issue
> previously. In my last app submission, I completely removed the entire
> section in the info.plist file which referenced UIBackgroundModes, but they
> still rejected it on the same claim that background audio was enabled. This
> tells me one of two things: there is some other file in the standalone that
> is referencing this function, or, by completely removing it from info.plist,
> this effectively defaults to enabling that function.
>
> I am hoping that the precise code I included in my previous email is the
> correct way to disable background audio in info.plist, and that there is no
> other file other than the info.plist that needs to be addressed.
>
> Richard
>
>
> Sent from my iPhone
>
>> On Apr 3, 2017, at 5:03 PM, Ralph DiMola <[hidden email]>
> wrote:
>> After reading closer:
>> 1) Make sure that the "Background Audio" is un-ticked.
>> 2) Do the "plist hack" as enumerated in my last email.
>> 3) This is all I do and have never been rejected for the "Background
> Audio"
>> issue.
>> 4) I have never tried to submit to the store with v9. This might be a
>> v9 issue.
>>
>> <key>UIBackgroundModes</key>
>>      <array>
>>
>>      </array>
>>
>> Seems to be correct.
>>
>> Ralph DiMola
>> IT Director
>> Evergreen Information Services
>> [hidden email]
>>
>>
>> -----Original Message-----
>> From: use-livecode [mailto:[hidden email]] On
>> Behalf Of Richard Miller via use-livecode
>> Sent: Monday, April 03, 2017 3:52 PM
>> To: How to use LiveCode
>> Cc: Richard Miller
>> Subject: iOS app rejected five times because of background audio
>> setting
>>
>> I have gone back and forth with Apple five times in an attempt to get
>> this setting correct. I made the mistake originally of enabling the
>> background audio option in the iOS standalone settings area. I was
>> trying to prevent the app from exiting when the user switched to a
>> different app. I know that this setting solves that issue, but it also
>> caused Apple to reject my app because I was not including any background
> audio.
>> I have since realized that the correct way to deal with this is to
>> modify the "exit on suspend" clause in the livecodescript file. But
>> after creating a new standalone and submitting it to Apple, they keep
>> telling me I am still referencing the backgroundaudio option. I tried
>> making changes to the info.plist and settings.plist files, but I can't
> seem to get this right.
>> I just downloaded a fresh copy of LC 9.0 and created a new standalone.
>> When I look at the info.plist file in the standalone, this is what I find:
>>
>> <key>UIBackgroundModes</key>
>>      <array>
>>
>>      </array>
>>
>>
>> Is this correct? Is this the way the code should read when the
>> background audio option is not being used?
>>
>> Thanks for any help with this,
>> Richard Miller
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...