You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+
## Project Overview
6
+
7
+
This repository contains Smart Mobile Factory's common project setup files for iOS development. It provides reusable components, scripts, and configurations that are shared across multiple iOS projects and frameworks through git submodules.
8
+
9
+
## Architecture
10
+
11
+
The repository is organized into several functional directories:
12
+
13
+
### SDK Helper Wrappers
14
+
-**LifetimeTracker/**: Memory leak detection helpers with base view controllers (wraps https://github.com/krzysztofzablocki/LifetimeTracker)
15
+
16
+
### Development Tools
17
+
-**SwiftLint/**: SwiftLint v0.59.1 configurations and execution scripts with portable binary
18
+
-**Xcode/**: Xcode version checking utilities
19
+
20
+
### Utilities
21
+
-**Plist2swift/**: Swift Package Manager tool that generates Swift code from plist files
22
+
-**Git/**: Git merge drivers and upmerge scripts for framework development
This Repo contains our common project setup files.
7
7
8
8
Helpers which can be added manually to the Xcode project which should be used:
9
9
10
-
-[HockeySDK.swift](#hockeyapp-sdk)
11
-
-[SentrySDK.swift](#sentry-sdk)
12
-
-[BuglifeSDK.swift](#buglife-sdk)
13
10
-[LifetimeTrackerSDK](#lifetimetracker-sdk)
14
11
15
12
Scripts which should be called during the build phase:
16
13
17
14
-[SwiftLint](#swiftlint)
18
-
-[DrSwift](#drswift)
19
15
-[Xcode version check](#xcode-version-check)
20
16
21
17
### Setup
@@ -52,100 +48,7 @@ If you want to add more parameters, eg. to disable SwiftLint, you have to add th
52
48
53
49
## Helper classes
54
50
55
-
### HockeyApp-SDK
56
51
57
-
This repo contains the `HockeySDK` helper struct which takes care of the default HockeyApp SDK setup. The SDK will be initialized with the App ID and the Crash Manager started.
58
-
59
-
### Sentry-SDK
60
-
61
-
This repo contains the `SentrySKD` (plus the SMFLogger variant) helper struct which takes care of the default Sentry SDK setup. The SDK will be initialized with the Sentry DSN (in the info.plist).
62
-
63
-
#### Integrate the HockeyApp SDK
64
-
To use the HockeySDK.swift helper struct you have to manually add the HockeyApp SDK to your project first. Use the preferred way to do this - at this time it's [CocoaPods](https://cocoapods.org).
65
-
66
-
#### Add the HockeyApp App ID to the info plists
67
-
The helper struct will automatically read the App IDs from the info plists. It's mandatory to add these with the key `HockeyAppId` to all info plists in the project:
68
-
69
-
```
70
-
<key>HockeyAppId</key>
71
-
<string>ABCDE...</string>
72
-
```
73
-
74
-
#### Add the HockeySDK.swift file to the project
75
-
76
-
Once the SDK is properly integrated and the App IDs set you have to add the `HockeySDK.swift` file to the Xcode project:
77
-
78
-
```
79
-
Project navigator > Submodules > Add files to "SMF-iOS-CommonProjectSetupFiles" > Choose the folder "HockeyApp"
80
-
```
81
-
82
-
#### Use the HockeySDK.swift helper struct
83
-
84
-
If all former steps are completed you can call the `HockeySDK.setup()` method during the `applicationDidFinishLaunching(_:)` in the app delegate:
If you want to use a diferent `BITCrashManagerStatus` (the default is `.autoSend`) or want to enable crash reports also for debug builds you can send these as optional parameters:
If you want to test if crash reports are working you can perform a test crash. This will trigger a `fatalError()`. Note: If you didn't set `configureHockeyAppAlsoForDebugBuildTypes` to `true` you have to build the app as release app in order to capture crashes!
103
-
104
-
```
105
-
HockeySDK.performTestCrash()
106
-
```
107
-
108
-
109
-
### Buglife-SDK
110
-
111
-
This repo contains the `BuglifeSDK` helper struct which takes care of the default Buglife SDK setup with `Shake` as default invocation option to trigger the Buglife view controller.
112
-
113
-
#### Integrate the Buglife SDK
114
-
To use the BuglifeSDK.swift helper struct you have to manually add the Buglife SDK to your project first. Use the preferred way to do this - at this time it's [CocoaPods](https://cocoapods.org).
115
-
116
-
#### Add the Buglife ID to the info plists
117
-
The helper struct will automatically read the IDs from the info plists. It's mandatory to add these with the key `BuglifeId` to all info plists in the project:
118
-
119
-
```
120
-
<key>BuglifeId</key>
121
-
<string>ABCDE...</string>
122
-
```
123
-
124
-
#### Add the BuglifeSDK.swift file to the project
125
-
126
-
Once the SDK is properly integrated and the Buglife ID set you have to add the `BuglifeSDK .swift` file to the Xcode project:
127
-
128
-
```
129
-
Project navigator > Submodules > Add files to "SMF-iOS-CommonProjectSetupFiles" > Choose the folder "Buglife"
130
-
```
131
-
132
-
#### Use the BuglifeSDK.swift helper struct
133
-
134
-
If all former steps are completed you can call the `BuglifeSDK.setup()` method during the `applicationDidFinishLaunching (_:)` in the app delegate:
If you want to use a diferent `LIFEInvocationOptions` (the default is `.shake`) you can send it as optional parameter:
145
-
146
-
```
147
-
BuglifeSDK.setup(withOption: .screenshot)
148
-
```
149
52
150
53
### LifetimeTracker-SDK
151
54
@@ -165,7 +68,7 @@ Multiple `#if canImport(LifetimeTracker)` checks make sure that targets with Lif
165
68
166
69
### SwiftLint
167
70
168
-
Swiftlint is integrated in SMF-iOS-CommonProjectSetupFiles itself. The current version is 0.28.1.
71
+
SwiftLint is integrated in SMF-iOS-CommonProjectSetupFiles itself. The current version is 0.59.1.
169
72
170
73
#### Integrate it into the project
171
74
@@ -187,15 +90,6 @@ excluded:
187
90
##### Optional: Call the SwiftLint script without using the setup script
188
91
If you want to copy the SwiftLint configuration and lint the code without integrating the setup script you can call `Submodules/SMF-iOS-CommonProjectSetupFiles/SwiftLint/copy-and-run-swiftlint-config.sh` directly.
189
92
190
-
### DrSwift
191
-
192
-
[DrSwift](https://github.com/dduan/DrString) is integrated in SMF-iOS-CommonProjectSetupFiles itself. The current version is 0.4.2.
193
-
194
-
#### Integrate it into the project
195
-
196
-
DrString is configured to run when you execute `Submodules/SMF-iOS-CommonProjectSetupFiles/setup-common-project-files.sh` with [framework target configuration](#setup) parameters.
197
-
198
-
**Make sure that `/.drstring.toml` is added to the gitignore file as the DrSwift configuration file be automatically copied from the repo into the projects base folder.**
0 commit comments