Skip to content

Commit

Permalink
Leif/feature/xcodegen (#6)
Browse files Browse the repository at this point in the history
* Add project file for xcodegen

* Start updating project for xcodegen

* Successfully generate project

* Remove xcodeproj from git

* Correctly ignore project file

* Start sh script to rename base

* Update rename-base sh file

* Update script to rename files and folders

* Update script structure

* Add cleanup and xcodegen

* Update variable to remove error after renaming

* Add rename steps

* Add instruction for installing xcodegen

* Add back project file for CI tests

* Fix CI running tests

* Update GitHub workflow files

* Fix path for cd .github

* Update yamllint for CI
  • Loading branch information
0xLeif authored Jan 22, 2023
1 parent e9b9563 commit ca83705
Show file tree
Hide file tree
Showing 70 changed files with 1,223 additions and 1,072 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yamllint disable rule:line-length
name: CI
'on':
push:
Expand All @@ -17,10 +18,11 @@ jobs:
xcode-version: '14.1'
- name: Build
run: >
cd base xcodebuild build -project base.xcodeproj -scheme base clean
xcodebuild build -project base.xcodeproj -scheme base clean
build -sdk iphoneos CODE_SIGNING_ALLOWED=No
- name: Tests
run: >
cd base xcodebuild test -project base.xcodeproj -scheme base clean
xcodebuild test -project base.xcodeproj -scheme base clean
build -sdk iphoneos -destination "platform=iOS
Simulator,OS=16.1,name=iPhone 14 Pro Max" CODE_SIGNING_ALLOWED=No
# yamllint enable rule:line-length
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,17 @@ The OpenBytes template for iOS projects using SwiftUI
- Allows us to transform types from one to another while also providing us the various caching options.
- [Fork](https://github.com/0xLeif/Fork)
- Fork allows us to run multiple asynchronous tasks at the same time.

## Getting Started

### [Installing Xcodegen](https://github.com/yonaskolb/XcodeGen#installing)

`brew install xcodegen`

### Renaming

There is a some scripts to help rename base to whatever project name you want.

- Clone the templated repository
- run `./rename.sh`
- Enter a project name
970 changes: 970 additions & 0 deletions base.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

105 changes: 105 additions & 0 deletions base.xcodeproj/xcshareddata/xcschemes/base.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
runPostActionsOnFailure = "NO">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DF1016DAD4611E7FCD642455"
BuildableName = "base.app"
BlueprintName = "base"
ReferencedContainer = "container:base.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
onlyGenerateCoverageForSpecifiedTargets = "NO">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DF1016DAD4611E7FCD642455"
BuildableName = "base.app"
BlueprintName = "base"
ReferencedContainer = "container:base.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2144EE64796B39378E7F6907"
BuildableName = "baseTests.xctest"
BlueprintName = "baseTests"
ReferencedContainer = "container:base.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<CommandLineArguments>
</CommandLineArguments>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DF1016DAD4611E7FCD642455"
BuildableName = "base.app"
BlueprintName = "base"
ReferencedContainer = "container:base.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
</CommandLineArguments>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DF1016DAD4611E7FCD642455"
BuildableName = "base.app"
BlueprintName = "base"
ReferencedContainer = "container:base.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
</CommandLineArguments>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
33 changes: 33 additions & 0 deletions base/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>UILaunchScreen</key>
<array>
<dict>
<key>UILaunchScreen</key>
<array/>
</dict>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
</dict>
</plist>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
extension AuthNetworking {
var tokenFileName: String { "base.token" }

var baseURL: URL {
var authURL: URL {
URL(string: "AUTH_URL")! // TODO: (base-Template) Change AUTH_URL to valid URL
}

Expand Down Expand Up @@ -58,7 +58,7 @@ extension AuthNetworking {
encoder.dateEncodingStrategy = .iso8601

let dataResponse = try await Network.post(
url: baseURL.appendingPathComponent("register"),
url: authURL.appendingPathComponent("register"),
body: try encoder.encode(payload)
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit ca83705

Please sign in to comment.