From the course: Writing Secure Code in iOS by Infosec
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Activity: Preventing race conditions
From the course: Writing Secure Code in iOS by Infosec
Activity: Preventing race conditions
- [Instructor] Interprocess communications. Activity: preventing race conditions. Open Swift Projects, open Course 5, open Preventing a Race Condition, and open the Playground. In our example, a user is going to try to withdraw money from two ATM automatic teller machines at the same time. In real life, I'm not sure how well that would work. Most ATMs these days lock the card and don't release them. But let's pretend that these are two older ATMs where you just slide the card in and out. The user has a starting balance of 1,200 and we create a struct ATM and we're going to use a tag to identify which ATM in the debug console we're talking about. We have a function to withdraw money and the value is of course an int and we'll use the tag and we'll print a message checking for sufficient funds. If the balance is greater than what they're trying to withdraw, this value, then we'll say balance is sufficient. Please wait while we're processing the withdrawal. And then we're going to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Common data risks, part 114m 15s
-
(Locked)
Common data risks, part 27m 55s
-
(Locked)
Protecting files, part 17m 48s
-
(Locked)
Protecting files, part 27m 24s
-
(Locked)
Activity: Saving data in a Realm database13m 42s
-
(Locked)
Network security14m 52s
-
(Locked)
Activity: Making an HTTP exception10m 28s
-
App backgrounding4m 56s
-
(Locked)
Activity: Securely backgrounding an app10m 49s
-
(Locked)
API security11m 52s
-
(Locked)
Activity: Storing an API key in Keychain9m 11s
-
(Locked)
Interprocess communications (IPC), part 113m 59s
-
(Locked)
Interprocess communications (IPC), part 24m 28s
-
(Locked)
Activity: Preventing race conditions8m 9s
-
(Locked)
-
-
-