Skip to content

Commit

Permalink
feat: make saving articles possible when offline (#320)
Browse files Browse the repository at this point in the history
* chore(deps): bump flutter

* refactor: factorize some init steps

* feat: allow offline saving of articles

* refactor: simplify loading screen when saving article

* refactor(ios): move DB to the app group container

* POC Flutter <-> Swift interop

* link a Flutter Framework for the extension

* hide the navigation bar

* keep share/Frameworks in git

* try to not embedded the Framework for the extension

* remove some unused files

* remove more unused files

* refactor(iOS): save article using the RemoteSyncer (offline support!)

Fixes: #310 #312
  • Loading branch information
casimir authored Jan 24, 2025
1 parent 306db8a commit 0dbf99f
Show file tree
Hide file tree
Showing 27 changed files with 1,509 additions and 657 deletions.
2 changes: 1 addition & 1 deletion .flutter-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.27.0
3.27.1
2 changes: 2 additions & 0 deletions ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Flutter/flutter_export_environment.sh
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*

share/Frameworks/Flutter.xcframework

# Exceptions to above rules.
!default.mode1v3
!default.mode2v3
Expand Down
3 changes: 0 additions & 3 deletions ios/Gemfile

This file was deleted.

222 changes: 0 additions & 222 deletions ios/Gemfile.lock

This file was deleted.

21 changes: 17 additions & 4 deletions ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '12.0'
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down Expand Up @@ -32,13 +32,26 @@ target 'Runner' do
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

target 'share' do
use_frameworks!

pod 'device_info_plus', :path => '.symlinks/plugins/device_info_plus/ios'
pod 'package_info_plus', :path => '.symlinks/plugins/package_info_plus/ios'
pod 'path_provider_foundation', :path => '.symlinks/plugins/path_provider_foundation/darwin'
pod 'shared_preference_app_group', :path => '.symlinks/plugins/shared_preference_app_group/ios'
pod 'shared_preferences_foundation', :path => '.symlinks/plugins/shared_preferences_foundation/darwin'
end

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

flutter_ext_path = File.expand_path(File.join('bin', 'cache', 'artifacts', 'engine', 'ios-release', 'extension_safe', 'Flutter.xcframework'), flutter_root)
flutter_ext_symlink = File.join('share', 'Frameworks', 'Flutter.xcframework')
if !File.exist?(flutter_ext_symlink)
FileUtils.ln_s(flutter_ext_path, flutter_ext_symlink)
end
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ SPEC CHECKSUMS:
sqlite3_flutter_libs: 5235ce0546528db87927a3ef1baff8b7d5107f0e
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d

PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
PODFILE CHECKSUM: 5c0af5843f83b930cc6312bb7e01426808ecb246

COCOAPODS: 1.16.2
Loading

0 comments on commit 0dbf99f

Please sign in to comment.