To run the example project, clone the repo, and run pod install
from the Example directory first.
To use the Prototyper framework you need an account for the Prototyper online service. Create a new prototype and download the container file for the prototype you want to inlude in your app.
-
Integrate Prototyper Cocoapod
pod 'Prototyper'
-
Add App transport security exception for localhost:
<key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>localhost</key> <dict> <key>NSTemporaryExceptionAllowsInsecureHTTPSLoads</key> <false/> <key>NSIncludesSubdomains</key> <true/> <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> <true/> <key>NSTemporaryExceptionMinimumTLSVersion</key> <string>1.0</string> <key>NSTemporaryExceptionRequiresForwardSecrecy</key> <false/> </dict> </dict> </dict>
-
Add container zip file to project
-
Create ViewController for every prototype page you want to show and make it a subclass of PrototypeViewController (Don’t forget to import Prototyper module)
import Prototyper
-
Load prototype in view controller. In viewDidLoad for example:
self.loadPrototypePage("PAGE_ID")
-
Optional: Preload prototype (e.g. in AppDelegate)
PrototypeController.sharedInstance.preloadPrototypes(nil)
Stefan Kofler, grafele@gmail.com
Prototyper is available under the MIT license. See the LICENSE file for more info.