Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abdullahselek/ViperC
Xcode template for VIPER Architecture for both Objective-C and Swift.
https://github.com/abdullahselek/ViperC
ios objective-c quick swift swift-3 swift-4 viper viper-architecture xcode-templates xctest
Last synced: 5 days ago
JSON representation
Xcode template for VIPER Architecture for both Objective-C and Swift.
- Host: GitHub
- URL: https://github.com/abdullahselek/ViperC
- Owner: abdullahselek
- License: mit
- Created: 2017-03-07T14:49:43.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-14T10:54:54.000Z (7 months ago)
- Last Synced: 2024-11-24T01:42:14.550Z (18 days ago)
- Topics: ios, objective-c, quick, swift, swift-3, swift-4, viper, viper-architecture, xcode-templates, xctest
- Language: Objective-C
- Homepage:
- Size: 1.56 MB
- Stars: 80
- Watchers: 7
- Forks: 24
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - ViperC - Xcode template for VIPER Architecture for both Objective-C and Swift. (Xcode / Other Xcode)
- awesome-ios-star - ViperC - Xcode template for VIPER Architecture for both Objective-C and Swift. (Xcode / Other Xcode)
README
![License](https://img.shields.io/dub/l/vibe-d.svg)
![ViperC](https://raw.githubusercontent.com/abdullahselek/ViperC/master/images/viperc_header.png)
# ViperC
Xcode template for VIPER Architecture for both Objective-C and Swift.- ViperC creates modules for you when you want to use VIPER architecture in your projects. You can choose your language for the VIPER modules that will be created.
## Installation
- Clone this repository
- Go to repository main folder
- ```./install.sh ViperC``` installs ViperC module for Objective-C or Swift.
- ```./install.sh ViperC-Quick``` installs ViperC unit tests module for Objective-C or Swift. It uses **Quick** and **Expecta** for Objective-C and **Quick** and **Nimble** for Swift.
- ```./install.sh ViperC-XCTest``` installs ViperC unit tests module for Objective-C or Swift. It uses default **XCTest**.## Template Path
You can find ViperC under ```/Users/USER_NAME/Library/Developer/Xcode/Templates/File Templates/ViperC/ViperC.xctemplate```
## Usage
![ViperC Demo](https://raw.githubusercontent.com/abdullahselek/ViperC/master/images/demo.gif)
## VIPER Diagram
![VIPER](https://raw.githubusercontent.com/abdullahselek/ViperC/master/images/viper.png)
## Generated Source Code
Example for a ToDO module:
### Protocols
```
#pragma mark - WireFrameProtocol@protocol ToDoWireframeProtocol
@end
#pragma mark - PresenterProtocol
@protocol ToDoPresenterProtocol
@end
#pragma mark - InteractorProtocol
@protocol ToDoInteractorOutputProtocol
@end
@protocol ToDoInteractorInputProtocol
- (void)setOutput:(id)output;
- (id)getOutputProtocol;@end
#pragma mark - ViewProtocol
@protocol ToDoViewProtocol
@end
```### Interactor
```
NS_ASSUME_NONNULL_BEGIN@interface ToDoInteractor: NSObject
@property (nonatomic, weak, nullable) id output;
@end
NS_ASSUME_NONNULL_END
```### Presenter
```
NS_ASSUME_NONNULL_BEGIN@interface ToDoPresenter: NSObject
@property (nonatomic, weak, nullable) id view;
@property (nonatomic) id interactor;
@property (nonatomic, weak) id router;- (instancetype)initWithInterface:(id)interface
interactor:(id)interactor
router:(id)router;@end
NS_ASSUME_NONNULL_END
```### WireFrame
```
@interface ToDoRouter: NSObject@property (nonatomic, weak) ToDoViewController *viewController;
+ (UIViewController *)createModule;
@end
```### View
```
NS_ASSUME_NONNULL_BEGIN@interface ToDoViewController: UIViewController
@property (nonatomic) ToDoPresenter *presenter;
@end
NS_ASSUME_NONNULL_END
```## License
ViperC is released under the MIT license. See LICENSE for details.