Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mahmudahsan/appsportfolio
To showcase multiple apps of a developer for cross promotion. Its an offline way to show user about other apps and it's also possible to know which app users are having more interest.
https://github.com/mahmudahsan/appsportfolio
ios-swift ios-ui showcase-app swift swift-library swift4 xcode
Last synced: 5 days ago
JSON representation
To showcase multiple apps of a developer for cross promotion. Its an offline way to show user about other apps and it's also possible to know which app users are having more interest.
- Host: GitHub
- URL: https://github.com/mahmudahsan/appsportfolio
- Owner: mahmudahsan
- License: mit
- Created: 2017-10-24T08:48:35.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-20T11:32:22.000Z (almost 2 years ago)
- Last Synced: 2024-03-15T06:00:26.614Z (8 months ago)
- Topics: ios-swift, ios-ui, showcase-app, swift, swift-library, swift4, xcode
- Language: Swift
- Homepage:
- Size: 1.74 MB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AppsPortfolio
To showcase multiple apps of a developer for cross promotion. Its an offline way to show user about other apps and it's also possible to know which app users are having more interest. I have been using this UI in all of my iOS apps for cross promoting my other apps. This is a complete project but any improvements are welcome.In plist data, if there is only one category mention for example games, then the segmented tab at top will not be shown. To show segmented tab with categories you must have to provide at least 2 categories of apps. Please check the plist file structure to know how to provide app list.
## Features
- [X] Showcase apps for cross promotion
- [X] Delegate to integrate analytics to see which app user visits in app store
- [X] Works in both iPhone and iPad## Examples
Integrate within a UIViewController:
```swift
let bundle = Bundle(for: AppsPortfolioViewController.self)
let storyboard = UIStoryboard(name: "AppsPortfolio", bundle: bundle)
let appsPortfolioVC = storyboard.instantiateInitialViewController() as! AppsPortfolioViewController
appsPortfolioVC.title = "Portfolio"
appsPortfolioVC.loadAppList(name: "sample_portfolio")
self.navigationController?.pushViewController(appsPortfolioVC, animated: true)
```Add a custom back button to top left if by default navigation bar is hidden:
```swift
let backButton = UIButton(frame: CGRect(x: 10, y: 7, width: 74, height: 30))
backButton.setImage(UIImage(named: "btnBack"), for: UIControlState.normal)
backButton.addTarget(self, action: #selector(goBackFromPortfolio), for: UIControlEvents.touchUpInside)
appsPortfolioVC.view.addSubview(backButton)
``````swift
@objc private func goBackFromPortfolio(){
self.navigationController?.popViewController(animated: true)
}
```
Implement delegate to inform when user tap an app:
```swift
let bundle = Bundle(for: AppsPortfolioViewController.self)
let storyboard = UIStoryboard(name: "AppsPortfolio", bundle: bundle)
let appsPortfolioVC = storyboard.instantiateInitialViewController() as! AppsPortfolioViewController
appsPortfolioVC.title = "Portfolio"//assigning analytics delegates
appsPortfolioVC.setAnalyticsDelegate(any: self)appsPortfolioVC.loadAppList(name: "sample_portfolio")
self.navigationController?.pushViewController(appsPortfolioVC, animated: true)
```One delegate method need to implement to know user interaction:
```swift
extension ViewController : AppsPortfolio.Analytics{
func appClicked(appNamed: String) {
print("App: \(appNamed) clicked.")
}
}
```sample_portfolio.plist file structure:
## How to use
Add this Swift package to your project
```
https://github.com/mahmudahsan/AppsPortfolio
```* In your project create a new **apps_portfolio.plist** file and provide your apps list. Follow the sample_portfolio.plist file format provided in AppsPortfolio/Data.
* In your project add the icons of your cross promoting apps and mention them in your plist file. Better use Images.assets to add apps's icons.
## Questions or feedback?
Feel free to [open an issue](https://github.com/mahmudahsan/AppsPortfolio/issues/new), or find me [@mahmudahsan on Twitter](https://twitter.com/mahmudahsan).