Skip to content

Commit

Permalink
feat: support consent to contact allow/blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccartney committed Jan 8, 2024
1 parent 569864d commit 362ac4d
Show file tree
Hide file tree
Showing 103 changed files with 3,542 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.7.6'
flutter-version: '3.13.9'
channel: 'stable'
- run: docker-compose -p xmtp -f "tool/local-node/docker-compose.yml" up -d
- run: flutter pub get
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ jobs:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.7.6'
flutter-version: '3.13.9'
channel: 'stable'
- run: docker-compose -p xmtp -f "tool/local-node/docker-compose.yml" up -d
- run: flutter pub get
- run: dart format . --set-exit-if-changed
- run: flutter test --dart-define=TEST_SERVER_ENABLED=true
# See tool/test-lib/README.md for more details.
env:
LD_LIBRARY_PATH: "${{ github.workspace }}/tool/test-lib/linux-x64"
- run: docker-compose -p xmtp -f "tool/local-node/docker-compose.yml" down
if: always()
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# See https://www.dartlang.org/guides/libraries/private-files

# These are the dynamic edition of the libxmtp bindings.
# They are used during `flutter test` runs.
# See tool/test-lib/README.md for details.
libxmtp_bindings_flutter.dylib
libxmtp_bindings_flutter.so
!tool/test-lib/**/libxmtp_bindings_flutter.dylib
!tool/test-lib/**/libxmtp_bindings_flutter.so

.flutter-plugins
.flutter-plugins-dependencies

Expand Down
1 change: 0 additions & 1 deletion example/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Include these when we're ready to add them
ios/
android/

# Miscellaneous
Expand Down
17 changes: 10 additions & 7 deletions example/.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: "7f20e5d18ce4cb80c621533090a7c5113f5bdc52"
revision: "d211f42860350d914a5ad8102f9ec32764dc6d06"
channel: "stable"

project_type: app
Expand All @@ -13,14 +13,17 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 7f20e5d18ce4cb80c621533090a7c5113f5bdc52
base_revision: 7f20e5d18ce4cb80c621533090a7c5113f5bdc52
create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06
base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06
- platform: android
create_revision: 7f20e5d18ce4cb80c621533090a7c5113f5bdc52
base_revision: 7f20e5d18ce4cb80c621533090a7c5113f5bdc52
create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06
base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06
- platform: ios
create_revision: 7f20e5d18ce4cb80c621533090a7c5113f5bdc52
base_revision: 7f20e5d18ce4cb80c621533090a7c5113f5bdc52
create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06
base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06
- platform: macos
create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06
base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06

# User provided section

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:drift/native.dart';
import 'package:flutter_test/flutter_test.dart';

import 'package:example/database/database.dart' as db;
import 'package:xmtp/src/common/topic.dart';

import 'test_data.dart';

Expand Down Expand Up @@ -34,7 +35,7 @@ void main() {
expect(emitted[0], []);
// Then the first and later the second update.
expect(emitted[1], [convoAandB.topic]);
expect(emitted[2], [convoAandB.topic, convoAandC.topic]);
expect(emitted[2], [convoAandC.topic, convoAandB.topic]);
await watching.cancel();
});

Expand Down
File renamed without changes.
34 changes: 34 additions & 0 deletions example/ios/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
**/dgph
*.mode1v3
*.mode2v3
*.moved-aside
*.pbxuser
*.perspectivev3
**/*sync/
.sconsign.dblite
.tags*
**/.vagrant/
**/DerivedData/
Icon?
**/Pods/
**/.symlinks/
profile
xcuserdata
**/.generated/
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral/
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*

# Exceptions to above rules.
!default.mode1v3
!default.mode2v3
!default.pbxuser
!default.perspectivev3
26 changes: 26 additions & 0 deletions example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?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>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
</dict>
</plist>
2 changes: 2 additions & 0 deletions example/ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
2 changes: 2 additions & 0 deletions example/ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
44 changes: 44 additions & 0 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
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
83 changes: 83 additions & 0 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
PODS:
- cryptography_flutter (0.2.0):
- Flutter
- Flutter (1.0.0)
- flutter_app_badger (1.3.0):
- Flutter
- integration_test (0.0.1):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- sqlite3 (3.41.2):
- sqlite3/common (= 3.41.2)
- sqlite3/common (3.41.2)
- sqlite3/fts5 (3.41.2):
- sqlite3/common
- sqlite3/perf-threadsafe (3.41.2):
- sqlite3/common
- sqlite3/rtree (3.41.2):
- sqlite3/common
- sqlite3_flutter_libs (0.0.1):
- Flutter
- sqlite3 (~> 3.41.0)
- sqlite3/fts5
- sqlite3/perf-threadsafe
- sqlite3/rtree
- url_launcher_ios (0.0.1):
- Flutter
- xmtp_bindings_flutter (0.0.1-development.3)

DEPENDENCIES:
- cryptography_flutter (from `.symlinks/plugins/cryptography_flutter/ios`)
- Flutter (from `Flutter`)
- flutter_app_badger (from `.symlinks/plugins/flutter_app_badger/ios`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- xmtp_bindings_flutter (from `.symlinks/plugins/xmtp_bindings_flutter/ios`)

SPEC REPOS:
trunk:
- sqlite3

EXTERNAL SOURCES:
cryptography_flutter:
:path: ".symlinks/plugins/cryptography_flutter/ios"
Flutter:
:path: Flutter
flutter_app_badger:
:path: ".symlinks/plugins/flutter_app_badger/ios"
integration_test:
:path: ".symlinks/plugins/integration_test/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqlite3_flutter_libs:
:path: ".symlinks/plugins/sqlite3_flutter_libs/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
xmtp_bindings_flutter:
:path: ".symlinks/plugins/xmtp_bindings_flutter/ios"

SPEC CHECKSUMS:
cryptography_flutter: 381bdacc984abcfbe3ca45ef7c76566ff061614c
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_app_badger: b87fc231847b03b92ce1412aa351842e7e97932f
integration_test: 13825b8a9334a850581300559b8839134b124670
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472
sqlite3: fd89671d969f3e73efe503ce203e28b016b58f68
sqlite3_flutter_libs: 78f93cb854d4680595bc2c63c57209a104b2efb1
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
xmtp_bindings_flutter: 9699cc6008d8fc86ed5dd072b4b920255d01926f

PODFILE CHECKSUM: 70d9d25280d0dd177a5f637cdb0f0b0b12c6a189

COCOAPODS: 1.12.1
Loading

0 comments on commit 362ac4d

Please sign in to comment.