mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-08-17 00:30:29 +03:00
Compare commits
2 Commits
63f35564f0
...
64c8a5802a
Author | SHA1 | Date | |
---|---|---|---|
|
64c8a5802a | ||
|
f0e1db79e0 |
53
Docs/Recipes/ios-alternate-app-icons.md
Normal file
53
Docs/Recipes/ios-alternate-app-icons.md
Normal 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
|
||||
```
|
72
Docs/Recipes/ios-environments.md
Normal file
72
Docs/Recipes/ios-environments.md
Normal 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
|
||||
```
|
||||
|
90
Docs/Recipes/ios-playground.md
Normal file
90
Docs/Recipes/ios-playground.md
Normal 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
|
||||
```
|
58
Docs/Recipes/ios-ui-testing-bundle.md
Normal file
58
Docs/Recipes/ios-ui-testing-bundle.md
Normal 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
|
||||
```
|
58
Docs/Recipes/ios-unit-testing-bundle.md
Normal file
58
Docs/Recipes/ios-unit-testing-bundle.md
Normal 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
|
||||
```
|
Loading…
Reference in New Issue
Block a user