• 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
My eyes are failing me.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

My eyes are failing me.


  • Subject: My eyes are failing me.
  • From: Alex Zavatone <email@hidden>
  • Date: Fri, 22 Feb 2019 10:39:57 -0600

I was adding some basic networking code to a simple case test and decided to
try out NSURL URLWithString: relativeToURL:

As can be seen in the output below, it attempts to be doing the opposite of
what is expected.  All I am trying to do is append a string to an NSURL and get
back an NSURL.

Am I making some monumentally obvious mistake in the code below? Because I
can’t see it.

FYI, Xcode 10.1, iOS 12.1


self.loginURL = [NSURL URLWithString:@"/login"
relativeToURL:self.sharedData.webServicesURL]; // // WHY does this not work? It
does "/login -- https://qa-home.mrcooper.com/api";


(lldb) po self.sharedData.webServicesURL
https://qa-home.mrcooper.com/api

(lldb) po  [NSURL URLWithString:@"/login"
relativeToURL:self.sharedData.webServicesURL]
/login -- https://qa-home.mrcooper.com/api

(lldb) po self.sharedData.webServicesURL.absoluteString
https://qa-home.mrcooper.com/api




Sent from my iPad
_______________________________________________

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: Jens Alfke <email@hidden>
    • Re: My eyes are failing me.
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Silly question on extending NSObject.
  • Next by Date: Re: My eyes are failing me.
  • Previous by thread: Re: Silly question on extending NSObject.
  • Next by thread: Re: My eyes are failing me.
  • Index(es):
    • Date
    • Thread