Skip to content

Commit

Permalink
Configure fastlane
Browse files Browse the repository at this point in the history
  • Loading branch information
nnsnodnb committed May 2, 2023
1 parent 7b3c3e6 commit 9a6d3bd
Show file tree
Hide file tree
Showing 12 changed files with 211 additions and 15 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ DerivedData/
.LSOverride

# Icon must end with two \r
Icon
Icon


# Thumbnails
._*
Expand Down Expand Up @@ -118,4 +119,7 @@ build-iPhoneSimulator/
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
# .rubocop-https?--*

.swiftpm
WebSocketClient/Generated/*.swift
fastlane/*.xml
fastlane/test_output
12 changes: 12 additions & 0 deletions Configurations/App/App.base.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include "Configurations/Project.xcconfig"

CODE_SIGN_STYLE = Manual
PRODUCT_BUNDLE_IDENTIFIER = moe.nnsnodnb.WebSocketClient

GENERATE_INFOPLIST_FILE = NO
INFOPLIST_FILE = WebSocketClient/Supporting Files/Info.plist
MARKETING_VERSION = 1.0.0
CURRENT_PROJECT_VERSION = 1

COPY_PHASE_STRIP = YES
STRIP_INSTALLED_PRODUCT = YES
14 changes: 14 additions & 0 deletions Configurations/App/App.debug.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "Configurations/App/App.base.xcconfig"

ONLY_ACTIVE_ARCH = YES
DEBUG_INFORMATION_FORMAT = dwarf
ENABLE_TESTABILITY = YES

CODE_SIGN_IDENTITY = Apple Development
PROVISIONING_PROFILE_SPECIFIER = match Development moe.nnsnodnb.WebSocketClient

GCC_OPTIMIZATION_LEVEL = 0
SWIFT_OPTIMIZATION_LEVEL = -Onone
SWIFT_ACTIVE_COMPILATION_CONDITIONS = Debug
COPY_PHASE_STRIP = NO
STRIP_INSTALLED_PRODUCT = NO
12 changes: 12 additions & 0 deletions Configurations/App/App.release.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include "Configurations/App/App.base.xcconfig"

ONLY_ACTIVE_ARCH = NO
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
ENABLE_TESTABILITY = NO

CODE_SIGN_IDENTITY = Apple Distribution
PROVISIONING_PROFILE_SPECIFIER = match AppStore moe.nnsnodnb.WebSocketClient

GCC_OPTIMIZATION_LEVEL = s
SWIFT_OPTIMIZATION_LEVEL = -O
SWIFT_ACTIVE_COMPILATION_CONDITIONS = Release
3 changes: 3 additions & 0 deletions Configurations/Project.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
IPHONEOS_DEPLOYMENT_TARGET = 16.0
TARGETED_DEVICE_FAMILY = 1
DEVELOPMENT_TEAM = 99649YXF6E
48 changes: 34 additions & 14 deletions WebSocketClient.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
CFC1AAA42A00768800C62659 /* FirebaseAnalyticsSwift in Frameworks */ = {isa = PBXBuildFile; productRef = CFC1AAA32A00768800C62659 /* FirebaseAnalyticsSwift */; };
CFC1AAA62A00773000C62659 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = CFC1AAA52A00773000C62659 /* GoogleService-Info.plist */; };
CFC1AAAF2A007EC300C62659 /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = CFC1AAAE2A007EC300C62659 /* FirebaseAnalytics */; };
CFC1AABA2A019E5B00C62659 /* Project.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = CFC1AAB62A019E5B00C62659 /* Project.xcconfig */; };
CFC1AABE2A019E9800C62659 /* App.release.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = CFC1AABB2A019E9800C62659 /* App.release.xcconfig */; };
CFC1AABF2A019E9800C62659 /* App.base.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = CFC1AABC2A019E9800C62659 /* App.base.xcconfig */; };
CFC1AAC02A019E9800C62659 /* App.debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = CFC1AABD2A019E9800C62659 /* App.debug.xcconfig */; };
CFD5AB8529F0284400765E48 /* DatabaseClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFD5AB8429F0284400765E48 /* DatabaseClient.swift */; };
CFD5AB8829F0322C00765E48 /* Unrealm in Frameworks */ = {isa = PBXBuildFile; productRef = CFD5AB8729F0322C00765E48 /* Unrealm */; };
CFD5AB8A29F0328300765E48 /* History.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFD5AB8929F0328300765E48 /* History.swift */; };
Expand Down Expand Up @@ -83,6 +87,10 @@
CFC1AA9F2A006C4B00C62659 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Localizable.strings; sourceTree = "<group>"; };
CFC1AAA12A006C5500C62659 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ../ja.lproj/Localizable.strings; sourceTree = "<group>"; };
CFC1AAA52A00773000C62659 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
CFC1AAB62A019E5B00C62659 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Project.xcconfig; sourceTree = "<group>"; };
CFC1AABB2A019E9800C62659 /* App.release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = App.release.xcconfig; sourceTree = "<group>"; };
CFC1AABC2A019E9800C62659 /* App.base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = App.base.xcconfig; sourceTree = "<group>"; };
CFC1AABD2A019E9800C62659 /* App.debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = App.debug.xcconfig; sourceTree = "<group>"; };
CFD5AB8429F0284400765E48 /* DatabaseClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DatabaseClient.swift; sourceTree = "<group>"; };
CFD5AB8929F0328300765E48 /* History.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = History.swift; sourceTree = "<group>"; };
CFD5AB8C29F1746C00765E48 /* HistoryListReducer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryListReducer.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -238,6 +246,25 @@
path = Base.lproj;
sourceTree = "<group>";
};
CFC1AAB12A019E5B00C62659 /* Configurations */ = {
isa = PBXGroup;
children = (
CFC1AAB22A019E5B00C62659 /* App */,
CFC1AAB62A019E5B00C62659 /* Project.xcconfig */,
);
path = Configurations;
sourceTree = "<group>";
};
CFC1AAB22A019E5B00C62659 /* App */ = {
isa = PBXGroup;
children = (
CFC1AABC2A019E9800C62659 /* App.base.xcconfig */,
CFC1AABD2A019E9800C62659 /* App.debug.xcconfig */,
CFC1AABB2A019E9800C62659 /* App.release.xcconfig */,
);
path = App;
sourceTree = "<group>";
};
CFD5AB8329F0283B00765E48 /* Database */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -290,6 +317,7 @@
isa = PBXGroup;
children = (
CFFF581729E98D3B0037AA85 /* WebSocketClient */,
CFC1AAB12A019E5B00C62659 /* Configurations */,
CFFF582829E98D3C0037AA85 /* WebSocketClientTests */,
CFFF581629E98D3B0037AA85 /* Products */,
CFD5AB9329F526F700765E48 /* Frameworks */,
Expand Down Expand Up @@ -619,7 +647,11 @@
files = (
CFC1AAA02A006C4B00C62659 /* Localizable.strings in Resources */,
CFFF582029E98D3C0037AA85 /* Preview Assets.xcassets in Resources */,
CFC1AABF2A019E9800C62659 /* App.base.xcconfig in Resources */,
CFC1AABE2A019E9800C62659 /* App.release.xcconfig in Resources */,
CFC1AAC02A019E9800C62659 /* App.debug.xcconfig in Resources */,
CFC1AAA62A00773000C62659 /* GoogleService-Info.plist in Resources */,
CFC1AABA2A019E5B00C62659 /* Project.xcconfig in Resources */,
CFFF584B29E990A30037AA85 /* Settings.bundle in Resources */,
CFFF581D29E98D3C0037AA85 /* Assets.xcassets in Resources */,
);
Expand Down Expand Up @@ -874,15 +906,12 @@
};
CFFF583A29E98D3C0037AA85 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = CFC1AABD2A019E9800C62659 /* App.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"WebSocketClient/Resources/Preview Content\"";
DEVELOPMENT_TEAM = 99649YXF6E;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = "WebSocketClient/Supporting Files/Info.plist";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
Expand All @@ -892,30 +921,24 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = moe.nnsnodnb.WebSocketClient;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
};
CFFF583B29E98D3C0037AA85 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = CFC1AABB2A019E9800C62659 /* App.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"WebSocketClient/Resources/Preview Content\"";
DEVELOPMENT_TEAM = 99649YXF6E;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = "WebSocketClient/Supporting Files/Info.plist";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
Expand All @@ -925,16 +948,13 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = moe.nnsnodnb.WebSocketClient;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = Release;
};
Expand Down
6 changes: 6 additions & 0 deletions fastlane/Appfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app
# apple_id("[[APPLE_ID]]") # Your Apple Developer Portal username


# For more information about the Appfile, see:
# https://docs.fastlane.tools/advanced/#appfile
43 changes: 43 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
default_platform(:ios)

app_identifier = "moe.nnsnodnb.WebSocketClient"

platform :ios do
desc "Run tests"
lane :test do
scan
end

# Match
desc "Setup development certificates"
lane :setup_development_certificates do
match(
type: "development",
)
end

desc "Setup adhoc certificates"
lane :setup_adhoc_certificates do
match(
type: "adhoc",
)
end

desc "Setup AppStore certificates"
lane :setup_appstore_certificates do
match(
type: "appstore",
)
end

# Gym
desc "Gym for adhoc"
lane :adhoc do
setup_adhoc_certificates

gym(
export_method: "ad-hoc",
xcargs: "PROVISIONING_PROFILE_SPECIFIER='match AdHoc #{app_identifier}'",
)
end
end
6 changes: 6 additions & 0 deletions fastlane/Gymfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
project("WebSocketClient.xcodeproj")
scheme("WebSocketClient")
clean(true)
cloned_source_packages_path(".swiftpm")
disable_package_automatic_updates(true)
output_directory("Products")
6 changes: 6 additions & 0 deletions fastlane/Matchfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
readonly(true)
app_identifier("moe.nnsnodnb.WebSocketClient")
git_url("git@github.com:nnsnodnb/ios-certificates.git")
git_branch("certs")
shallow_clone(true)
clone_branch_directly(true)
64 changes: 64 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
fastlane documentation
----

# Installation

Make sure you have the latest version of the Xcode command line tools installed:

```sh
xcode-select --install
```

For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)

# Available Actions

## iOS

### ios test

```sh
[bundle exec] fastlane ios test
```

Run tests

### ios setup_development_certificates

```sh
[bundle exec] fastlane ios setup_development_certificates
```

Setup development certificates

### ios setup_adhoc_certificates

```sh
[bundle exec] fastlane ios setup_adhoc_certificates
```

Setup adhoc certificates

### ios setup_appstore_certificates

```sh
[bundle exec] fastlane ios setup_appstore_certificates
```

Setup AppStore certificates

### ios adhoc

```sh
[bundle exec] fastlane ios adhoc
```

Gym for adhoc

----

This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.

More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).

The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
6 changes: 6 additions & 0 deletions fastlane/Scanfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
project("WebSocketClient.xcodeproj")
scheme("WebSocketClient")
clean(true)
cloned_source_packages_path(".swiftpm")
disable_package_automatic_updates(true)
prelaunch_simulator(true)

0 comments on commit 9a6d3bd

Please sign in to comment.