iOS 🍏☎️
General iOS dev notes.
Peer-to-peer
Problem: we want to discover services on our local network
Solution: Implementing Bonjour across iOS and Android and Multipeer Connectivity provide good examples.
Install on device
Problem: the ability to deploy to multiple devices is helpful when developing networked apps
Solution: define a development certificate, as described by https://codewithchris.com/deploy-your-app-on-an-iphone/
Avoid storyboard complexity
Problem: storyboards hide programmatic complexity behind UI complexity, which is hard to search for
Solution: delete storyboards and plist references, and init view controller in AppDelegate, as described by https://stackoverflow.com/questions/25783282/how-to-create-an-empty-application-in-xcode-without-storyboard
Related: consider generalizing view logic using something like Flutter
Detecting simulator
Problem: developing for two devices can require use of simulator and device simultaneously, so how do we differentiate?
Solution: #if targetEnvironment(simulator)
as described by https://stackoverflow.com/a/37124071/1971682