Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
72 changes: 72 additions & 0 deletions .github/workflows/xcode.xxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Build main target

on:
push:
branches:
- master
- develop
pull_request:
types: [synchronize, opened, reopened, ready_for_review]
branches:
- master
- develop

jobs:
build-and-test:
name: Build and Test
runs-on: macos-latest
if: github.event.pull_request.draft == false
env:
PROJECT: Nextcloud.xcodeproj
DESTINATION: platform=iOS Simulator,name=iPhone 14
SCHEME: Nextcloud
steps:
- name: Set env var
run: echo "DEVELOPER_DIR=$(xcode-select --print-path)" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Setup Bundler and Install Gems
run: |
gem install bundler
bundle install
bundle update
- name: Restore Carhage Cache
uses: actions/cache@v3
id: carthage-cache
with:
path: Carthage
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
restore-keys: |
${{ runner.os }}-carthage-
- name: Carthage
if: steps.carthage-cache.outputs.cache-hit != 'true'
run: carthage bootstrap --use-xcframeworks --platform iOS
- name: Download GoogleService-Info.plist
run: wget "https://raw.githubusercontent.com/firebase/quickstart-ios/master/mock-GoogleService-Info.plist" -O GoogleService-Info.plist
- name: Install docker
run: |
brew install colima
brew install docker
colima start
- name: Create docker test server and export enviroment variables
run: |
source ./create-docker-test-server.sh
if [ ! -f ".env-vars" ]; then
touch .env-vars
echo "export TEST_SERVER_URL=$TEST_SERVER_URL" >> .env-vars
echo "export TEST_USER=$TEST_USER" >> .env-vars
echo "export TEST_APP_PASSWORD=$TEST_APP_PASSWORD" >> .env-vars
fi
- name: Build & Test Nextcloud iOS
run: |
set -o pipefail && xcodebuild test -project $PROJECT \
-scheme "$SCHEME" \
-destination "$DESTINATION" \
-enableCodeCoverage YES \
-test-iterations 3 \
-retry-tests-on-failure \
| xcpretty
- name: Upload coverage to codecov
run: |
bundle exec slather
bash <(curl -s https://codecov.io/bash) -f ./cobertura.xml -X coveragepy -X gcov -X xcode -t ${{ secrets.CODECOV_TOKEN }}

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,8 @@ Package.resolved

*.generated.swift
/.env-vars

## CI artifacts
BuildForSimulator/
ipaDerivedData/
build/
151 changes: 151 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
variables:
outputDirPath: "./build/sym"
IPA_PATH: "${outputDirPath}/${scheme}.ipa"
DSYM_PATH: "*.dSYM.zip"
scheme: "Nextcloud"
dev_configuration: "Alpha"
beta_configuration: "Beta"
archive_path: "${outputDirPath}/${scheme}"
export_method: "ad-hoc"

stages:
- build
- deploy

.mac_general_scripts: &mac_general_scripts
- security unlock-keychain -p $PASSWORD_BUILDE ~/Library/Keychains/login.keychain-db
- brew install jq
- gem install fastlane --user-install
- fastlane -v
- xcodebuild -version
- date

.download_google_info_plist: &download_google_info_plist
- curl
--fail
--location
--request GET
--url $FB_PLIST_PATH
--header "Authorization:Bearer ${FB_PLIST_PROJECT_TOKEN}" | jq -r '.content' | base64 --decode >> "./GoogleService-Info.plist"

.download_google_info_plist_beta: &download_google_info_plist_beta
- curl
--fail
--location
--request GET
--url $FB_BETA_PLIST_PATH
--header "Authorization:Bearer ${FB_PLIST_PROJECT_TOKEN}" | jq -r '.content' | base64 --decode >> "./GoogleService-Info.plist"


.build_general_script: &build_general_script
- fastlane gym
--scheme $scheme
--configuration $dev_configuration
--output_directory $outputDirPath
--derived_data_path ./ipaDerivedData
--output_name $scheme
--archive_path $archive_path
--export_method $export_method
--silent
--clean

.build_general_script_beta: &build_general_script_beta
- fastlane gym
--scheme $scheme
--configuration $beta_configuration
--output_directory $outputDirPath
--derived_data_path ./ipaDerivedData
--output_name $scheme
--archive_path $archive_path
--export_method $export_method
--silent
--clean

.build_simulator_general_script: &build_simulator_general_script
- xcodebuild -configuration Alpha -scheme $scheme -sdk iphonesimulator -derivedDataPath ./BuildForSimulator -quiet

############## build ##############

.build_general_params: &build_general_params
retry: 1
stage: build
tags:
- xcode16
before_script:
- *mac_general_scripts
artifacts:
paths:
- $IPA_PATH
- $DSYM_PATH
expire_in: 1 week

build_develop_feature:
<<: *build_general_params
script:
- *download_google_info_plist
- *build_general_script
only:
- develop
- /^feature/
- /^release/

build_beta:
<<: *build_general_params
when: manual
script:
- *download_google_info_plist_beta
- *build_general_script_beta
only:
- develop
- /^feature/
- /^release/

build_simulator:
<<: *build_general_params
when: manual
script:
- *download_google_info_plist
- *build_simulator_general_script
- zip -r ./${scheme}.zip ./BuildForSimulator/Build/Products/Debug-iphonesimulator/${scheme}.app

only:
- develop
- /^feature/
- /^hotfix/
- /^release/
artifacts:
paths:
- Nextcloud.zip
expire_in: 1 week

############ deploy ###########

.deploy_general_params: &deploy_general_params
stage: deploy
image: ruby
tags:
- docker

deploy_develop_feature:
<<: *deploy_general_params
script:
- curl $STORE_UPLOAD_URL -F token=$DEV_STORE_TOKEN -F bundle=@"${IPA_PATH}" -F comment=$CI_PIPELINE_ID
dependencies:
- build_develop_feature
needs: [build_develop_feature]
only:
- develop
- /^feature/
- /^release/

deploy_beta:
<<: *deploy_general_params
script:
- curl $STORE_UPLOAD_URL -F token=$DEV_STORE_TOKEN -F bundle=@"${IPA_PATH}" -F comment=$CI_PIPELINE_ID
dependencies:
- build_beta
needs: [build_beta]
only:
- develop
- /^feature/
- /^release/
3 changes: 3 additions & 0 deletions .slather.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage_service: cobertura_xml
xcodeproj: Nextcloud.xcodeproj
scheme: Nextcloud
14 changes: 14 additions & 0 deletions Brand/Alpha/File_Provider_Extension.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?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>com.apple.security.application-groups</key>
<array>
<string>group.com.viseven.ionos.easystorage</string>
</array>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.viseven.ionos.easystorage</string>
</array>
</dict>
</plist>
42 changes: 42 additions & 0 deletions Brand/Alpha/File_Provider_Extension.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>HiDrive Next</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSExtension</key>
<dict>
<key>NSExtensionFileProviderDocumentGroup</key>
<string>group.com.viseven.ionos.easystorage</string>
<key>NSExtensionFileProviderSupportsEnumeration</key>
<true/>
<key>NSExtensionFileProviderSupportsPickingFolders</key>
<true/>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.fileprovider-nonui</string>
<key>NSExtensionPrincipalClass</key>
<string>$(PRODUCT_MODULE_NAME).FileProviderExtension</string>
</dict>
</dict>
</plist>
14 changes: 14 additions & 0 deletions Brand/Alpha/File_Provider_Extension_UI.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?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>com.apple.security.application-groups</key>
<array>
<string>group.com.viseven.ionos.easystorage</string>
</array>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.viseven.ionos.easystorage</string>
</array>
</dict>
</plist>
44 changes: 44 additions & 0 deletions Brand/Alpha/File_Provider_Extension_UI.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?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>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>HiDrive Next</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionFileProviderActions</key>
<array>
<dict>
<key>NSExtensionFileProviderActionActivationRule</key>
<string>TRUEPREDICATE</string>
<key>NSExtensionFileProviderActionIdentifier</key>
<string>com.mycompany.FileProviderUI.CustomAction</string>
<key>NSExtensionFileProviderActionName</key>
<string>Custom Action</string>
</dict>
</array>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.fileprovider-actionsui</string>
</dict>
<key>NSHumanReadableCopyright</key>
<string></string>
</dict>
</plist>
18 changes: 18 additions & 0 deletions Brand/Alpha/Notification_Service_Extension.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?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>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.viseven.ionos.easystorage</string>
</array>
<key>com.apple.security.network.client</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.viseven.ionos.easystorage</string>
</array>
</dict>
</plist>
Loading