Re: Correct way to specify anchors with NSURL?

2016-04-20 Thread Quincey Morris
On Apr 20, 2016, at 22:16 , Graham Cox wrote: > > But it’s 10.9+ only. I really need a solution that will work back to 10.7 (or > 10.8 at the latest). Then I’d guess you’d need to construct the entire URL as a string first, then use initWithString. Presumably

Re: Correct way to specify anchors with NSURL?

2016-04-20 Thread Graham Cox
> On 21 Apr 2016, at 1:08 PM, Quincey Morris > wrote: > > On Apr 20, 2016, at 19:59 , Graham Cox wrote: >> >> What’s the correct way to append an anchor to a URL? > > I believe you need to use NSURLComponents, and specify the

Re: Text field alignment

2016-04-20 Thread Roland King
> On 21 Apr 2016, at 11:13, Quincey Morris > wrote: > > I’m laying out some views (using auto-layout, though I don’t think that’s the > cause of the problem) on OS X 10.11.4 with Xcode 7.3. In many cases, I’m > baseline-aligning a pair of text fields, one

Re: Correct way to specify anchors with NSURL?

2016-04-20 Thread dangerwillrobinsondanger
There are also URLEncoded... versions of those components that should help to URL encode properly per component type. I'm not sure which SDK added that. Sent from my iPhone > On Apr 21, 2016, at 12:08 PM, Quincey Morris > wrote: > >> On Apr 20, 2016, at

Re: Text field alignment

2016-04-20 Thread dangerwillrobinsondanger
Increase the priority on vertical content hugging of both. Sent from my iPhone > On Apr 21, 2016, at 12:13 PM, Quincey Morris > wrote: > > I’m laying out some views (using auto-layout, though I don’t think that’s the > cause of the problem) on OS X

Re: Air Drop-style sharing between instances of my app?

2016-04-20 Thread Rick Mann
Well, I want it to use the side-channel WiFi connection, if it can, so I think MPC is the way to go. Thanks! > On Apr 20, 2016, at 19:09 , Jeff Kelley wrote: > > That sounds like the perfect use case for using the MultipeerConnectivity > framework. At a lower level, you

Text field alignment

2016-04-20 Thread Quincey Morris
I’m laying out some views (using auto-layout, though I don’t think that’s the cause of the problem) on OS X 10.11.4 with Xcode 7.3. In many cases, I’m baseline-aligning a pair of text fields, one label and one editable. The font is the default (System-Regular, i.e. 13 pt) and the text field

Re: Correct way to specify anchors with NSURL?

2016-04-20 Thread Quincey Morris
On Apr 20, 2016, at 19:59 , Graham Cox wrote: > > What’s the correct way to append an anchor to a URL? I believe you need to use NSURLComponents, and specify the “fragment” property. ___ Cocoa-dev mailing list

Correct way to specify anchors with NSURL?

2016-04-20 Thread Graham Cox
Hi all, I’m building a URL from parts, which may include anchors. When I do this: url = [myURL URLByAppendingPathComponent:@“page#anchor”]; I get a URL which has replaced the # with %23. That may be correct as such, but when it’s used to load the actual page, it results in a 404. If I type

Re: Air Drop-style sharing between instances of my app?

2016-04-20 Thread Jeff Kelley
That sounds like the perfect use case for using the MultipeerConnectivity framework. At a lower level, you could use Bonjour (though that requires the devices to be on the same network). Jeff Kelley > On Apr 20, 2016, at 9:33 PM, Rick Mann wrote: > > Is there a way to

Air Drop-style sharing between instances of my app?

2016-04-20 Thread Rick Mann
Is there a way to do Air Drop-style sharing between two instances of my app (running on separate devices near each other)? It seems I can AirDrop to any other device, but I want to restrict it to devices that have my app installed. Our app gathers app-specific data. It can be beneficial to the

So, you guys have helped me do the impossible.

2016-04-20 Thread Alex Zavatone
Parson the spam, but… StackOverflow only goes so far. Having a community of sharing professionals to advise (through my frustration) has helped me do what a year ago was not even within our dreams. Our entire iOS app, rewritten from scratch (OK, MOSTLY rewritten) in 2 months by me in a

Re: BOOL parameter passed as nil object

2016-04-20 Thread Carl Hoefs
On Apr 19, 2016, at 1:50 PM, John McCall wrote: > We strongly encourage you not to worry about any of this and just always call > methods using the right method signature. Roger, wilco! (It had a 'smell' to it, but I wasn't quite certain why. Now I know! ;-) -Carl

Re: How to make an app launch on login?

2016-04-20 Thread Jens Alfke
FYI, I just filed a bug report complaining about the lack of a reasonable native API for this. rdar://25834170 . —Jens ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: Proper way to set up constants when building an iOS framework

2016-04-20 Thread Jens Alfke
> On Apr 20, 2016, at 11:11 AM, Alex Zavatone wrote: > > I wasn't thinking that I'd make yet another header, (the .pch) to then > include the constants header and then it would need to be at the same level > in the framework as the constants file or would need to be able to see

Re: How to make an app launch on login?

2016-04-20 Thread Alex Zavatone
I use a super useful and nice little tool for iOS called SimulatorManager that has the option to make it an item that is launched at startup. It probably contains the code you need. It is here: https://github.com/tue-savvy/SimulatorManager Hope this helps. Alex Zavatone On Apr 19, 2016, at

Re: Proper way to set up constants when building an iOS framework

2016-04-20 Thread Alex Zavatone
Bingo. It works. She builds. Constants are found. All is well. Thanks for the collective patience. I was initially under the assumption that my constants.h file would somehow need to become the pch, since i put my constants in the .h. I wasn't thinking that I'd make yet another header,

Re: How to make an app launch on login?

2016-04-20 Thread sqwarqDev
| On Apr 20, 2016, at 05:00 PM, sqwarqDev wrote: | If your app is sandboxed you'll need to call it via NSUserAppleScriptTask Correction: NSUserScriptTask

Re: How to make an app launch on login?

2016-04-20 Thread sqwarqDev
Not quite sure what "correct" means there, but I use the AppleScript approach in a couple of my apps and it works without issue. Doesn't require elevated privileges, and it's tied to a checkbox user preference which gets saved in StandardUserDefaults. If your app is sandboxed you'll need to

Re: How to make an app launch on login?

2016-04-20 Thread dangerwillrobinsondanger
I believe the correct answer is LaunchAgent plist, XPC helper LaunchAgent or instruct users to manually add it in system preferences or provide a script they can manually run once. Sent from my iPhone > On Apr 20, 2016, at 6:01 PM, sqwarqDev wrote: > > If you’re

Re: How to make an app launch on login?

2016-04-20 Thread sqwarqDev
If you’re willing (or able: beware sandboxing issues) to call either osascript or NSAppleScript, you can do this via a bit of AppleScript magic: tell application "Finder" to set aPath to POSIX path of (application file id ”com.yourBundleID.yourApp" as string) tell application "System Events” 

Re: No Alert, Discard Change, & Beep

2016-04-20 Thread dangerwillrobinsondanger
> On Apr 20, 2016, at 3:40 PM, Richard Charles wrote: > > The engineers at Apple that invented and implemented this stuff must have > been amazing. And at NeXT before that. The folks who work and have worked on Cocoa have always included people with broad minds,

Fwd: How to make an app launch on login?

2016-04-20 Thread Jeff Szuhay
As Jens suggested in another thread, launchd is likely too low-level. Finally, there is Tim Schroeder’s “Launch At Login Project” which enables a sandboxed app to launch itself.

Re: No Alert, Discard Change, & Beep

2016-04-20 Thread Richard Charles
> On Apr 19, 2016, at 11:52 PM, Quincey Morris > wrote: > > On Apr 19, 2016, at 22:25 , Richard Charles wrote: >> >> I am not sure where the alert sheet comes from but … > > I just looked this up here: > > >