Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

iOS and MacOS / agk::GetFirstFile() and agk::GetNextFile() not work for iOS

Author
Message
Commandor
13
Years of Service
User Offline
Joined: 25th Jan 2011
Location: Kiev, Ukraine
Posted: 7th Oct 2012 10:56 Edited at: 7th Oct 2012 15:13
Why agk::GetFirstFile() and agk::GetNextFile() work under Windows, but under iOS do not work?



Life is our game, playing we live!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Oct 2012 18:10
What folder name are you passing in? And does it start with a '/' or not?

Cheers,
Ancient Lady
AGK Community Tester
Commandor
13
Years of Service
User Offline
Joined: 25th Jan 2011
Location: Kiev, Ukraine
Posted: 7th Oct 2012 18:14
example: "Data/Textures/Sprites/Start/3_yeti/"

Life is our game, playing we live!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Oct 2012 18:41
Okay, is that exact path and its files added in your Resources folder in your Xcode project? And I mean exactly with the same case.

If you don't start with a '/', I think the SetFolder command will attempt to set the folder relative to its current location. I could be wrong. I always use it to make sure that the path starts at the top of the app (either actual executable directory or the sandbox area).

Cheers,
Ancient Lady
AGK Community Tester
Commandor
13
Years of Service
User Offline
Joined: 25th Jan 2011
Location: Kiev, Ukraine
Posted: 7th Oct 2012 19:12
1) Directory "Data" in Resources folder.
2) "/Data/Textures/Sprites/Start/3_yeti/" - did not help.

Life is our game, playing we live!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Oct 2012 20:15
And all the subdirectories under Resources/Data appear with the same letter cases that you are using in your code?

What versions of Xcode and iOS are you working with?

I'll have to try a test from Xcode on Monday to see if I have the same issue.

Cheers,
Ancient Lady
AGK Community Tester
Commandor
13
Years of Service
User Offline
Joined: 25th Jan 2011
Location: Kiev, Ukraine
Posted: 7th Oct 2012 20:20
Quote: "And all the subdirectories under Resources/Data appear with the same letter cases that you are using in your code?"

yes


Quote: "What versions of Xcode and iOS are you working with?"

Xcode 4.4.1 & iOS 5.1
Xcode 4.5 - not work. Compile with errors all codes from AppGameKit and my code.

Life is our game, playing we live!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 7th Oct 2012 20:23
Okay, I'll try on Monday and see if I have the same issues. And, if so, I'll post it as an official bug.

Cheers,
Ancient Lady
AGK Community Tester
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 8th Oct 2012 21:37
This appears to be a very legitimate and serious bug!

If you pass in "" as the path, it will read the files in the executable directory. Anything else fails.

I tried with and without leading '/'. I tried using agk::SetCurrentDir instead of agk::SetFolder.

I will report it in the google list and set it as confirmed.

Cheers,
Ancient Lady
AGK Community Tester
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 17th Oct 2012 16:54
Commander, it turns out not to be a bug but a usage issue with Xcode.

Paul provided the solution. See his response in the google issue I posted.

It's such a simple and easy fix.

Cheers,
Ancient Lady
AGK Community Tester
Commandor
13
Years of Service
User Offline
Joined: 25th Jan 2011
Location: Kiev, Ukraine
Posted: 17th Oct 2012 18:28
Thank you.

Life is our game, playing we live!

Login to post a reply

Server time is: 2024-04-18 20:54:07
Your offset time is: 2024-04-18 20:54:07