text:
Xcode 8 makes it easier to find several new categories of bugs with improvements in Runtime Sanitization and the Clang Static Analyzer. The Thread Sanitizer will help you find data races and other concurrency bugs. The static analyzer has been extended to search for localizability issues, check nullability, and find memory leaks in MRR code.
[ Music ] Hello, I'm Anna.
Welcome to the Thread Sanitizer and Static Analysis talk. Since our team works on bug-finding tools, we are going to tell you about new ways of catching bugs.
I'm going to start with giving a brief overview of Address Sanitizer and then dive much deeper into Thread Sanitizer which is a new feature we introducing this year. Later, Devin is going to come up and tell you about the new checks we've added to the Clang Static Analyzer.
But let's start. Sanitizers, [inaudible] LEM tools that combine compile time instrumentation and runtime monitoring to find bugs at runtime. They're similar to Valgrind. However, their main advantage is that they have low runtime overhead. They work with Swift and Objective-C, and they have tight integration into the Xcode UI.
So last year we've introduced Address Sanitizer to macOS and iOS. This tool finds memory corruptions such as stack and heap buffer overflows use up the freeze, double freeze. It's extremely effective at finding memory issues. So if you're not using it already, I highly, highly, highly recommend it. This year we've extended the tool to provide full support for Swift.
Which will be especially exciting to those of you who love to live dangerously in Swift. So what does it mean if you are using unsafe pointer types? Run your test with Address Sanitizer turned on, it will find some bugs for you. Now, while Address Sanitizer mainly focuses on memory corruption issues, there is another large source of bugs that are threading issues. These are even harder to reproduce and debug.
They're sensitive to timing. They might occur only in some certain circumstances which means that the appellations that contain them will have unpredictable behaviors. So this year we introduce support to another tool, Thread Sanitizer which will help you to both find and better understand your threading bugs. TSan reports mainly different kinds of bugs, so let's take a look at some of them.
It will tell you about use of uninitialized mutexes. This might not seem like a big deal. However, if you are using a mutex that is not appropriately initialized that will lead to very subtle bugs in your applications because you're not actually getting any mutual exclusion when you use such a mutex. Another example are thread leaks. If your application has a lot of threads and if those threads are leaked, you will, and if there's memory leaks. Another one unsafe call in signal handlers and unlocks from a wrong thread. However, data races are by far the most common problem because they're so easy to introduce.
They happen when multiple threads access the same memory location without using proper synchronization. So let's see how this tool works by going into an Xcode demo.
So here I'm going to demo this Thread Sanitizer on an alpha version of last year's WWDC app. So here as you would expect, it brings up a schedule for the week. However, notice this interesting visual bug. Even though all the session's data has been downloaded, the network activity indicator keeps spinning. Now, I know I use a global variable to decide when to show and hide this indicator so there might be a threading problem.
Let's see if Thread Sanitizer can help us find it. In order to turn on Thread Sanitizer, we go to edit scheme. Choose diagnostics tab.
And click here on enable Thread Sanitizer. Now, here you can choose to pause in the debugger on every single issue and debug that issue right there.
Or you could choose to keep running, collect all the threading issues that Thread Sanitizer report, and explore them later on.
The second workflow is new in Xcode 8, and it's only supported by Thread Sanitizer, so let's take a look how that works. When your launch application under Thread Sanitizer, Xcode is going to rebuild your project with extra compiler instrumentation, and it's going to launch it in a special mode that tries to find threading issues. So here is our application is up. And Xcode tells us that Thread Sanitizer detected two issues by displaying this purple indicator in the activity viewer. Clicking on this purple indicator will take us to the issue navigator. And while previously we only used it to display build time issues such as compiler warnings, compiler errors, Static Analyzer issues. This year has been extended to provide support to runtime issues.
And this is where Thread Sanitizer's issue found its home. So Thread Sanitizer reported two problems.
Let's take a look at each one. The first one is use of uninitialized mutex. Now, this problem occurred as you were running that application sometime in the past. Thread Sanitizer is going to tell us about that exact moment by providing a historical stack trace.
Even though this is not a live stack trace, you can walk its frames as if it was a live stack trace. So let's take a look.
At some point we called acquire lock. That called pthread mutex lock, and passed an invalid mutex reference.
That was called from reset feed status which was called from the initializer. Now, as you can see here we do initialize the mutex, but we initialize it after we use it. It's a simple ordering bug. So just reordering those to statement should take care of that. Okay, let's go on to the second problem which is a data race. Also, here Thread Sanitizer tells that there is a data race on the variable called activity count. Now, that's the same global variable that they use to decide when to show and hide that indicator.
Since this is a data race, Thread Sanitizer will tell us about two events. The two race accesses.
A read and a write here. So the read happened on thread 11, and the write happened on thread 13.
Notice that neither of those are a main thread, and the stack traces are the same which means that they are probably executing the same cord from multiple threads without using synchronization. So let's take a look. Okay, here we are updating this activity account variable.
Now, I could have fixed this race by adding a lock. But notice that this is just a symptom. The next line here updates the UI.
And we know that the UI updates should happen on the main thread. So the proper fix here is to dispatch both the counter increment and the UI update onto the main cue with Grand Central Dispatch. This will both take care of the logical problem in our application and also take care of the race because all the threads will access that count variable from the same thread.
Now, I'm sure I sound very convincing and you all believe me that I fixed the bugs. However, the best way of checking yourself is to run the tool again on your project. So we should rerun the application again with Thread Sanitizer turned on.
And again it's going to rebuild your project with this extra checking and launch it in the special mode. Now, the application is up.
We see that the strange visual UI bug is gone, and Thread Sanitizer doesn't report any issues. So all is well.
Let's go back to slides. So just to recap the demo, you can enable Thread Sanitizer in the Scheme Editor when you go to the diagnostics tab just like you did with Address Sanitizer. In addition to ASan's workflow of stopping in the debugger on the very first issue, Thread Sanitizer it supports an additional mode. Where you could keep routing as the issues that detected, and then you could explore them in the issue navigator. They will stay there until you launch an application again. So let's now talk about what Xcode does behind the scenes to make this all work. In order to use Thread Sanitizer, Xcode passes a special flag to both Clang and Swift compilers that instruct them to produce an instrumented binary. This binary links to a TSan runtime library that is used by the instrumentation to both monitor the execution of the program and detect those threading issues. So if you're building and running Cocoa command line, you can pass an option to either of the compilers.
And Xcode will also support Thread Sanitizer by providing enableThreadSanitizer option. Now by default, TSan will keep running as the errors are detected. But you can instruct it to abort on the very first issue by setting this TSan options environment variables to halt on error equals 1 when you launch your process. That will allow you to have the same workflow as what you have with Address Sanitizer.
So where can you use this tool? Thread Sanitizer is supported on macOS and in the 64-bit simulators.
It is not supported on the device. So now you know how to use this tool, how to launch it, how to find issues.
Let's talk about what, how you can fix the bugs it reports. And we'll focus mainly on data races because this is the biggest category of bugs it reports.
So what is a data race? Data race happens when multiple threads access the same memory location without using proper synchronization and when at least one of those accesses is a write. And the problem here that you might not only end up with stale data, but the behavior here is unpredictable.
You might even end up with a memory corruption. So what are the reasons for data races? Well, it often indicates that you have a logical problem in the structure of your program. And only you will know how to fix it. On the other hand, it also means that we are missing some synchronization. So let's talk about that second scenario. Here is an example of a data race in Swift.
We have a global variable data. We have a producer that sets it for 42 and a consumer that prints it.
If those two pieces of code are executed by two different threads, there will be a data race. So how about this code? We introduce another variable called is data available. And we set that flag after we update the data in the producer, and in the consumer we are going to wait until the flag is set and then if once it's set, we print the data. Well, this looks very logical. It seems like it should work.
The problem here is what you see is not what will get executed. The instructions here can be reordered by either the compiler or the CPU, so you cannot assume that the flag is set after the data is updated. The order of the instruction is not guaranteed neither in the producer nor the consumer.
So what is the point here of this slide? I just want to demonstrate that trying to roll your own synchronization methods is often not a good idea. What should we do instead? We should use something that's available already.
For example, Grand Central Dispatch is a very good option. You can dispatch the recent accesses onto the same serial queue that will make sure that they execute it on the same thread, and there will be no data race. So now as you might recall Thread Sanitizer works for both Objective-C and Swift. So let's use Objective-C for our next example. Here is lazy initialization code.
And we are implementing method called getSingleton. That makes sure that we return the same shared instance to all of its callers.
Now, if this code is executed by multiple threads without proper synchronization, there will be a data race when both threads try to update the shared instance variable.
Okay, so what about this code? We tried to fix the problem by allocating and initializing a local variable, and then we are using atomic compare and set operation to make sure that threads atomically update that global variable.
So there will be no data race on the right. This might look like a step in the right direction, but this code still has problems.
So let's take a look at them. First, it's very difficult to reason about memory management when you are using atomics.
So, for example, here you will have use-after-free if you are using ARC. And if you are using MRR, this object will be leaked only in case there is a race. So that's not good. That's not the only problem.
Another problem here is that since the read is unsynchronized, there could still be a race where one thread is trying to read that shared variable and another one is trying to atomically set it. So this is undefined behavior, and that's not good.
What should you do instead? I mean, if you know the solution already, use Grand Central Dispatch.
Dispatch wants performed laziness socialization for you. It's even simpler in Swift. Both global variables and class constants have dispatch one semantics. So you can choose either of those two solutions, whatever works best for your code.
Okay, so just to summarize, you should use the highest level API that's suitable to your needs.
And most people should be using Grand Central Dispatch. If that's not suitable, you can use pthread APIs or NSLock, for example, now, we do have a new OS unfair lock that's new on our platform this year, and it replaces OSSpinLock. And they also have C++ and C11 Atomics. They are supported by Thread Sanitizer.
But as you've seen in the previous example, they're very difficult to use correctly. And besides the performance, being here is either not measurable or negligible. So don't choose to use those APIs if you did not measure that they actually have something on your application.
So for more information about all of those APIs, please attend Concurrent Programming talk on Friday. So now let's talk about benign races.
What are those? Some developers argue that on some architectures, for example x86, you do not need to insert synchronization between a read and a write because the architecture itself guarantees automaticity of those operations on pointer size data.
Now, it's important to remember that any race, even at a benign race, is considered to be undefined behavior from C or C++ standard.
So not only will you be surprised if that code with benign races write, runs on an architecture you have not tested well on before.
But the compiler is free to reorder those instructions as if no other thread saw that. So the bottom line is that you might end up with very subtle bugs. So as our engineering lead for Thread Sanitizer [inaudible] "Fix all the bugs." Now, to the most exciting part of our talk. As we all know, data races are hard to reproduce since they're so sensitive to timing. So the most interesting thing about Thread Sanitizer is that it can detect races that did not even manifest during that particular program run. Let's see how it does that. When you compile your program with Thread Sanitizer, it instruments every memory access, and it prefixes it with a check, with a code. But first, records the information about that access.
And second checks if that access participates in a race. So let's take a closer look. For every aligned 8 bytes of application memory, Thread Sanitizer shared those state, keeps track up to four accesses. So suppose we have four threads.
Thread one writes to that memory location. Thread sanitizer updates that, stores that information to shadow thread to reset memory location.
Again, we record that, and we keep going on and on. So now what happens if you have more than four accesses? Thread Sanitizer uses an educated guess onto what cell to evict next. So here it evicts access to that same thread which lets it not lose precision.
However, if we had access from a fifth thread, it would evict a random cell. So bounding the number of accesses like this means that we might not catch all races and all cases. Okay. Now, let's talk about how it detects data races. Thread sanitizer uses a well known technique of vector clocks for race detection. So how does that work? Thread local storage for each thread keeps track of threads own counter and the counters of all the other threads. This counter is initialized to zero, and every time a thread accesses memory, its counter is incremented. So, for example, here suppose thread one access two memory locations. Thread two accessed 22 memory locations. Thread three accesses 55 memory locations.
Now, this timestamps are not comparable. Each thread uses those timestamps or counters to order the accesses to memory that it performs.
Okay. So let's go back and bring back our memory location and its shadow and see how its threads interact and how they update the counters here.
We'll also add the lock that threads used to synchronize access to that memory location. Okay, thread one writes.
It's a well behaved thread. It's going to acquire a lock. It's going to update its counter.
It's going to write to that memory location. Now, Thread Sanitizer sees that. It's going to update the shadow.
Before updating the shadow, it sees that there is nothing in the shadow, stored in the shadow which means that that memory location has not been accessed before.
So it just safe to go ahead and write that down. Now before releasing the lock, thread one is going to update it with its own timestamp, and it releases the lock.
Now, it's time for thread two to write. Again, thread two is a very well behaved thread. It's going to acquire the lock.
Now, acquiring a lock like this lets thread two see that thread one has implemented its counter. Now, thread two implements its own counter, it writes to that memory location. Thread Sanitizer sees that it's trying to update the shadow. Now, here it sees that there is something there it shadowed before, so that means that memory location has been accessed already, so it's going to check for races.
By comparing the timestamps, Thread Sanitizer sees that thread two has synchronized after thread one has accessed the memory.
So there is no data race. And we can just proceed with the update. Before releasing the lock, thread two is going to update with its own timestamp. And it releases the lock. Okay, now it's time for thread three to write.
Thread three has been waiting for a long time. It's so excited to write to that memory location. Guess what, it forgets the lock.
It implements the counter, writes to the memory location, Thread Sanitizer is there, it's watching. It's trying to update the shadow and check for races.
So here the Thread Sanitizer sees that the old view of thread three is too old. The reads and writes stored in the shadow happened after thread three last synchronized. This allows Thread Sanitizer to catch the bug. So what's important to know about this algorithm is that the sensitivity of timing that we associate with data races does not apply here.
TSan can detect races even if they did not manifest during that particular run but could occur if you run your application again or your users run your application. And this makes using Thread Sanitizer much more effective than debugging and trying to reproduce those data races in the [inaudible] without the use of the tool. Now, another thing to remember here is that Thread Sanitizer is a runtime bug finding tool, so it will only catch races if you provided sufficient coverage. So please run all your tests with Thread Sanitizer turned on.
And that was Thread Sanitizer new in Xcode 8. Use it. It will find bugs, it will make your applications better.
Now, off to Devin who will tell you about the checks we've added to the Clang Static Analyzer.
Thanks, Anna. Unlike the sanitizers, the Static Analyzer can find bugs without even running your code. It does this by systematically exploring all paths through the program.
This makes it great at catching hard to reproduce edge-case bugs. It's supported for all of the languages that Clang compiles to, so C, Objective-C, and C++. This year, we've added three now checks to the Static Analyzer. A check for missing localizability, a check for improper instance cleanup in your manual retained release code, and a check for nullability violations.
Let me tell you about them. A common bug in localized apps is to forget to localize a UI element.
This can be very startling for your users. They'll be using your app in their own native language when all of a sudden, out of the blue a string in your language shows up in their UI. This is not a good user experience. So let me give you a demo of how the Static Analyzer can catch this kind of bug. Okay. So I'll demo the Static Analyzer on the same app that Anna used.
To run the analyzer, you can go to Xcode's product menu and choose analyze. This will explore a large number of paths through your program and try to find a bug along each one. Just like Thread Sanitizer, if address, if the Static Analyzer finds an issue, it will display this blue Static Analyzer icon in Xcode's activity bar. If you click on it it will show you the issue navigator, so it looks like we have a localizability issue. A nonlocalized string is flowing to a user-facing property. So we should localize it.
But looking at this method, I don't see anything immediately wrong. So I'm going to click on the diagnostic.
This shows me more information about how this nonlocalized string ended up flowing to the user-facing property.
I can explore this path with the path explorer bar at the top of Xcode's editor. Working my way backwards, I can see that this method is called from a TableView data source method, and then an intern it's passing in this nonlocalized constant string.
So let's localize it. To do so, I'll use the NS localized string macro. This will load a translated version of the string at runtime. Now, it's really important when using this macro to also include a comment for your translator to help them correctly translate that string. So I will say "This is the button that resets the session filter." Okay. Let's run the analyzer again to make sure we fixed the issue. Looks great.
So I'll switch back to slides. To recap, you can run the analyzer from the product menu, and it will display any of the issues that it finds in the issue navigator. As we saw, it's super useful to click on that diagnostic to show the path. This makes it easy to understand the issue and ultimately how to fix it.
So the analyzer can now find missing localizability as we saw. But it will also warn us if we've forgotten to provide that comment to our translators. Here I've provided a comment of nil which is not helpful at all. And so the analyzer will warn about it you can turn these checks on and other Static Analyzer checks in the Static Analyzer section of your project's build settings.
The check for missing localizability will be turned on automatically by Xcode if your project has localizations in more than one language.
The check for missing comments is off by default, but you should make sure to turn it on if you don't communicate these comments to your translator in some other way. For example, you might already be doing this directly in your strings file.
This year we've also improved checking of dealloc in your manual retained release code. It's really important under manual retained release to not release instance variables that are synthesized for assigned properties in your dealloc. If you do so, this can cause an over-release when the owner of that value also releases it and can crash your program. So the analyzer now warns about this. On the other hand, you must release instance variables that are synthesized for retain or copy properties. Because if you don't, they will leak. The analyzer warns about this as well.
Yeah! So this is an awesome check.
It found a bug in every single manual retained release project that we ran it on. So try it out.
Of course, the best way to get rid of retained release issue is to update your project to automated reference counting. Fortunately, Xcode can help you do this automatically. If you go to the edit menu and choose convert to Objective-C ARC.
This will have the compiler handle all of the messiness of retained release for you. Finally this year, we've added a check for nullability violations. This builds on work from last year where we annotated our STKs to indicate whether methods or properties take or return nil.
For example, Core Location's timestamp property is non-null. This is because every measurement of a location also has a corresponding date and time.
In contrast, its floor property is nullable. That's because this property will return nil when the location is in a venue that's not indoor location enabled. You should annotate your own headers with nullability because it enables a new program and model where you communicate your expectations about nullability directly to your clients. This is important because violations of those expectations can cause crashes or unexpected behavior. In fact, we thought it was so important that we built it into Swift where the optional type requires you to check for nil before using a value. Now, it's important in Objective-C as well, and so we've added a check for nullability violations to the Static Analyzer. And this check is particularly useful for projects that mix Swift and Objective-C code.
And it finds two kinds of issues. There might be logical problems in your code. Maybe you're returning nil when you shouldn't.
Or you might have an incorrect annotation. So let's take a look at how to fix each of these two kinds of issues.
A common mistake is to initialize a local variable with nil and then later fill it in with a series of non-exhaustive branches.
This method, for example, returns a short description of a location. Either the name of a city or the country that contains that location. But we fail to consider an important case. What if the location is in international waters? Then there will neither be a city nor a country. And so this method will unexpectedly return nil. And the analyzer will tell us about it.
Fortunately. This is awesome, too. Fortunately, the fix here is simple. All you need to do is initialize your local variable with a nonnil default.
In this case, we'll use the constant string Earth and, of course, we'll make sure to localize it. On the other hand, it could be that your code in the implementation is perfectly fine, and it's the annotation that's incorrect. And we found that one way that this commonly arises is when you use the convenient NS assume nonnull begin and end macros. These macros wrap a portion of your header and say that inside of the reins that they wrap, that types will be implicitly nonnull. This can save you a lot of typing, but it also makes it really easy to forget to mark a property as nullable. In this example, the pressure property returns nil when the device doesn't have a barometer. But the property is implicitly nonnull. Fortunately, the fix here is simple as well.
We can simply explicitly mark that property as nullable inside of that region. And this will tell clients that they shouldn't expect pressure data to always be available. Now, you do need to be careful about this.
That's because the nullability of your API is a contract. And so you shouldn't change it just to make the analyzer happy. Instead, you should carefully consider the API that you want to expose and use that. If you do decide to change your API, you'll also need to carefully think about backwards compatibility.
This is particularly important in Swift where nullability changes how a type is imported. You might also find yourself in a situation where you can change neither the implementation of your method nor its annotation. And in these cases, you can suppress the analyzer diagnostic with a cast. One way that this commonly arises is in methods that defensively return nil when a precondition is violated.
In this example, the method returns nil when an index is out of bounds. If there's existing code that relies on this behavior, then you can't remove that check and you can't replace it within a cert. Instead, the right thing to do is tell the analyzer that that's what you meant by casting the return value to nonnull. So that's what's new in the Static Analyzer and Xcode 8.
So let's wrap up. Today we told you about three great tools.
These tools find real bugs. Address Sanitizer and Thread Sanitizer find memory corruption in threading issues at runtime.
And the Static Analyzer can find bugs without even running your code. So please use these tools on your own projects.
They will help you find your bugs before your users find them for you. If you're interested in more information, you can go to your session website. And there's also several related sessions that we think you might find helpful.

tokenized:
Xcode 8 makes it easier to find several new categories of bugs with improvements in Runtime Sanitization and the Clang Static Analyzer . The Thread Sanitizer will help you find data races and other concurrency bugs . The static analyzer has been extended to search for localizability issues , check nullability , and find memory leaks in MRR code .
 [ Music ] Hello , I 'm Anna .
 Welcome to the Thread Sanitizer and Static Analysis talk . Since our team works on bug - finding tools , we are going to tell you about new ways of catching bugs .
 I 'm going to start with giving a brief overview of Address Sanitizer and then dive much deeper into Thread Sanitizer which is a new feature we introducing this year . Later , Devin is going to come up and tell you about the new checks we 've added to the Clang Static Analyzer .
 But let 's start . Sanitizers , [ inaudible ] LEM tools that combine compile time instrumentation and runtime monitoring to find bugs at runtime . They 're similar to Valgrind . However , their main advantage is that they have low runtime overhead . They work with Swift and Objective - C , and they have tight integration into the Xcode UI .
 So last year we 've introduced Address Sanitizer to macOS and iOS . This tool finds memory corruptions such as stack and heap buffer overflows use up the freeze , double freeze . It 's extremely effective at finding memory issues . So if you 're not using it already , I highly , highly , highly recommend it . This year we 've extended the tool to provide full support for Swift .
 Which will be especially exciting to those of you who love to live dangerously in Swift . So what does it mean if you are using unsafe pointer types ? Run your test with Address Sanitizer turned on , it will find some bugs for you . Now , while Address Sanitizer mainly focuses on memory corruption issues , there is another large source of bugs that are threading issues . These are even harder to reproduce and debug .
 They 're sensitive to timing . They might occur only in some certain circumstances which means that the appellations that contain them will have unpredictable behaviors . So this year we introduce support to another tool , Thread Sanitizer which will help you to both find and better understand your threading bugs . TSan reports mainly different kinds of bugs , so let 's take a look at some of them .
 It will tell you about use of uninitialized mutexes . This might not seem like a big deal . However , if you are using a mutex that is not appropriately initialized that will lead to very subtle bugs in your applications because you 're not actually getting any mutual exclusion when you use such a mutex . Another example are thread leaks . If your application has a lot of threads and if those threads are leaked , you will , and if there 's memory leaks . Another one unsafe call in signal handlers and unlocks from a wrong thread . However , data races are by far the most common problem because they 're so easy to introduce .
 They happen when multiple threads access the same memory location without using proper synchronization . So let 's see how this tool works by going into an Xcode demo .
 So here I 'm going to demo this Thread Sanitizer on an alpha version of last year 's WWDC app . So here as you would expect , it brings up a schedule for the week . However , notice this interesting visual bug . Even though all the session 's data has been downloaded , the network activity indicator keeps spinning . Now , I know I use a global variable to decide when to show and hide this indicator so there might be a threading problem .
 Let 's see if Thread Sanitizer can help us find it . In order to turn on Thread Sanitizer , we go to edit scheme . Choose diagnostics tab .
 And click here on enable Thread Sanitizer . Now , here you can choose to pause in the debugger on every single issue and debug that issue right there .
 Or you could choose to keep running , collect all the threading issues that Thread Sanitizer report , and explore them later on .
 The second workflow is new in Xcode 8 , and it 's only supported by Thread Sanitizer , so let 's take a look how that works . When your launch application under Thread Sanitizer , Xcode is going to rebuild your project with extra compiler instrumentation , and it 's going to launch it in a special mode that tries to find threading issues . So here is our application is up . And Xcode tells us that Thread Sanitizer detected two issues by displaying this purple indicator in the activity viewer . Clicking on this purple indicator will take us to the issue navigator . And while previously we only used it to display build time issues such as compiler warnings , compiler errors , Static Analyzer issues . This year has been extended to provide support to runtime issues .
 And this is where Thread Sanitizer 's issue found its home . So Thread Sanitizer reported two problems .
 Let 's take a look at each one . The first one is use of uninitialized mutex . Now , this problem occurred as you were running that application sometime in the past . Thread Sanitizer is going to tell us about that exact moment by providing a historical stack trace .
 Even though this is not a live stack trace , you can walk its frames as if it was a live stack trace . So let 's take a look .
 At some point we called acquire lock . That called pthread mutex lock , and passed an invalid mutex reference .
 That was called from reset feed status which was called from the initializer . Now , as you can see here we do initialize the mutex , but we initialize it after we use it . It 's a simple ordering bug . So just reordering those to statement should take care of that . Okay , let 's go on to the second problem which is a data race . Also , here Thread Sanitizer tells that there is a data race on the variable called activity count . Now , that 's the same global variable that they use to decide when to show and hide that indicator .
 Since this is a data race , Thread Sanitizer will tell us about two events . The two race accesses .
 A read and a write here . So the read happened on thread 11 , and the write happened on thread 13 .
 Notice that neither of those are a main thread , and the stack traces are the same which means that they are probably executing the same cord from multiple threads without using synchronization . So let 's take a look . Okay , here we are updating this activity account variable .
 Now , I could have fixed this race by adding a lock . But notice that this is just a symptom . The next line here updates the UI .
 And we know that the UI updates should happen on the main thread . So the proper fix here is to dispatch both the counter increment and the UI update onto the main cue with Grand Central Dispatch . This will both take care of the logical problem in our application and also take care of the race because all the threads will access that count variable from the same thread .
 Now , I 'm sure I sound very convincing and you all believe me that I fixed the bugs . However , the best way of checking yourself is to run the tool again on your project . So we should rerun the application again with Thread Sanitizer turned on .
 And again it 's going to rebuild your project with this extra checking and launch it in the special mode . Now , the application is up .
 We see that the strange visual UI bug is gone , and Thread Sanitizer does n't report any issues . So all is well .
 Let 's go back to slides . So just to recap the demo , you can enable Thread Sanitizer in the Scheme Editor when you go to the diagnostics tab just like you did with Address Sanitizer . In addition to ASan 's workflow of stopping in the debugger on the very first issue , Thread Sanitizer it supports an additional mode . Where you could keep routing as the issues that detected , and then you could explore them in the issue navigator . They will stay there until you launch an application again . So let 's now talk about what Xcode does behind the scenes to make this all work . In order to use Thread Sanitizer , Xcode passes a special flag to both Clang and Swift compilers that instruct them to produce an instrumented binary . This binary links to a TSan runtime library that is used by the instrumentation to both monitor the execution of the program and detect those threading issues . So if you 're building and running Cocoa command line , you can pass an option to either of the compilers .
 And Xcode will also support Thread Sanitizer by providing enableThreadSanitizer option . Now by default , TSan will keep running as the errors are detected . But you can instruct it to abort on the very first issue by setting this TSan options environment variables to halt on error equals 1 when you launch your process . That will allow you to have the same workflow as what you have with Address Sanitizer .
 So where can you use this tool ? Thread Sanitizer is supported on macOS and in the 64 - bit simulators .
 It is not supported on the device . So now you know how to use this tool , how to launch it , how to find issues .
 Let 's talk about what , how you can fix the bugs it reports . And we 'll focus mainly on data races because this is the biggest category of bugs it reports .
 So what is a data race ? Data race happens when multiple threads access the same memory location without using proper synchronization and when at least one of those accesses is a write . And the problem here that you might not only end up with stale data , but the behavior here is unpredictable .
 You might even end up with a memory corruption . So what are the reasons for data races ? Well , it often indicates that you have a logical problem in the structure of your program . And only you will know how to fix it . On the other hand , it also means that we are missing some synchronization . So let 's talk about that second scenario . Here is an example of a data race in Swift .
 We have a global variable data . We have a producer that sets it for 42 and a consumer that prints it .
 If those two pieces of code are executed by two different threads , there will be a data race . So how about this code ? We introduce another variable called is data available . And we set that flag after we update the data in the producer , and in the consumer we are going to wait until the flag is set and then if once it 's set , we print the data . Well , this looks very logical . It seems like it should work .
 The problem here is what you see is not what will get executed . The instructions here can be reordered by either the compiler or the CPU , so you can not assume that the flag is set after the data is updated . The order of the instruction is not guaranteed neither in the producer nor the consumer .
 So what is the point here of this slide ? I just want to demonstrate that trying to roll your own synchronization methods is often not a good idea . What should we do instead ? We should use something that 's available already .
 For example , Grand Central Dispatch is a very good option . You can dispatch the recent accesses onto the same serial queue that will make sure that they execute it on the same thread , and there will be no data race . So now as you might recall Thread Sanitizer works for both Objective - C and Swift . So let 's use Objective - C for our next example . Here is lazy initialization code .
 And we are implementing method called getSingleton . That makes sure that we return the same shared instance to all of its callers .
 Now , if this code is executed by multiple threads without proper synchronization , there will be a data race when both threads try to update the shared instance variable .
 Okay , so what about this code ? We tried to fix the problem by allocating and initializing a local variable , and then we are using atomic compare and set operation to make sure that threads atomically update that global variable .
 So there will be no data race on the right . This might look like a step in the right direction , but this code still has problems .
 So let 's take a look at them . First , it 's very difficult to reason about memory management when you are using atomics .
 So , for example , here you will have use - after - free if you are using ARC . And if you are using MRR , this object will be leaked only in case there is a race . So that 's not good . That 's not the only problem .
 Another problem here is that since the read is unsynchronized , there could still be a race where one thread is trying to read that shared variable and another one is trying to atomically set it . So this is undefined behavior , and that 's not good .
 What should you do instead ? I mean , if you know the solution already , use Grand Central Dispatch .
 Dispatch wants performed laziness socialization for you . It 's even simpler in Swift . Both global variables and class constants have dispatch one semantics . So you can choose either of those two solutions , whatever works best for your code .
 Okay , so just to summarize , you should use the highest level API that 's suitable to your needs .
 And most people should be using Grand Central Dispatch . If that 's not suitable , you can use pthread APIs or NSLock , for example , now , we do have a new OS unfair lock that 's new on our platform this year , and it replaces OSSpinLock . And they also have C++ and C11 Atomics . They are supported by Thread Sanitizer .
 But as you 've seen in the previous example , they 're very difficult to use correctly . And besides the performance , being here is either not measurable or negligible . So do n't choose to use those APIs if you did not measure that they actually have something on your application .
 So for more information about all of those APIs , please attend Concurrent Programming talk on Friday . So now let 's talk about benign races .
 What are those ? Some developers argue that on some architectures , for example x86 , you do not need to insert synchronization between a read and a write because the architecture itself guarantees automaticity of those operations on pointer size data .
 Now , it 's important to remember that any race , even at a benign race , is considered to be undefined behavior from C or C++ standard .
 So not only will you be surprised if that code with benign races write , runs on an architecture you have not tested well on before .
 But the compiler is free to reorder those instructions as if no other thread saw that . So the bottom line is that you might end up with very subtle bugs . So as our engineering lead for Thread Sanitizer [ inaudible ] " Fix all the bugs . " Now , to the most exciting part of our talk . As we all know , data races are hard to reproduce since they 're so sensitive to timing . So the most interesting thing about Thread Sanitizer is that it can detect races that did not even manifest during that particular program run . Let 's see how it does that . When you compile your program with Thread Sanitizer , it instruments every memory access , and it prefixes it with a check , with a code . But first , records the information about that access .
 And second checks if that access participates in a race . So let 's take a closer look . For every aligned 8 bytes of application memory , Thread Sanitizer shared those state , keeps track up to four accesses . So suppose we have four threads .
 Thread one writes to that memory location . Thread sanitizer updates that , stores that information to shadow thread to reset memory location .
 Again , we record that , and we keep going on and on . So now what happens if you have more than four accesses ? Thread Sanitizer uses an educated guess onto what cell to evict next . So here it evicts access to that same thread which lets it not lose precision .
 However , if we had access from a fifth thread , it would evict a random cell . So bounding the number of accesses like this means that we might not catch all races and all cases . Okay . Now , let 's talk about how it detects data races . Thread sanitizer uses a well known technique of vector clocks for race detection . So how does that work ? Thread local storage for each thread keeps track of threads own counter and the counters of all the other threads . This counter is initialized to zero , and every time a thread accesses memory , its counter is incremented . So , for example , here suppose thread one access two memory locations . Thread two accessed 22 memory locations . Thread three accesses 55 memory locations .
 Now , this timestamps are not comparable . Each thread uses those timestamps or counters to order the accesses to memory that it performs .
 Okay . So let 's go back and bring back our memory location and its shadow and see how its threads interact and how they update the counters here .
 We 'll also add the lock that threads used to synchronize access to that memory location . Okay , thread one writes .
 It 's a well behaved thread . It 's going to acquire a lock . It 's going to update its counter .
 It 's going to write to that memory location . Now , Thread Sanitizer sees that . It 's going to update the shadow .
 Before updating the shadow , it sees that there is nothing in the shadow , stored in the shadow which means that that memory location has not been accessed before .
 So it just safe to go ahead and write that down . Now before releasing the lock , thread one is going to update it with its own timestamp , and it releases the lock .
 Now , it 's time for thread two to write . Again , thread two is a very well behaved thread . It 's going to acquire the lock .
 Now , acquiring a lock like this lets thread two see that thread one has implemented its counter . Now , thread two implements its own counter , it writes to that memory location . Thread Sanitizer sees that it 's trying to update the shadow . Now , here it sees that there is something there it shadowed before , so that means that memory location has been accessed already , so it 's going to check for races .
 By comparing the timestamps , Thread Sanitizer sees that thread two has synchronized after thread one has accessed the memory .
 So there is no data race . And we can just proceed with the update . Before releasing the lock , thread two is going to update with its own timestamp . And it releases the lock . Okay , now it 's time for thread three to write .
 Thread three has been waiting for a long time . It 's so excited to write to that memory location . Guess what , it forgets the lock .
 It implements the counter , writes to the memory location , Thread Sanitizer is there , it 's watching . It 's trying to update the shadow and check for races .
 So here the Thread Sanitizer sees that the old view of thread three is too old . The reads and writes stored in the shadow happened after thread three last synchronized . This allows Thread Sanitizer to catch the bug . So what 's important to know about this algorithm is that the sensitivity of timing that we associate with data races does not apply here .
 TSan can detect races even if they did not manifest during that particular run but could occur if you run your application again or your users run your application . And this makes using Thread Sanitizer much more effective than debugging and trying to reproduce those data races in the [ inaudible ] without the use of the tool . Now , another thing to remember here is that Thread Sanitizer is a runtime bug finding tool , so it will only catch races if you provided sufficient coverage . So please run all your tests with Thread Sanitizer turned on .
 And that was Thread Sanitizer new in Xcode 8 . Use it . It will find bugs , it will make your applications better .
 Now , off to Devin who will tell you about the checks we 've added to the Clang Static Analyzer .
 Thanks , Anna . Unlike the sanitizers , the Static Analyzer can find bugs without even running your code . It does this by systematically exploring all paths through the program .
 This makes it great at catching hard to reproduce edge - case bugs . It 's supported for all of the languages that Clang compiles to , so C , Objective - C , and C++ . This year , we 've added three now checks to the Static Analyzer . A check for missing localizability , a check for improper instance cleanup in your manual retained release code , and a check for nullability violations .
 Let me tell you about them . A common bug in localized apps is to forget to localize a UI element .
 This can be very startling for your users . They 'll be using your app in their own native language when all of a sudden , out of the blue a string in your language shows up in their UI . This is not a good user experience . So let me give you a demo of how the Static Analyzer can catch this kind of bug . Okay . So I 'll demo the Static Analyzer on the same app that Anna used .
 To run the analyzer , you can go to Xcode 's product menu and choose analyze . This will explore a large number of paths through your program and try to find a bug along each one . Just like Thread Sanitizer , if address , if the Static Analyzer finds an issue , it will display this blue Static Analyzer icon in Xcode 's activity bar . If you click on it it will show you the issue navigator , so it looks like we have a localizability issue . A nonlocalized string is flowing to a user - facing property . So we should localize it .
 But looking at this method , I do n't see anything immediately wrong . So I 'm going to click on the diagnostic .
 This shows me more information about how this nonlocalized string ended up flowing to the user - facing property .
 I can explore this path with the path explorer bar at the top of Xcode 's editor . Working my way backwards , I can see that this method is called from a TableView data source method , and then an intern it 's passing in this nonlocalized constant string .
 So let 's localize it . To do so , I 'll use the NS localized string macro . This will load a translated version of the string at runtime . Now , it 's really important when using this macro to also include a comment for your translator to help them correctly translate that string . So I will say " This is the button that resets the session filter . " Okay . Let 's run the analyzer again to make sure we fixed the issue . Looks great .
 So I 'll switch back to slides . To recap , you can run the analyzer from the product menu , and it will display any of the issues that it finds in the issue navigator . As we saw , it 's super useful to click on that diagnostic to show the path . This makes it easy to understand the issue and ultimately how to fix it .
 So the analyzer can now find missing localizability as we saw . But it will also warn us if we 've forgotten to provide that comment to our translators . Here I 've provided a comment of nil which is not helpful at all . And so the analyzer will warn about it you can turn these checks on and other Static Analyzer checks in the Static Analyzer section of your project 's build settings .
 The check for missing localizability will be turned on automatically by Xcode if your project has localizations in more than one language .
 The check for missing comments is off by default , but you should make sure to turn it on if you do n't communicate these comments to your translator in some other way . For example , you might already be doing this directly in your strings file .
 This year we 've also improved checking of dealloc in your manual retained release code . It 's really important under manual retained release to not release instance variables that are synthesized for assigned properties in your dealloc . If you do so , this can cause an over - release when the owner of that value also releases it and can crash your program . So the analyzer now warns about this . On the other hand , you must release instance variables that are synthesized for retain or copy properties . Because if you do n't , they will leak . The analyzer warns about this as well .
 Yeah ! So this is an awesome check .
 It found a bug in every single manual retained release project that we ran it on . So try it out .
 Of course , the best way to get rid of retained release issue is to update your project to automated reference counting . Fortunately , Xcode can help you do this automatically . If you go to the edit menu and choose convert to Objective - C ARC .
 This will have the compiler handle all of the messiness of retained release for you . Finally this year , we 've added a check for nullability violations . This builds on work from last year where we annotated our STKs to indicate whether methods or properties take or return nil .
 For example , Core Location 's timestamp property is non - null . This is because every measurement of a location also has a corresponding date and time .
 In contrast , its floor property is nullable . That 's because this property will return nil when the location is in a venue that 's not indoor location enabled . You should annotate your own headers with nullability because it enables a new program and model where you communicate your expectations about nullability directly to your clients . This is important because violations of those expectations can cause crashes or unexpected behavior . In fact , we thought it was so important that we built it into Swift where the optional type requires you to check for nil before using a value . Now , it 's important in Objective - C as well , and so we 've added a check for nullability violations to the Static Analyzer . And this check is particularly useful for projects that mix Swift and Objective - C code .
 And it finds two kinds of issues . There might be logical problems in your code . Maybe you 're returning nil when you should n't .
 Or you might have an incorrect annotation . So let 's take a look at how to fix each of these two kinds of issues .
 A common mistake is to initialize a local variable with nil and then later fill it in with a series of non - exhaustive branches .
 This method , for example , returns a short description of a location . Either the name of a city or the country that contains that location . But we fail to consider an important case . What if the location is in international waters ? Then there will neither be a city nor a country . And so this method will unexpectedly return nil . And the analyzer will tell us about it .
 Fortunately . This is awesome , too . Fortunately , the fix here is simple . All you need to do is initialize your local variable with a nonnil default .
 In this case , we 'll use the constant string Earth and , of course , we 'll make sure to localize it . On the other hand , it could be that your code in the implementation is perfectly fine , and it 's the annotation that 's incorrect . And we found that one way that this commonly arises is when you use the convenient NS assume nonnull begin and end macros . These macros wrap a portion of your header and say that inside of the reins that they wrap , that types will be implicitly nonnull . This can save you a lot of typing , but it also makes it really easy to forget to mark a property as nullable . In this example , the pressure property returns nil when the device does n't have a barometer . But the property is implicitly nonnull . Fortunately , the fix here is simple as well .
 We can simply explicitly mark that property as nullable inside of that region . And this will tell clients that they should n't expect pressure data to always be available . Now , you do need to be careful about this .
 That 's because the nullability of your API is a contract . And so you should n't change it just to make the analyzer happy . Instead , you should carefully consider the API that you want to expose and use that . If you do decide to change your API , you 'll also need to carefully think about backwards compatibility .
 This is particularly important in Swift where nullability changes how a type is imported . You might also find yourself in a situation where you can change neither the implementation of your method nor its annotation . And in these cases , you can suppress the analyzer diagnostic with a cast . One way that this commonly arises is in methods that defensively return nil when a precondition is violated .
 In this example , the method returns nil when an index is out of bounds . If there 's existing code that relies on this behavior , then you ca n't remove that check and you ca n't replace it within a cert . Instead , the right thing to do is tell the analyzer that that 's what you meant by casting the return value to nonnull . So that 's what 's new in the Static Analyzer and Xcode 8 .
 So let 's wrap up . Today we told you about three great tools .
 These tools find real bugs . Address Sanitizer and Thread Sanitizer find memory corruption in threading issues at runtime .
 And the Static Analyzer can find bugs without even running your code . So please use these tools on your own projects .
 They will help you find your bugs before your users find them for you . If you 're interested in more information , you can go to your session website . And there 's also several related sessions that we think you might find helpful .


text: SmartFTP allows you to transfer files across the Internet. Features include SSL (Implicit/Explicit), FXP Support, Multiple connections, Proxy Firewall support, Drag and Drop from Explorer, and Remote Directory caching. It is a solid FTP client that is constantly being improved. Take it for a test ride today and see for yourself its many outstanding features.

tokenized: SmartFTP allows you to transfer files across the Internet . Features include SSL ( Implicit / Explicit ) , FXP Support , Multiple connections , Proxy Firewall support , Drag and Drop from Explorer , and Remote Directory caching . It is a solid FTP client that is constantly being improved . Take it for a test ride today and see for yourself its many outstanding features .


text:
Just a few days back we updated you about the iconic LG and Prada cell phones. Now we are back with it. But this time, with pictures to testify the fusion of high-end technology and avant-garde design. It is the basic LG KE850 handset in a Prada design as well as packaging and will have a unique Prada user interface. The most unique feature of this cell is that it sports a touch screen display that will change according to the application on the screen instead of the conventional keypad. It has a classic minimalist design, featuring an utterly stylish white on black user interface and will come in a swanky Prada designed leather case.
Prices have yet to be confirmed, but it will be a lot cheaper (in the range of $400 to $500) than might be expected of a Prada branded product. This phone will be hitting five European countries this spring, and hopefully be making its way stateside later in the year.

tokenized:
Just a few days back we updated you about the iconic LG and Prada cell phones . Now we are back with it . But this time , with pictures to testify the fusion of high - end technology and avant - garde design . It is the basic LG KE850 handset in a Prada design as well as packaging and will have a unique Prada user interface . The most unique feature of this cell is that it sports a touch screen display that will change according to the application on the screen instead of the conventional keypad . It has a classic minimalist design , featuring an utterly stylish white on black user interface and will come in a swanky Prada designed leather case .
 Prices have yet to be confirmed , but it will be a lot cheaper ( in the range of $ 400 to $ 500 ) than might be expected of a Prada branded product . This phone will be hitting five European countries this spring , and hopefully be making its way stateside later in the year .


text: Approval of Permit No. 19217, under CA code of regulations, Title 23, Section 6, for work within an adopted plan of flood control, within a regulated stream (Table 8.1; Title 23, Div. 1, Article 8): To remove the existing bridge; construct a new five span cast-in-place prestressed concrete slab bridge reconstruct the approach roads, driveway and channel access roads; place rock slope protection relocate an existing underground utility line, two utility poles, and overhead utilities; remove and replace existing steel gate posts, and drainage culvert, and barbed wire fences.

tokenized: Approval of Permit No . 19217 , under CA code of regulations , Title 23 , Section 6 , for work within an adopted plan of flood control , within a regulated stream ( Table 8.1 ; Title 23 , Div . 1 , Article 8) : To remove the existing bridge ; construct a new five span cast - in - place prestressed concrete slab bridge reconstruct the approach roads , driveway and channel access roads ; place rock slope protection relocate an existing underground utility line , two utility poles , and overhead utilities ; remove and replace existing steel gate posts , and drainage culvert , and barbed wire fences .


text:
Follow these top tips from Think U Know to stay safe online.
You can also call Childline on: 0800 1111 to talk to someone who can help.
http://www.thinkuknow.co.uk/ is the website run by the Police agency Child Exploitation and Online Protection(CEOP) Center. It provides information and advice for parents.
Childnet International This site provides a great resource for parents called 'Know IT All'.

tokenized:
Follow these top tips from Think U Know to stay safe online .
 You can also call Childline on : 0800 1111 to talk to someone who can help .
 http://www.thinkuknow.co.uk/ is the website run by the Police agency Child Exploitation and Online Protection(CEOP ) Center . It provides information and advice for parents .
 Childnet International This site provides a great resource for parents called ' Know IT All ' .


text:
My name is Ngozi Onwukwe… I’m the founder of www.abacityblog.com. Abacityblog is an information portal representing Aba, Abia State and it’s environs. The platform was established in the year 2014, precisely, February 22nd 2014.
Well, while growing up, I have always wanted to do what others have not done, I mean do something different from what other people have been doing. Building up my platform… Which I prefer to call ‘Our’ because it’s a registered name and it can be referred as a company…. I would have chosen another name… But I stick to Abacityblog.
Thus, that is how Abacityblog was borne because I’m a news person, I love reading news and I love talking about things, places, and in all, I love to be informed. Those are the things that motivated me to venture into blogging.
That is not a new thing any more… Everyone knows that starting up anything… There must be a challenge.
In my own case, funding was part of it. As a blogger, you need cash at least for subscription, to fuel your generator when there is no power (electricity). My challenges as a start up blogger was much, as someone who started from the scratch, I have to source money for my internet subscription, I don’t have a generator but I needed one. I have to be steady online because I’m a news blogger. All these are challenges but the cash were not there.
It really helped me pay off my bills, buy a small generator and started the blogging world in a different level. In all of this, the only thing, “traffic” which by my hard work and strategies, I do get some traffic that generate revenue every month end. I had a lot of challenges… But I had to make it brief.
The environment I found myself was also a challenge… But it’s no longer a challenge because I have mastered my work and I’m doing it with joy now.
Is it going to work? What are the things you love most? Ask yourself these questions, if you can get the answers then you’re good to go.
If you have things you love most, then work on them and make people see the reason(s) why they should buy your idea ( I mean read your content). Blogging is not just about news only, you can write about Health, Education, Travels, Money, etc.
Take time, identify and unlock your inner self… Then you will find your potential in blogging. Don’t start up a news blog because Ngozi Onwukwe has started Abacityblog and it’s moving for him. Like I said earlier, don’t do things because others are doing… Try something new, different, you will excel!
Thanks Adamazi for the featuring, this goes a long way to showcased that no matter what we are doing people are watching.
It’s a honour to me and my team.

tokenized:
My name is Ngozi Onwukwe … I ’m the founder of www.abacityblog.com . Abacityblog is an information portal representing Aba , Abia State and it ’s environs . The platform was established in the year 2014 , precisely , February 22nd 2014 .
 Well , while growing up , I have always wanted to do what others have not done , I mean do something different from what other people have been doing . Building up my platform … Which I prefer to call ‘ Our ’ because it ’s a registered name and it can be referred as a company … . I would have chosen another name … But I stick to Abacityblog .
 Thus , that is how Abacityblog was borne because I ’m a news person , I love reading news and I love talking about things , places , and in all , I love to be informed . Those are the things that motivated me to venture into blogging .
 That is not a new thing any more … Everyone knows that starting up anything … There must be a challenge .
 In my own case , funding was part of it . As a blogger , you need cash at least for subscription , to fuel your generator when there is no power ( electricity ) . My challenges as a start up blogger was much , as someone who started from the scratch , I have to source money for my internet subscription , I do n’t have a generator but I needed one . I have to be steady online because I ’m a news blogger . All these are challenges but the cash were not there .
 It really helped me pay off my bills , buy a small generator and started the blogging world in a different level . In all of this , the only thing , “ traffic ” which by my hard work and strategies , I do get some traffic that generate revenue every month end . I had a lot of challenges … But I had to make it brief .
 The environment I found myself was also a challenge … But it ’s no longer a challenge because I have mastered my work and I ’m doing it with joy now .
 Is it going to work ? What are the things you love most ? Ask yourself these questions , if you can get the answers then you ’re good to go .
 If you have things you love most , then work on them and make people see the reason(s ) why they should buy your idea ( I mean read your content ) . Blogging is not just about news only , you can write about Health , Education , Travels , Money , etc .
 Take time , identify and unlock your inner self … Then you will find your potential in blogging . Do n’t start up a news blog because Ngozi Onwukwe has started Abacityblog and it ’s moving for him . Like I said earlier , do n’t do things because others are doing … Try something new , different , you will excel !
 Thanks Adamazi for the featuring , this goes a long way to showcased that no matter what we are doing people are watching .
 It ’s a honour to me and my team .


text:
Guys, Dingdong is the voice which indicates the arrival of someone at your place. When a visitor pushes button of the wireless doorbell a bell rung and it can be in any form, It could be Ding dong sound, poems, prayers or songs which indicates someone is outside to meet you.
Nowadays in big cities, the trend has developed that uses telephone technology to wireless signal doorbells as well as to answer the doors and remotely release electric strikes.
In wired doorbell one terminal of the button is wired to a terminal on a transformer, A doorbell transformer steps down the 120 or 240 volts AC electrical power to a lower voltage, typically 10 to 20 volts and the other terminal is connected to one of three terminals on the signalling device.
A smart doorbell is connected with internet connected doorbell that notifies the smartphone of the homeowner when a guest arrives at the entrance of the home, It activates when the guest presses the button of the doorbell when the doorbell senses the guest with its built-in motion sensors. This doorbell is quite expensive and has a limited range of frequencies.
So the best option between three doorbells is Wireless Doorbell which is not expensive and easy to install no time is required to install the whole system in the premises it also have high range of frequency, in ways of money it is pocket friendly it is also portable, so these are the features which make it the best option among these three.
As most people prefer Wireless Doorbells because the physical wiring is not necessary for it. Most Wireless Doorbells system consists of a radio transmitter and a receiver. The transmitter is mounted at door outside and receiver can be placed anywhere in the house where it meets the range specifications. It is also very cost effective.
When opting for a Wireless Doorbell it’s important to keep a range of the doorbell in mind.
As it doesn’t need any physical wiring, Wireless Doorbells can be installed, setup and running in a few minutes with a few screws. Its installation is very easy; you don’t need any physical agent to install your system in the house. You can do it by yourself.
It is very cost effective because in wired doorbells you need to pay a huge amount to a professional electrician, needs wires even the beauty of house also ruined by wires whereas in the wireless connection you can easily do the job by yourself.
Modern Wireless Doorbells not only provide a laundry list of features for ultimate convenience and versatility, but they often look quite nice as well.
In addition to being able to install a wireless push button transmitter anywhere you want, you can place the receivers anywhere near an electrical outlet. If you have outlets on the exterior of your home, you can even hear the doorbell ring and greet visitors while working in the backyard.
Wireless Doorbell is known for their range they come in various ranges like 50 to 1000 feet. Some cheaper doorbells have limited operating ranges of 50 feet or so. Better quality range up to 1000 feet or more. They can be quite nice for lounging out back by the pool as well.
As we know in Wireless Doorbell no physical wiring is required you only need a transmitter and receiver installed inside the house, whereas in wired doorbells somewhere you have to compromise with the beauty of your house with wire and it also needs much cost because professional will charge their fees for the installation of the doorbell therefore Wireless Doorbell required less cost compared with wired doorbell.
A wired doorbell cannot be installed anywhere you want, it only can be installed at a fixed place by the professional agent whereas Wireless Doorbell can be placed wherever we want according to our need. Sometimes we are busy doing something in the backyard and someone rung our bell but we didn’t hear the chime of wired doorbell but in Wireless Doorbell we can place the receiver anywhere we want and here the chime when someone arrives.
There are various types of innovation happened in Wireless Doorbell like as we take to design, the design of the doorbell comes in various shapes that are attractive, stylish and modern too. Different types of ringtones are available in the form of Ding dong, jingle bell song, poems and songs even now a day ringtones are coming in the form of prayers too.
In today’s world the doorbells with camera attached to it plays a very helpful role, security is a big reason to worry because we are not safe anywhere even not in our house, especially the home where elders and small children live the camera help the person to identify who is standing outside the door without opening gate. Since this camera fitted doorbells often come with a speaker and a microphone attached to it, you can even communicate with someone who is standing outside the door before letting him in.
Wireless Doorbell is expensive rill only a few years back, now they are very cost effective as you don’t need any wiring and any installation agent who charge fee for installation of the doorbell whereas compared with wired doorbell you need wiring as well a person who will install the system and charge for it, therefore, the better value for money is Wireless Doorbell.
As we know Wireless Doorbells needs a battery which is the biggest disadvantage of using Wireless Doorbell because you never know when the battery is about to die and there is no way to find out when will battery die. If the outsider presses the button and its not working then surely you have to change the battery.
Wireless Doorbells are in trend now and available in various designs and shapes after having lots of options customers get confused to choose which one is the best for their building.
Wireless Doorbells are limited in frequency it comes in the range from 100 feet to 1000 feet but if you need to fix doorbell in a big building you think about the range of frequency.
Wireless Doorbell can collide with many frequencies such as doorbell sound, car alarm as many of these are same frequency range. Because of this reason, one can choose a Wireless Doorbell which may have wireless frequencies and block other interception frequencies of another device.
Guys, if you want a stylish and modern doorbell so you got it as SadoTech Model C Wireless Doorbell provides a stylish modern design in white colour. It is a C series doorbell. Remote transmitter button is rated IP33 waterproof and acceptable for outdoor use. In this doorbell, you don’t need any battery for the main receiver. It is CE, FCC, and RoHS Certified. It is used in the training of dogs, used in classrooms to quiet students. The weight of the item is 4 ounces and the product dimensions are 3.2 x 1.5 x 3.5 inches, and the thickness of the bell is 29 millimetres. The bulb installed in it is LED. It covers the range up to 900 feet and is very cost effective.
Music lovers can opt for this option, Bodyguard Wireless Doorbell is made up of ABS material, which is not harmful. It has not affected by Dust, rain, Sunlight. It even has no electromagnetic radiations so it is very friendly to pregnant women as well as children.
The 2 doorbell receivers are highly sensitive; the level of protection of remote transmitter button is rated IP44 weatherproof so it works perfectly outdoors. It has 36 different ringtones like a ding dong, Christmas song, prayers and poems and volume is adjustable from 20 dB to 80 dB. The weight of the item is 8.8 ounce and the product dimensions are 6.9 x 4.6 x 2.7 inches. It covers the range up to 1000 feet.
No integration of L series Doorbell.
If you have more than one door entry or multiple entries then the features of this doorbell will surely attract you. The STARPOINT L series is a configurable and expandable doorbell system that can add 20 more extra receivers, transmitter buttons, motion sensors and door sensors.
Multiple receivers can be configured to ring with different ringtones to let you know which transmitter is triggered; it is very convenient feature for multiple door entry. The weight of the product is 12 ounces and the product dimensions are 8.5 x 4.8 x 3.8 inches. The coverage range of star point expendables doorbell is up to 600 feet. The battery cell type is alkaline.
Comes with 2 buttons and 2 chimes.
L series Doorbell is configurable.
Expended to 20 + buttons.
Perfect for larger homes and offices.
The range is up to 600 feet.
The special feature of this doorbell will help you if you have a hearing problem. It has 36 types of ringtones Including songs, prayers, Christmas song and poems. It also has the special feature of flashing light with the audio alert indicator. The installation of the bell is very easy. Easily plug the receiver into an electrical outlet.
The push button can be mounted to the doorframe. The push button is rated IP44 weatherproof no effect of rain, dust and sunlight and it’s acceptable outdoor. The weight of the item is 4.8 ounces; dimensions are 4.8 x 3.2 x2.6 inches. Battery cell type is alkaline and the covers the range up to 1000 feet.
The range is up to 1000 feet.
As the range of the GE, Wireless Doorbell is not high but the features of the product are quite impressive, the GE Wireless Doorbell includes one wireless door chime and two compatible push buttons. It has eight unique sound options. Its installation is very easy, no wiring is required only 3 C battery is included.
The weight of the product is 9.6 ounces and the product dimensions are 1.8 x 3.8 x 5 inches. The range of the product is up to 150 feet. It is useful in small areas where you don’t need much range, It is also helpful in a small business where you need to ask for something you can just press the button. so it is also a very important product who works in fewer ranges.
Four levels of volume setting.
Backed up by 1-year warranty.
Volume needs to be improved.
Can be used in small workplaces.
Honeywell premium portable doorbell works with up to 3 push buttons, motion detectors or door contacts for added security and convenience. It has three types of chime tunes, the volume is fully adjustable if you are a lover of loud volume you can increase the level of volume and if you want to minimise it you can do it too.
It also has a code system through which you can eliminate interference. The weight of the item is 1.45 pounds and the product dimensions are 1 x 4 x 5 inches, the battery is also required in it. the range of the product is up to 250 feet.
The range is up to 250 feet.
It has 3 chimes or ringtones.
3 push buttons, a motion detector for security.
MoKo Wireless Doorbell is very stylish, modern and impressive model it consists of 36 types of different ringtones. you can adjust volume up to 5 levels from 25 dB to 85 dB and its totally your choice which one you want, you can choose your best level of the volume.
The remote transmitter button is IP 44 weatherproof means no effect from dust, rain and sunlight and is also acceptable for outdoor use. Installation is very easy, no wiring required you can install it by your self. Just plug the receiver into any electrical outlet, no battery is required in it. the weight of the item is 3.84 ounces and the product dimensions are 6 x 3 x 2 inches. the covering range of the product is 900 feet.
Wide range, up to 900 feet.
Volume adjustable up to 5 levels.
The kit of TeckNet remote Wireless Doorbell includes 1 push button and 2 receivers to meet the customer’s higher level demand, Remote transmitter button is rated IP 33 weatherproof means it resists from rain, sunlight and dust and acceptable for outdoor use. Easy installation just plugs the receiver into an electrical outlet, when someone pushes the button blue LED light flashes to indicate someone’s arrival.
It has 32 different types of ringtones. It includes 1 battery operated transmitter and 2 plugin receivers. The weight of the product is 6.4 ounces and the product dimensions are 6.4 x 4 x 2.2 inches. the operating range of the product is 820 feet. The one who has a hearing problem can get the indication of some one’s arrival by the LED light.
32 different types of ringtone.
The range is up to 820 feet.
Coolqiya Wireless Doorbell is very durable and safe the transmitter button is rated IP 55 and is waterproof with various certifications. It has more than 50 different ringtones and you can adjust volume up to 4 levels, the transmitter fitted in it allows you and your visitor to leave a message for each other. No batteries are required for receiver simply plug into electrical outlet.
The weight of the product is 14.1 ounces and the product dimensions are 3.1 x 3.1 x 1 inches. The covering range of the product is up to 1000 feet. The special feature in this doorbell where you can leave a message for each other if you are not at home and your closed one arrived at least they can leave a message for you and after coming home you will get their message and revert them back. So this feature is very helpful.
50 different types of chimes.
Volume is adjustable up to 4 levels.
Leave a message in microphone.
It does not have frequency blocking.
The Ifecco Wireless Doorbell ‘s remote transmitted button is rated IP 44 waterproof and resist Dust, sunlight and rain and acceptable for outdoor use. It has 36 types of different ringtones which include Ding dong bell, Christmas song bell, poems, song among all these you can choose your favourite from the upper button and the volume is adjustable up to 4 levels.
If you are looking for a weatherproof or stylish Wireless Doorbell it could be considered as an option the weight of the item is 5.9 ounces and the product dimensions are 6.1 x 4.5 x 2.6 inches, the covering range of the product is up to 1000 feet.
At last, I am here to recommend the best Wireless Doorbell. The doorbell which stands well on most of the parameters given above are the easy installation, portable, innovative, high range frequency goes with SadoTech Model C Wireless Doorbell. Everyone is familiar with the brand and it occupies a very good market.
It has all the features which you need in your Wireless Doorbell and if we see cost wise it is very effective and you don’t have to pay any installation fee, you can install it by your self, you can choose ringtones from different Fifty plus ringtones and is quite stylish and modern, it will enhance the beauty of your house and even the covering range is 900 which is quite good.
The dimension of the product that is 3.2 x 1.5 x 3.5 inches are also good even it resists from dust, sunlight and rain and is acceptable for outdoor use. If we see money value of the product so it is also in the positive side as the price of SadoTech Model C Wireless Doorbell is pocket-friendly, you don’t need to think about before purchasing it.
Thanks to all readers for reading the article. Hope I provide the necessary information on top 10 best Wireless Doorbells. stay tuned with us for more interesting topics.

tokenized:
Guys , Dingdong is the voice which indicates the arrival of someone at your place . When a visitor pushes button of the wireless doorbell a bell rung and it can be in any form , It could be Ding dong sound , poems , prayers or songs which indicates someone is outside to meet you .
 Nowadays in big cities , the trend has developed that uses telephone technology to wireless signal doorbells as well as to answer the doors and remotely release electric strikes .
 In wired doorbell one terminal of the button is wired to a terminal on a transformer , A doorbell transformer steps down the 120 or 240 volts AC electrical power to a lower voltage , typically 10 to 20 volts and the other terminal is connected to one of three terminals on the signalling device .
 A smart doorbell is connected with internet connected doorbell that notifies the smartphone of the homeowner when a guest arrives at the entrance of the home , It activates when the guest presses the button of the doorbell when the doorbell senses the guest with its built - in motion sensors . This doorbell is quite expensive and has a limited range of frequencies .
 So the best option between three doorbells is Wireless Doorbell which is not expensive and easy to install no time is required to install the whole system in the premises it also have high range of frequency , in ways of money it is pocket friendly it is also portable , so these are the features which make it the best option among these three .
 As most people prefer Wireless Doorbells because the physical wiring is not necessary for it . Most Wireless Doorbells system consists of a radio transmitter and a receiver . The transmitter is mounted at door outside and receiver can be placed anywhere in the house where it meets the range specifications . It is also very cost effective .
 When opting for a Wireless Doorbell it ’s important to keep a range of the doorbell in mind .
 As it does n’t need any physical wiring , Wireless Doorbells can be installed , setup and running in a few minutes with a few screws . Its installation is very easy ; you do n’t need any physical agent to install your system in the house . You can do it by yourself .
 It is very cost effective because in wired doorbells you need to pay a huge amount to a professional electrician , needs wires even the beauty of house also ruined by wires whereas in the wireless connection you can easily do the job by yourself .
 Modern Wireless Doorbells not only provide a laundry list of features for ultimate convenience and versatility , but they often look quite nice as well .
 In addition to being able to install a wireless push button transmitter anywhere you want , you can place the receivers anywhere near an electrical outlet . If you have outlets on the exterior of your home , you can even hear the doorbell ring and greet visitors while working in the backyard .
 Wireless Doorbell is known for their range they come in various ranges like 50 to 1000 feet . Some cheaper doorbells have limited operating ranges of 50 feet or so . Better quality range up to 1000 feet or more . They can be quite nice for lounging out back by the pool as well .
 As we know in Wireless Doorbell no physical wiring is required you only need a transmitter and receiver installed inside the house , whereas in wired doorbells somewhere you have to compromise with the beauty of your house with wire and it also needs much cost because professional will charge their fees for the installation of the doorbell therefore Wireless Doorbell required less cost compared with wired doorbell .
 A wired doorbell can not be installed anywhere you want , it only can be installed at a fixed place by the professional agent whereas Wireless Doorbell can be placed wherever we want according to our need . Sometimes we are busy doing something in the backyard and someone rung our bell but we did n’t hear the chime of wired doorbell but in Wireless Doorbell we can place the receiver anywhere we want and here the chime when someone arrives .
 There are various types of innovation happened in Wireless Doorbell like as we take to design , the design of the doorbell comes in various shapes that are attractive , stylish and modern too . Different types of ringtones are available in the form of Ding dong , jingle bell song , poems and songs even now a day ringtones are coming in the form of prayers too .
 In today ’s world the doorbells with camera attached to it plays a very helpful role , security is a big reason to worry because we are not safe anywhere even not in our house , especially the home where elders and small children live the camera help the person to identify who is standing outside the door without opening gate . Since this camera fitted doorbells often come with a speaker and a microphone attached to it , you can even communicate with someone who is standing outside the door before letting him in .
 Wireless Doorbell is expensive rill only a few years back , now they are very cost effective as you do n’t need any wiring and any installation agent who charge fee for installation of the doorbell whereas compared with wired doorbell you need wiring as well a person who will install the system and charge for it , therefore , the better value for money is Wireless Doorbell .
 As we know Wireless Doorbells needs a battery which is the biggest disadvantage of using Wireless Doorbell because you never know when the battery is about to die and there is no way to find out when will battery die . If the outsider presses the button and its not working then surely you have to change the battery .
 Wireless Doorbells are in trend now and available in various designs and shapes after having lots of options customers get confused to choose which one is the best for their building .
 Wireless Doorbells are limited in frequency it comes in the range from 100 feet to 1000 feet but if you need to fix doorbell in a big building you think about the range of frequency .
 Wireless Doorbell can collide with many frequencies such as doorbell sound , car alarm as many of these are same frequency range . Because of this reason , one can choose a Wireless Doorbell which may have wireless frequencies and block other interception frequencies of another device .
 Guys , if you want a stylish and modern doorbell so you got it as SadoTech Model C Wireless Doorbell provides a stylish modern design in white colour . It is a C series doorbell . Remote transmitter button is rated IP33 waterproof and acceptable for outdoor use . In this doorbell , you do n’t need any battery for the main receiver . It is CE , FCC , and RoHS Certified . It is used in the training of dogs , used in classrooms to quiet students . The weight of the item is 4 ounces and the product dimensions are 3.2 x 1.5 x 3.5 inches , and the thickness of the bell is 29 millimetres . The bulb installed in it is LED . It covers the range up to 900 feet and is very cost effective .
 Music lovers can opt for this option , Bodyguard Wireless Doorbell is made up of ABS material , which is not harmful . It has not affected by Dust , rain , Sunlight . It even has no electromagnetic radiations so it is very friendly to pregnant women as well as children .
 The 2 doorbell receivers are highly sensitive ; the level of protection of remote transmitter button is rated IP44 weatherproof so it works perfectly outdoors . It has 36 different ringtones like a ding dong , Christmas song , prayers and poems and volume is adjustable from 20 dB to 80 dB. The weight of the item is 8.8 ounce and the product dimensions are 6.9 x 4.6 x 2.7 inches . It covers the range up to 1000 feet .
 No integration of L series Doorbell .
 If you have more than one door entry or multiple entries then the features of this doorbell will surely attract you . The STARPOINT L series is a configurable and expandable doorbell system that can add 20 more extra receivers , transmitter buttons , motion sensors and door sensors .
 Multiple receivers can be configured to ring with different ringtones to let you know which transmitter is triggered ; it is very convenient feature for multiple door entry . The weight of the product is 12 ounces and the product dimensions are 8.5 x 4.8 x 3.8 inches . The coverage range of star point expendables doorbell is up to 600 feet . The battery cell type is alkaline .
 Comes with 2 buttons and 2 chimes .
 L series Doorbell is configurable .
 Expended to 20 + buttons .
 Perfect for larger homes and offices .
 The range is up to 600 feet .
 The special feature of this doorbell will help you if you have a hearing problem . It has 36 types of ringtones Including songs , prayers , Christmas song and poems . It also has the special feature of flashing light with the audio alert indicator . The installation of the bell is very easy . Easily plug the receiver into an electrical outlet .
 The push button can be mounted to the doorframe . The push button is rated IP44 weatherproof no effect of rain , dust and sunlight and it ’s acceptable outdoor . The weight of the item is 4.8 ounces ; dimensions are 4.8 x 3.2 x2.6 inches . Battery cell type is alkaline and the covers the range up to 1000 feet .
 The range is up to 1000 feet .
 As the range of the GE , Wireless Doorbell is not high but the features of the product are quite impressive , the GE Wireless Doorbell includes one wireless door chime and two compatible push buttons . It has eight unique sound options . Its installation is very easy , no wiring is required only 3 C battery is included .
 The weight of the product is 9.6 ounces and the product dimensions are 1.8 x 3.8 x 5 inches . The range of the product is up to 150 feet . It is useful in small areas where you do n’t need much range , It is also helpful in a small business where you need to ask for something you can just press the button . so it is also a very important product who works in fewer ranges .
 Four levels of volume setting .
 Backed up by 1 - year warranty .
 Volume needs to be improved .
 Can be used in small workplaces .
 Honeywell premium portable doorbell works with up to 3 push buttons , motion detectors or door contacts for added security and convenience . It has three types of chime tunes , the volume is fully adjustable if you are a lover of loud volume you can increase the level of volume and if you want to minimise it you can do it too .
 It also has a code system through which you can eliminate interference . The weight of the item is 1.45 pounds and the product dimensions are 1 x 4 x 5 inches , the battery is also required in it . the range of the product is up to 250 feet .
 The range is up to 250 feet .
 It has 3 chimes or ringtones .
 3 push buttons , a motion detector for security .
 MoKo Wireless Doorbell is very stylish , modern and impressive model it consists of 36 types of different ringtones . you can adjust volume up to 5 levels from 25 dB to 85 dB and its totally your choice which one you want , you can choose your best level of the volume .
 The remote transmitter button is IP 44 weatherproof means no effect from dust , rain and sunlight and is also acceptable for outdoor use . Installation is very easy , no wiring required you can install it by your self . Just plug the receiver into any electrical outlet , no battery is required in it . the weight of the item is 3.84 ounces and the product dimensions are 6 x 3 x 2 inches . the covering range of the product is 900 feet .
 Wide range , up to 900 feet .
 Volume adjustable up to 5 levels .
 The kit of TeckNet remote Wireless Doorbell includes 1 push button and 2 receivers to meet the customer ’s higher level demand , Remote transmitter button is rated IP 33 weatherproof means it resists from rain , sunlight and dust and acceptable for outdoor use . Easy installation just plugs the receiver into an electrical outlet , when someone pushes the button blue LED light flashes to indicate someone ’s arrival .
 It has 32 different types of ringtones . It includes 1 battery operated transmitter and 2 plugin receivers . The weight of the product is 6.4 ounces and the product dimensions are 6.4 x 4 x 2.2 inches . the operating range of the product is 820 feet . The one who has a hearing problem can get the indication of some one ’s arrival by the LED light .
 32 different types of ringtone .
 The range is up to 820 feet .
 Coolqiya Wireless Doorbell is very durable and safe the transmitter button is rated IP 55 and is waterproof with various certifications . It has more than 50 different ringtones and you can adjust volume up to 4 levels , the transmitter fitted in it allows you and your visitor to leave a message for each other . No batteries are required for receiver simply plug into electrical outlet .
 The weight of the product is 14.1 ounces and the product dimensions are 3.1 x 3.1 x 1 inches . The covering range of the product is up to 1000 feet . The special feature in this doorbell where you can leave a message for each other if you are not at home and your closed one arrived at least they can leave a message for you and after coming home you will get their message and revert them back . So this feature is very helpful .
 50 different types of chimes .
 Volume is adjustable up to 4 levels .
 Leave a message in microphone .
 It does not have frequency blocking .
 The Ifecco Wireless Doorbell ‘s remote transmitted button is rated IP 44 waterproof and resist Dust , sunlight and rain and acceptable for outdoor use . It has 36 types of different ringtones which include Ding dong bell , Christmas song bell , poems , song among all these you can choose your favourite from the upper button and the volume is adjustable up to 4 levels .
 If you are looking for a weatherproof or stylish Wireless Doorbell it could be considered as an option the weight of the item is 5.9 ounces and the product dimensions are 6.1 x 4.5 x 2.6 inches , the covering range of the product is up to 1000 feet .
 At last , I am here to recommend the best Wireless Doorbell . The doorbell which stands well on most of the parameters given above are the easy installation , portable , innovative , high range frequency goes with SadoTech Model C Wireless Doorbell . Everyone is familiar with the brand and it occupies a very good market .
 It has all the features which you need in your Wireless Doorbell and if we see cost wise it is very effective and you do n’t have to pay any installation fee , you can install it by your self , you can choose ringtones from different Fifty plus ringtones and is quite stylish and modern , it will enhance the beauty of your house and even the covering range is 900 which is quite good .
 The dimension of the product that is 3.2 x 1.5 x 3.5 inches are also good even it resists from dust , sunlight and rain and is acceptable for outdoor use . If we see money value of the product so it is also in the positive side as the price of SadoTech Model C Wireless Doorbell is pocket - friendly , you do n’t need to think about before purchasing it .
 Thanks to all readers for reading the article . Hope I provide the necessary information on top 10 best Wireless Doorbells . stay tuned with us for more interesting topics .