Re: NSURLSessionUploadTask - stops uploading after sending 160kB of data (5x 32kB chunks)

2013-12-11 Thread Robert Vojta
, Robert Vojta rob...@tapmates.com wrote: When I’m testing it, it starts upload almost immediately, I see it in logs and then it suddenly stops after 160kB of data sent and is stalled ... Is it possible this is a server-side issue? What exactly are you uploading it to? Have you looked

NSURLSessionUploadTask - stops uploading after sending 160kB of data (5x 32kB chunks)

2013-12-10 Thread Robert Vojta
Hi all, I’ve got issues with NSURLSessionUploadTask and maybe I missed something. My NSURLSession has background configuration, cellular data allowed and discretionary property set to NO. The configuration is … NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration

Re: Fast hash of NSData?

2013-11-29 Thread Robert Vojta
It's old, but try to start with these: https://code.google.com/p/xxhash/ Sent from my iPhone On 29. 11. 2013, at 20:58, Graham Cox graham@bigpond.com wrote: Another general question. Does anyone have a quick-and-dirty (but functional) way to hash NSData? I’m currently using SHA-1

Re: NSView, Animator, and Autoresizing

2013-09-27 Thread Robert Vojta
Hi, don't have 10.8.X around now. But on redacted, it seems to behave correctly: * when your view is resizing and I start resizing window, * animation is stopped, * your view is being resized correctly according to your mask (left, top, bottom stays, height is resized) R. On Fri, Sep 27,

Re: Threadsafe copy of objective c object

2013-09-03 Thread Robert Vojta
On Tue, Sep 3, 2013 at 2:39 PM, Jonathan Taylor jonathan.tay...@glasgow.ac.uk wrote: The primary instance of the object (call it MyParameters) is bound to UI elements. Changes to the UI will change the values of its properties (int/bool/double). These changes will take place on the main

Re: Threadsafe copy of objective c object

2013-09-03 Thread Robert Vojta
Then this should be enough ... - (MyParameters *)copyParameters { __block MyParameters *parameters; dispatch_sync( dispatch_get_main_queue(), ^{ parameters = [myObjectHoldingParameters.parameters copy]; }); return parameters; } ... if all your parameters object properties

Re: How to create a dial keypad with autolayout?

2013-08-31 Thread Robert Vojta
Hi Steve, I had some free time, so, I made sample project for you ... (Xcode5 iOS 7 SDK ...). You can get it here: http://d.pr/f/VOX4 Look at two classes: DPDialPadButton - (id)initWithNumber:(NSString *)number label:(NSString *)label; DPDialPadView - (void)setupDialPadButtons; You can run

Re: Tracking down NSNotification center sigaborts

2013-08-27 Thread Robert Vojta
On 27. 8. 2013, at 19:27, Alex Zavatone z...@mac.com wrote: But what was difficult was figuring out how to inspect what's going on in the Notification Center. Stepping into the postNotificationName method didn't step into anything in the debugger, making the crash a little harder to debug.

Re: frame puzzle

2013-08-22 Thread Robert Vojta
On 22. 8. 2013, at 22:05, David Rowland rowla...@sbcglobal.net wrote: CGRect tframe = CGRectMake(12, 12, 100, 100); [appDelegate.buttonController.rotationControl setFrame:tframe]; CGRect qframe = appDelegate.buttonController.rotationControl.frame; buttonController is a UIViewController,

Re: Major Xcode irritation

2013-08-14 Thread Robert Vojta
Yep, I did several times. Was forced to remove DerivedData, because even Clean didn't help. Sent from my iPhone On 12. 8. 2013, at 21:31, Graham Cox graham@bigpond.com wrote: Has anyone else run into this? You open a system header from the SDK into XCode, and due to muscle-memory,

Re: Non-sandboxed Cocoa app accessing current user preferences using NSTask fails when launched outside Xcode.

2013-07-27 Thread Robert Vojta
On 26. 7. 2013, at 21:36, Jens I've never worked with sandboxing, but I would guess that a sandboxed app can't access arbitrary files in ~/Library/Preferences They can't. Sandboxed apps have own containers in ~/Library/Containers/$BUNDLEID/Data/Library/Preferences ... You can ask for

NSLayoutConstraint animator proxy leads to crashes

2013-07-24 Thread Robert Vojta
Howdy, I've got NSScrollView and NSLayoutConstraint which is defined as: _scrollViewHeightConstraint = [TMIntegralLayoutConstraint constraintWithItem:self.scrollView attribute:NSLayoutAttributeHeight

Re: NSLayoutConstraint animator proxy leads to crashes

2013-07-24 Thread Robert Vojta
Hmm, if I replace beginGrouping/endGrouping/setCompletionHandler: with [NSAnimationContext runAnimationGroup:completionHandler: it doesn't crash if I retain the scroll view until completion handler is called. But anyway, shouldn't NSLayoutConstraint handle this? -- Robert @ Tapmates, Inc.

10.8 Sandbox start at login

2013-07-08 Thread Robert Vojta
Hi all, I've got problem with start at login in sandboxed environment on 10.8 ( 10.8 is not supported now). It simply doesn't work sometimes. What does it mean exactly? 1. App is downloaded from the App Store 2. App is started by me/user and Start at login is checked (code below) 3. I do

Re: Post to a particular friend or friends group on Facebook

2013-07-05 Thread Robert Vojta
1. Get access_token from ACAccount - credential - oauthToken 2. Send POST request to https://graph.facebook.com/ … - /me/feed - you're going to post to your feed - /%@/feed - replace %@ with whatever object ID which does have feed connection (User, Page, Application, Group) … arguments

Re: positioning two UILabels with auto layout problem

2013-06-20 Thread Robert Vojta
Hi, or you can use visual format, which is much shorter … NSDictionary *viewsDictionary = NSDictionaryOfVariableBindings( _firstLabel, _secondLabel ); [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@V:[_firstLabel(=16)]-16-[_secondLabel(=16)]

Re: Account framework

2013-06-15 Thread Robert Vojta
Yep, Jens's right. We do use this framework heavily for Facebook and it's good, but not perfect and there're many issues you have to fight with and we did end up with WebKit support as well (classic Facebook web auth dialog). Sometimes you have to completely reset privacy database via tcccutil,

Re: Suggested maximum size of NSCachesDirectory on iOS

2013-06-10 Thread Robert Vojta
Hi Markus, On Sunday, 9. June 2013 at 23:13, Markus Spoettl wrote: on iOS, is there any documentation on how much space an app should use at most when storing things in the location returned by NSFileManagers's -URLsForDirectory: with NSCachesDirectory? Are there any hard numbers (like

Re: What, exactly constitutes a mutable action on an instance?

2013-05-29 Thread Robert Vojta
On Wednesday, 29. May 2013 at 8:37, Diederik Meijer | Ten Horses wrote: May I add two questions to this enlightening thread? 1. With ARC, do we still have to worry about string1 leaking in the following scenario? @property (nonatomic, copy) NSString *string1; ….. No, ARC perfectly

Re: Show / hide application menu / icon in dock / windows cycling / ...

2013-05-28 Thread Robert Vojta
Ken, thanks for the reply. Prohibited is no way. Maybe you know how to solve following problem and there will be no need for switching activation policy or creating another helper. 1. App creates new Wizard NSWindow 2. Window is visible, user did go through several steps and now I do ask

Re: Show / hide application menu / icon in dock / windows cycling / ...

2013-05-28 Thread Robert Vojta
On Tuesday, 28. May 2013 at 13:31, Ken Thomases wrote: Can't you just activate your app (if it's been deactivated) and order your window to the front when the ACAccountStore request completes? Ouch, stupid me, yes, does work ;-) Thanks. ___

Show / hide application menu / icon in dock / windows cycling / ...

2013-05-27 Thread Robert Vojta
Hi all, I've got application (Mac Application Store, deployment target = 10.8), which has LSUIElement set to YES in Info.plist. It's status bar application. I do open windows without menu in menu bar and app icon is not visible in dock, cycling, … Just what I need. But now, I've got one

Re: Creating More Than 1 Of The Same Element/control

2013-05-23 Thread Robert Vojta
On Thursday, 23. May 2013 at 2:03, Thomas Davie wrote: I'd really very strongly suggest that you just use Interface Builder. Your user interface is essentially data, not code. I doubt (and hope) very much that you don't write code to fill up a buffer with image data at runtime, rather than

Re: Creating More Than 1 Of The Same Element/control

2013-05-23 Thread Robert Vojta
...@mooseyard.com wrote: On May 22, 2013, at 11:19 PM, Robert Vojta rob...@tapmates.com wrote: On Thursday, 23. May 2013 at 2:03, Thomas Davie wrote: I'd really very strongly suggest that you just use Interface Builder. Your user interface is essentially data, not code. I doubt (and hope

Re: CTFramesetterSuggestFrameSizeWithConstraints cuts off text

2013-05-17 Thread Robert Vojta
I ran into this few years ago and didn't find correct solution. Correct means nice clean. Ended with adding 1/2 of line height, which causes another issues like wrong vertical alignment of elements. It was pre NSAttributedString era on iOS. Height was wrong even if returned width = constrained

Re: CTFramesetterSuggestFrameSizeWithConstraints cuts off text

2013-05-17 Thread Robert Vojta
with attributed string and auto layout for now. It's enough for almost all needs and I'm glad that I'm not forced to dive into this mess again. On Friday, 17. May 2013 at 23:42, Quincey Morris wrote: On May 17, 2013, at 11:20 , Robert Vojta rob...@tapmates.com (mailto:rob...@tapmates.com) wrote

Re: Validate core data sqlite file

2013-05-13 Thread Robert Vojta
And here's the code to check sqlite db integrity … https://gist.github.com/robertvojta/1251278 On Monday, 13. May 2013 at 11:10, Mike Abdullah wrote: On 12 May 2013, at 22:15, Peng Gu pan...@gmail.com (mailto:pan...@gmail.com) wrote: Hi I am building an core data app that

Accounts framework - does unexpected things sometimes / freezes system preferences ...

2013-05-12 Thread Robert Vojta
Hi all, we do use accounts framework on Mac OS X for Facebook and we did find two issues (+- 15 % of cases) … 1. ACAccountStore returns non sense sometimes Here's the code to check account store status, request access, etc. https://gist.github.com/robertvojta/ecc7a790664b3c432f63 This code

Re: how to run NSApplicationMain() in child process?

2013-05-10 Thread Robert Vojta
On Friday, 10. May 2013 at 9:00, Stephen J. Butler wrote: Make launchd run the same executable, but with a --daemon option. That's got to be as easy, or easier, than detecting an already running one and forking + daemonizing. Detecting is not so hard … [NSRunningApplication

Re: how to run NSApplicationMain() in child process?

2013-05-10 Thread Robert Vojta
On Friday, 10. May 2013 at 12:47, Ondrej Holecek wrote: I don't think it would fit sandbox. Or do you have any idea how to pass command-line application to App Store? :-) Just like BBEdit … App in MAS and command line utility downloadable from your website outside of the MAS.

Re: NSWindow - flickering shadow during height animation (borderless, transparent)

2013-05-02 Thread Robert Vojta
Okay, so, here's the solution … The problem was in this … Wrong way I was listening for contentView frame changes (NSViewDidChangeFrameNotification) and I was calling display/invalidateShadow whenever I receieved this notification. Correct way NSWindowDelegate has windowDidResize

Re: Overlapping sibling views

2013-04-30 Thread Robert Vojta
I've never seen any evidence that sibling *NSView*s draw in the wrong order since 10.5. I believe that 'drawRect:' is correctly called in the back-to-front order of the sibling arrangement in the parent view. However, I *have* seen firsthand, in the last few weeks, that the layers of

Re: Overlapping sibling views

2013-04-30 Thread Robert Vojta
On Tuesday, 30. April 2013 at 10:42, Mike Abdullah wrote: Layer-backed views always *appear* above non-layer-backed views. Effectively, all non-layer-backed views get rendered into a single layer that makes up the entire window. Thanks, didn't know this. Never needed layer backed view until

Re: NSWindow - flickering shadow during height animation (borderless, transparent)

2013-04-24 Thread Robert Vojta
On Wednesday, 24. April 2013 at 1:28, Ken Thomases wrote: Hi Ken, It's not clear if you tried to use [self invalidateShadow] instead of all three lines or just instead of the last two. The shadow shape is computed from the visible content of the window. That's why there's a call to

NSWindow - flickering shadow during height animation (borderless, transparent)

2013-04-23 Thread Robert Vojta
Hallo all, I do use borderless transparent NSWindow with shadow. The way I do initialize this window is at the end of this email. I experienced lot of problems with shadow, but found in Apple examples that the only way to fix shadow (= read to display it correctly) is to call … [self

Re: animating addSubview with iOS4

2011-03-02 Thread Robert Vojta
That's because viewDidLoad doesn't mean it's going to be displayed now. It just informs you that view was loaded. You have to use viewWillAppear/viewWillDisappear or any other method where you know that view is visible = you'll see animations. Sent from my iPhone On 2.3.2011, at 10:44, Martin

Re: animating addSubview with iOS4

2011-03-02 Thread Robert Vojta
I meant viewWillAppear/viewDidAppear, not disappear ... Sry ... Sent from my iPhone On 2.3.2011, at 11:36, Robert Vojta rob...@izyapps.com wrote: That's because viewDidLoad doesn't mean it's going to be displayed now. It just informs you that view was loaded. You have to use viewWillAppear

CoreText - CTFrameDraw doesn't draw paragraph's last line

2010-11-26 Thread Robert Vojta
Hi all, I'm trying to solve my CoreText problem with paragraph text drawing. It draws my paragraph perfectly, but it doesn't draw the last line in some cases. I have no idea why. Here's the frame size calculation method ... - (CGSize)sizeThatFits:(CGSize)size { CFRange labelFitRange;

Re: CoreText - CTFrameDraw doesn't draw paragraph's last line

2010-11-26 Thread Robert Vojta
On 26.11.2010, at 14:12, Robert Vojta wrote: Sorry, wrong mailing list, redirecting to coretext-dev ... ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

iPad - UIScrollView - smooth scrolling

2010-09-03 Thread Robert Vojta
Hi all, I'm trying to optimize our application for smooth scrolling, but it looks like I'm at the end and I don't know what else I can try. Simple description of what I did so far ... Screen looks like ... - background image, which doesn't scroll and is below UIScrollView - UIScrollView,

Re: Where is the preset?

2010-07-04 Thread Robert Vojta
Or just Get Info on the project and there's Company Name in the first tab. Here you can set project specific company name. -- Sent from my iPhone On 4.7.2010, at 1:51, rramage rram...@dccnet.com wrote: Please forgive this newbie question. When I create a new header implementation file, it

Re: iOS4: UDP sockets in the background

2010-06-25 Thread Robert Vojta
On 23.6.2010, at 20:15, Gerd Knops wrote: I have been doing that without a problem since early iOS 3, so no reason to expect it would stop working in iOS4. FYI, doc quote ... Cancel any Bonjour-related services before being suspended. When your application moves to the background, and

Re: can we have own application logo for ad-hoc release.

2010-06-25 Thread Robert Vojta
On 22.6.2010, at 8:05, Kalyanraju M wrote: Hi,when loading the Ad-Hoc release into iTunes, there is a generic icon shown in the Apps section. Additionally, the label shows Unknown genre. Can i have my own image and my own label at label Unknown genre. Look at