The iOS CodeGen command line tool generates iOS client side LoopBack Model representations in Objective-C by looking into the specified server application.
The following is an example usage applied to the test server provided under this directory:
- Run
npm installin this directory to initialize the toolbin/lb-iosand the test server undertest-env/server.
- Run
bin/lb-ios -p XX test-env/server/server test-env/client/ios/CodeGenTest/gen-srcto generate the models in Objective-C representation, whereXXis the prefix attached to all the generated class names.
After performing the above steps, run the followings:
node test-env/server/server.js
cd test-env/client/ios/CodeGenTestpod installopen CodeGenTest.xcworkspace- Run the CodeGenTestTests unit tests.
- Currently properties and simple method generation are supported. See the generated headers for details.
Discuss features and ask questions on LoopBack Forum.