Skip to content

Commit

Permalink
[Build] Restructure TchapX build files to better handle ShareExtensio…
Browse files Browse the repository at this point in the history
…ns and NSE
  • Loading branch information
NicolasBuquet committed Dec 4, 2024
1 parent 7e07b89 commit a62e96e
Show file tree
Hide file tree
Showing 27 changed files with 939 additions and 372 deletions.
33 changes: 33 additions & 0 deletions TchapX-NSE/development/SupportingFiles/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>1C8F.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>7D9E.1</string>
</array>
</dict>
</array>
</dict>
</plist>
123 changes: 123 additions & 0 deletions TchapX-NSE/development/SupportingFiles/target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: TchapX-NSE-Development

schemes:
TchapX-NSE-Development:
analyze:
config: Debug
archive:
config: Release
build:
targets:
TchapX-NSE-Development:
- running
- testing
- profiling
- analyzing
- archiving
profile:
config: Release
run:
askForAppToLaunch: true
config: Debug
debugEnabled: false
disableMainThreadChecker: false
launchAutomaticallySubstyle: 2
test:
config: Debug
disableMainThreadChecker: false

targets:
TchapX-NSE-Development:
type: app-extension
platform: iOS

dependencies:
- package: MatrixRustSDK
- package: KeychainAccess
- package: Kingfisher
- package: Collections
- package: Compound
- package: DeviceKit
- package: DTCoreText
- package: LRUCache
- package: Version

info:
path: Info.plist
properties:
CFBundleDisplayName: $(PRODUCT_DISPLAY_NAME)
CFBundleShortVersionString: $(MARKETING_VERSION)
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
appGroupIdentifier: $(APP_GROUP_IDENTIFIER)
baseBundleIdentifier: $(BASE_BUNDLE_IDENTIFIER)
keychainAccessGroupIdentifier: $(KEYCHAIN_ACCESS_GROUP_IDENTIFIER)
productionAppName: $(PRODUCTION_APP_NAME)
NSExtension:
NSExtensionPointIdentifier: com.apple.usernotifications.service
NSExtensionPrincipalClass: $(PRODUCT_MODULE_NAME).NotificationServiceExtension

settings:
base:
PRODUCTION_APP_NAME: TchapX-NSE Development
BASE_APP_GROUP_IDENTIFIER: fr.gouv.tchapx.dev
BASE_BUNDLE_IDENTIFIER: fr.gouv.tchapx.dev
APP_NAME: TchapX-NSE-Development
APP_DISPLAY_NAME: TchapX-NSE Development

PRODUCT_NAME: TchapX-NSE-Development
PRODUCT_DISPLAY_NAME: $(APP_DISPLAY_NAME)
PRODUCT_BUNDLE_IDENTIFIER: ${BASE_BUNDLE_IDENTIFIER}.nse
MARKETING_VERSION: $(MARKETING_VERSION)
CURRENT_PROJECT_VERSION: $(CURRENT_PROJECT_VERSION)
CODE_SIGN_ENTITLEMENTS: TchapX-NSE/development/SupportingFiles/NSE.entitlements
SWIFT_OBJC_INTERFACE_HEADER_NAME: GeneratedInterface-Swift.h
OTHER_SWIFT_FLAGS:
- "-DIS_NSE -DIS_ENVIRONMENT_DEVELOPMENT"

sources:
- path: ../../../NSE/Sources
- path: ../SupportingFiles
- path: ../../../ElementX/Sources/Generated/Assets.swift
- path: ../../../ElementX/Sources/Generated/Strings.swift
- path: ../../../ElementX/Sources/Other/Avatars.swift
- path: ../../../ElementX/Sources/Other/Extensions/AttributedString.swift
- path: ../../../ElementX/Sources/Other/Extensions/Bundle.swift
- path: ../../../ElementX/Sources/Other/Extensions/ClientBuilder.swift
- path: ../../../ElementX/Sources/Other/Extensions/Date.swift
- path: ../../../ElementX/Sources/Other/Extensions/FileManager.swift
- path: ../../../ElementX/Sources/Other/Extensions/ImageCache.swift
- path: ../../../ElementX/Sources/Other/Extensions/LayoutDirection.swift
- path: ../../../ElementX/Sources/Other/Extensions/NSRegularExpresion.swift
- path: ../../../ElementX/Sources/Other/Extensions/ProcessInfo.swift
- path: ../../../ElementX/Sources/Other/Extensions/String.swift
- path: ../../../ElementX/Sources/Other/Extensions/Task.swift
- path: ../../../ElementX/Sources/Other/Extensions/UNNotificationContent.swift
- path: ../../../ElementX/Sources/Other/Extensions/URL.swift
- path: ../../../ElementX/Sources/Other/Extensions/UTType.swift
- path: ../../../ElementX/Sources/Other/HTMLParsing
- path: ../../../ElementX/Sources/Other/InfoPlistReader.swift
- path: ../../../ElementX/Sources/Other/Logging
- path: ../../../ElementX/Sources/Other/MatrixEntityRegex.swift
- path: ../../../ElementX/Sources/Other/SwiftUI/Views/PlaceholderAvatarImage.swift
- path: ../../../ElementX/Sources/Other/UserAgentBuilder.swift
- path: ../../../ElementX/Sources/Other/UserPreference.swift
- path: ../../../ElementX/Sources/Other/TestablePreview.swift
- path: ../../../ElementX/Sources/Other/Pills/PlainMentionBuilder.swift
- path: ../../../ElementX/Sources/Other/Pills/PillConstants.swift
- path: ../../../ElementX/Sources/Other/CurrentValuePublisher.swift
- path: ../../../ElementX/Sources/Other/NetworkMonitor
- path: ../../../ElementX/Sources/Services/Keychain/KeychainController.swift
- path: ../../../ElementX/Sources/Services/Keychain/KeychainControllerProtocol.swift
- path: ../../../ElementX/Sources/Services/Media/Provider
- path: ../../../ElementX/Sources/Services/Notification/NotificationConstants.swift
- path: ../../../ElementX/Sources/Services/Notification/Proxy
- path: ../../../ElementX/Sources/Services/Room/RoomSummary/RoomMessageEventStringBuilder.swift
- path: ../../../ElementX/Sources/Services/UserSession/RestorationToken.swift
- path: ../../../ElementX/Sources/Services/UserSession/SessionDirectories.swift
- path: ../../../ElementX/Sources/UITests/UITestsScreenIdentifier.swift
- path: ../../../ElementX/Sources/Services/ElementCall/ElementCallServiceConstants.swift
- path: ../../../ElementX/Sources/Application/AppSettings.swift
- path: ../../../ElementX/Sources/AppHooks/AppHooks.swift
- path: ../../../ElementX/Sources/AppHooks/Hooks/ClientBuilderHook.swift
- path: ../../../TchapX/main/Sources/Generated/TchapAssets.swift
- path: ../../../TchapX/main/Sources/Generated/TchapStrings.swift
33 changes: 33 additions & 0 deletions TchapX-NSE/production/SupportingFiles/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>1C8F.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>7D9E.1</string>
</array>
</dict>
</array>
</dict>
</plist>
123 changes: 123 additions & 0 deletions TchapX-NSE/production/SupportingFiles/target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: TchapX-NSE-Production

schemes:
TchapX-NSE-Production:
analyze:
config: Debug
archive:
config: Release
build:
targets:
TchapX-NSE-Production:
- running
- testing
- profiling
- analyzing
- archiving
profile:
config: Release
run:
askForAppToLaunch: true
config: Debug
debugEnabled: false
disableMainThreadChecker: false
launchAutomaticallySubstyle: 2
test:
config: Debug
disableMainThreadChecker: false

targets:
TchapX-NSE-Production:
type: app-extension
platform: iOS

dependencies:
- package: MatrixRustSDK
- package: KeychainAccess
- package: Kingfisher
- package: Collections
- package: Compound
- package: DeviceKit
- package: DTCoreText
- package: LRUCache
- package: Version

info:
path: Info.plist
properties:
CFBundleDisplayName: $(PRODUCT_DISPLAY_NAME)
CFBundleShortVersionString: $(MARKETING_VERSION)
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
appGroupIdentifier: $(APP_GROUP_IDENTIFIER)
baseBundleIdentifier: $(BASE_BUNDLE_IDENTIFIER)
keychainAccessGroupIdentifier: $(KEYCHAIN_ACCESS_GROUP_IDENTIFIER)
productionAppName: $(PRODUCTION_APP_NAME)
NSExtension:
NSExtensionPointIdentifier: com.apple.usernotifications.service
NSExtensionPrincipalClass: $(PRODUCT_MODULE_NAME).NotificationServiceExtension

settings:
base:
PRODUCTION_APP_NAME: TchapX-NSE Production
BASE_APP_GROUP_IDENTIFIER: fr.gouv.tchapx
BASE_BUNDLE_IDENTIFIER: fr.gouv.tchapx
APP_NAME: TchapX-NSE-Production
APP_DISPLAY_NAME: TchapX-NSE

PRODUCT_NAME: TchapX-NSE-Production
PRODUCT_DISPLAY_NAME: $(APP_DISPLAY_NAME)
PRODUCT_BUNDLE_IDENTIFIER: ${BASE_BUNDLE_IDENTIFIER}.nse
MARKETING_VERSION: $(MARKETING_VERSION)
CURRENT_PROJECT_VERSION: $(CURRENT_PROJECT_VERSION)
CODE_SIGN_ENTITLEMENTS: TchapX-NSE/production/SupportingFiles/NSE.entitlements
SWIFT_OBJC_INTERFACE_HEADER_NAME: GeneratedInterface-Swift.h
OTHER_SWIFT_FLAGS:
- "-DIS_NSE -DIS_ENVIRONMENT_PRODUCTION"

sources:
- path: ../../../NSE/Sources
- path: ../SupportingFiles
- path: ../../../ElementX/Sources/Generated/Assets.swift
- path: ../../../ElementX/Sources/Generated/Strings.swift
- path: ../../../ElementX/Sources/Other/Avatars.swift
- path: ../../../ElementX/Sources/Other/Extensions/AttributedString.swift
- path: ../../../ElementX/Sources/Other/Extensions/Bundle.swift
- path: ../../../ElementX/Sources/Other/Extensions/ClientBuilder.swift
- path: ../../../ElementX/Sources/Other/Extensions/Date.swift
- path: ../../../ElementX/Sources/Other/Extensions/FileManager.swift
- path: ../../../ElementX/Sources/Other/Extensions/ImageCache.swift
- path: ../../../ElementX/Sources/Other/Extensions/LayoutDirection.swift
- path: ../../../ElementX/Sources/Other/Extensions/NSRegularExpresion.swift
- path: ../../../ElementX/Sources/Other/Extensions/ProcessInfo.swift
- path: ../../../ElementX/Sources/Other/Extensions/String.swift
- path: ../../../ElementX/Sources/Other/Extensions/Task.swift
- path: ../../../ElementX/Sources/Other/Extensions/UNNotificationContent.swift
- path: ../../../ElementX/Sources/Other/Extensions/URL.swift
- path: ../../../ElementX/Sources/Other/Extensions/UTType.swift
- path: ../../../ElementX/Sources/Other/HTMLParsing
- path: ../../../ElementX/Sources/Other/InfoPlistReader.swift
- path: ../../../ElementX/Sources/Other/Logging
- path: ../../../ElementX/Sources/Other/MatrixEntityRegex.swift
- path: ../../../ElementX/Sources/Other/SwiftUI/Views/PlaceholderAvatarImage.swift
- path: ../../../ElementX/Sources/Other/UserAgentBuilder.swift
- path: ../../../ElementX/Sources/Other/UserPreference.swift
- path: ../../../ElementX/Sources/Other/TestablePreview.swift
- path: ../../../ElementX/Sources/Other/Pills/PlainMentionBuilder.swift
- path: ../../../ElementX/Sources/Other/Pills/PillConstants.swift
- path: ../../../ElementX/Sources/Other/CurrentValuePublisher.swift
- path: ../../../ElementX/Sources/Other/NetworkMonitor
- path: ../../../ElementX/Sources/Services/Keychain/KeychainController.swift
- path: ../../../ElementX/Sources/Services/Keychain/KeychainControllerProtocol.swift
- path: ../../../ElementX/Sources/Services/Media/Provider
- path: ../../../ElementX/Sources/Services/Notification/NotificationConstants.swift
- path: ../../../ElementX/Sources/Services/Notification/Proxy
- path: ../../../ElementX/Sources/Services/Room/RoomSummary/RoomMessageEventStringBuilder.swift
- path: ../../../ElementX/Sources/Services/UserSession/RestorationToken.swift
- path: ../../../ElementX/Sources/Services/UserSession/SessionDirectories.swift
- path: ../../../ElementX/Sources/UITests/UITestsScreenIdentifier.swift
- path: ../../../ElementX/Sources/Services/ElementCall/ElementCallServiceConstants.swift
- path: ../../../ElementX/Sources/Application/AppSettings.swift
- path: ../../../ElementX/Sources/AppHooks/AppHooks.swift
- path: ../../../ElementX/Sources/AppHooks/Hooks/ClientBuilderHook.swift
- path: ../../../TchapX/main/Sources/Generated/TchapAssets.swift
- path: ../../../TchapX/main/Sources/Generated/TchapStrings.swift
33 changes: 33 additions & 0 deletions TchapX-NSE/staging/SupportingFiles/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>1C8F.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>7D9E.1</string>
</array>
</dict>
</array>
</dict>
</plist>
Loading

0 comments on commit a62e96e

Please sign in to comment.