Skip to content

Commit c1dcd19

Browse files
Preparation for open source repo
OKTA-404190 <<<Jenkins Check-In of Tested SHA: 5c10baa for [email protected]>>> Artifact: okta-ios-logger Files changed count: 39 PR Link: "#39"
1 parent 803c948 commit c1dcd19

39 files changed

+490
-153
lines changed

.ruby-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.6.0
1+
2.7.2

.travis.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
language: swift
2+
os: osx
3+
osx_image: xcode12.2
4+
5+
before_install:
6+
- gem install xcpretty
7+
- gem install cocoapods
8+
jobs:
9+
include:
10+
- stage: Linting
11+
name: SwiftLint
12+
addons:
13+
homebrew:
14+
packages:
15+
- swiftlint
16+
update: true
17+
script:
18+
- swiftlint
19+
- stage: Unit Tests
20+
name: iOS
21+
script:
22+
- xcodebuild -workspace "OktaLogger.xcworkspace" -scheme "OktaLogger" -destination "platform=iOS Simulator,OS=latest,name=iPhone 11" clean test | xcpretty
23+
- stage: Dependency Manager Validation
24+
name: CocoaPods
25+
script:
26+
- pod lib lint --allow-warnings

CONTRIBUTING.md

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
Contributing to Okta Open Source Repos
2+
======================================
3+
4+
Sign the CLA
5+
------------
6+
7+
If you haven't already, [sign the CLA](https://developer.okta.com/cla/). Common questions/answers are also listed on the CLA page.
8+
9+
Summary
10+
-------
11+
This document covers how to contribute to an Okta Open Source project. These instructions assume you have a github.com account, so if you don't have one you will have to create one. Your proposed code changes will be published to your own fork of the Okta Logger SDK project and you will submit a Pull Request for your changes to be added.
12+
13+
_Lets get started!!!_
14+
15+
16+
Fork the code
17+
-------------
18+
19+
In your browser, navigate to: [https://github.com/okta/okta-logger-swift](https://github.com/okta/okta-os)
20+
21+
Fork the repository by clicking on the 'Fork' button on the top right hand side. The fork will happen and you will be taken to your own fork of the repository. Copy the Git repository URL by clicking on the clipboard next to the URL on the right hand side of the page under '**HTTPS** clone URL'. You will paste this URL when doing the following `git clone` command.
22+
23+
On your computer, follow these steps to setup a local repository for working on the Okta Logger SDK:
24+
25+
``` bash
26+
$ git clone https://github.com/YOUR_ACCOUNT/okta-logger-swift.git
27+
$ cd okta-logger-swift
28+
$ git remote add upstream https://github.com/okta/okta-logger-swift.git
29+
$ git checkout master
30+
$ git fetch upstream
31+
$ git rebase upstream/master
32+
```
33+
34+
35+
Making changes
36+
--------------
37+
38+
It is important that you create a new branch to make changes on and that you do not change the `master` branch (other than to rebase in changes from `upstream/master`). In this example I will assume you will be making your changes to a branch called `feature_x`. This `feature_x` branch will be created on your local repository and will be pushed to your forked repository on GitHub. Once this branch is on your fork you will create a Pull Request for the changes to be added to the Okta Logger SDK project.
39+
40+
It is best practice to create a new branch each time you want to contribute to the project and only track the changes for that pull request in this branch.
41+
42+
``` bash
43+
$ git checkout -b feature_x
44+
(make your changes)
45+
$ git status
46+
$ git add .
47+
$ git commit -a -m "descriptive commit message for your changes"
48+
```
49+
50+
> The `-b` specifies that you want to create a new branch called `feature_x`. You only specify `-b` the first time you checkout because you are creating a new branch. Once the `feature_x` branch exists, you can later switch to it with only `git checkout feature_x`.
51+
52+
53+
Rebase `feature_x` to include updates from `upstream/master`
54+
------------------------------------------------------------
55+
56+
It is important that you maintain an up-to-date `master` branch in your local repository. This is done by rebasing in the code changes from `upstream/master` (the official Okta Logger SDK project repository) into your local repository. You will want to do this before you start working on a feature as well as right before you submit your changes as a pull request. I recommend you do this process periodically while you work to make sure you are working off the most recent project code.
57+
58+
This process will do the following:
59+
60+
1. Checkout your local `master` branch
61+
2. Synchronize your local `master` branch with the `upstream/master` so you have all the latest changes from the project
62+
3. Rebase the latest project code into your `feature_x` branch so it is up-to-date with the upstream code
63+
64+
``` bash
65+
$ git checkout master
66+
$ git fetch upstream
67+
$ git rebase upstream/master
68+
$ git checkout feature_x
69+
$ git rebase master
70+
```
71+
72+
> Now your `feature_x` branch is up-to-date with all the code in `upstream/master`.
73+
74+
75+
Make a GitHub Pull Request to contribute your changes
76+
-----------------------------------------------------
77+
78+
When you are happy with your changes and you are ready to contribute them, you will create a Pull Request on GitHub to do so. This is done by pushing your local changes to your forked repository (default remote name is `origin`) and then initiating a pull request on GitHub.
79+
80+
> **IMPORTANT:** Make sure you have rebased your `feature_x` branch to include the latest code from `upstream/master` _before_ you do this.
81+
82+
``` bash
83+
$ git push origin master
84+
$ git push origin feature_x
85+
```
86+
87+
Now that the `feature_x` branch has been pushed to your GitHub repository, you can initiate the pull request.
88+
89+
To initiate the pull request, do the following:
90+
91+
1. In your browser, navigate to your forked repository: [https://github.com/YOUR_ACCOUNT/okta-logger-swift](https://github.com/YOUR_ACCOUNT/okta-logger-swift)
92+
2. Click the new button called '**Compare & pull request**' that showed up just above the main area in your forked repository
93+
3. Validate the pull request will be into the upstream `master` and will be from your `feature_x` branch
94+
4. Enter a detailed description of the work you have done and then click '**Send pull request**'
95+
96+
If you are requested to make modifications to your proposed changes, make the changes locally on your `feature_x` branch, re-push the `feature_x` branch to your fork. The existing pull request should automatically pick up the change and update accordingly.
97+
98+
99+
Cleaning up after a successful pull request
100+
-------------------------------------------
101+
102+
Once the `feature_x` branch has been committed into the `upstream/master` branch, your local `feature_x` branch and the `origin/feature_x` branch are no longer needed. If you want to make additional changes, restart the process with a new branch.
103+
104+
> **IMPORTANT:** Make sure that your changes are in `upstream/master` before you delete your `feature_x` and `origin/feature_x` branches!
105+
106+
You can delete these deprecated branches with the following:
107+
108+
``` bash
109+
$ git checkout master
110+
$ git branch -D feature_x
111+
$ git push origin :feature_x
112+
```

Config.xcconfig

-10
This file was deleted.

Example/Example-iOS/AppDelegate.swift

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
//
2-
// AppDelegate.swift
3-
// OktaLoggerDemoApp
4-
//
5-
// Created by Lihao Li on 6/5/20.
6-
// Copyright © 2020 Okta, Inc. All rights reserved.
7-
//
8-
1+
/*
2+
* Copyright (c) 2020-Present, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
912
import UIKit
1013
import OktaLogger
1114
import Firebase

Example/Example-iOS/DemoTableViewCell.swift

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
//
2-
// DemoTableViewCell.swift
3-
// OktaLoggerDemoApp
4-
//
5-
// Created by Kaushik Krishnakumar on 7/14/20.
6-
// Copyright © 2020 Okta, Inc. All rights reserved.
7-
//
8-
1+
/*
2+
* Copyright (c) 2020-Present, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
912
import UIKit
1013

1114
class DemoTableViewCell: UITableViewCell {

Example/Example-iOS/LoggerDemoViewController.swift

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
//
2-
// LoggerDemoViewController.swift
3-
// OktaLoggerDemoApp
4-
//
5-
// Created by Lihao Li on 6/5/20.
6-
// Copyright © 2020 Okta, Inc. All rights reserved.
7-
//
8-
1+
/*
2+
* Copyright (c) 2020-Present, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
912
import UIKit
1013
import OktaLogger
1114

Example/Example-iOS/LoggerDemoViewModel.swift

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
//
2-
// LoggerDemoViewModel.swift
3-
// OktaLoggerDemoApp
4-
//
5-
// Created by Borys Kasianenko on 3/3/21.
6-
// Copyright © 2021 Okta, Inc. All rights reserved.
7-
//
8-
1+
/*
2+
* Copyright (c) 2020-Present, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
912
import Foundation
1013
import OktaLogger
1114
import FirebaseCrashlytics

Example/Example-iOS/LogsBrowseViewController.swift

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
//
2-
// LogsBrowseViewController.swift
3-
// OktaLoggerDemoApp
4-
//
5-
// Created by Borys Kasianenko on 3/4/21.
6-
// Copyright © 2021 Okta, Inc. All rights reserved.
7-
//
8-
1+
/*
2+
* Copyright (c) 2020-Present, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
912
import UIKit
1013

1114
class LogsBrowseViewController: UIViewController {

Example/Example-iOS/SceneDelegate.swift

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
//
2-
// SceneDelegate.swift
3-
// OktaLoggerDemoApp
4-
//
5-
// Created by Lihao Li on 6/5/20.
6-
// Copyright © 2020 Okta, Inc. All rights reserved.
7-
//
8-
1+
/*
2+
* Copyright (c) 2020-Present, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
912
import UIKit
1013

1114
class SceneDelegate: UIResponder, UIWindowSceneDelegate {

OktaLogger.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "OktaLogger"
3-
s.version = "1.2.1"
3+
s.version = "1.2.2"
44
s.summary = "Logging proxy for standardized logging interface across products"
55
s.description = "Standard interface for all logging in Okta apps + SDK. Supports file, console, firebase logging destinations."
66
s.homepage = "https://github.com/okta/okta-logger-swift"

OktaLogger.xcodeproj/project.pbxproj

+2-4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
804F18F724C0174800894A52 /* OktaLoggerFileLoggerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 804F18F624C0174800894A52 /* OktaLoggerFileLoggerTests.swift */; };
1414
806FF25E24B95A3300994D4D /* OktaLoggerFileLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 806FF25D24B95A3300994D4D /* OktaLoggerFileLogger.swift */; };
1515
80AA110224BE799800981074 /* DemoTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80AA110124BE799800981074 /* DemoTableViewCell.swift */; };
16-
8DCF5F682644B25D008698CD /* AppCenterLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DCF5F672644B25D008698CD /* AppCenterLogger.swift */; };
1716
8DCF5EB8263CACAD008698CD /* DDLogFileManagerCustomName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DCF5EB7263CACAC008698CD /* DDLogFileManagerCustomName.swift */; };
17+
8DCF5F682644B25D008698CD /* AppCenterLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DCF5F672644B25D008698CD /* AppCenterLogger.swift */; };
1818
B3E071E3B33C4657A8B4381B /* libPods-OktaLogger.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 62BB891524DBDEF8FC8E9711 /* libPods-OktaLogger.a */; };
1919
C4AA0759EDAC342A3B6B6796 /* libPods-OktaLoggerTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4FFB48B8C0D4F4DD1D258FFD /* libPods-OktaLoggerTests.a */; };
2020
D52C2AD12474A4F5003CCF4D /* ReadWriteLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = D52C2AD02474A4F5003CCF4D /* ReadWriteLock.swift */; };
@@ -102,9 +102,8 @@
102102
804F18F624C0174800894A52 /* OktaLoggerFileLoggerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OktaLoggerFileLoggerTests.swift; sourceTree = "<group>"; };
103103
806FF25D24B95A3300994D4D /* OktaLoggerFileLogger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OktaLoggerFileLogger.swift; sourceTree = "<group>"; };
104104
80AA110124BE799800981074 /* DemoTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoTableViewCell.swift; sourceTree = "<group>"; };
105-
80DDE79324B972FC00D0E2F3 /* Config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = "<group>"; };
106-
8DCF5F672644B25D008698CD /* AppCenterLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCenterLogger.swift; sourceTree = "<group>"; };
107105
8DCF5EB7263CACAC008698CD /* DDLogFileManagerCustomName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DDLogFileManagerCustomName.swift; sourceTree = "<group>"; };
106+
8DCF5F672644B25D008698CD /* AppCenterLogger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppCenterLogger.swift; sourceTree = "<group>"; };
108107
C58A9E54B6CE1A902894264C /* Pods-OktaLoggerDemoApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OktaLoggerDemoApp.debug.xcconfig"; path = "Target Support Files/Pods-OktaLoggerDemoApp/Pods-OktaLoggerDemoApp.debug.xcconfig"; sourceTree = "<group>"; };
109108
D52C2AD02474A4F5003CCF4D /* ReadWriteLock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadWriteLock.swift; sourceTree = "<group>"; };
110109
D54461C02469FFBA00C755F1 /* OktaLoggerLogLevel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OktaLoggerLogLevel.swift; sourceTree = "<group>"; };
@@ -206,7 +205,6 @@
206205
D5C824CA2469DBF1005CF747 = {
207206
isa = PBXGroup;
208207
children = (
209-
80DDE79324B972FC00D0E2F3 /* Config.xcconfig */,
210208
DEC5276524DBF9630022B698 /* GoogleService-Info.plist */,
211209
E251E7F5248AD13D00EF466D /* Example */,
212210
D5C824D62469DBF1005CF747 /* OktaLogger */,

OktaLogger.xcworkspace/contents.xcworkspacedata

-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

OktaLogger/AppCenterLogger/AppCenterLogger.swift

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
//
2-
// Created by Brenner Ryan on 5/11/21.
3-
// Copyright (c) 2021 Okta, Inc. All rights reserved.
4-
//
5-
1+
/*
2+
* Copyright (c) 2020-Present, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
612
import AppCenterAnalytics
713

814
/**

OktaLogger/FileLoggers/DDLogFileManagerCustomName.swift

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
//
2-
// DDLogFileManagerCustomName.swift
3-
// OktaLogger
4-
//
5-
// Created by Brenner Ryan on 4/30/21.
6-
// Copyright (c) 2021 Okta, Inc. All rights reserved.
7-
//
8-
1+
/*
2+
* Copyright (c) 2020-Present, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
912
import Foundation
1013
import CocoaLumberjack
1114

0 commit comments

Comments
 (0)