Splashstack and datastack for iPhone

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Splashstack and datastack for iPhone

Post by bn » Wed Mar 02, 2011 10:49 pm

Hi Danny,
code, but when I tried it in my game, on my iPod, it didn't save. I have a button that has the same code and when I press it I can quit, come back, and it saves the stack. I'm not sure why this is going on. Does shutDown run when I quit the game or another time.
actually I only tried it on my iPhone, not shure whether there is a difference between iPhone and iPod. Your code worked for me the couple of times I tried when I quit the app by pressing the home button. Then it saved the state the stack is in every time.

Second. I was wondering why preOpenStack only works once on my iPod. Because as you might've seen in my app I have some code that says when you open the stack, add up those fields. Is there a way around this?
This also worked everytime I restarted the app by pressing the icon on the iPhone. No idea what is going on. I changed the random stars and everytime when I started new the number of stars where what was saved when quitting the app in above way.

I don't know what to recommend since I can not reproduce the errors you mention. Unless of course I did not fully understand what you are doing. But your stack was pretty clear about it and it worked. The one thing I noticed was that in your Standalone Application Settings you had indicated a folder and the level menu stack. I did change that to the level menu stack only since I did not have the folder and did not create one. Maybe that is a lead. Since your code to set up the test for the level menu stack did not include a folder I wonder how it did work at all. But if you use the substack approach you would only have to include the one file "level menu.livecode" anyways.

Kind regards
Bernd

Danny
Posts: 106
Joined: Tue Nov 09, 2010 1:28 am

Re: Splashstack and datastack for iPhone

Post by Danny » Wed Mar 02, 2011 11:38 pm

:shock: THERE IS A GOD!! :D It works on my iPod. All I did was change the code

Code: Select all

on shutdown
save this stack
end shutdown
to

Code: Select all

on shutdown
save stack "Level Select"
end shutdown
And it started saving like magic.
This also worked everytime I restarted the app by pressing the icon on the iPhone
Yes i've seen this work. See what happens to me that doesn't happen for you is I'll open the level select then play the first level then maybe the second and when I return to the menu it doesn't add them up. I guess I'll have to do more research.

If you'd like to beta test the game I'd love to have you check it out and give some advice. If you'd like to, please let me know as i'd like some people that know the code and how to optimize it. I can post my email or you can post your email and i'll send you an invite.

Thanks again for taking your time to help me, I truly appreciate it.

Danny

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Splashstack and datastack for iPhone

Post by bn » Thu Mar 03, 2011 11:42 am

Hi Danny,

glad you got it working.

You can contact me at

Code: Select all

on mouseUp
   put "110 105 103 103 101 109 97 110 110 64 117 110 105 45 119 104 46 100 101" into tData
   repeat with i = 1 to the number of words of tData
      put numtochar(word i of tData) after tCollect
   end repeat
   put tCollect
end mouseUp
this will put the address into the message box

Kind regards

Bernd

Danny
Posts: 106
Joined: Tue Nov 09, 2010 1:28 am

Re: Splashstack and datastack for iPhone

Post by Danny » Thu Mar 03, 2011 10:39 pm

Awesome! The service i'm using is great and free you might be able to use it. What i'm going to do is send you the email and it will ask you to create an account you can sign up as a dev or just a user. Then (hopefully) it will have a button that says "Register Device" you click on that, then hit "Install" it says that it will change the iPod settings but it doesn't and if it works you're in, if not just retry the Registration process again. It will be a couple of days before I send out any app but the faster I can sign people up the easier it is to send it out once.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Splashstack and datastack for iPhone

Post by bn » Fri Mar 04, 2011 12:09 am

Hi Danny,

I got your invitation. I am not shure what that service is. I read their privacy policy and it is not really reassuring.

I would prefer not to take part in this program.

If you want me to have a look at your app I would prefer if you would send me the stack, or just parts of the stacks you have problems with. You got my email address.

Thanks for inviting me.

Kind regards

Bernd

Danny
Posts: 106
Joined: Tue Nov 09, 2010 1:28 am

Re: Splashstack and datastack for iPhone

Post by Danny » Fri Mar 04, 2011 3:14 am

That's not a problem, sorry it didn't work out but I understand. It is a service that makes it easier to beta test an app and send it to a group of people as well as getting the uuid. I haven't been having to many more prolems with my app luckily :). If you'd prefer I can just send you the ipa file to you personally but I would need your uuid number. Let me know if you change your mind :D I just want to make sure that the program I am using isn't holding you back.

Thanks,

Danny

witeowl
Posts: 45
Joined: Mon Feb 21, 2011 3:02 am

Re: Splashstack and datastack for iPhone

Post by witeowl » Sun Apr 24, 2011 6:01 am

bn wrote:This set-up is important to understand since when you change the data stack in Livecode and then use it in the Simulator or the actual device, the new Data stack will NOT be copied to the documents folder, only the Splash stack is replaced.
So this has an important consequence:

WHENEVER YOU CHANGE YOUR APP DELETE THE VERSION YOU PUT ON THE SIMULATOR OR THE IPHONE FIRST BEFORE TESTING THE NEW VERSION.
Correct me if I misunderstand, but this means that I shouldn't really ever put anything other than data into these substacks, correct? Because if I put any working cards there, then decide to change any of those cards when updating, any updates through the app store won't actually replace/update those cards. Am I understanding this right?

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Splashstack and datastack for iPhone

Post by bn » Wed Apr 27, 2011 2:14 pm

Hi witeowl,

my caveat was regarding the fact that the stack in the documents folder is not automatically updated when you update the app.

But the use of a stack to store data AND that holds the logic for generating the data is a design flaw of this approach that needs consideration if you want to go this way.

Imagine some of the logic in the data stack e.g. needs to be changed. You can not just replace the data stack with the new version since you would wipe the user's data. You would have to find a way to preserve the data but change the logic/layout.

I am not saying that it is impossible to go that way, only you have to carefully plan your app and documents stack. I did not try to do this, needs some experimentation I guess.

What comes to ming would be to export the data and reimport the data into the new data stack, updating the script of the data stack from the app, changing the layout of the data stack from the app.
Actually one should have good control over the data stack since it is modifiable.

Kind regards

Bernd

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Splashstack and datastack for iPhone

Post by BarrySumpter » Fri Jul 01, 2011 11:28 pm

Re: Anyone else feel the tictactoe stack should be dual player?

Postby John Allijn » Sat Jun 18, 2011 6:55 pm
Hi Barry,
I've been thinking about turn-based apps myself and I'm not going to use a simple mysql database on a webserver. With GET URL in livecode you can then execute a php script that updates the database.
That way you only have to have basic internet access and you don't have to worry about bluetooth or lan networking. i (finally) got a messaging app running that also uses scripts like these. If you want I would be happy to share...
Regards,
John
Hi John Allijn,
Appoligies (to all) for having to contact you in this roundabout way.
The summer academy has been closed and this is the only post I can reply to that you might get a Topic Reply Notification Email notice from.
I hope we didn't drive you off when the Summer Academy forum was closed.

I'm still intersted in your php scripts.
Please feel free to reply here or contact me directly on BarrySum@bigpond.net.au.
All my best.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am
Contact:

Re: Splashstack and datastack for iPhone

Post by maxs » Wed Feb 15, 2012 1:17 am

I am trying to submit my first app to the App Store, I get the error "Application failed codesign verification. The signature was invalid, or it was not signed with an iPhone Distribution Certificate." How can I fix this?

OK I checked Apple's IOS forums, but they talk about xcode not livecode.

I think it has something to do with keychains and certificates.

Max

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Splashstack and datastack for iPhone

Post by Jellicle » Wed Feb 15, 2012 3:09 am

maxs wrote:I think it has something to do with keychains and certificates. Max
To get an app on the store you have to be a registered developer ($99/year from Apple), and you have to create and download security certificates and profiles that are bundled up with your app when a standalone is created. There is a lesson on the RunRev site that covers all this (I'm not 100% sure it is up to date).

Good luck!

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am
Contact:

Re: Splashstack and datastack for iPhone

Post by maxs » Wed Feb 15, 2012 4:16 am

Thanks Gerry,

Your advice worked. I found a good tutorial in Livecode.

Had I known I would need to jump from Livecode to Keychain access to Application Loader to IOS dev Center to itunes connect , while trying to find buttons and directions which aren't very obvious, I might have opted to kill myself.

Max

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Splashstack and datastack for iPhone

Post by Dixie » Thu Sep 13, 2012 3:21 pm

Hi Bernd...

It would be interesting to know if an 'app' built in this way gets Apple approval... I suspect not.

be well,

Dixie

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Splashstack and datastack for iPhone

Post by bn » Tue Sep 25, 2012 9:19 pm

Hi Dixie,

sorry, just found your post.
It would be interesting to know if an 'app' built in this way gets Apple approval... I suspect not.
First it was a proof of concept. But to my surprise I know of one app that uses this approach. Sylvan Rogers (SylvanR) got his app accepted. It is Study Cards.
Currently he has

Children's Study Cards of Nurses Station Software

in the App store
It is not the original version that I have but it looks a lot like the old one.
Maybe he was just lucky or they did not mind
Kind regards
Bernd

Post Reply