Skip to content

Instantly share code, notes, and snippets.

@d-date
Last active March 17, 2024 21:17
Show Gist options
  • Star 46 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save d-date/44510c5b4b3baf820033453bfeb235c3 to your computer and use it in GitHub Desktop.
Save d-date/44510c5b4b3baf820033453bfeb235c3 to your computer and use it in GitHub Desktop.
XcodeGen Example
name: XXXX
attributes:
LastUpgradeCheck: 1140
ORGANIZATIONNAME: "kankak, Inc."
options:
bundleIdPrefix: com.xxxx.xxxxxxxx
deploymentTarget:
iOS: 13.1.3
configs:
Develop Debug: debug
Staging Debug: debug
Production Debug: debug
Develop Release: release
Staging Release: release
Production Release: release
schemes:
App Develop:
build:
targets:
App: all
run:
config: Develop Debug
commandLineArguments:
-FIRAnalyticsDebugEnabled: YES
-FIRDebugDisabled: YES
test:
config: Develop Debug
commandLineArguments:
-FIRAnalyticsDebugEnabled: YES
-FIRDebugDisabled: YES
gatherCoverageData: true
targets:
- name: AppTests
parallelizable: true
randomExecutionOrder: true
profile:
config: Develop Release
analyze:
config: Develop Debug
archive:
config: Develop Release
revealArchiveInOrganizer: false
App Staging:
build:
targets:
App: all
run:
config: Staging Debug
commandLineArguments:
-FIRAnalyticsDebugEnabled: YES
-FIRDebugDisabled: YES
test:
config: Staging Debug
commandLineArguments:
-FIRAnalyticsDebugEnabled: YES
-FIRDebugDisabled: YES
gatherCoverageData: true
targets:
- name: AppTests
parallelizable: true
randomExecutionOrder: true
profile:
config: Staging Release
analyze:
config: Staging Debug
archive:
config: Staging Release
revealArchiveInOrganizer: true
App Production:
build:
targets:
App: all
run:
config: Production Debug
commandLineArguments:
-FIRAnalyticsDebugEnabled: NO
test:
config: Production Debug
commandLineArguments:
-FIRAnalyticsDebugEnabled: YES
gatherCoverageData: true
targets:
- name: AppTests
parallelizable: true
randomExecutionOrder: true
profile:
config: Production Release
analyze:
config: Production Debug
archive:
config: Production Release
revealArchiveInOrganizer: true
settings:
base:
IPHONEOS_DEPLOYMENT_TARGET: 13.1.3
TARGETED_DEVICE_FAMILY: 1,2
SWIFT_VERSION: 5.0
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED: YES
settingGroups:
appBaseSettings:
DEVELOPMENT_TEAM: XXXXXXXXXX
packages:
CafeAPIClient:
url: https://github.com/kankak/cafe-api-spec
from: 1.2.0
FloatingPanel:
url: https://github.com/SCENEE/FloatingPanel
from: 1.7.4
APIClient:
url: https://github.com/d-date/APIClient
from: 1.0.5
ImagePipeline:
url: https://github.com/folio-sec/ImagePipeline
from: 1.0.0
CasePaths:
url: https://github.com/pointfreeco/swift-case-paths
from: 0.1.0
targets:
App:
type: application
platform: iOS
deploymentTarget: 13.1.3
sources:
- path: App
name: App
excludes:
- FirebaseOptions
settings:
groups:
- appBaseSettings
base:
CODE_SIGN_ENTITLEMENTS: App/App.entitlements
DEBUG_INFORMATION_FORMAT: dwarf-with-dsym
MARKETING_VERSION: 2.2.5
CURRENT_PROJECT_VERSION: 46
OTHER_LDFLAGS:
- $(inherited)
- $(OTHER_LDFLAGS)
- -ObjC
configs:
Develop Debug: &develop_config
API_HOST: xxx
API_BASE_PATH: https:$()/$()/$(API_HOST)
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
WEB_HOST: xxx
WEB_BASE_PATH: https:$()/$()/$(WEB_HOST)
BUNDLE_DISPLAY_NAME: "COFFEE Dev"
GOOGLESERVICE_INFO_PLIST_DIR: ${SRCROOT}/App/FirebaseOptions/Develop
PRODUCT_BUNDLE_IDENTIFIER: com.xxxxxx.xxxxxx.xxx
STRIPE_API_KEY: xxx
FIREBASE_CUSTOM_URL_SCHEME: com.googleusercontent.apps
Develop Release: *develop_config
Staging Debug: &staging_config
API_HOST: xxx
API_BASE_PATH: https:$()/$()/$(API_HOST)
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
WEB_HOST: xxx
WEB_BASE_PATH: https:$()/$()/$(WEB_HOST)
BUNDLE_DISPLAY_NAME: "COFFEE Stg"
GOOGLESERVICE_INFO_PLIST_DIR: ${SRCROOT}/App/FirebaseOptions/Staging
PRODUCT_BUNDLE_IDENTIFIER: xxx
STRIPE_API_KEY: xxx
FIREBASE_CUSTOM_URL_SCHEME: com.googleusercontent.apps.xxx
Staging Release: *staging_config
Production Debug: &production_config
API_HOST: xxx
API_BASE_PATH: https:$()/$()/$(API_HOST)
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
WEB_HOST: xxx
WEB_BASE_PATH: https:$()/$()/$(WEB_HOST)
BUNDLE_DISPLAY_NAME: "COFFEE App"
GOOGLESERVICE_INFO_PLIST_DIR: ${SRCROOT}/App/FirebaseOptions/Production
PRODUCT_BUNDLE_IDENTIFIER: com.kankak.coffee
STRIPE_API_KEY: xxx
FIREBASE_CUSTOM_URL_SCHEME: com.googleusercontent.apps.xxx
Production Release: *production_config
info:
path: "./App/Info.plist"
properties:
API_BASE_PATH: $(API_BASE_PATH)
WEB_BASE_PATH: $(WEB_BASE_PATH)
STRIPE_API_KEY: $(STRIPE_API_KEY)
CFBundleDisplayName: $(BUNDLE_DISPLAY_NAME)
CFBundleShortVersionString: "$(MARKETING_VERSION)"
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
CFBundlePackageType: $(PRODUCT_BUNDLE_PACKAGE_TYPE)
CFBundleURLTypes:
- CFBundleTypeRole: Editor
CFBundleURLName: Firebase Auth URL Scheme
CFBundleURLSchemes:
- "$(FIREBASE_CUSTOM_URL_SCHEME)"
UISupportedInterfaceOrientations:
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
UISupportedInterfaceOrientations~ipad:
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
UIRequiredDeviceCapabilities:
- armv7
UILaunchStoryboardName: LaunchScreen
LSApplicationQueriesSchemes:
- googlechromes
- comgooglemaps
- line
- twitter
- fb
LSRequiresIPhoneOS: true
SMAuthorizedClients:
- ""
UIApplicationSceneManifest:
UIApplicationSupportsMultipleScenes: false
UISceneConfigurations:
UIWindowSceneSessionRoleApplication:
- UISceneConfigurationName: Default Configuration
UISceneDelegateClassName: $(PRODUCT_MODULE_NAME).SceneDelegate
dependencies:
- package: CafeAPIClient
- carthage: RxSwift
- carthage: RxCocoa
- carthage: RxRelay
- package: FloatingPanel
- package: ImagePipeline
- package: APIClient
# Need to install Firebase via Carthage
# Don't add Firebase.framework
# See: https://github.com/firebase/firebase-ios-sdk/issues/911#issuecomment-372455235
- carthage: FIRAnalyticsConnector
linkType: static
- carthage: FirebaseABTesting
linkType: static
- carthage: FirebaseAnalytics
linkType: static
- carthage: FirebaseAuth
linkType: static
- carthage: FirebaseCore
linkType: static
- carthage: FirebaseCoreDiagnostics
linkType: static
- carthage: FirebaseDynamicLinks
linkType: static
- carthage: FirebaseInAppMessaging
linkType: static
- carthage: FirebaseCrashlytics
linkType: static
- carthage: FirebaseInstallations
linkType: static
- carthage: FirebaseInstanceID
linkType: static
- carthage: FirebaseMessaging
linkType: static
- carthage: FirebasePerformance
linkType: static
- carthage: FirebaseRemoteConfig
linkType: static
- carthage: GoogleAppMeasurement
linkType: static
- carthage: GoogleDataTransport
linkType: static
- carthage: GoogleDataTransportCCTSupport
linkType: static
- carthage: GoogleToolboxForMac
linkType: static
- carthage: GoogleUtilities
linkType: static
- carthage: GTMSessionFetcher
linkType: static
- carthage: nanopb
linkType: static
- carthage: PromisesObjC
linkType: static
- carthage: Protobuf
linkType: static
- sdk: CoreTelephony.framework
- sdk: StoreKit.framework
- sdk: libc++.tbd
- sdk: libsqlite3.tbd
- sdk: AdSupport.framework
- sdk: CryptoKit.framework
- target: ComposableArchitecture
preBuildScripts:
- script: ./Scripts/BuildPhases/SwiftGen.sh
name: SwiftGen
- script: ./Scripts/BuildPhases/FirebaseOptions.sh
name: "Firebase Options"
- script: ./Scripts/BuildPhases/Versioning.sh
name: Versioning
postCompileScripts:
- script: ./Scripts/BuildPhases/swiftlint.sh
name: Swiftlint
postBuildScripts:
- script: ./Scripts/FirebaseCrashlytics/run
name: Crashlytics run
inputFiles:
- ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}
- $(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
AppTests:
type: bundle.unit-test
platform: iOS
sources: [AppTests]
scheme: {}
dependencies:
- target: App
settings:
CLANG_ENABLE_MODULES: YES
DEVELOPMENT_TEAM: XXXXXXXXXX
ComposableArchitecture:
type: framework
platform: iOS
sources: ComposableArchitecture
info:
path: ./Architecture/Info.plist
properties:
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
dependencies:
- carthage: RxSwift
- carthage: RxCocoa
- carthage: RxRelay
- package: CasePaths
@iandundas
Copy link

Very handy! Just wondering how the GOOGLESERVICE_INFO_PLIST_DIR was implemented 🤔

@d-date
Copy link
Author

d-date commented May 12, 2021

@iandundas Not bundle to project, and running copy script on build phase.
See: https://github.com/folio-sec/Fastfile/blob/master/Scripts/BuildPhases/FirebaseOptions.sh

@iandundas
Copy link

Many thanks, that's similar to what I came up with in the end. Good to have the link for others 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment