Group Group Group Group Group Group Group Group Group

Swift Apprentice 4: Chapter 23 - Page 382 - GCD


#1

Hi there,

I am not able to see the “Background thread: Adding numbers… etc” if I write the example code with command-line tool, but I am able to see those logs if I write it in iOS app.

My question is, is GCD work differently in iOS and in Mac command-line tool? That’s why it doesn’t show properly if I use command-line tool for the book example?

Thanks.


#2

@choonsiong Thanks very much for your question!

GCD is an API that functions the same way, regardless of either macOS or iOS. What tool are you using? Are you not using Xcode?


#3

Hi! I’m working with Xcode, and the same problems occurs here. Sometimes the “Background thread: Adding numbers…” appears, others don’t. And the “Main thread: The sum is 5050” never appears


#4

@choonsiong @andrerj Do you still have this issue?


#5

I also have this issue with Xcode 10.1 and macOS Mojave 10.14.2


#6

Any ideas here? I’ve got the same issue. No output text when running as a CommandLine app.


#7

This topic was automatically closed after 166 days. New replies are no longer allowed.