Prototype
The prototype framework allows you to integrate .prototype files created with the macOS Prototype-Application into your iOS, macOS or tvOS application. You can configure and inspect the PrototypeView
using the Xcode Interface Builder with ease.
Example
Run pod install
from the Example directory first and open the PrototypeExample.workspace and select one of the three provided targets (iOS, macOS, and tvOS) and run the project.
Requirements
Create a .prototype file that can be displayed using the Prototype Framework you need to download the Prototype-Application available for macOS. Create a .prototype file based on a prototype created with Marvel App using the macOS Prototype-Application.
Installation
-
Integrate the Prototype Framework using CocoaPods
pod 'Prototype'
To guarantee that you can configure the
PrototypeView
directly in the Xcode Interface Builder add the following lines at the end of your Podfile:post_install do |installer| installer.pods_project.targets.each do |target| target.new_shell_script_build_phase.shell_script = "mkdir -p $PODS_CONFIGURATION_BUILD_DIR/#{target.name}" target.build_configurations.each do |config| config.build_settings['CONFIGURATION_BUILD_DIR'] = '$PODS_CONFIGURATION_BUILD_DIR' end end installer.pods_project.build_configurations.each do |config| config.build_settings.delete('CODE_SIGNING_ALLOWED') config.build_settings.delete('CODE_SIGNING_REQUIRED') end end
-
Add the .prototype file created with the Prototype-Application to your Xcode project and the corresponding target.
Swift UI
- Add a
PrototypeContainer
to your SwiftUI View. You need to set theprototypeName
and optionally thestartPage
of the prototype. - You can immediately see the result displayed in the SwiftUI Live Preview.
- Build and run your application.
UIKit or AppKit
- Add a
PrototypeView
to the corresponding interface using the Xcode Interface Builder or code. You can completely configure thePrototyperView
in the Xcode Interface Builder's Attributes Inspector. You need to set theprototypeName
and optionally thestartPage
of the prototype. - You can immediately see the result displayed in the Xcode Interface Builder. To inspect if you configured the right prototype page you can enable the
showButtonsInIB
attribute in the Xcode Interface Builder's Attributes Inspector. - Build and run your application.
Author
Paul Schmiedmayer, @PSchmiedmayer, Chair for Applied Software Engineering, [email protected]
License
Prototyper is available under the MIT license. See the LICENSE file for more info.