Re: Sandboxing. WTF?

2012-05-28 Thread Jean-Daniel Dupas
Le 28 mai 2012 à 07:18, Graham Cox a écrit : > > On 28/05/2012, at 3:10 PM, Marco S Hyman wrote: > >> I think that is your issue. > > > What is the issue? > > I have read that, several times. It states: > > "With these provisos in mind, you can use a path-based temporary exception > entitl

Re: Sandboxing. WTF?

2012-05-28 Thread Graham Cox
On 28/05/2012, at 6:54 PM, Jean-Daniel Dupas wrote: > The posted documentation says: > > «A POSIX function, such as getpwuid, can provide the file system path you > need.» > > I guess it means you have to resolve the real com.apple.iApps.plist path > yourself and access the file directly. O

Re: Losing memory

2012-05-28 Thread James Montgomerie
On Monday, 28 May 2012 at 03:20, Charlie Dickman wrote: > My application is using (leaking) too much memory and eventually dies because > no more can be allocated. I have used Instruments to measure the usage and > leaks and have addressed those it told me about. > > Now, however, Instruments in

Re: Sandboxing. WTF?

2012-05-28 Thread Roland King
On May 28, 2012, at 5:23 PM, Graham Cox wrote: > > On 28/05/2012, at 6:54 PM, Jean-Daniel Dupas wrote: > >> The posted documentation says: >> >> «A POSIX function, such as getpwuid, can provide the file system path you >> need.» >> >> I guess it means you have to resolve the real com.apple.i

Re: Sandboxing. WTF?

2012-05-28 Thread Graham Cox
On 28/05/2012, at 7:31 PM, Roland King wrote: > The way I read it is you register the entitlement exactly as you have been > doing, as a user entitlement to Library/. Then at runtime you use > getpwuid() to find an absolute path to the actual user's home directory, > construct the Library/ on

Re: Sandboxing. WTF?

2012-05-28 Thread Roland King
On May 28, 2012, at 5:51 PM, Graham Cox wrote: > > On 28/05/2012, at 7:31 PM, Roland King wrote: > >> The way I read it is you register the entitlement exactly as you have been >> doing, as a user entitlement to Library/. Then at runtime you use >> getpwuid() to find an absolute path to the a

Re: Sandboxing. WTF?

2012-05-28 Thread Mikkel Islay
On 28 May 2012, at 07:58, Quincey Morris wrote: > On May 27, 2012, at 22:40 , Graham Cox wrote: > >> People will always click "Allow" if it gives them an easy life. > I don't know of any solution to that, though I guess asking is better than > not being forced to ask. Perhaps the app store rev

Re: NSXMLParser and initWithStream

2012-05-28 Thread Fritz Anderson
On 27 May 2012, at 7:14 PM, John Drake wrote: > Looking at the documentation for NSXMLParser, it seems like the > initWithStream: method to initialize a NSXMLParser would be the perfect > solution to my problem. I can initialize the parser with a NSInputStream and > then call the parse method o

Re: Losing memory

2012-05-28 Thread Fritz Anderson
On 27 May 2012, at 9:20 PM, Charlie Dickman wrote: > My application is using (leaking) too much memory and eventually dies because > no more can be allocated. I have used Instruments to measure the usage and > leaks and have addressed those it told me about. > > Now, however, Instruments indica

Re: Page number in UIWebView

2012-05-28 Thread Takeichi Kanzaki Cabrera
On Thu, May 24, 2012 at 6:49 PM, David Duncan wrote: > On May 24, 2012, at 4:05 AM, Takeichi Kanzaki Cabrera wrote: > >> Hello everyone, I'm displaying a PDF in an UIWebView object, is there a way >> to access the page number displayed when scrolling? > > Nope. OK, thanks, I was almost sure that

Re: CoreData, automatic migration and sandbox problems.

2012-05-28 Thread Dave Fernandes
If you want to check whether a store needs to be migrated and ask the user, you can use [NSPersistentStoreCoordinator metadataForPersistentStoreOfType:::] to get the metadata for the document in question and [NSManagedObjectModel isConfiguration:compatibleWithStoreMetadata:] to check whether tha

RE: NSXMLParser and initWithStream

2012-05-28 Thread John Drake
I thought the same when I first read the documentation, and have tried not making ContentParser the delegate of the input stream as well as removing the call to -[NSXMLParser parse], however I still don't see any of the NSXMLParser delegates being called. I'm wondering if it's a run loop issue,

RE: Sandboxing. WTF?

2012-05-28 Thread Shawn Bakhtiar
First off (as much as I agree with the sentiment) isn't WTF profanity? Second, and more to the point of my sentiment, and I hope someone on the Apple development team is reading this, have you people gone absolutely mad! This is MCP to the max! Thankfully I write apps for custom in-house appl

Re: Cocoa-dev Digest, Vol 9, Issue 371

2012-05-28 Thread Peter Hudson
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.co

Re: crashes loading saved file

2012-05-28 Thread James Maxwell
Okay, so I'm back to trying to tackle this annoying unarchiving crash… Just to recap the problem: I get a exc_bad_access crash when unarchiving certain files from disk. The file is a keyed archive, which contains a fairly complex custom object graph, with plenty of circular references (i.e., pa

Memory use

2012-05-28 Thread Charlie Dickman
Is (Are) there functions that report application memory usage, as a whole, on the stack, in the autorelease pool, in the heap? Charlie Dickman 3tothe...@comcast.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin re

Re: Sandboxing. WTF?

2012-05-28 Thread Fritz Anderson
On 28 May 2012, at 4:30 PM, Shawn Bakhtiar wrote: > First off (as much as I agree with the sentiment) isn't WTF profanity? Yes it is. Personally, I never use it, but I'll pass it unaltered to preserve mail threads or to quote accurately. > Second, and more to the point of my sentiment, and I ho

Re: Sandboxing. WTF?

2012-05-28 Thread Graham Cox
On 29/05/2012, at 7:30 AM, Shawn Bakhtiar wrote: > First off (as much as I agree with the sentiment) isn't WTF profanity? Well, it's in the eye of the beholder. I merely meant "Where To Find (information)" ;-) > Mark my words, to do this, will be the death of the App store. Users are > fickle

Re: Sandboxing. WTF?

2012-05-28 Thread Charles Srstka
On May 28, 2012, at 5:43 PM, Fritz Anderson wrote: > The tradeoff is that most developers don't have the resources to handle > publicity, distribution, updates, or worldwide payments, and the MAS does > those things for them. (You can afford time and money to do those things for > yourself? Fin

Re: Sandboxing. WTF?

2012-05-28 Thread Charles Srstka
On May 28, 2012, at 7:23 PM, Charles Srstka wrote: > The only thing that’s legitimately more expensive when going non-MAS is > getting a website for distribution, and a) web sites are cheap, b) if you > move any kind of volume at all, their price will be easily dwarfed by the > savings from not

Re: Sandboxing. WTF?

2012-05-28 Thread Kyle Sluder
On May 28, 2012, at 7:59 PM, Graham Cox wrote: > Nobody has written a better analysis, critique and alternative suggestion for > sandboxing than Wil Shipley: > http://blog.wilshipley.com/2011/11/real-security-in-mac-os-x-requires.html > > But Apple haven't taken any notice of this as far as an

Re: Sandboxing. WTF?

2012-05-28 Thread Graham Cox
On 29/05/2012, at 10:40 AM, Kyle Sluder wrote: > On May 28, 2012, at 7:59 PM, Graham Cox wrote: > >> Nobody has written a better analysis, critique and alternative suggestion >> for sandboxing than Wil Shipley: >> http://blog.wilshipley.com/2011/11/real-security-in-mac-os-x-requires.html >>

Another sandboxing issue

2012-05-28 Thread Graham Cox
I'm getting this logged in the sandboxed version of my app: (4041) deny file-write-data /Users//Library/Autosave Information/Unsaved Document. This appears to be when Lion's autosaves my untitled document. Seriously? Lion's own features don't even know when to use the sandbox. Does this imp

Re: Another sandboxing issue

2012-05-28 Thread Roland King
On May 29, 2012, at 8:54 AM, Graham Cox wrote: > I'm getting this logged in the sandboxed version of my app: > > (4041) deny file-write-data /Users//Library/Autosave > Information/Unsaved Document. > > > This appears to be when Lion's autosaves my untitled document. Seriously? > Lion's own

Re: Another sandboxing issue

2012-05-28 Thread Graham Cox
On 29/05/2012, at 11:18 AM, Roland King wrote: > I believe I read something about that last week over in the good old dev > forums. IIRC the poster believed the app worked ok, it just logged a load of > rubbish like that to the logfile, does your app still actually work? Is it > writing Autosa

Re: crashes loading saved file

2012-05-28 Thread James Maxwell
Hi Charlie, Thanks for the reply. Hmm… I wonder if it would be enough to just copy the objects that lead to circular references? I'll think about it… I agree that it would be worth a try, if only to determine whether the problem really is related to circular references. thanks, J. On 2012-

Re: crashes loading saved file

2012-05-28 Thread James Maxwell
Thanks, Quincey. Well, I've revisited this problem many times over the past year, or so (obviously, not on a daily, or even weekly basis, but the problem has been lurking for a long time, unresolved). I've gone over the code in detail literally hundreds of times looking for the kind of problem

Re: crashes loading saved file

2012-05-28 Thread Quincey Morris
On May 28, 2012, at 20:48 , James Maxwell wrote: > The only reason I've begun to even vaguely questioned the framework -- > honestly, for the first time today -- is because I've read a number of > threads today that talked about potential problems in NSKeyedUnarchiver when > dealing with large,

Re: crashes loading saved file

2012-05-28 Thread James Maxwell
> > I think I was referring to that inner voice that *tempts* you to blame, not > any actual blaming. :) Sure, understood. > > We're probably at the point where you need to start showing code, at least in > a reduced version, for encodeWithCoder and initWithCoder. > - (void)enco

Re: Memory use

2012-05-28 Thread Jens Alfke
On May 28, 2012, at 3:20 PM, Charlie Dickman wrote: > Is (Are) there functions that report application memory usage, as a whole, on > the stack, in the autorelease pool, in the heap? Not easily-used ones. It's not something that processes other than diagnostic or admin tools usually care about

Re: crashes loading saved file

2012-05-28 Thread Jens Alfke
On May 28, 2012, at 10:08 PM, James Maxwell wrote: > Well, yes, that's what happens. In fact, it's much hairier than that! There's > actually an array of parentNodes, not just one. It's a complex graph, as I > mentioned, not a straightforward tree (which would already contain mutual > parent/c

Re: crashes loading saved file

2012-05-28 Thread Jens Alfke
On May 28, 2012, at 10:51 PM, I wrote: > In general, look at your graph and figure out the minimum number of object > relations you need to archive to reconstruct its structure. Then archive only > those, and recreate the rest at load time. I just had another thought. Are you using linked list

Re: crashes loading saved file

2012-05-28 Thread Graham Cox
On 29/05/2012, at 3:08 PM, James Maxwell wrote: > I did try, btw, using encodeConditionalObject for parentNodes, sourceNodes, > and superState, all of which are CbCMNodes. But the structure was no longer > intact after trying this (parent connections gone), so I think I > misunderstood how con

Re: crashes loading saved file

2012-05-28 Thread Quincey Morris
On May 28, 2012, at 22:08 , James Maxwell wrote: > Well, yes, that's what happens. In fact, it's much hairier than that! There's > actually an array of parentNodes, not just one. It's a complex graph, as I > mentioned, not a straightforward tree (which would already contain mutual > parent/chil

Re: crashes loading saved file

2012-05-28 Thread Quincey Morris
On May 28, 2012, at 15:14 , James Maxwell wrote: > Just to recap the problem: I get a exc_bad_access crash when unarchiving > certain files from disk. The file is a keyed archive, which contains a fairly > complex custom object graph, with plenty of circular references (i.e., > parentNode <--->