Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
Replied In
URLComponents returns nil instance
OK, now it is working when I initialize urlComps and then initialize urlComps.path with the following two lines.var urlComps: URLComponents = URLComponents()urlComps.path = "/user/auser"I printed it in the console using control click (Print Description of "urlComps") or mousing over urlComps in the source code and clicking the i icon shows the value for path. This is also the method I used when urlComps was showing nil.Printing description of urlComps:▿ /user/auser - path : "/user/auser"It also works asvar urlComps = URLComponents()It must have been my error but before posting the initial question, I tried these and many ways of creating the instance. They were all producing nil but are now working. Even as I was writing my response some failed that now work. I know code does not magically start working but unfortunately I didn't catch whatever I did to fix this.Thank you for your response. I'll be sure to provide much greater detail with questions in the future.