Posts

Post not yet marked as solved
6 Replies
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.
Post not yet marked as solved
6 Replies
I have checked that the result is nil and if I let the simulater continue it will fail.