CS 185C/286 - Lecture 12

Cay S. Horstmann
Lecture 12 Quiz 1
How do you make a new array?
NSMutableArray *employees = [NSMutableArray array];
NSMutableArray *employees = [NSMutableArray alloc];
NSMutableArray *employees = new NSMutableArray();
- Any of the above will construct a new array.
Lecture 12 Quiz 2
What is true about a weak reference?
- It does not prevent the object to which it points from being garbage collected
- It is set to nil when the object to which it points is deallocated
- It does not cause the reference count of the object to which it points to be modified
- All of the above
Projects

- Modernize Android client for Android 4, including tablets: Keith, Vakati, Wu. Site
- Improve device integration with Android and iPhone client: location, phone, schedule, contacts, etc.: Pham, Li X, Li Y. Site
- HTML5 Cinequest client: Cheung, Nguyen, Yi. Site
- Hemepath counter app: Dang, Eibagi, Karnes. Site
- Samsung S-Pen: Sainion, Sivaraman, Tang. Site
- Port Cinequest app (films only, not schedule) to Windows phone: Anderson, Lehrmann, Yulianto (lead???). Site
Today's Lecture/Lab
- The business of the app store
- What is a monopoly?
App Stores

- Traditionally, independent software vendors (ISVs) produced and distributed software directly to end users
- Disadvantage: installation, update, license enforcement was reinvented by each ISV
- Linux package managers unify installation and update
- Apple introduces app store with iPhone 2
- Apple reviews apps before making them available
- Apple handles billing and takes a percentage of the price
- Android, Blackberry, Windows 8 have their own stores
- Sony, Samsung, Amazon, etc. etc. try the same with limited success
The App Store Business Model
- Developer pays annual fee ($99)
- Apple charges 30% for services (review, hosting, billing)
- Over 800,000 apps available
- In 2011, Apple paid $2B to developers
- Most non-game apps sell for $1, most games for $2
- 12% of apps earn $50K or more, 68% of developers earn < $5K (Source)
- It costs at least $100K to make a competitive iOS app (Source Source, with interesting data)
- In Android, most apps are free and ad-supported
- Get paid roughly $1 per 1,000 ad views
- It works for Apple and Google, so it probably won't change
The Walled Garden

- Traditionally, consumers can install any app on their computer
- Disadvantage: Security, quality risks
- With app store, Apple is sole gatekeeper to iOS apps
- Critera include:
- No sex, violence, drugs
- Must feel like an app, not a web page
- Must not crash
- No programmability
- Can't run Scratch on an iPad (Source)
- Apple has kept apps off the app store that compete with its business
- Android: Users can choose to install apps from other sources
Is it Your Phone?

- Can Apple legally stop you from putting an app on your phone?
- No absolute right to do with your equipment what you want
- Ex: The DCMA makes it illegal to circumvent copyright restrictions, even if you own the device and media
- Cell phone companies can restrict your ability to unlock a phone, even after the contract is up. (Obama doesn't like it.)
- Game console makers can stop you from running an alternate OS
- Generally, device is considered a part of a “system”
- Not all “systems” claims work. Ex. Lexmark's attempt to use the DCMA to shut out ink refills
- Currently, only legal restriction is antitrust law
- Some efforts to assert against Apple (subscriptions, conversion tools)
What is a Monopoly?

- Monopoly: Sole source of good or service
- Not in itself illegal
- In U.S., illegal to exploit monopoly in one area to gain an unfair advantage in another
- Ex. Microsoft was convicted for using its OS monopoly to unfairly interfere in the market for web browsers (“cutting off Netscape's air supply”)
- Apple has no monopoly on cell phone OS
- Apple was pressured to back off from dictating prices to book and magazine publishers
Reading Before Next Class

- Dr. Pollett recommends the book by Hillegass for learning Objective-C.
- Read chapters 21 - 26
- This won't be on the exam. It's due next Tuesday.
Lab

- Bring your laptop to the lab
- You will work with a buddy
- For this lab, match yourself up with a buddy who has a Mac
- Today, we simply continue following in Dr. Pollett's footsteps. Start here..
- I want you to submit your lab code to git. But don't use the git support in the IDE.
- Instead, tell XCode to put your (unmanaged) project into the
workspace/lab11
directory.
- You should be able to finish these activities. If you have extra time, see me to discuss your project progress.