Sandboxing for the App Store

Using Standalone Maker to build executables or delivering projects for use with the SuperCard Player? Discuss it here.

Sandboxing for the App Store

Postby KevinPaszalek » Sun Feb 09, 2014 11:30 am

Hi, Everybody.
How would it be possible to Sandbox an app developed in Supercard for the App Store?
Are there un-Sandboxed apps on the App Store?
Thanks!
Kevin
KevinPaszalek
 
Posts: 105
Joined: Fri Jun 08, 2012 11:35 am

Re: Sandboxing for the App Store

Postby KevinPaszalek » Sun Feb 16, 2014 5:05 am

Surely the developers of SC could comment on this, please?
K
KevinPaszalek
 
Posts: 105
Joined: Fri Jun 08, 2012 11:35 am

Re: Sandboxing for the App Store

Postby Scott » Sun Feb 16, 2014 8:11 am

Sorry... it's a complicated topic, and I just haven't had the time to sit down and write a response that addresses all issues involved.

In addition to the sandbox itself, all binaries must be code signed, meaning the standalone cannot be self modifying (any modified data, settings, etc. must be saved outside of the standalone).

Does your standalone store any data or settings within the project it is built from? If so, you'll need to rethink its design.
User avatar
Scott
Site Admin
 
Posts: 1243
Joined: Sat Jul 05, 2008 1:37 pm
Location: Northern Sierra Nevada

Re: Sandboxing for the App Store

Postby KevinPaszalek » Sun Feb 16, 2014 9:28 pm

I do not explicitly save settings. However, radio buttons and checkboxes automatically retain their hilite status in SuperCard and I use that. Is that kind of thing a problem?
Thanks for your reply. Surely this question continues to be relevant. Is no one else doing development for products to sell?
Thanks
Kevin
KevinPaszalek
 
Posts: 105
Joined: Fri Jun 08, 2012 11:35 am

Re: Sandboxing for the App Store

Postby Scott » Mon Feb 17, 2014 7:56 am

KevinPaszalek wrote:I do not explicitly save settings. However, radio buttons and checkboxes automatically retain their hilite status in SuperCard and I use that. Is that kind of thing a problem?


Once you sign the standalone's package, any changes made to anything in the package will invalidate the signature.
User avatar
Scott
Site Admin
 
Posts: 1243
Joined: Sat Jul 05, 2008 1:37 pm
Location: Northern Sierra Nevada

Re: Sandboxing for the App Store

Postby Mike » Wed Feb 19, 2014 9:37 am

Hi Kevin,

Basically for code signing to work and remain in effect, the app (and everything else in the app bundle) is locked up so the original state of things (properties and user properties) when you build the app are what will be presented to the user. If you change anything that changes the app bundle (try to create new files in it, write to existing files in it, etc.) that will break the code signature. Of course while the app is running the user can make changes to such things but that is only while the window with such controls are visible... as soon as you close something up and return to it, you are back to that original state again. So, if you want anything the user enters to stick, you basically have to save out (to preferences or some other file) external to your bundle any changes that you want to stick and then set up scripts to lock screen or open invisible -- read in the saved data and set things up accordingly -- and then display to the user.

And with Sandboxing things get locked down even more... there are only certain locations your app is allowed to read or write data to on its own and if you want to leave that up to the user you MUST use the system-based open/save dialogs [or drag and drop *I think*] (can't use externals to build your own interfaces like a sidebar or anything as a shortcut). Don't even get me started on the major rewrite and rethinking of my Archive app (and my Framework project I use as the basis for my apps) that this has caused or the collateral "damage" of rethinking everything which leads to lots of unexpected side R&D opening a can-of-worm projects to test out some things that delay upgrades even more. Worth it in the long run? More than likely... but still something very annoying in the short to mid-term. And honestly, Apple is not really helpful when it comes to particulars about this for SuperCard developers - not that one would expect them to be - because Apple can only tell you about Xcode and checking various options there to ensure you are doing things right.

KevinPaszalek wrote:I do not explicitly save settings. However, radio buttons and checkboxes automatically retain their hilite status in SuperCard and I use that. Is that kind of thing a problem?
Thanks for your reply. Surely this question continues to be relevant. Is no one else doing development for products to sell?
Thanks
Kevin
Mike Yenco
YENCO.COM
User avatar
Mike
 
Posts: 216
Joined: Sun Jul 06, 2008 8:54 am
Location: Massachusetts, USA

Re: Sandboxing for the App Store

Postby sctell » Wed Feb 19, 2014 11:03 am

Mike,

A few examples, perhaps you or Scott could comment and perhaps expand on the list.

1. You create a new user property. Do you have to delete it before you close your app?

2. You create a file in the bundle. Do you have to delete it before you close your app?

3. You should keep your preferences in the preferences folder?

4. Where should you keep say SQLite data files you may create?

5. What are the places you are allowed to place files?

6. Any variable you create in your app should be empty when opening and empty when the app is closed?

7. Do SC's Open/Save dialogs meet with Apple's approval?

8. Is the use of externals acceptable so long as their data content is the same at the start/end of a session?

9. All grcs containing picture data if empty at the opening of the app should be empty at the close of the app?

10. All fields empty at the opening of the app should be empty at the close of the app?

11. All fields containing text at the opening of the app should contain the same text at the close of the app?

12. Any paint or draw grcs created after the app is open should be deleted before the app is closed?

13. Is calling Applescript from SC acceptable?

14. Is using the Shell command from SC acceptable?

I am sure there are many other questions.

Kevin is looking for some guidance, perhaps someone with the knowledge can help?

I have noticed SolutionsEtcetera have an App on the app store, perhaps they could help Kevin? ;)

All the best

Terry
sctell
 
Posts: 1142
Joined: Sun Jul 06, 2008 10:41 am

Re: Sandboxing for the App Store

Postby sctell » Wed Feb 19, 2014 11:19 am

I have just been reading this thread on carbon-dev and unless I am reading it incorrectly it suggests that Carbon based apps unless already on the App Store are likely to be rejected.

Does anyone know?

It would prevent Kevin a lot of heartache.

http://lists.apple.com/archives/carbon-dev/2013/Jun/msg00024.html

Thanks

Terry
sctell
 
Posts: 1142
Joined: Sun Jul 06, 2008 10:41 am

Re: Sandboxing for the App Store

Postby Mike » Thu Feb 20, 2014 12:12 am

From the SuperCard perspective... Look up the cantModify property in the SuperTalk Language Guide. Set the cantModify of your project to "true" and see what happens. This should answer many of your questions regarding user properties, variables, graphics, pictureData, fields, paint, etc.

Apart from that, let me start by saying you can't create App Store apps with the Standalone Maker and if you are interested beyond that you really have to talk to Scott because I can't really say anything more in that regard but it has a definite bearing on some of your questions.

Scott already answered question 2 earlier in this thread.

The rest in brief off the top of my head that I feel I can answer and going from memory (which can be a bit unreliable at times - I'm sure Scott or Mark will probably jump in if I'm wrong here on any of this):

3. There is a preferences external (I think on Alec's site) that can let you read/write .plist files. And yes, ideally you would likely store "preferences" in the "preferences" folder. That is what it is there for. I suppose you could use other formats as well such as .txt or .rtf or whatever if you wanted. Most apps though seem to go with .plist format

4. Depends on the type of app. If the data files are hidden from view, I would go with the App Support folder. See the findFolder external in Xtend... you DEFINITELY want to use that to dynamically get the path. The data it returns is from the OS and very different if an app is sandboxed or not. Or you may choose to let the user save the file... if so, you have to use the open/save dialogs available in SuperCard if the app is sandboxed as that is the only way* the app will be given the proper permission by the OS to read or write... you can't, for example, use the dir external in Xtend to create a list of some directory outside the sandbox and expect to just be able to read or write from any file the user might select from there.

*Apple mentioned drag and drop to me in regard to sandboxing when I ran into some issues with an Archive update but I have not personally used that in my apps so I have no idea if there are any problems there, I also seem to recall that direct Finder interaction is allowed for as well... so a user could double click on a file created by your app and you would gain the proper permission to handle that... but again, I haven't personally tried that out so not sure if anything additional is involved on top of the scripting needed to handle such things.

5, 13, & 14. I would go to the Apple developer site and look for info on sandboxing and entitlements. They have documentation in HTML and .pdf that discusses this. From my own experience I would point out what I said above about findFolder when it comes to directory paths (5). I would also point out that the console will *mostly* report when a sandboxed app does something it isn't allowed to do and sometimes even point out exactly what entitlement you might need to claim (13,14). In addition I would add that just because you might be able to claim an entitlement and get a sandboxed app working does NOT mean that Apple will actually approve your app for the App Store using that entitlement. It really depends on what you are doing and how Apple feels about it. There are some entitlements that are "more likely" to be approved than others and the documentation Apple provides offers some tips.
Mike Yenco
YENCO.COM
User avatar
Mike
 
Posts: 216
Joined: Sun Jul 06, 2008 8:54 am
Location: Massachusetts, USA

Re: Sandboxing for the App Store

Postby sctell » Thu Feb 20, 2014 12:28 am

Mike,
Thanks for your response.

Mike wrote:Apart from that, let me start by saying you can't create App Store apps with the Standalone Maker and if you are interested beyond that you really have to talk to Scott because I can't really say anything more in that regard but it has a definite bearing on some of your questions.


Perhaps Kevin is in conversation with Scott.

Yes, I remember something about this. I believe (probably wrong) that Solutions... have another app that overcomes the limitations of SAM?

Is there a charge for this?

Is it clearly identified on the website when someone purchases SC that it can't produce applications for the App Store?

I have also read that the App Store will not accept NEW apps that rely on QuickTime. Is that correct?
I believe QuickTime is an essential part of SC.

All the best

Terry
sctell
 
Posts: 1142
Joined: Sun Jul 06, 2008 10:41 am

Re: Sandboxing for the App Store

Postby Mike » Thu Feb 20, 2014 8:59 am

sctell wrote:Is it clearly identified on the website when someone purchases SC that it can't produce applications for the App Store


Products are not usually promoted or defined by what they CAN NOT do, but rather information is provided that tells you specifically what they CAN.

I mean, if you look at the name "SuperCARD" for example... maybe someone might get confused and think the app is specifically going to create greeting cards or something right out of the box if they buy it... is it clearly identified on the website when someone purchases SuperCARD that it can't produce get well CARDS, birthday CARDS, holiday CARDS, sympathy CARDS, graduation CARDS, off-the-wall greeting CARDS, thank-you CARDS, etc... oh wait... maybe CARDS means like... playing cards so people might think of card games... so add Blackjack, Poker, Old Maid, Go Fish, Solitaire, etc. And when people hear "SUPERcard" they might think of a SUPER hero so now we have to say SUPERcard will NOT leap into action and rescue you from a burning building, will not leap tall buildings in a single bound, etc... And I'm sure we could find plenty of other things that the words "Super" and "Card" might bring to mind. :roll:

Is any claim made on the SuperCard site that specifically says the Standalone Maker CAN produce applications for the App Store? Mac App Store? Android Store? or whatever else might be out there? No.
Mike Yenco
YENCO.COM
User avatar
Mike
 
Posts: 216
Joined: Sun Jul 06, 2008 8:54 am
Location: Massachusetts, USA

Re: Sandboxing for the App Store

Postby sctell » Thu Feb 20, 2014 10:17 am

Mike wrote:Products are not usually promoted or defined by what they CAN NOT do, but rather information is provided that tells you specifically what they CAN.


Really sorry if I got your stress levels up. :(

It was only a question.

Can someone tell me what this means, extracted fro the about SC page?

As a development tool, it allows you to quickly build software that works the way you do.
:?

How would Solutions... know how I work?

Another extract

But no matter what you want to build, you can be confident that SuperCard will take long learning curves and heavy grunt work out of your development.


I want to build an App for the App Store?

Please don't get stressed, they are legitimate questions.

It would be more helpful to potential purchasers of SC if they knew all the facts before they purchased rather than be disappointed later. It may not be their intention to build an App for the App Store at the outset so they would not consider it at the time but as time goes by and they become proficient scripters they may wish to spread their wings only to be foiled when they find out that SC cannot do what they want. At that point they may regret their commitment to SC. It all sounds a legitimate point of view to me.

I only contributed to this thread to try and help Kevin find out what he needed to do to prepare his App for the App Store and to be honest I am sure he is still non the wiser as to whether or not this can be achieved, unless of course he is having a private conversation with Solutions...

It does seem strange that Solutions.. do not seem to promote a Method/App/Service and do not seem to make a definitive statement as to whether it can be achieved or not.

All the best

Terry
sctell
 
Posts: 1142
Joined: Sun Jul 06, 2008 10:41 am

Re: Sandboxing for the App Store

Postby Mike » Thu Feb 20, 2014 2:58 pm

No, I'm not stressed at all - at least, certainly not stressed by anything in this thread. And I was just having fun with the whole "tell me what your product can't do" thing to make a point... I mean... and I know this may come as a huge shock to everyone :o but, no, it doesn't slice, it doesn't dice, it can't chop onions or julienne potatoes... yeah, I know... if only I had known this before I started using it. :lol: Nothing in the promotion or documentation suggested it could, but for some reason I just assumed they forgot to mention it.

But seriously... I've pretty much answered about as much as I can of the questions. Wish I could say more on some things, but I can't. And some of the questions you asked have very nuanced answers to them which require many pages of explaination vs. a simple yes or no... while others have no clear cut answer at all other than it might depend what kind of mood Apple is when they go to review it as they move various goalposts around from time to time and things may ultimately depend on what exactly an app is trying to do. Even going through the process... you don't really become knowledgable at it... you do only what is required to get approval so questions that fall outside of that experience... I've honestly no clue what the answers are.
Mike Yenco
YENCO.COM
User avatar
Mike
 
Posts: 216
Joined: Sun Jul 06, 2008 8:54 am
Location: Massachusetts, USA

Re: Sandboxing for the App Store

Postby sctell » Thu Feb 20, 2014 11:55 pm

Well Kevin,

Unless you have contacted Solutions... and received a positive response it seems to me you may be on your own. :(

I wish I could answer your questions but not having tried to get a SC App into the App Store I can't point you in the right direction.

My point of getting involved here was solely to illicit some help for you. I hope you have contacted Solutions.. to see if they are prepared to help (free of charge? ;) ) and have been successful.

Good Luck

Terry
sctell
 
Posts: 1142
Joined: Sun Jul 06, 2008 10:41 am

Re: Sandboxing for the App Store

Postby Mike » Fri Feb 21, 2014 12:20 pm

Aren't we all on our own to some degree here? I mean, there isn't an app out there that really creates an app for you. You have to do a certain amount of work on the parts before you can assemble/build something. You can't really jump to the last step of a process and expect that it will resolve all the other steps you skipped over. Of course you can ask for help here and get hints, tips, and sometimes even some helpful scripts and externals along the way.

Kevin asked a question, Scott provided an answer which included the FIRST step to consider (how the project in question stores data or settings). Kevin asked a followup question regarding that including some more detail and Scott reiterated that anything that changes something in the package will invalidate the signature - so obviously what Kevin asked causes changes and that behavior will have to be modified. I also jumped in with some further comment on that as someone who has gone through the process to get some SuperCard-built apps on the Mac App Store (Archive, Finance, and iKeeper). You asked a bunch of questions and I offered the best answer to those questions that I could... including further clarification of a way to test to make sure your project is NOT making changes (look at the cantModify property) as well as providing additional info on ways to save data out (like the Preferences external, using the findFolder external)... and even though it has nothing to do with the FIRST step, I also tried to answer the other questions as well including pointing out that Apple has many pages of documentation available to developers regarding sandboxing and entitlements if you search for them. As Scott also pointed out in his initial answer -- it's a complicated topic. But I would think the answers provided are somewhat helpful in taking the FIRST step necessary and obviously if there were followup questions that could be answered here I'm sure they would be.

But then, you jumped to the final step and asked questions I can't talk about and already stated that anyone interested would have to contact Scott about. And you included something rather odd about if it is clearly stated somewhere things that SuperCard can't do. To which I pointed out that generally speaking app developers don't create lists of things their products CAN NOT do but rather what they CAN. And then I had some fun coming up with some random things that SuperCard CAN NOT do just to make the point (which you interpreted as stress)? In regards to questions I can't answer that Scott has to address or "definitive statements"... as Scott said already -- it's a complicated topic.

Terry, If you really are genuinely interested, create a project to sell on the Mac App Store... keep in mind some of the helpful answers that have already been provided for that first step in this thread. Go search out Apple's Mac App Submission Guidelines, Apple's documentation for sandboxing and entitlements, etc. Ignore the technical references to APIs and such and look at if your app will meet those guidelines in general or if you want/need to do something Apple says that you can't. Contact Scott and ask very particular questions that are relevant to what your project does if you get stuck along the way... or you can ask here on the off-chance the rather small number of people who have actually gone through the process already might have run into the same thing - and assuming you want to publicly share such specific data about what your app is doing. That is pretty much all work you'll have to do though. If you make it that far, yes... there is a way to get from here to an App you can submit to the Mac App Store. But don't expect even then for a 100% guarantee that it will be approved... that isn't just a SuperCard thing... there are plenty of people using Xcode or other tools to write apps that experience the same uncertainty and worry about the risk of spending time on something to only have it rejected for inclusion in the Mac App Store. I have seen at least a few of my favorite apps that just can't make it to the Mac App Store due to various Apple requirements - and they are not using SuperCard to make their apps). You want to see some promotion of a method/app/service at a reasonable cost... help show Scott a real genuine demand rather than just a passing interest of a random SuperCard developer here or there. I mean, apart from my three apps on the Mac App Store I'm only aware of a couple of others -- and one of those is something Scott put together... where is everyone else expressing interest in this? But then, I'm just a SuperCard user not involved in the day-to-day operations of the company... for all I know Scott might be getting a TON of interest coming in every day... but I haven't seen anything to suggest that in the forum. In fact, the last time the topic of the Mac App Store came up the response seemed extremely lackluster to me.

And no... I'm not stressed or angry with any of the above, just pointing out my view of it. I'll just mention that my own apps going through the process hit numerous snags. Things I didn't fully understand or things I didn't quite realize the implications of even though I did understand the overall idea - some misconceptions I just had in general about SuperCard that were never an issue until now. My apps were all rejected numerous times and each time I had to go back in and look at the specific area that seemed to trigger that rejection. In *almost* all cases... the rejections came from my own mistakes and assumptions. IIRC, there were a couple of cases where it fell to Scott & Mark to work out what was going on to address it from their end of things. Like I said, no guarantees... you just press on and see what can be done. I've been very fortunate (so far) that my apps have been approved in the end but that is by no means a certainty. Apple could move the goalposts at ANY time and leave not just SuperCard-based apps, but other apps created in other ways without an option to continue on the Mac App Store as well. It is what it is. Apple leaves various things vague. Definitive statements are nice, but no one is really making them. As Scott said already -- it's a complicated topic.
Mike Yenco
YENCO.COM
User avatar
Mike
 
Posts: 216
Joined: Sun Jul 06, 2008 8:54 am
Location: Massachusetts, USA

Re: Sandboxing for the App Store

Postby sctell » Fri Feb 21, 2014 11:41 pm

I see it as quite simple really (... and I don't mean getting an App on the App Store).

As you seem to have collaborated with Solutions... to get your/their App onto the App Store perhaps you will collaborate again to make a list of the problems you came across and the solutions.

You could then publish them?

This I am in no doubt would help others. It would not necessarily answer all their issues but I am sure with it being produced by two experienced SC users would go a long way.

Do you think it's a good suggestion. ;)

All the best

Terry
sctell
 
Posts: 1142
Joined: Sun Jul 06, 2008 10:41 am

Re: Sandboxing for the App Store

Postby Mike » Sat Feb 22, 2014 2:29 pm

Terry, sure a reference of some sort might be a nice idea if Scott ever makes some of the stuff I can't talk about public. I might have even mentioned that idea to him at some point in the recent past when he emailed me for some feedback on some thoughts he had. So we are rather on the same wavelength there.

Honestly, I'm not sure how much help I would be. Some issues were either fixed by Mark - so they are no longer issues, or they were stupid mistakes it took me a while to get - I remember more Scott just reiterating that I was being an idiot about something and not to make assumptions more than I recall now what I was being an idiot about... and I got past that issue finally and moved on and I didn't really dwell on it too much. And then some stuff is VERY specific to particular aspects of my apps that anyone else is unlikely to care about. Some stuff is actually stuff I had already been doing in a certain way long before the Mac App Store stuff came about and it just worked out that I didn't have to change a thing (or not much) - like storing data and preferences outside my project - I had been doing that for years - even before OS X came out first as text files and then later as SQLite and .plist when the externals for those became available. Since my attention has recently been on other improvements in my apps and Framework project I'm not even really in a mindset right now where I could just come up with a list off the top of my head of stuff specific to the Mac App Store or Sandboxing. Certainly if questions come up that sound familiar and I remember what I did I would be happy to answer them or contribute to an answer. But most of the answers are probably ones I got from Scott or Mark anyway so they really wouldn't need my input. And some answers might not be known or out-of-date. I certainly ran into moments when Apple moved goalposts and rejected something in a subsequent app submission that had previously passed through in a prior app submission. So even if I have an answer, it may no longer be a valid answer.
Mike Yenco
YENCO.COM
User avatar
Mike
 
Posts: 216
Joined: Sun Jul 06, 2008 8:54 am
Location: Massachusetts, USA

Re: Sandboxing for the App Store

Postby KevinPaszalek » Thu Feb 27, 2014 6:12 am

Thanks, everyone, for your thoughtful replies. I took a while to respond because I wanted to get over the discouragement first.

SuperCard is a great environment for developing all kinds of apps, but it has its limitations. I'm working on Objective C again (that's what I was trying to avoid by working in SuperCard) because I can't fully go where I want to with SuperCard.

However, I have developed a wonderful app for students and researchers in SuperCard. I'll just have to market it on my own website.

Thanks again for the clarifications.

Blessings,
Kevin
KevinPaszalek
 
Posts: 105
Joined: Fri Jun 08, 2012 11:35 am


Return to Building Standalones

Who is online

Users browsing this forum: No registered users and 1 guest

cron