My eyes are failing me.
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