Scale is a simple iOS app created by Kennan Mell that weighs objects placed on an iOS device’s screen. It is not available on the App Store due to restrictions in Apple’s App Store guidelines. However, the app’s source code can be downloaded on GitHub here and installed on an iOS device via Xcode. Instructions for downloading and updating the app are available at the GitHub link provided above.
To function properly, this app requires that:
- The device has a force touch sensor.
- The object is relatively light (~375 grams or less).
- The object is recognizable by the capacitive touch sensors.
- Ideally, the object has only one touch point.
Discussion
In testing, the force data provided by the system was not very reliable, and often returned different values when weighing the same object multiple times in a row. However, measurements were usually still accurate within ~10-20 grams for objects with only one touch point, when compared to the weight measured by a standard kitchen scale.
In addition to functioning as a rough measuring app, Scale’s code has educational value for those who are new to iOS development. It demonstrates many good coding practices for iOS apps including:
- Model-view-controller design pattern
- Localization of user-facing text
- Use of a navigation controller
- Use of a table view controller
- Persisting data with user defaults
- Creating views with layout constraints
- Proper use of data structures and control structures
- Property encapsulation
- Use of constants for strings, colors, and numbers
- Comments and marks
Disclaimers
This type of app is very simple to create, but nothing like it is available on the App Store because Apple’s developer guidelines prevent it. While this may be partly due to the lack of reliability mentioned above, it’s likely also because placing heavy objects on a device may damage the device’s screen and/or the device itself.
Note that this app is licensed under the MIT license and as such provides no warranty of fitness for any particular purpose, including for weighing objects. Moreover, it is available publicly, and third parties are free to modify it and distribute their modified versions, which are not associated with me.
Contact Info
To contact me, visit my contact page or use the menu option in the Scale app.