GLBasic forum

Main forum => GLBasic - en => Topic started by: kaotiklabs on 2009-Nov-04

Title: Does shoebox works on iphone?
Post by: kaotiklabs on 2009-Nov-04
I know is not necessary a shoebox just for iphone but i´m building a multiplatform app.

So, does it work on iphone? And if it works...
Where do you have to put the file? I´ve tried in Media but paths seems wrong...
any got it working?
Title: Re: Does shoebox works on iphone?
Post by: kaotiklabs on 2009-Nov-04
Sorry, it was obvious...
setshoebox "Media/Media.sbx", "Media/Media.sbx"
And of course, sbx on the media folder

Works but it has some issues...
Sounds are not loading.
Title: Re: Does shoebox works on iphone?
Post by: Kitty Hello on 2009-Nov-06
Yikes. Thanks for mentioning.
Title: Re: Does shoebox works on iphone?
Post by: Ian Price on 2009-Nov-06
I mentioned sounds and music not playing from a shoebox over a year ago (for GP2X)... :(
Title: Re: Does shoebox works on iphone?
Post by: Kitty Hello on 2009-Nov-09
VEry very strange. Because I use the same code for images as for sounds ... Sigh.
Title: Re: Does shoebox works on iphone?
Post by: Crivens on 2011-Mar-04
Did anything ever happen with this? It works fine for me on the iPhone for image files, but wav files just don't work. Isn't the end of the world as can keep wav files seperate, but would be nice if all in one single archive.

Cheers
Title: Re: Does shoebox works on iphone?
Post by: aonyn on 2011-Mar-05
I have used shoebox on the iPhone, but only for unreleased projects for the sake of trying it, I am wary about using it for an app I release on the appstore.

Reason is, I am unsure, but I think being a US citizen, it is illegal to release anything encrypted for export, which is not pre approved by NSA, and I think shoebox may fall in this category.
If anybody is clear on how this works, I would appreciate an explanation.
In the meantime, I am just avoiding shoeboxing my content, although I would prefer to use it if I knew I could legally.

Thanks,
Dave
Title: Re: Does shoebox works on iphone?
Post by: Ian Price on 2011-Mar-05
Shoebox does actually work on my iPod for sound and gfx. Shoeboxes aren't encrypted, they are just compressed, surely?
Title: Re: Does shoebox works on iphone?
Post by: Kitty Hello on 2011-Mar-07
Yes. Shoebox is not encrypted. But... why shoeboxing for iOS anyway? Because of crackers?
Title: Re: Does shoebox works on iphone?
Post by: Crivens on 2011-Mar-07
Just so no-one can use an iOS explorer (like I did the other day) to grab my media is all. Works fine, just not with wav files for me. Out of interest is there a way to list the items in a shoebox on a PC to make sure the files are in there? I mean what if the IDE tool to create the shoebox only looks for picture files? I have no way of really knowing if it picked them up or not.

Cheers
Title: Re: Does shoebox works on iphone?
Post by: Kitty Hello on 2011-Mar-07
Not really. :(
Title: Re: Does shoebox works on iphone?
Post by: aonyn on 2011-Mar-07
Thank you Ian and Gernot, for the explanation that shoebox is not encrypted, so I guess I am safe to use it.

And my reason is the same as Crivens, just to protect my content to some degree.
I am sure if someone wants it badly enough, they could figure out how to get it, as any lock mechanism.
But if I can at least make them work a bit harder for it, I will.

regards,
Dave
Title: Re: Does shoebox works on iphone?
Post by: Crivens on 2011-Mar-07
Yes exactly. It's better than nothing really. Its not exactly top priority to include wavs I just keep them separate currently, but would be nicer in one file.

Cheers
Title: Re: Does shoebox works on iphone?
Post by: Moebius on 2011-Mar-07
QuoteOut of interest is there a way to list the items in a shoebox on a PC to make sure the files are in there?
Actually, if you open the '.sbx' file with a text editor and scroll down to the end, the file names will be somewhere around the last few 'lines', seperated by a few bytes.  You might be able to display them with a program if you wanted to...  This doesn't really compromise the security though anyway - the way that the files are stored looks relatively complicated...
Title: Re: Does shoebox works on iphone?
Post by: Crivens on 2011-Mar-07
I'm assuming the files are just written straight to the file one after another and then the positions are stored at the end with their names (as you indicate). Pretty easy to extract if you really want to, and I even wrote my own routine in DB or Blitz years ago, but it's nice to keep things wrapped up in a package that GLB reads natively. Gives it a level of security as aonyn states that keeps your media out of the hand of most people, plus for me it makes it look a lot more professional in an iPhone explorer. Before using shoebox I had loads of media files on the iPhone. Doesn't look great if a user can find them all on the iPhone with a free bit of explorer software.

Cool, I will look tonight to see if I can see the filenames in the shoebox file.

Cheers
Title: Re: Does shoebox works on iphone?
Post by: ampos on 2011-Mar-07
Showbox has 2 params

Code (glbasic) Select
setshowbox "file-1.sbx","file-2.sbx"

File-1 is used for all but samples (notice that music is also in file-1.sbx) and "file-2.sbx" is used for nothing but soundfiles (wavefiles and so, music is on file-1.sbx)

I assumed as music was a sound it was in the 2nd file but no.
Title: Re: Does shoebox works on iphone?
Post by: Crivens on 2011-Mar-07
I use the same shoebox file for both. So something like this:-
Code (glbasic) Select
setshowbox "file-1.sbx","file-1.sbx"

Is that not a good idea and I should do the first for bitmaps, and the second for wavs only?

Cheers
Title: Re: Does shoebox works on iphone?
Post by: MrTAToad on 2011-Mar-07
Theoretically, it should be fine.
Title: Re: Does shoebox works on iphone?
Post by: hardyx on 2011-Mar-08
Quote from: aonyn on 2011-Mar-05
Reason is, I am unsure, but I think being a US citizen, it is illegal to release anything encrypted for export, which is not pre approved by NSA, and I think shoebox may fall in this category.
If anybody is clear on how this works, I would appreciate an explanation.
I think this norm applies to encryption software, not encrypted data.
Title: Re: Does shoebox works on iphone?
Post by: AlienMenace on 2011-Sep-06
So, did this ever get resolved? Still can't seem to play sound files on iOS from shoebox using Crivens idea of putting all media in single file and calling it twice... ? I have both .wav and .m4a files. Any ideas?

Thanks.
Title: Re: Does shoebox works on iphone?
Post by: Crivens on 2011-Sep-06
I think only the memory leak was fixed 

Cheers
Title: Re: Does shoebox works on iphone?
Post by: Kitty Hello on 2011-Sep-07
playmusic or loadsound?
Title: Re: Does shoebox works on iphone?
Post by: AlienMenace on 2011-Sep-14
Both.
Title: Re: Does shoebox works on iphone?
Post by: Kitty Hello on 2011-Sep-14
aw, bad. I need to fix that.
Title: Re: Does shoebox works on iphone?
Post by: AlienMenace on 2011-Sep-16
Please. Please. Please.
Title: Re: Does shoebox works on iphone?
Post by: AlienMenace on 2011-Sep-29
Any luck on this getting fixed?

Thanks.
Title: Re: Does shoebox works on iphone?
Post by: Kitty Hello on 2011-Sep-29
Yes, I have an idea - but it's quite some work. So sorry :(
There's not really a benefit from using shoebox on iOS, is there? I mean, the package is zipped in the end anyway.
Title: Re: Does shoebox works on iphone?
Post by: Crivens on 2011-Sep-29
If you use an iOS browser to search the device then you can dig all media out of the media directory. You can also get the shoebox, but at least your normal non-GLB user may have trouble extracting things from it (although it does look pretty simple to decode).

Cheers
Title: Re: Does shoebox works on iphone?
Post by: caffeinekid on 2011-Sep-29
incbin would solve all this too? ;)
Title: Re: Does shoebox works on iphone?
Post by: Kitty Hello on 2011-Sep-29
Yes. But this is even more complicated... Anyway - I put it on the todo.
Title: Re: Does shoebox works on iphone?
Post by: AlienMenace on 2011-Sep-30
If you look in your iTunes, mobile applications folder there are ipa files stored there from syncing. If you rename one of these files to .zip, you can extract the media to your hard drive and access whatever is there. My particular concern is sound effects and music that I have licensed from a third party and just leaving them hanging out there for people to steal. As Crivens said, it's not bulletproof security but at least it provides some level of protection. If there is a better option or a third-party solution out there that works with GLB, I'd certainly be game to try that.

Thanks.