• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: My eyes are failing me.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: My eyes are failing me.


  • Subject: Re: My eyes are failing me.
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 22 Feb 2019 08:48:11 -0800


> On Feb 22, 2019, at 8:39 AM, Alex Zavatone <email@hidden> wrote:
>
> self.loginURL = [NSURL URLWithString:@"/login"
> relativeToURL:self.sharedData.webServicesURL]; // // WHY does this not work?
> It does "/login -- https://qa-home.mrcooper.com/api
> <https://qa-home.mrcooper.com/api>"

Because NSURL’s .description property has a stupid way of printing a relative
URL.

The actual URL is correct, as you’ll see if you do something like `po
self.loginURL.absoluteString`. It should return `
https://qa-home.mrcooper.com/login` <https://qa-home.mrcooper.com/login`>.

Moral of the story: Always use .absoluteString to convert an NSURL to a string,
never .description or something that calls it implicitly.

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: My eyes are failing me.
      • From: Alex Zavatone <email@hidden>
References: 
 >My eyes are failing me. (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: My eyes are failing me.
  • Next by Date: Re: My eyes are failing me.
  • Previous by thread: Re: My eyes are failing me.
  • Next by thread: Re: My eyes are failing me.
  • Index(es):
    • Date
    • Thread