Skip to content

Commit

Permalink
First test-flight releases
Browse files Browse the repository at this point in the history
This extended commit includes the following:
* updates the flutter dependencies
* re-generates the iOS project using the latest flutter template
* resolves versioning issues between the application and extension
* adds an application icon to the macOS project
* adds the replicated file provider extension to iOS
* temporarily disables the iOS share extension
  • Loading branch information
za-creature committed Dec 8, 2024
1 parent fd64f97 commit 2efa33d
Show file tree
Hide file tree
Showing 56 changed files with 792 additions and 887 deletions.
25 changes: 20 additions & 5 deletions .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819"
revision: "dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668"
channel: "stable"

project_type: app
Expand All @@ -13,11 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: android
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: ios
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: linux
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: macos
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: web
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
- platform: windows
create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668

# User provided section

Expand Down
2 changes: 1 addition & 1 deletion darwin/OuisyncBackend/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ let package = Package(
],
dependencies: [
.package(path: "../OuisyncCommon"),
.package(path: "../ouisync/bindings/swift/OuisyncLib")
.package(path: "../../ouisync/bindings/swift/OuisyncLib")
],
targets: [
.target(name: "OuisyncBackend",
Expand Down
50 changes: 50 additions & 0 deletions darwin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# duisync-darwin
This folder hosts code specific to deploying the ouisync library to apple devices.

## Supported platforms
Currently, macOS 11+ and iOS 16+ are supported targets.

## Requirements
To build, you must have a mac and the following:

* [xcode](https://apps.apple.com/us/app/xcode/id497799835) 15.2 or above
(earlier versions are not tested)
* xcode command line tools:
`xcode-select --install`
* [rust](https://www.rust-lang.org/):
`curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
* [flutter](https://docs.flutter.dev/release/archive#stable-channel-macos)
* [cocoapods](https://cocoapods.org/):
`sudo gem install cocoapods` or
`brew install cocoapods`
* an account that is a (paid) member of the
[Apple Developer Program](https://developer.apple.com/programs/enroll/)
WARN: a free account is insufficient to build due to our use of app groups

## Tips & tricks
* Xcode cannot currently open the same package in multiple windows; as such,
if you work on iOS and macOS at the same time, only the first opened workspace
will be able to access the shared dependencies: `OuisyncCommon`,
`OuisyncBackend` or `OuisyncLib`.
* Your first build will take a long time because it involves cross-compiling
the rust library on all platforms; you can speed things up by editing
`config.sh` from the `OuisyncLib` package dependency and opting for a release
build instead of a (much larger) debug build

## Troubleshooting
* `Module 'biometric_storage' not found`: You can only build from Xcode by
opening the `.xcworkspace`; the `.xcproject` will leave you unable to load
dependencies; as far as I can tell, this is an
[intentional decision](https://docs.flutter.dev/deployment/ios#review-xcode-project-settings)
made by early flutter devs and one that cannot be (easily) worked around.
If you already opened the workspace, you need to run `pod install` from
either `macos` or `ios`
* `Unable to load contents of file list: 'ouisync-app/macos/Flutter/ephemeral/FlutterInputs.xcfilelist'`:
appears to be a [known issue](https://github.com/flutter/flutter/issues/115804#issuecomment-1324164871)
in Flutter; current workaround is to run `flutter build macos` after checkout
and after every `flutter clean` before building from Xcode
* `Linker command failed with exit code 1 (use -v to see invocation)`:
9 times out of 10, this means that your ouisync rust framework was not built
correctly: this can either be because you didn't successfully run
`Update rust dependencies` before building, the OuisyncLib build plugin did
not run or you've disabled your current target in `config.sh`
97 changes: 2 additions & 95 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,109 +32,16 @@ target 'Runner' do
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

# Sharing Extension is name of Extension which you created. It is 'Share Extension' and 'Sharing Extension' in example
target 'Share Extension' do
target 'RunnerTests' do
inherit! :search_paths
end
end

#post_install do |installer|
# installer.pods_project.targets.each do |target|
# flutter_additional_ios_build_settings(target)
# end
#end

# post install
post_install do |installer|
# fix xcode 15 DT_TOOLCHAIN_DIR - remove after fix officially - https://github.com/CocoaPods/CocoaPods/issues/12065
installer.aggregate_targets.each do |target|
target.xcconfigs.each do |variant, xcconfig|
xcconfig_path = target.client_root + target.xcconfig_relative_path(variant)
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end

installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference
xcconfig_path = config.base_configuration_reference.real_path
IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
end
end
end


installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)

# Add the line below
target_is_resource_bundle = target.respond_to?(:product_type) && target.product_type == 'com.apple.product-type.bundle'

target.build_configurations.each do |config|

# And lines from here
if target_is_resource_bundle
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
config.build_settings['CODE_SIGNING_REQUIRED'] = 'NO'
config.build_settings['CODE_SIGNING_IDENTITY'] = '-'
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = '-'
end
# to here

# You can enable the permissions needed here. For example to enable camera
# permission, just remove the `#` character in front so it looks like this:
#
# ## dart: PermissionGroup.camera
# 'PERMISSION_CAMERA=1'
#
# Preprocessor definitions can be found in: https://github.com/Baseflow/flutter-permission-handler/blob/master/permission_handler_apple/ios/Classes/PermissionHandlerEnums.h
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',

## dart: PermissionGroup.calendar
# 'PERMISSION_EVENTS=1',

## dart: PermissionGroup.reminders
# 'PERMISSION_REMINDERS=1',

## dart: PermissionGroup.contacts
# 'PERMISSION_CONTACTS=1',

## dart: PermissionGroup.camera
'PERMISSION_CAMERA=1',

## dart: PermissionGroup.microphone
# 'PERMISSION_MICROPHONE=1',

## dart: PermissionGroup.speech
# 'PERMISSION_SPEECH_RECOGNIZER=1',

## dart: PermissionGroup.photos
'PERMISSION_PHOTOS=1',

## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
# 'PERMISSION_LOCATION=1',

## dart: PermissionGroup.notification
# 'PERMISSION_NOTIFICATIONS=1',

## dart: PermissionGroup.mediaLibrary
# 'PERMISSION_MEDIA_LIBRARY=1',

## dart: PermissionGroup.sensors
# 'PERMISSION_SENSORS=1',

## dart: PermissionGroup.bluetooth
# 'PERMISSION_BLUETOOTH=1',

## dart: PermissionGroup.appTrackingTransparency
# 'PERMISSION_APP_TRACKING_TRANSPARENCY=1',

## dart: PermissionGroup.criticalAlerts
# 'PERMISSION_CRITICAL_ALERTS=1'
]
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
36 changes: 18 additions & 18 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,16 @@ PODS:
- permission_handler_apple (9.3.0):
- Flutter
- PromisesObjC (2.4.0)
- receive_sharing_intent (1.8.0):
- receive_sharing_intent (1.8.1):
- Flutter
- SDWebImage (5.19.7):
- SDWebImage/Core (= 5.19.7)
- SDWebImage/Core (5.19.7)
- Sentry/HybridSDK (8.36.0)
- sentry_flutter (8.9.0):
- SDWebImage (5.20.0):
- SDWebImage/Core (= 5.20.0)
- SDWebImage/Core (5.20.0)
- Sentry/HybridSDK (8.40.1)
- sentry_flutter (8.10.1):
- Flutter
- FlutterMacOS
- Sentry/HybridSDK (= 8.36.0)
- Sentry/HybridSDK (= 8.40.1)
- share_plus (0.0.1):
- Flutter
- shared_preferences_foundation (0.0.1):
Expand Down Expand Up @@ -246,7 +246,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
biometric_storage: 1400f1382af3a4cc2bf05340e13c3d8de873ceb9
connectivity_plus: ddd7f30999e1faaef5967c23d5b6d503d10434db
connectivity_plus: 4c41c08fc6d7c91f63bc7aec70ffe3730b04f563
cryptography_flutter: 381bdacc984abcfbe3ca45ef7c76566ff061614c
device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d
DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
Expand All @@ -256,7 +256,7 @@ SPEC CHECKSUMS:
flutter_email_sender: 10a22605f92809a11ef52b2f412db806c6082d40
flutter_file_dialog: 4c014a45b105709a27391e266c277d7e588e9299
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
GoogleMLKit: 97ac7af399057e99182ee8edfa8249e3226a4065
GoogleToolboxForMac: d1a2cbf009c453f4d6ded37c105e2f67a32206d8
Expand All @@ -272,22 +272,22 @@ SPEC CHECKSUMS:
mobile_scanner: 96e91f2e1fb396bb7df8da40429ba8dfad664740
move_to_background: 39a5b79b26d577b0372cbe8a8c55e7aa9fcd3a2d
nanopb: 438bc412db1928dac798aa6fd75726007be04262
network_info_plus: 9d930145451916919786087c4173226363616071
network_info_plus: 6613d9d7cdeb0e6f366ed4dbe4b3c51c52d567a9
ouisync: 2620ea99b935c285b7383dd4dbd64d37b0445cef
package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
receive_sharing_intent: df9c334dc9feadcbd3266e5cb49c8443405e1c9f
SDWebImage: 8a6b7b160b4d710e2a22b6900e25301075c34cb3
Sentry: f8374b5415bc38dfb5645941b3ae31230fbeae57
sentry_flutter: 0eb93e5279eb41e2392212afe1ccd2fecb4f8cbe
share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad
receive_sharing_intent: 79c848f5b045674ad60b9fea3bafea59962ad2c1
SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8
Sentry: e9215d7b17f7902692b4f8700e061e4f853e3521
sentry_flutter: 927eed60d66951d1b0f1db37fe94ff5cb7c80231
share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4

PODFILE CHECKSUM: a2502349a4697221978af8d2814b154da0c71c1b
PODFILE CHECKSUM: c01bb388329ad1f437627e96e4481f3cc5ec8038

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
11 changes: 1 addition & 10 deletions ios/ReplicatedFileProviderUI/DocumentActionViewController.swift
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
//
// DocumentActionViewController.swift
// ReplicatedFileProviderUI
//
// Created by Radu Dan on 21.11.2024.
//

import UIKit
import FileProviderUI


class DocumentActionViewController: FPUIActionExtensionViewController {

@IBOutlet weak var identifierLabel: UILabel!
@IBOutlet weak var actionTypeLabel: UILabel!

Expand All @@ -31,6 +24,4 @@ class DocumentActionViewController: FPUIActionExtensionViewController {
@IBAction func cancelButtonTapped(_ sender: Any) {
extensionContext.cancelRequest(withError: NSError(domain: FPUIErrorDomain, code: Int(FPUIExtensionErrorCode.userCancelled.rawValue), userInfo: nil))
}

}

Loading

0 comments on commit 2efa33d

Please sign in to comment.