VamshiIITBHU14 /
DesignPatternsInSwift
This repository contains all the code from my book 'Design Patterns in Swift', live at https://www.amazon.com/dp/B07FYXHBKZ. All code written in Swift4. Do give a star if you like the work.
58/100 healthLoading repository data…
pavithra-05 / repository
In this pattern, we’ll create an iOS step-tracking app by using Swift. The application’s back end will also be written in Swift with the use of Kitura, a server-side web framework for Swift. This pattern is for iOS developers who want to write both their front end and back end in one language. Working in one language helps developers concentrate and spend more time in the logic of their application, rather than learning or dealing with another programming language. The three simple Kitura microservices will be deployed in Kubernetes, a container-orchestration platform. The sample iOS app is a step tracker that rewards users with “fitcoins.” When you’ve completed this pattern, you will understand how to: Build a server-side Swift application with Kitura. Use Kitura with Swift Kuery to connect to a database. Deploy Kitura microservices in Kubernetes. Integrate an iOS app with the Kitura back end. Make Kubernetes available under a public domain with TLS.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
In this code pattern, we will create a simple step tracker iOS app written in Swift. The application's backend will also be written in Swift with the use of Kitura, a server-side web framework for Swift. This code pattern is for iOS developers who wish to write both their frontend and backend in one language. Working in one language helps developers concentrate and spend more time in the logic of their application rather than learning or dealing with another programming language. The 3 simple Kitura microservices will be deployed in Kubernetes, a container orchestration platform. The sample iOS app is a simple step tracker that rewards users with "fitcoins".
When you have completed this code pattern, you will understand how to:
Selected from shared topics, language and repository description—not editorial ratings.
VamshiIITBHU14 /
This repository contains all the code from my book 'Design Patterns in Swift', live at https://www.amazon.com/dp/B07FYXHBKZ. All code written in Swift4. Do give a star if you like the work.
58/100 healthrubygarage /
This is a repository for our article about design patterns in the Swift programming language https://rubygarage.org/blog/swift-design-patterns
76/100 healthCreate a Standard Kubernetes cluster with IBM Bluemix Kubernetes Service to deploy in cloud. The code here is regularly tested against Kubernetes Cluster from IBM Cloud Kubernetes Service using Travis.
Helm package manager. Helm will be needed to install cert-manager for issuing certificates from Let's Encrypt. You can install Helm by going to through their official documentation.
Xcode is needed for developing iOS apps.
Install Docker by following the instructions here for your preferred operating system. You would need docker if you want to build and use your own images. You would need to have a Docker Hub account to push your images.
$ git clone https://github.com/IBM/kitura-on-kubernetes
$ cd kitura-on-kubernetes
Create an IBM Cloud Kubernetes Service if you don't already have one:
containers folder. You can open the Xcode project file to open it in Xcode.$ export DOCKERHUB_USERNAME=<your-dockerhub-username>
$ docker build -t $DOCKERHUB_USERNAME/kitura-users:latest containers/users/
$ docker build -t $DOCKERHUB_USERNAME/kitura-shop:latest containers/shop/
$ docker build -t $DOCKERHUB_USERNAME/kitura-leaderboards:latest containers/leaderboards/
$ docker push $DOCKERHUB_USERNAME/kitura-users:latest
$ docker push $DOCKERHUB_USERNAME/kitura-shop:latest
$ docker push $DOCKERHUB_USERNAME/kitura-leaderboards:latest
manifests folder to use your own images
e.g. manifests/leaderboard.yaml
...
image: anthonyamanse/kitura-leaderboard:1.0
## change the value to the images you just built in the previous step.
...
This is only for testing (data will be deleted if container is destroyed/restarted). You'll need to setup your own persistency or you can use Compose for PostgreSQL for production.
## Create the credentials and deploy PostgreSQL
$ kubectl create cm postgres-cm --from-env-file=postgres-config.env
$ kubectl apply -f manifests/postgres.yaml
## Make sure the postgres container is running
$ kubectl get pods
$ kubectl apply -f manifests/leaderboard.yaml
$ kubectl apply -f manifests/shop.yaml
$ kubectl apply -f manifests/users.yaml
## Make sure the 3 of them are running
$ kubectl get pods
$ bx cs cluster-get <Your cluster name here>
## You should look for these values
## ..
## Ingress Subdomain: anthony-dev.us-south.containers.mybluemix.net
## Ingress Secret: anthony-dev
## ..
manifests/ingress.yaml to use the provided subdomain you have...
spec:
tls:
- hosts:
- YOUR_INGRESS_SUBDOMAIN
secretName: YOUR_INGRESS_SECRET
backend:
serviceName: users
servicePort: 8080
rules:
- host: YOUR_INGRESS_SUBDOMAIN
...
If you want to use your own domain, proceed to step #6
$ kubectl apply -f ingress-prod.yaml
$ export URL=https://YOUR_INGRESS_SUBDOMAIN
## Create a user
$ curl -X POST -H 'Content-type: application/json' -d "$(curl $URL/users/generate)" $URL/users
{"name":"Gisk Igofrow","userId":"6A213D99-7C08-4BF2-A250-D24E3310236B","stepsConvertedToFitcoin":0,"image":"..." ...}
## Get the users
$ curl $URL/users
[{"name":"Gisk Igofrow","userId":"6A213D99-7C08-4BF2-A250-D24E3310236B" ...}]
## Create products
curl -X POST -H 'Content-type: application/json' -d "$(cat sampleProducts/smartwatch.json)" $URL/shop/products
curl -X POST -H 'Content-type: application/json' -d "$(cat sampleProducts/runningshoes.json)" $URL/shop/products
curl -X POST -H 'Content-type: application/json' -d "$(cat sampleProducts/smartbodyscale.json)" $URL/shop/products
## Get the products
$ curl $URL/shop/products
[{"productId":"smartwatch","price":20,"quantity":100,"name":"Smart Watch"},{"productId":"shoes","price":50,"quantity":25,"name":"Running Shoes"},{"productId":"bodyScale","price":5,"quantity":50,"name":"Body Scale"}]
Open the Xcode project iOS/KituraStepTracker/KituraStepTracker.xcworkspace
Controllers folder and AppDelegate.swift that sayslet KituraBackendUrl = "https://anthony-dev.us-south.containers.mybluemix.net"
## Change the variable to point to your own backend
## let KituraBackendUrl = "https://YOUR_INGRESS_SUBDOMAIN"
To test the step tracking part of the app, you would need a physical device with a pedometer (iPhone 5s+).
To enable TLS in your own domain, you may want to automate issuance of the TLS certificates. You can do this with cert-manager to request certificates from Let's Encrypt.
$ kubectl get ing
## NAME HOSTS ADDRESS PORTS AGE
## ingress www.ibm-fitchain.com 169.48.XYZ.XYZ 80, 443 2d
helm. This will install tiller in your cluster.$ helm init
cert-manager$ helm install \
--name cert-manager \
--namespace kube-system \
stable/cert-manager
cert-manager/issuer.yaml to use your own valid email address.
More details here
...
email: EMAIL_ADDRESS
## change it to a valid one
...
$ kubectl apply -f cert-manager/issuer.yaml
cert-manager/certificate.yaml...
spec:
## THIS WILL PRODUCE A CERTIFICATE NAMED ibm-fitchain-com-tls
secretName: ibm-fitchain-com-tls
issuerRef:
name: letsencrypt-prod
## PROVIDE YOUR OWN DOMAIN NAME
commonName: www.ibm-fitchain.com
dnsNames:
- www.ibm-fitchain.com
acme:
config:
- http01:
ingressClass: nginx
domains:
## PROVIDE YOUR OWN DOMAIN NAME
- www.ibm-fitchain.com
- http01:
ingress: my-ingress
domains:
## PROVIDE YOUR OWN DOMAIN NAME
- www.ibm-fitchain.com
$ kubectl apply -f cert-manager/certificate.yaml
## Wait for the certificate to get issued
$ kubectl describe certificate
IbrahimKZ /
This simple iOS application written in Swift 4 shows how to use VIPER architecture pattern in practice
41/100 healthVamshiIITBHU14 /
This project covers: 1) UICollectionViewFlowLayout with all the auto-layout constraints added programatically 2) How to build custom tab bar as seen in YouTube app 3) URL session integration to build feed for Home screen. All written in Latest Swift 3 syntax following MVC pattern, re-usable code methodologies, extensions etc.Converted from Swift2 (Source: https://www.letsbuildthatapp.com) to Swift3.
42/100 healthrgmez /
This repository is dedicated to exploring various design patterns used in Swift programming. It serves as a guide for both novice and experienced developers to understand and implement design patterns effectively in their Swift projects.
59/100 healthDaniEid /
This is an example of clean architecture and MVVM pattern written in swift
38/100 health