This commit is contained in:
Roman Aliyev 2024-07-03 10:08:10 -07:00 committed by GitHub
commit 63f35564f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 331 additions and 0 deletions

View File

@ -0,0 +1,53 @@
# (iOS) Alternate app icons
## Description
Adds alternate app icons to include in the built product.
## File structure
```diff
.
├── MyApp
│   ├── AppDelegate.swift
│   ├── Assets.xcassets
│   │   ├── AppIcon.appiconset
│   │   │   ├── AppIcon.png
| | | └── Contents.json
+│   │   ├── AppIcon2.appiconset
+│   │   │   ├── AppIcon.png
+| | | └── Contents.json
+│   │   ├── AppIcon3.appiconset
+│   │   │   ├── AppIcon.png
+| | | └── Contents.json
│   │   └── Contents.json
│   ├── LaunchScreen.storyboard
│   └── RootViewController.swift
└── project.yml
```
## project.yml
```diff
name: MyApp
targets:
MyApp:
type: application
platform: iOS
deploymentTarget: 12.0
settings:
TARGETED_DEVICE_FAMILY: 1
MARKETING_VERSION: 1.0
CURRENT_PROJECT_VERSION: 1
DEVELOPMENT_TEAM: MYTEAMID
PRODUCT_BUNDLE_IDENTIFIER: com.mycompany.myapp
GENERATE_INFOPLIST_FILE: YES
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents: YES
INFOPLIST_KEY_UILaunchStoryboardName: LaunchScreen.storyboard
INFOPLIST_KEY_UISupportedInterfaceOrientations: UIInterfaceOrientationPortrait
+ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS: YES
+ ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES: AppIcon2 AppIcon3
sources:
- MyApp
```

View File

@ -0,0 +1,72 @@
# (iOS) Environments
## Description
Best way to setup Development, Testing and Production environments.
## File structure
```diff
.
├── MyApp
│   ├── AppDelegate.swift
│   ├── Assets.xcassets
│   │   ├── AppIcon.appiconset
│   │   │   ├── AppIcon.png
| | | └── Contents.json
│   │   └── Contents.json
│   ├── LaunchScreen.storyboard
│   └── RootViewController.swift
└── project.yml
```
## project.yml
```diff
name: MyApp
+configs:
+ Dev Debug: debug
+ Test Debug: debug
+ Prod Debug: debug
+ Dev Release: release
+ Test Release: release
+ Prod Release: release
+settings:
+ configs:
+ Dev Debug:
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS: DEBUG DEV
+ Test Debug:
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS: DEBUG TEST
+ Prod Debug:
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS: DEBUG PROD
+ Dev Release:
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS: DEV
+ Test Release:
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS: TEST
+ Prod Release:
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS: PROD
targets:
MyApp:
type: application
platform: iOS
deploymentTarget: 12.0
settings:
TARGETED_DEVICE_FAMILY: 1
MARKETING_VERSION: 1.0
CURRENT_PROJECT_VERSION: 1
DEVELOPMENT_TEAM: MYTEAMID
PRODUCT_BUNDLE_IDENTIFIER: com.mycompany.myapp
GENERATE_INFOPLIST_FILE: YES
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents: YES
INFOPLIST_KEY_UILaunchStoryboardName: LaunchScreen.storyboard
INFOPLIST_KEY_UISupportedInterfaceOrientations: UIInterfaceOrientationPortrait
sources:
- MyApp
+ scheme:
+ configVariants:
+ - Dev
+ - Test
+ - Prod
```

View File

@ -0,0 +1,90 @@
# (iOS) Playground
## Description
An alternative to XCode Playground.
Example of Source.swift:
```swift
import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
var greeting = "Hello, playground"
print(greeting)
return true
}
}
```
Another example with UI:
```swift
import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
let window = UIWindow()
self.window = window
let rootViewController = RootViewController(nibName: nil, bundle: nil)
window.rootViewController = rootViewController
window.makeKeyAndVisible()
return true
}
}
class RootViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
}
```
## File structure
```diff
.
├── Source.swift
└── project.yml
```
## project.yml
```diff
name: MyApp
targets:
MyApp:
type: application
platform: iOS
deploymentTarget: 12.0
settings:
TARGETED_DEVICE_FAMILY: 1
MARKETING_VERSION: 1.0
CURRENT_PROJECT_VERSION: 1
DEVELOPMENT_TEAM: MYTEAMID
PRODUCT_BUNDLE_IDENTIFIER: com.mycompany.myapp
GENERATE_INFOPLIST_FILE: YES
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents: YES
- INFOPLIST_KEY_UILaunchStoryboardName: LaunchScreen.storyboard
+ INFOPLIST_KEY_UILaunchScreen_Generation: YES
INFOPLIST_KEY_UISupportedInterfaceOrientations: UIInterfaceOrientationPortrait
sources:
- Source.swift
```

View File

@ -0,0 +1,58 @@
# (iOS) UI Testing Bundle
## Description
Adds a user interface testing bundle that uses the XCTest framework.
## File structure
```diff
.
├── MyApp
│   ├── AppDelegate.swift
│   ├── Assets.xcassets
│   │   ├── AppIcon.appiconset
│   │   │   ├── AppIcon.png
| | | └── Contents.json
│   │   └── Contents.json
│   ├── LaunchScreen.storyboard
│   └── RootViewController.swift
+├── MyAppUITests
+│   └── SomeUITests.swift
└── project.yml
```
## project.yml
```diff
name: MyApp
targets:
MyApp:
type: application
platform: iOS
deploymentTarget: 12.0
settings:
TARGETED_DEVICE_FAMILY: 1
MARKETING_VERSION: 1.0
CURRENT_PROJECT_VERSION: 1
DEVELOPMENT_TEAM: MYTEAMID
PRODUCT_BUNDLE_IDENTIFIER: com.mycompany.myapp
GENERATE_INFOPLIST_FILE: YES
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents: YES
INFOPLIST_KEY_UILaunchStoryboardName: LaunchScreen.storyboard
INFOPLIST_KEY_UISupportedInterfaceOrientations: UIInterfaceOrientationPortrait
sources:
- MyApp
+ MyAppUITests:
+ type: bundle.ui-testing
+ platform: iOS
+ settings:
+ DEVELOPMENT_TEAM: MYTEAMID
+ PRODUCT_BUNDLE_IDENTIFIER: com.company.myappuitests
+ GENERATE_INFOPLIST_FILE: YES
+ sources:
+ - MyAppUITests
+ dependencies:
+ - target: MyApp
```

View File

@ -0,0 +1,58 @@
# (iOS) Unit Testing Bundle
## Description
Adds a unit test bundle that uses the XCTest framework.
## File structure
```diff
.
├── MyApp
│   ├── AppDelegate.swift
│   ├── Assets.xcassets
│   │   ├── AppIcon.appiconset
│   │   │   ├── AppIcon.png
| | | └── Contents.json
│   │   └── Contents.json
│   ├── LaunchScreen.storyboard
│   └── RootViewController.swift
+├── MyAppTests
+│   └── SomeTests.swift
└── project.yml
```
## project.yml
```diff
name: MyApp
targets:
MyApp:
type: application
platform: iOS
deploymentTarget: 12.0
settings:
TARGETED_DEVICE_FAMILY: 1
MARKETING_VERSION: 1.0
CURRENT_PROJECT_VERSION: 1
DEVELOPMENT_TEAM: MYTEAMID
PRODUCT_BUNDLE_IDENTIFIER: com.mycompany.myapp
GENERATE_INFOPLIST_FILE: YES
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents: YES
INFOPLIST_KEY_UILaunchStoryboardName: LaunchScreen.storyboard
INFOPLIST_KEY_UISupportedInterfaceOrientations: UIInterfaceOrientationPortrait
sources:
- MyApp
+ MyAppTests:
+ type: bundle.unit-test
+ platform: iOS
+ settings:
+ DEVELOPMENT_TEAM: MYTEAMID
+ PRODUCT_BUNDLE_IDENTIFIER: com.company.myapptests
+ GENERATE_INFOPLIST_FILE: YES
+ sources:
+ - MyAppTests
+ dependencies:
+ - target: MyApp
```