Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open source Network SDK 🎉 #1

Merged
merged 3 commits into from
Apr 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug Report
about: This template is for reporting bugs you have found.
title: "[DATE]: [BUG TITLE]"
labels: Needs Triage
assignees: jeremyauclert, nurito-burrito
---

## Information

Device:

iOS version:

App Version:

Environment:

Frequency (How often does the bug occur?):

## Expected Behaviour
*What do you expect to happen?*

## Actual Behaviour
*What actually happens?*

### Screenshots
*Screenshot or video of the bug*

## Reproduction Steps
*Steps on how to reproduce?*
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Karhoo Developer Site
url: developer.karhoo.com
about: You may find answers to your questions here
- name: Karhoo website
url: karhoo.com
about: The main Karhoo Website. You can contact us from here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Custom Template
about: This template can be used for anything that does fit a feature request nor bug report.
title: "[DATE]: [TITLE]"
labels:
assignees:
---

*Please feel free to include any information you consider important to better explain your ticket/request. Please do try to keep everything formatted*
[Markdown Cheat Sheet](https://guides.github.com/pdfs/markdown-cheatsheet-online.pdf)
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature Request
about: This is a template for requesting a feature into the Network SDK.
title: "[DATE]: [Feature Title]"
labels:
assignees:
---

## What kind of feature do you want?
*Explain the kind and type of feature you would like to see in the Network*

## How will it work?
*Explain how you think your feature idea will work*

## Why would it be a good idea to implement this?
*Explain why you think we should go ahead and add this into to our Network SDK?*

### Examples:
*Show any examples you may have about what you are asking for here*
5 changes: 5 additions & 0 deletions .github/delete-merged-branch-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
exclude:
- develop
- master
- release
- release/*
30 changes: 30 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## JIRA
[MOB-XXXX](https://karhoo.atlassian.net/browse/MOB-XXXX)

## DESCRIPTION
[Create a description of what you have changed in this branch]

## Types of changes

What types of changes does your code introduce to the project?
_Put an `x` in the boxes that apply_

- [ ] Bugfix
- [ ] New feature
- [ ] Tech Debt
- [ ] Breaking change
- [ ] Documentation Update
- [ ] Other: *define what type of change it is*

## CHECKLIST

_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. This is simply a reminder of what we are going to look for before merging code._
Please review the guidelines for contributing to this repository.

- [ ] All work relating to the ticket is complete (Code complete/Acceptance Criteria met)
- [ ] Lint and unit tests pass locally (if appropriate)
- [ ] Added tests that prove the fix is effective or that feature works (if appropriate)
- [ ] Documentation (if appropriate)

## SCREENSHOTS
[Add screenshots if any for changes you have made to the App/UI]
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI-Development

on:
push:
branches-ignore: # disable workflows
- '**'
#branches:
#- '*'
#- '!master'

jobs:
Unit_tests:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Bundle install
run: bundle install
- name: Run Unit Tests
run:
xcodebuild -workspace 'KarhooSDK.xcworkspace' -scheme 'KarhooSDK' -destination 'platform=iOS Simulator,name=iPhone 11' test | xcpretty --test --color
- name: Fastlane Xcov report
run: fastlane ios XcovReport

Build_Project:
runs-on: macos-latest
needs: [Unit_tests]
steps:
- uses: actions/checkout@v2
- name: Build SDK
run:
xcodebuild -workspace 'KarhooSDK.xcworkspace' -scheme 'KarhooSDK' -destination 'generic/platform=iOS' -configuration Release build CODE_SIGNING_ALLOWED=NO | xcpretty
28 changes: 28 additions & 0 deletions .github/workflows/ios-develop-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Develop Branch CI

on:
push:
branches:
- 'develop'

jobs:
Unit_tests:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Bundle install
run: bundle install
- name: Run Unit Tests
run:
xcodebuild -workspace 'KarhooSDK.xcworkspace' -scheme 'KarhooSDK' -destination 'platform=iOS Simulator,name=iPhone 11' test | xcpretty --test --color
# - name: Fastlane Xcov report
# run: fastlane ios XcovReport

Build_Project:
runs-on: macos-latest
needs: [Unit_tests]
steps:
- uses: actions/checkout@v2
- name: Build SDK
run:
xcodebuild -workspace 'KarhooSDK.xcworkspace' -scheme 'KarhooSDK' -destination 'generic/platform=iOS' -configuration Release build CODE_SIGNING_ALLOWED=NO | xcpretty
31 changes: 31 additions & 0 deletions .github/workflows/ios-feature-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Feature Branch CI

on:
push:
branches:
- '*'
- '!develop'
- '!master'
- '!release*'

jobs:
Unit_tests:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Bundle install
run: bundle install
- name: Run Unit Tests
run:
xcodebuild -workspace 'KarhooSDK.xcworkspace' -scheme 'KarhooSDK' -destination 'platform=iOS Simulator,name=iPhone 11' test | xcpretty --test --color
# - name: Fastlane Xcov report
# run: fastlane ios XcovReport

Build_Project:
runs-on: macos-latest
needs: [Unit_tests]
steps:
- uses: actions/checkout@v2
- name: Build SDK
run:
xcodebuild -workspace 'KarhooSDK.xcworkspace' -scheme 'KarhooSDK' -destination 'generic/platform=iOS' -configuration Release build CODE_SIGNING_ALLOWED=NO | xcpretty
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
*.DS_Store
KarhooSDK.xcodeproj/xcuserdata/
KarhooSDK.xcodeproj/project.xcworkspace/xcuserdata
KarhooSDK.xcworkspace/xcuserdata/
KarhooSDK.framework
KarhooSDK.framework/
build/
IDEWorkspaceChecks.plist
WorkspaceSettings.xcsettings

# CocoaPods
Pods/

# Fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output
8 changes: 8 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Pods
disabled_rules: # rule identifiers to exclude from running
- identifier_name
- force_try
- redundant_string_enum_value
- trailing_whitespace
- line_length
42 changes: 42 additions & 0 deletions Client/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
//
// AppDelegate.swift
// Client
//
// Copyright © 2020 Flit Technologies Ltd. All rights reserved.
//

import UIKit
import KarhooSDK

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Karhoo.set(configuration: SDKConfig())
return true
}

// MARK: UISceneSession Lifecycle

func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
}

struct SDKConfig: KarhooSDKConfiguration {

func environment() -> KarhooEnvironment {
return .sandbox
}

func authenticationMethod() -> AuthenticationMethod {
/* let tokenSettings = TokenExchangeSettings(clientId: "",
scope: "")*/

let guestSettings = GuestSettings(identifier: "",
referer: "")
return .guest(settings: guestSettings)
}
}
98 changes: 98 additions & 0 deletions Client/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
6 changes: 6 additions & 0 deletions Client/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading