Skip to content

Commit

Permalink
🔀 Lib to template (#76)
Browse files Browse the repository at this point in the history
* 🔥 Remove template lib

* 🔧 Update CI

* 🔥 Remove Carthage build

* 🔧 Fix install tuist

* 🔧 Comment out changelog check

* 🔧 Fix install tuist

* 🔧 Use Xcode 15.2

* 🔧 Fix install tuist

* 🔧 Use FirebaseFetcher in example app

* 🔧 Remove underscores from target names

* 📝 Update docs
  • Loading branch information
olejnjak committed Mar 24, 2024
1 parent 09f5740 commit df39b59
Show file tree
Hide file tree
Showing 60 changed files with 165 additions and 1,067 deletions.
4 changes: 0 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

39 changes: 9 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,23 @@ name: Build
on: [pull_request, push]

jobs:
carthage:
name: Carthage build
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: AckeeCZ/[email protected]
- uses: actions/cache@v3
with:
path: Carthage
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
restore-keys: |
${{ runner.os }}-carthage-
- name: Fetch Carthage dependencies
run: carthage checkout
- name: Carthage build
run: carthage build --no-skip-current --cache-builds --use-xcframeworks
tests:
build:
name: Build
runs-on: macos-13
defaults:
run:
working-directory: ./ProjectTemplate
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: AckeeCZ/[email protected]
- uses: actions/cache@v3
with:
path: ../Carthage
path: Carthage
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
restore-keys: |
${{ runner.os }}-carthage-
- name: Install Tuist
run: bash <(curl -Ls https://install.tuist.io)
- name: Build Carthage dependencies
run: |
carthage checkout --project-directory ..
carthage build --no-skip-current --cache-builds --use-xcframeworks --project-directory ..
- name: Generate project
run: tuist fetch && tuist generate
run: carthage bootstrap --cache-builds --use-xcframeworks
- name: Build project
run: set -o pipefail && xcodebuild -scheme App -workspace ProjectTemplate.xcworkspace -sdk iphonesimulator ARCHS=x86_64 ONLY_ACTIVE_ARCH=NO | xcpretty
run: |
bash <(curl -Ls https://install.tuist.io)
tuist fetch
tuist generate
tuist build
17 changes: 0 additions & 17 deletions .github/workflows/checks.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/xcode-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15.1
15.2
1 change: 1 addition & 0 deletions .tuist-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.37.0
494 changes: 0 additions & 494 deletions AckeeTemplate.xcodeproj/project.pbxproj

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?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>CLIENT_ID</key>
<string>&lt;id&gt;.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.&lt;id&gt;</string>
<key>ANDROID_CLIENT_ID</key>
<string>&lt;id&gt;.apps.googleusercontent.com</string>
<key>API_KEY</key>
<string>&lt;key&gt;</string>
<key>GCM_SENDER_ID</key>
<string>&lt;id&gt;</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>cz.ackee.ProjectTemplate.test</string>
<key>PROJECT_ID</key>
<string>&lt;id&gt;</string>
<key>STORAGE_BUCKET</key>
<string>&lt;id&gt;.appspot.com</string>
<key>IS_ADS_ENABLED</key>
<false/>
<key>IS_ANALYTICS_ENABLED</key>
<false/>
<key>IS_APPINVITE_ENABLED</key>
<true/>
<key>IS_GCM_ENABLED</key>
<true/>
<key>IS_SIGNIN_ENABLED</key>
<true/>
<key>GOOGLE_APP_ID</key>
<string>&lt;id&gt;</string>
<key>DATABASE_URL</key>
<string>&lt;id&gt;</string>
</dict>
</plist>
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import FirebaseCore
import FirebaseCrashlytics
import UIKit

@main
Expand All @@ -8,11 +10,19 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
// This is gonna crash as plist file is just a placeholder
FirebaseApp.configure()

window = .init(frame: UIScreen.main.bounds)
window?.rootViewController = UIViewController()
window?.rootViewController?.view.backgroundColor = .red
window?.makeKeyAndVisible()

appDependencies.userManager.currentUserChanged = {
Crashlytics.crashlytics().setUserID($0?.id)
Crashlytics.crashlytics().setCustomValue($0?.username, forKey: "username")
}

return true
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import Core
import ACKategories
import AppCore
import Foundation
import UserManager

final class AppDependency: HasUserManager {
let userManager = createUserManager()
let versionUpdateManager = VersionUpdateManager(fetcher: FirebaseFetcher(key: "min_build_number"))
}

let appDependencies = AppDependency()
File renamed without changes.
16 changes: 0 additions & 16 deletions CHANGELOG.md

This file was deleted.

1 change: 1 addition & 0 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
github "AckeeCZ/ACKategories" ~> 6.13

binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" ~> 10.19
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseCrashlyticsBinary.json" ~> 10.19
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json" ~> 10.19
1 change: 1 addition & 0 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json" "10.21.0"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseCrashlyticsBinary.json" "10.21.0"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseRemoteConfigBinary.json" "10.21.0"
github "AckeeCZ/ACKategories" "6.13.0"
Loading

0 comments on commit df39b59

Please sign in to comment.