v1.5.0 Release

This commit is contained in:
Tha_14 2024-02-22 23:56:53 +02:00
parent 1b96a031d2
commit bec08b56be
27 changed files with 968 additions and 825 deletions

18
.circleci/config.yml Normal file
View File

@ -0,0 +1,18 @@
---
version: 2
workflows:
version: 2
build_linux:
jobs:
- build
jobs:
build:
docker:
- image: ubuntu:bionic
steps:
- run: pwd; ls -al; id -a

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
*.strings diff=localizablestrings

1
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1 @@
custom: ["https://liberapay.com/zoff/donate" , "https://blockstream.info/address/1TRifA7eNLHZEcCTj43eYVWHBbLqTuXkS" , "https://buy.stripe.com/6oE7t716E53c3AIdQQ"]

32
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Your system information:**
- Antidote Version: [1.4.0]
- App from App Store / Testflight / Self compiled / other: [App Store]
- IOS Version: [IOS 13]
- Device:
**Add screenshots, if possible**
**Additional context**
Add any other context about the problem here.

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1 @@
blank_issues_enabled: false

View File

@ -0,0 +1,26 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Your system information:**
- Antidote Version: [1.4.0]
- App from App Store / Testflight / Self compiled / other: [App Store]
- IOS Version: [IOS 13]
- Device:
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

20
.github/stale.yml vendored Normal file
View File

@ -0,0 +1,20 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 90
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 30
# Issues with these labels will never be considered stale
exemptLabels:
- bug
- security
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs in the next 30 days. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
# Limit to only `issues` or `pulls`
only: issues

57
.github/workflows/change_log.yml vendored Normal file
View File

@ -0,0 +1,57 @@
name: Generate Changelog
on:
release:
types: [published, edited]
workflow_dispatch:
inputs:
version:
description: dummy
default: dummy
defaults:
run:
shell: bash
jobs:
gen-changelog:
runs-on: ubuntu-latest
environment: genlog_gen_token
steps:
- uses: actions/checkout@v3
- name: install pkgs
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt update && sudo apt install -y zip grep sudo ruby rubygems git ssh ruby-dev gcc make
sudo $(which gem) install specific_install
- name: install github-changelog-generator
run: |
git clone https://github.com/ameir/github-changelog-generator.git -b v1.15.2-fixes
cd github-changelog-generator/
sudo $(which gem) build github_changelog_generator.gemspec
sudo $(which gem) install -N github_changelog_generator-1.15.2.gem
- name: run github-changelog-generator
env:
CHANGELOG_GEN_TOKEN: ${{ secrets.CHANGELOG_GEN_TOKEN }}
run: |
pwd
$(which ruby) $(which github_changelog_generator) -u Zoxcore -p Antidote \
--exclude-tags "1.0.0-rc.1,1.0.0-rc.2,1.0.0-rc.3,1.0.0-rc.4,1.1.0,1.2.0,1.2.0-build-2,1.3.0,1.3.1,1.3.2,1.3.3,1.3.4,1.3.5,,0.1,0.10.0,0.10.1,0.10.2,0.10.3,0.10.4,0.10.4-2,0.2,0.2.1,0.2.2,0.2.3,0.2.4,0.2.5,0.3.0,0.4.0,0.5.0,0.6.0,0.6.1," \
--token "$CHANGELOG_GEN_TOKEN"
- name: chmod
run: |
sudo chmod a+r /home/runner/work/Antidote/Antidote/CHANGELOG.md
ls -rattlh
- name: upload CHANGELOG file
uses: actions/upload-artifact@v3
with:
name: Changelog
path: |
/home/runner/work/Antidote/Antidote/CHANGELOG.md

95
.github/workflows/nightly.yml vendored Normal file
View File

@ -0,0 +1,95 @@
name: Nightly
on:
push:
paths-ignore:
- 'README.md'
# schedule:
# - cron: '0 0 * * *'
workflow_dispatch:
inputs:
version:
description: dummy
default: dummy
defaults:
run:
shell: bash
jobs:
macos-compile:
runs-on: macos-12
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Display the OS Version1
run: sw_vers -productVersion
- name: Display the OS Version2
run: system_profiler SPSoftwareDataType
- name: install pkgs
run: |
brew install ldid
- name: xcode info
run: |
ls -al
pwd
id -a
pod install
xcode-select --print-path
xcodebuild -list -workspace Antidote.xcworkspace
xcodebuild -list -project Antidote.xcodeproj
- name: xcode list destinations
run: |
env NSUnbufferedIO=YES xcodebuild -workspace ./Antidote.xcworkspace -scheme Antidote -destination "name=NoSuchName" -destination-timeout 1 || echo 'NO ERR'
xcrun xctrace list devices || echo 'NOERR'
- name: xcode compile
run: |
echo "iPhone 11 Simulator"
set -x
id=`env NSUnbufferedIO=YES xcodebuild -workspace ./Antidote.xcworkspace -scheme Antidote -destination "name=NoSuchName" -destination-timeout 1 2>&1 | grep 'platform:iOS Simulator,' | grep 'name:iPhone 11 }' | tail -1 | sed -e 's#.* id:##'|sed -e 's#, OS:.*$##'` || echo 'NOERR'
echo $id
env NSUnbufferedIO=YES xcodebuild -workspace ./Antidote.xcworkspace -scheme Antidote -destination "platform=iOS Simulator,id=$id"
- name: xcode compile for IOS
run: |
echo "IOS"
env NSUnbufferedIO=YES xcodebuild -workspace ./Antidote.xcworkspace -configuration Release archive -archivePath build/Antidote.xcarchive -scheme Antidote CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED="NO" CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO"
ls -al ./build/Antidote.xcarchive
ldid -S $(pwd)/build/Antidote.xcarchive/Products/Applications/Antidote.app/Antidote
echo codesign -fs "keyname" $(pwd)/build/Antidote.xcarchive/Products/Applications/Antidote.app/Antidote || echo "dummy"
ldid -d $(pwd)/build/Antidote.xcarchive/Products/Applications/Antidote.app/Antidote
./tools/package-ida.sh $(pwd)/build/Antidote.xcarchive $(pwd)/Antidote_unsigned.ipa
- name: check compile output
run: |
ls -al /Users/runner/Library/Developer/Xcode/DerivedData/Antidote-bhjjxfvewsypipfpuadvlmuxuzew/Build/Products/Debug-iphonesimulator/Antidote.app/
file /Users/runner/Library/Developer/Xcode/DerivedData/Antidote-bhjjxfvewsypipfpuadvlmuxuzew/Build/Products/Debug-iphonesimulator/Antidote.app/Antidote
- name: upload IPA file
uses: actions/upload-artifact@v4
with:
name: ipa
path: |
/Users/runner/work/Antidote/Antidote/Antidote_unsigned.ipa
- name: Rename artifact for release upload
if: contains(github.ref, 'refs/tags/v')
run: |
echo "RELEASE_VERSION1=${GITHUB_REF#refs/*/}"
echo "RELEASE_VERSION2=${{github.ref_name}}"
cp -v /Users/runner/work/Antidote/Antidote/Antidote_unsigned.ipa Antidote_unsigned_${GITHUB_REF#refs/*/}.ipa
- name: Upload to versioned release
if: contains(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "Antidote_unsigned*.ipa"

77
.github/workflows/pull_request.yml vendored Normal file
View File

@ -0,0 +1,77 @@
name: PullRequest
on:
pull_request:
paths-ignore:
- 'README.md'
workflow_dispatch:
inputs:
version:
description: dummy
default: dummy
defaults:
run:
shell: bash
jobs:
macos-compile:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Display the OS Version1
run: sw_vers -productVersion
- name: Display the OS Version2
run: system_profiler SPSoftwareDataType
- name: install pkgs
run: |
brew install ldid
- name: xcode info
run: |
ls -al
pwd
id -a
pod install
xcode-select --print-path
xcodebuild -list -workspace Antidote.xcworkspace
xcodebuild -list -project Antidote.xcodeproj
- name: xcode list destinations
run: |
env NSUnbufferedIO=YES xcodebuild -workspace ./Antidote.xcworkspace -scheme Antidote -destination "name=NoSuchName" -destination-timeout 1 || echo 'NO ERR'
xcrun xctrace list devices || echo 'NOERR'
- name: xcode compile
run: |
echo "iPhone 11 Simulator"
set -x
id=`env NSUnbufferedIO=YES xcodebuild -workspace ./Antidote.xcworkspace -scheme Antidote -destination "name=NoSuchName" -destination-timeout 1 2>&1 | grep 'platform:iOS Simulator,' | grep 'name:iPhone 11 }' | tail -1 | sed -e 's#.* id:##'|sed -e 's#, OS:.*$##'` || echo 'NOERR'
echo $id
env NSUnbufferedIO=YES xcodebuild -workspace ./Antidote.xcworkspace -scheme Antidote -destination "platform=iOS Simulator,id=$id"
- name: xcode compile for IOS
run: |
echo "IOS"
env NSUnbufferedIO=YES xcodebuild -workspace ./Antidote.xcworkspace -configuration Release archive -archivePath build/Antidote.xcarchive -scheme Antidote CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED="NO" CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO"
ls -al ./build/Antidote.xcarchive
ldid -S $(pwd)/build/Antidote.xcarchive/Products/Applications/Antidote.app/Antidote
echo codesign -fs "keyname" $(pwd)/build/Antidote.xcarchive/Products/Applications/Antidote.app/Antidote || echo "dummy"
ldid -d $(pwd)/build/Antidote.xcarchive/Products/Applications/Antidote.app/Antidote
./tools/package-ida.sh $(pwd)/build/Antidote.xcarchive $(pwd)/Antidote_unsigned.ipa
- name: check compile output
run: |
ls -al /Users/runner/Library/Developer/Xcode/DerivedData/Antidote-bhjjxfvewsypipfpuadvlmuxuzew/Build/Products/Debug-iphonesimulator/Antidote.app/
file /Users/runner/Library/Developer/Xcode/DerivedData/Antidote-bhjjxfvewsypipfpuadvlmuxuzew/Build/Products/Debug-iphonesimulator/Antidote.app/Antidote
- name: upload IPA file
uses: actions/upload-artifact@v3
with:
name: ipa
path: |
/Users/runner/work/Antidote/Antidote/Antidote_unsigned.ipa

77
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,77 @@
name: Release
on:
release:
types: [published, edited]
workflow_dispatch:
inputs:
version:
description: dummy
default: dummy
defaults:
run:
shell: bash
jobs:
macos-compile:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Display the OS Version1
run: sw_vers -productVersion
- name: Display the OS Version2
run: system_profiler SPSoftwareDataType
- name: install pkgs
run: |
brew install ldid
- name: xcode info
run: |
ls -al
pwd
id -a
pod install
xcode-select --print-path
xcodebuild -list -workspace Antidote.xcworkspace
xcodebuild -list -project Antidote.xcodeproj
- name: xcode list destinations
run: |
env NSUnbufferedIO=YES xcodebuild -workspace ./Antidote.xcworkspace -scheme Antidote -destination "name=NoSuchName" -destination-timeout 1 || echo 'NO ERR'
xcrun xctrace list devices || echo 'NOERR'
- name: xcode compile
run: |
echo "iPhone 11 Simulator"
set -x
id=`env NSUnbufferedIO=YES xcodebuild -workspace ./Antidote.xcworkspace -scheme Antidote -destination "name=NoSuchName" -destination-timeout 1 2>&1 | grep 'platform:iOS Simulator,' | grep 'name:iPhone 11 }' | tail -1 | sed -e 's#.* id:##'|sed -e 's#, OS:.*$##'` || echo 'NOERR'
echo $id
env NSUnbufferedIO=YES xcodebuild -workspace ./Antidote.xcworkspace -scheme Antidote -destination "platform=iOS Simulator,id=$id"
- name: xcode compile for IOS
run: |
echo "IOS"
env NSUnbufferedIO=YES xcodebuild -workspace ./Antidote.xcworkspace -configuration Release archive -archivePath build/Antidote.xcarchive -scheme Antidote CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED="NO" CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO"
ls -al ./build/Antidote.xcarchive
ldid -S $(pwd)/build/Antidote.xcarchive/Products/Applications/Antidote.app/Antidote
echo codesign -fs "keyname" $(pwd)/build/Antidote.xcarchive/Products/Applications/Antidote.app/Antidote || echo "dummy"
ldid -d $(pwd)/build/Antidote.xcarchive/Products/Applications/Antidote.app/Antidote
./tools/package-ida.sh $(pwd)/build/Antidote.xcarchive $(pwd)/Antidote_unsigned.ipa
- name: check compile output
run: |
ls -al /Users/runner/Library/Developer/Xcode/DerivedData/Antidote-bhjjxfvewsypipfpuadvlmuxuzew/Build/Products/Debug-iphonesimulator/Antidote.app/
file /Users/runner/Library/Developer/Xcode/DerivedData/Antidote-bhjjxfvewsypipfpuadvlmuxuzew/Build/Products/Debug-iphonesimulator/Antidote.app/Antidote
- name: upload IPA file
uses: actions/upload-artifact@v3
with:
name: ipa
path: |
/Users/runner/work/Antidote/Antidote/Antidote_unsigned.ipa

45
.github/workflows/upload_release.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Upload to Store
on:
# push:
# paths-ignore:
# - 'README.md'
workflow_dispatch:
inputs:
version:
description: dummy
default: dummy
defaults:
run:
shell: bash
jobs:
macos-compile:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Display the OS Version1
run: sw_vers -productVersion
- name: Display the OS Version2
run: system_profiler SPSoftwareDataType
- name: install pkgs
run: |
sudo gem install fastlane -NV
- name: xcode info
run: |
ls -al
pwd
id -a
xcode-select --print-path
- name: check compile output
run: |
fastlane ios release

44
.gitignore vendored Normal file
View File

@ -0,0 +1,44 @@
# Xcode
Antidote/GoogleService-Info.plist
build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.xcworkspace
!default.xcworkspace
xcuserdata
profile
*.moved-aside
*.mode1
*.perspective
xcshareddata
# Exclude temp nibs and swap files
*~.nib
*.swp
# Exclude OS X folder attributes
.DS_Store
#
# Exclude AppCode files
.idea
Pods
Podfile.lock
.bundle
# fastlane specific
fastlane/report.xml
# deliver temporary files
fastlane/Preview.html
# snapshot generated screenshots
fastlane/screenshots
# scan temporary files
fastlane/test_output
__Users_vvg_github_Antidote44

6
.travis.yml Normal file
View File

@ -0,0 +1,6 @@
language: objective-c
osx_image: xcode9.3
install:
- echo dummy

View File

@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
@ -574,7 +574,7 @@
9CEE6B521C528AB600A1ECB5 /* SettingsAdvancedController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CEE6B511C528AB600A1ECB5 /* SettingsAdvancedController.swift */; };
9CEE6B531C528AB600A1ECB5 /* SettingsAdvancedController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CEE6B511C528AB600A1ECB5 /* SettingsAdvancedController.swift */; };
AF2C929D279AB3F10094C08D /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF2C929C279AB3F10094C08D /* NotificationService.swift */; };
AF2C92A1279AB3F10094C08D /* pushextension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = AF2C929A279AB3F10094C08D /* pushextension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
AF2C92A1279AB3F10094C08D /* pushextension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = AF2C929A279AB3F10094C08D /* pushextension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
AFA023F4274C069100FBFCC0 /* ConnectionStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFA023F3274C069100FBFCC0 /* ConnectionStatus.swift */; };
AFA024022753CC9000FBFCC0 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AFA024012753CC9000FBFCC0 /* GoogleService-Info.plist */; };
D4F896D05F7EAA7C321A2AA8 /* libPods-Antidote.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 034E57B3AE56E352BBAA0487 /* libPods-Antidote.a */; };
@ -661,15 +661,15 @@
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
AF2C92A2279AB3F10094C08D /* Embed App Extensions */ = {
AF2C92A2279AB3F10094C08D /* Embed Foundation Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
AF2C92A1279AB3F10094C08D /* pushextension.appex in Embed App Extensions */,
AF2C92A1279AB3F10094C08D /* pushextension.appex in Embed Foundation Extensions */,
);
name = "Embed App Extensions";
name = "Embed Foundation Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
@ -962,24 +962,23 @@
AF2C929E279AB3F10094C08D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
AF6AB23329156C5800019362 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/InfoPlist.strings; sourceTree = "<group>"; };
AF6AB23429156C6000019362 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/AppStoreLocalizable.strings; sourceTree = "<group>"; };
AF6AB23A29256F0000019362 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = "<group>"; };
AF6AB23529156EDA00019362 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/InfoPlist.strings; sourceTree = "<group>"; };
AF6AB23629156EDA00019362 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = ca; path = "ca.lproj/import-profile.html"; sourceTree = "<group>"; };
AF6AB23A29257F0000019362 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Localizable.strings; sourceTree = "<group>"; };
AF6AB23729156EDC00019362 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/AppStoreLocalizable.strings; sourceTree = "<group>"; };
AF6AB23829156F0000019362 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/InfoPlist.strings; sourceTree = "<group>"; };
AF6AB23929156F0000019362 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = ko; path = "ko.lproj/import-profile.html"; sourceTree = "<group>"; };
AF6AB23A29156F0000019362 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Localizable.strings; sourceTree = "<group>"; };
AF6AB23A29256F0000019362 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = "<group>"; };
AF6AB23A29257F0000019362 /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Localizable.strings; sourceTree = "<group>"; };
AF6AB23A29258F0000019362 /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/Localizable.strings; sourceTree = "<group>"; };
AF6AB23A29259F0000019362 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/Localizable.strings"; sourceTree = "<group>"; };
AF6AB23B29156F0000019362 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/AppStoreLocalizable.strings; sourceTree = "<group>"; };
AF6AB23C29156F0A00019362 /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/InfoPlist.strings; sourceTree = "<group>"; };
AF6AB23D29156F0A00019362 /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = nb; path = "nb.lproj/import-profile.html"; sourceTree = "<group>"; };
AF6AB23A29258F0000019362 /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/Localizable.strings; sourceTree = "<group>"; };
AF6AB23F29156F0B00019362 /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/AppStoreLocalizable.strings; sourceTree = "<group>"; };
AF6AB24029156F1C00019362 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
AF6AB24129156F1C00019362 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = "pt-BR"; path = "pt-BR.lproj/import-profile.html"; sourceTree = "<group>"; };
AF6AB24129156F1C00019362 /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/Localizable.strings; sourceTree = "<group>"; };
AF6AB24229156F1E00019362 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/AppStoreLocalizable.strings"; sourceTree = "<group>"; };
AF6AB23A29259F0000019362 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/Localizable.strings"; sourceTree = "<group>"; };
AF6AB24129156F1C00019362 /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "el"; path = "el.lproj/Localizable.strings"; sourceTree = "<group>"; };
AFA023F3274C069100FBFCC0 /* ConnectionStatus.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConnectionStatus.swift; sourceTree = "<group>"; };
AFA024012753CC9000FBFCC0 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
B3C17AF8CE3B4AD1B68F2B5B /* Pods-Antidote.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Antidote.release.xcconfig"; path = "Pods/Target Support Files/Pods-Antidote/Pods-Antidote.release.xcconfig"; sourceTree = "<group>"; };
@ -1558,7 +1557,7 @@
1164762C19794D3300DB20B8 /* Frameworks */,
1164762D19794D3300DB20B8 /* Resources */,
F334EF7D7E56B63481570925 /* [CP] Copy Pods Resources */,
AF2C92A2279AB3F10094C08D /* Embed App Extensions */,
AF2C92A2279AB3F10094C08D /* Embed Foundation Extensions */,
);
buildRules = (
);
@ -1613,18 +1612,19 @@
1164762719794D3300DB20B8 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1250;
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1520;
ORGANIZATIONNAME = zoxcore;
TargetAttributes = {
111782A61DC64391000C1721 = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 0820;
LastSwiftMigration = "";
TestTargetID = 1164762E19794D3300DB20B8;
};
1164762E19794D3300DB20B8 = {
DevelopmentTeam = Y46L589C5C;
LastSwiftMigration = 0930;
LastSwiftMigration = "";
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.Keychain = {
@ -1634,7 +1634,7 @@
};
1173F0551BC5D94400B88B7B = {
CreatedOnToolsVersion = 7.0;
LastSwiftMigration = 0930;
LastSwiftMigration = "";
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.BackgroundModes = {
@ -1646,6 +1646,7 @@
AF2C9299279AB3F10094C08D = {
CreatedOnToolsVersion = 12.5;
DevelopmentTeam = Y46L589C5C;
LastSwiftMigration = "";
ProvisioningStyle = Automatic;
};
};
@ -2541,7 +2542,6 @@
AF6AB23629156EDA00019362 /* ca */,
AF6AB23929156F0000019362 /* ko */,
AF6AB23D29156F0A00019362 /* nb */,
AF6AB24129156F1C00019362 /* pt-BR */,
);
name = "import-profile.html";
sourceTree = "<group>";
@ -2635,7 +2635,11 @@
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = ScreenshotsUITests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MTL_ENABLE_DEBUG_INFO = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@ -2690,7 +2694,11 @@
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = ScreenshotsUITests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = (
"$(inherited)",
@ -2781,7 +2789,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
ONLY_ACTIVE_ARCH = YES;
PROVISIONING_PROFILE = "";
SDKROOT = iphoneos;
@ -2831,9 +2839,10 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = Release;
@ -2848,16 +2857,19 @@
CODE_SIGN_ENTITLEMENTS = Antidote/Antidote.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 142800;
CURRENT_PROJECT_VERSION = 105000;
DEVELOPMENT_TEAM = Y46L589C5C;
ENABLE_BITCODE = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Antidote/Antidote-Prefix.pch";
GCC_WARN_SIGN_COMPARE = YES;
INFOPLIST_FILE = "Antidote/Antidote-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.4.28;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.5.0;
PRODUCT_BUNDLE_IDENTIFIER = "org.zoxcore.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
@ -2881,16 +2893,19 @@
CODE_SIGN_ENTITLEMENTS = Antidote/Antidote.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 142800;
CURRENT_PROJECT_VERSION = 105000;
DEVELOPMENT_TEAM = Y46L589C5C;
ENABLE_BITCODE = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Antidote/Antidote-Prefix.pch";
GCC_WARN_SIGN_COMPARE = YES;
INFOPLIST_FILE = "Antidote/Antidote-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.4.28;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.5.0;
PRODUCT_BUNDLE_IDENTIFIER = "org.zoxcore.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
@ -2918,7 +2933,11 @@
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = AntidoteTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = zoxcore.AntidoteTests;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -2945,7 +2964,11 @@
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = AntidoteTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = zoxcore.AntidoteTests;
PRODUCT_NAME = "$(TARGET_NAME)";
@ -2969,8 +2992,12 @@
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = Y46L589C5C;
INFOPLIST_FILE = pushextension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.zoxcore.Antidote.pushextension;
@ -2996,8 +3023,12 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = Y46L589C5C;
INFOPLIST_FILE = pushextension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.zoxcore.Antidote.pushextension;

View File

@ -118,7 +118,7 @@ extension AddFriendController {
alert.addAction(SDCAlertAction(title: String(localized: "add_contact_send"), style: .recommended) { [unowned self] action in
self.cachedMessage = messageView.text
let message = messageView.text.isEmpty ? "Antidote is Tox" : messageView.text
let message = messageView.text.isEmpty ? "Toxing on Antidote" : messageView.text
do {
try self.submanagerFriends.sendFriendRequest(toAddress: self.textView.text, message: message)

View File

@ -3,7 +3,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
import UIKit
import Firebase
//import Firebase
import os
@UIApplicationMain
@ -70,9 +70,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
window?.backgroundColor = UIColor.white
window?.makeKeyAndVisible()
FirebaseApp.configure()
Messaging.messaging().delegate = self
// FirebaseApp.configure()
//
// Messaging.messaging().delegate = self
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self
@ -283,18 +283,18 @@ private extension AppDelegate {
}
}
extension AppDelegate: MessagingDelegate {
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
print("Firebase registration token: \(String(describing: fcmToken))")
let dataDict: [String: String] = ["token": fcmToken ?? ""]
NotificationCenter.default.post(
name: Notification.Name("FCMToken"),
object: nil,
userInfo: dataDict
)
}
}
//extension AppDelegate: MessagingDelegate {
// func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
// print("Firebase registration token: \(String(describing: fcmToken))")
//
// let dataDict: [String: String] = ["token": fcmToken ?? ""]
// NotificationCenter.default.post(
// name: Notification.Name("FCMToken"),
// object: nil,
// userInfo: dataDict
// )
// }
//}
// Convenience AppWide Simple Alert
extension AppDelegate {

View File

@ -81,10 +81,6 @@ extension ChatInputViewManager: ChatInputViewDelegate {
func chatInputViewSendButtonPressed(_ view: ChatInputView) {
// HINT: call OCTSubmanagerChatsImpl.m -> sendMessageToChat()
submanagerChats.sendMessage(to: chat, text: view.text, type: .normal, successBlock: nil, failureBlock: nil)
DispatchQueue.main.asyncAfter(deadline: .now() + 10) {
os_log("PUSH:10_seconds")
self.submanagerChats.sendMessagePush(to: self.chat)
}
view.text = ""
endUserInteraction()

View File

@ -61,7 +61,7 @@ class ChatPrivateController: KeyboardNotificationController, CLLocationManagerDe
fileprivate var audioButton: UIBarButtonItem!
fileprivate var videoButton: UIBarButtonItem!
fileprivate var locationButton: UIBarButtonItem!
// fileprivate var locationButton: UIBarButtonItem!
fileprivate var CallWaitingView: UIView!
fileprivate var callwaiting_running: Bool!
fileprivate var CallWaitingCancelButton: CallButton?
@ -463,10 +463,6 @@ extension ChatPrivateController {
// send a text message to trigger PUSH notification, and make friend come online (hopefully)
// HINT: call OCTSubmanagerChatsImpl.m -> sendMessageToChat()
self.submanagerChats.sendMessage(to: self.chat, text: "calling you", type: .normal, successBlock: nil, failureBlock: nil)
DispatchQueue.main.asyncAfter(deadline: .now() + 10) {
os_log("PUSH:10_seconds")
self.submanagerChats.sendMessagePush(to: self.chat)
}
self.linearBar.startAnimation(viewToAddto: self.CallWaitingView, viewToAlignToBottomOf: lb3, bottom_margin: 10)
self.CallWaitingView.bringSubview(toFront: self.linearBar)
@ -520,61 +516,61 @@ extension ChatPrivateController {
}
}
@objc func displayalert() {
var alert = UIAlertController(title: "Location Sharing", message: "Would you like to enable location sharing with this contact?\nYou can disable this feature by clicking on the location icon after it has been enabled.", preferredStyle: UIAlertControllerStyle.alert)
var action_title = "Enable"
if (AppDelegate.location_sharing_contact_pubkey != "-1")
{
alert = UIAlertController(title: "Location Sharing", message: "Disable sharing with this contact " + AppDelegate.location_sharing_contact_pubkey + " ?" , preferredStyle: UIAlertControllerStyle.alert)
action_title = "Disable"
}
alert.addAction((UIAlertAction(title: action_title, style: .default, handler: { [self] (action) -> Void in
if (action_title == "Disable")
{
AppDelegate.location_sharing_contact_pubkey = "-1"
let locationImage = UIImage(named: "location-call-medium")!.withRenderingMode(.alwaysOriginal)
locationButton.setBackgroundImage(locationImage, for: .normal, barMetrics: .default)
}
else
{
AppDelegate.location_sharing_contact_pubkey = self.friend?.publicKey ?? "-1"
let locationImage = UIImage(named: "location-call-activated-medium")!.withRenderingMode(.alwaysOriginal)
locationButton.setBackgroundImage(locationImage, for: .normal, barMetrics: .default)
DispatchQueue.global(qos: .userInitiated).async {
print("ll:location_sharing")
if self.friend != nil {
while AppDelegate.location_sharing_contact_pubkey != "-1" {
location_manager.requestLocation()
// HINT: sleep for 30 seconds
sleep(30)
}
print("ll:while_loop_end")
}
}
}
alert.dismiss(animated: true, completion: nil)
})))
alert.addAction(
UIAlertAction(title: "Cancel", style: .cancel, handler: { (action) -> Void in
alert.dismiss(animated: true, completion: nil)
}))
self.present(alert, animated: true, completion: nil)
}
// @objc func displayalert() {
// var alert = UIAlertController(title: "Location Sharing", message: "Would you like to enable location sharing with this contact?\nYou can disable this feature by clicking on the location icon after it has been enabled.", preferredStyle: UIAlertControllerStyle.alert)
// var action_title = "Enable"
//
// if (AppDelegate.location_sharing_contact_pubkey != "-1")
// {
// alert = UIAlertController(title: "Location Sharing", message: "Disable sharing with this contact " + AppDelegate.location_sharing_contact_pubkey + " ?" , preferredStyle: UIAlertControllerStyle.alert)
// action_title = "Disable"
// }
//
// alert.addAction((UIAlertAction(title: action_title, style: .default, handler: { [self] (action) -> Void in
// if (action_title == "Disable")
// {
// AppDelegate.location_sharing_contact_pubkey = "-1"
// let locationImage = UIImage(named: "location-call-medium")!.withRenderingMode(.alwaysOriginal)
// locationButton.setBackgroundImage(locationImage, for: .normal, barMetrics: .default)
// }
// else
// {
// AppDelegate.location_sharing_contact_pubkey = self.friend?.publicKey ?? "-1"
// let locationImage = UIImage(named: "location-call-activated-medium")!.withRenderingMode(.alwaysOriginal)
// locationButton.setBackgroundImage(locationImage, for: .normal, barMetrics: .default)
//
// DispatchQueue.global(qos: .userInitiated).async {
//
// print("ll:location_sharing")
// if self.friend != nil {
//
// while AppDelegate.location_sharing_contact_pubkey != "-1" {
// location_manager.requestLocation()
// // HINT: sleep for 30 seconds
// sleep(30)
// }
// print("ll:while_loop_end")
// }
// }
// }
// alert.dismiss(animated: true, completion: nil)
// })))
//
// alert.addAction(
// UIAlertAction(title: "Cancel", style: .cancel, handler: { (action) -> Void in
// alert.dismiss(animated: true, completion: nil)
// }))
//
// self.present(alert, animated: true, completion: nil)
// }
@objc func videoCallButtonPressed() {
delegate?.chatPrivateControllerCallToChat(self, enableVideo: true)
}
@objc func locationButtonPressed() {
displayalert()
}
// @objc func locationButtonPressed() {
// displayalert()
// }
@objc func editMessagesDeleteButtonPressed(_ barButtonItem: UIBarButtonItem) {
guard let selectedRows = tableView?.indexPathsForSelectedRows else {
@ -671,31 +667,11 @@ extension ChatPrivateController: UITableViewDataSource {
if let messageText = message.messageText {
let outgoingModel = ChatOutgoingTextCellModel()
if (UserDefaultsManager().DebugMode == false) {
outgoingModel.message = messageText.text ?? ""
} else {
let s1 = (messageText.text ?? "")
let s2 = (messageText.msgv3HashHex ?? "")
let s3 = (message.senderUniqueIdentifier ?? "")
let s4 = (message.chatUniqueIdentifier )
let s5 = String(messageText.isDelivered)
let s6 = String(messageText.sentPush)
let s7 = String(message.tssent)
let s8 = String(message.tsrcvd)
let s9 = String(message.dateInterval)
outgoingModel.message = s1 + "\n"
+ "msgv3HashHex:\n" + s2 + "\n"
+ "senderUniqueIdentifier:\n" + s3 + "\n"
+ "chatUniqueIdentifier:\n" + s4 + "\n"
+ "isDelivered:\n" + s5 + "\n"
+ "sentPush:\n" + s6 + "\n"
+ "tssent:\n" + s7 + "\n"
+ "tsrcvd:\n" + s8 + "\n"
+ "dateInterval:\n" + s9 + "\n"
}
outgoingModel.delivered = messageText.isDelivered
outgoingModel.sentpush = messageText.sentPush
//outgoingModel.sentpush = messageText.sentPush
model = outgoingModel
@ -717,26 +693,9 @@ extension ChatPrivateController: UITableViewDataSource {
if let messageText = message.messageText {
let incomingModel = ChatBaseTextCellModel()
if (UserDefaultsManager().DebugMode == false) {
incomingModel.message = messageText.text ?? ""
} else {
let s1 = (messageText.text ?? "")
let s2 = (messageText.msgv3HashHex ?? "")
let s3 = (message.senderUniqueIdentifier ?? "")
let s4 = (message.chatUniqueIdentifier)
let s5 = String(messageText.isDelivered)
let s6 = String(message.tssent)
let s7 = String(message.tsrcvd)
let s8 = String(message.dateInterval)
incomingModel.message = "" + s1 + "\n"
+ "msgv3HashHex:\n" + s2 + "\n"
+ "senderUniqueIdentifier:\n" + s3 + "\n"
+ "chatUniqueIdentifier:\n" + s4 + "\n"
+ "isDelivered:\n" + s5 + "\n"
+ "tssent:\n" + s6 + "\n"
+ "tsrcvd:\n" + s7 + "\n"
+ "dateInterval:\n" + s8 + "\n"
}
model = incomingModel
@ -1156,7 +1115,7 @@ private extension ChatPrivateController {
titleView.connectionStatus = ConnectionStatus(connectionStatus: .none)
audioButton.isEnabled = true
videoButton.isEnabled = false
locationButton.isEnabled = true
// locationButton.isEnabled = true
chatInputView.cameraButtonEnabled = false
return
}
@ -1185,7 +1144,7 @@ private extension ChatPrivateController {
self.audioButton.isEnabled = true
self.videoButton.isEnabled = isConnected
self.locationButton.isEnabled = true
//self.locationButton.isEnabled = true
self.chatInputView.cameraButtonEnabled = isConnected
self.updateTableHeaderView()
@ -1296,7 +1255,7 @@ private extension ChatPrivateController {
}
func updateLastReadDate() {
submanagerObjects.change(chat, lastReadDateInterval: Date().timeIntervalSince1970)
submanagerObjects.change(chat, lastReadDateInterval: Date().timeIntervalSince1970 ?? 0.0)
}
func imageCellWithMessage(_ message: OCTMessageAbstract, incoming: Bool) -> (ChatMovableDateCellModel, ChatMovableDateCell) {
@ -1471,18 +1430,18 @@ private extension ChatPrivateController {
let locationImage = UIImage(named: "location-call-medium")!.withRenderingMode(.alwaysOriginal)
audioButton = UIBarButtonItem(image: audioImage, style: .plain, target: self, action: #selector(ChatPrivateController.audioCallButtonPressed))
videoButton = UIBarButtonItem(image: videoImage, style: .plain, target: self, action: #selector(ChatPrivateController.videoCallButtonPressed))
locationButton = UIBarButtonItem(image: locationImage, style: .plain, target: self, action: #selector(ChatPrivateController.locationButtonPressed))
// locationButton = UIBarButtonItem(image: locationImage, style: .plain, target: self, action: #selector(ChatPrivateController.locationButtonPressed))
if (AppDelegate.location_sharing_contact_pubkey != "-1") {
let locationImage = UIImage(named: "location-call-activated-medium")!.withRenderingMode(.alwaysOriginal)
locationButton.setBackgroundImage(locationImage, for: .normal, barMetrics: .default)
}
// if (AppDelegate.location_sharing_contact_pubkey != "-1") {
// let locationImage = UIImage(named: "location-call-activated-medium")!.withRenderingMode(.alwaysOriginal)
// locationButton.setBackgroundImage(locationImage, for: .normal, barMetrics: .default)
// }
navigationItem.leftBarButtonItems = nil
navigationItem.rightBarButtonItems = [
videoButton,
audioButton,
locationButton
audioButton//,
// locationButton
]
}
}

View File

@ -27,7 +27,7 @@ class FriendCardController: StaticTableController {
fileprivate let nameModel: StaticTableDefaultCellModel
fileprivate let statusMessageModel: StaticTableDefaultCellModel
fileprivate let publicKeyModel: StaticTableDefaultCellModel
fileprivate let capabilitiesModel: StaticTableDefaultCellModel
// fileprivate let capabilitiesModel: StaticTableDefaultCellModel
fileprivate let pushurlModel: StaticTableDefaultCellModel
init(theme: Theme, friend: OCTFriend, submanagerObjects: OCTSubmanagerObjects) {
@ -42,7 +42,7 @@ class FriendCardController: StaticTableController {
nameModel = StaticTableDefaultCellModel()
statusMessageModel = StaticTableDefaultCellModel()
publicKeyModel = StaticTableDefaultCellModel()
capabilitiesModel = StaticTableDefaultCellModel()
// capabilitiesModel = StaticTableDefaultCellModel()
pushurlModel = StaticTableDefaultCellModel()
super.init(theme: theme, style: .plain, model: [
@ -58,12 +58,12 @@ class FriendCardController: StaticTableController {
[
publicKeyModel,
],
[
capabilitiesModel,
],
[
pushurlModel,
],
// [
// capabilitiesModel,
// ],
// [
// pushurlModel,
// ],
])
updateModels()
@ -142,45 +142,6 @@ private extension FriendCardController {
publicKeyModel.value = friend.publicKey
publicKeyModel.userInteractionEnabled = false
publicKeyModel.canCopyValue = true
capabilitiesModel.title = "Tox Capabilities"
let capabilities = friend.capabilities2 ?? ""
if (capabilities.count > 0) {
let caps = NSNumber(value: UInt64(capabilities) ?? 0)
capabilitiesModel.value = capabilitiesToString(caps)
} else {
capabilitiesModel.value = "BASIC"
}
capabilitiesModel.userInteractionEnabled = false
pushurlModel.title = "Push URL"
let pushtoken = friend.pushToken ?? ""
if (pushtoken.count > 0) {
pushurlModel.value = pushtoken
} else {
pushurlModel.value = ""
}
pushurlModel.userInteractionEnabled = false
}
func capabilitiesToString(_ cap: NSNumber) -> String {
var ret: String = "BASIC"
if ((UInt(cap) & 1) > 0) {
ret = ret + " CAPABILITIES"
}
if ((UInt(cap) & 2) > 0) {
ret = ret + " MSGV2"
}
if ((UInt(cap) & 4) > 0) {
ret = ret + " H264"
}
if ((UInt(cap) & 8) > 0) {
ret = ret + " MSGV3"
}
if ((UInt(cap) & 16) > 0) {
ret = ret + " FTV2"
}
return ret;
}
}

View File

@ -75,7 +75,7 @@ class FriendListController: UIViewController {
if (UserDefaultsManager().EchobotAdded == false) {
do {
try self.submanagerFriends.sendFriendRequest(toAddress: echobotid, message: message)
//try self.submanagerFriends.sendFriendRequest(toAddress: echobotid, message: message)
UserDefaultsManager().EchobotAdded = true
}
catch let error as NSError {

View File

@ -286,7 +286,7 @@ private extension LoginCoordinator {
loginWithProfile(profileName, password: password, configurationClosure: {
if let name = username {
_ = try? $0.user.setUserName(name)
_ = try? $0.user.setUserStatusMessage("Antidote is Tox")
_ = try? $0.user.setUserStatusMessage("Toxing on Antidote")
}
}, errorClosure: { error in
handleErrorWithType(.createOCTManager, error: error)

View File

@ -3,7 +3,7 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
import UIKit
import Firebase
//import Firebase
protocol ProfileMainControllerDelegate: class {
func profileMainControllerLogout(_ controller: ProfileMainController)
@ -27,7 +27,7 @@ class ProfileMainController: StaticTableController {
// fileprivate let userStatusModel = StaticTableDefaultCellModel()
fileprivate let toxIdModel = StaticTableDefaultCellModel()
fileprivate let pushurlModel = StaticTableDefaultCellModel()
fileprivate let capabilitiesModel = StaticTableDefaultCellModel()
// fileprivate let capabilitiesModel = StaticTableDefaultCellModel()
fileprivate let profileDetailsModel = StaticTableDefaultCellModel()
fileprivate let logoutModel = StaticTableButtonCellModel()
@ -50,12 +50,12 @@ class ProfileMainController: StaticTableController {
[
toxIdModel,
],
[
pushurlModel,
],
[
capabilitiesModel,
],
// [
// pushurlModel,
// ],
// [
// capabilitiesModel,
// ],
[
profileDetailsModel,
],
@ -168,19 +168,15 @@ private extension ProfileMainController {
// for debugging print own ToxID ----------------
// print("TOXID: \(submanagerUser.userAddress)")
// for debugging print own ToxID ----------------
pushurlModel.title = "Push URL"
let pushtoken = Messaging.messaging().fcmToken ?? ""
if (pushtoken.count > 0) {
pushurlModel.value = "https://tox.zoff.xyz/toxfcm/fcm.php?id=" + pushtoken + "&type=1"
} else {
pushurlModel.value = ""
}
pushurlModel.userInteractionEnabled = false
capabilitiesModel.title = "Tox Capabilities"
capabilitiesModel.value = capabilitiesToString(submanagerUser.capabilities as NSNumber)
capabilitiesModel.userInteractionEnabled = false
//
// pushurlModel.title = "Push URL"
// let pushtoken = Messaging.messaging().fcmToken ?? ""
// if (pushtoken.count > 0) {
// pushurlModel.value = "https://tox.zoff.xyz/toxfcm/fcm.php?id=" + pushtoken + "&type=1"
// } else {
// pushurlModel.value = ""
// }
// pushurlModel.userInteractionEnabled = false
profileDetailsModel.value = String(localized: "profile_details")
profileDetailsModel.didSelectHandler = showProfileDetails
@ -190,26 +186,6 @@ private extension ProfileMainController {
logoutModel.didSelectHandler = logout
}
func capabilitiesToString(_ cap: NSNumber) -> String {
var ret: String = "BASIC"
if ((UInt(cap) & 1) > 0) {
ret = ret + " CAPABILITIES"
}
if ((UInt(cap) & 2) > 0) {
ret = ret + " MSGV2"
}
if ((UInt(cap) & 4) > 0) {
ret = ret + " H264"
}
if ((UInt(cap) & 8) > 0) {
ret = ret + " MSGV3"
}
if ((UInt(cap) & 16) > 0) {
ret = ret + " FTV2"
}
return ret;
}
func logout(_: StaticTableBaseCell) {
delegate?.profileMainControllerLogout(self)
}

View File

@ -33,24 +33,24 @@ class SettingsMainController: StaticTableController {
[
autodownloadImagesModel,
],
[
longerbgModel,
],
// [
// longerbgModel,
// ],
[
notificationsModel,
dateonmessagemodeModel,
debugmodeModel,
// debugmodeModel,
],
[
advancedSettingsModel,
],
[
faqModel,
// faqModel,
aboutModel,
],
], footers: [
String(localized: "settings_autodownload_images_description"),
"This will keep the Application running for longer in the background to finish sending messages, but this will also reveal more meta data about you. It will link your IP address and your PUSH token. It's a tradeoff between convenience and metadata privacy.\n\nYou can use ProtonVPN to prevent that.\n\nSee https://protonvpn.com/free-vpn/\n\nand\n\nhttps://apps.apple.com/app/apple-store/id1437005085",
// "This will keep the Application running for longer in the background to finish sending messages, but this will also reveal more meta data about you. It will link your IP address and your PUSH token. It's a tradeoff between convenience and metadata privacy.\n\nYou can use ProtonVPN to prevent that.\n\nSee https://protonvpn.com/free-vpn/\n\nand\n\nhttps://apps.apple.com/app/apple-store/id1437005085",
nil,
nil,
nil,

View File

@ -14,7 +14,7 @@ class UserDefaultsManager {
var UDPEnabled: Bool {
get {
return boolForKey(Keys.UDPEnabled, defaultValue: false)
return boolForKey(Keys.UDPEnabled, defaultValue: true)
}
set {
setBool(newValue, forKey: Keys.UDPEnabled)
@ -23,7 +23,7 @@ class UserDefaultsManager {
var EchobotAdded: Bool {
get {
return boolForKey(Keys.EchobotAdded, defaultValue: false)
return boolForKey(Keys.EchobotAdded, defaultValue: true)
}
set {
setBool(newValue, forKey: Keys.EchobotAdded)

View File

@ -261,19 +261,19 @@ triggerPush(NSString *used_pushToken,
NSString *msgv3HashHex = nil;
UInt32 msgv3tssec = 0;
if ((message_v3_hash_bin) && (message_v3_hash_hexstr))
{
tox_messagev3_get_new_message_id(message_v3_hash_bin);
bin_to_hex((const char *)message_v3_hash_bin, (size_t)TOX_MSGV3_MSGID_LENGTH, message_v3_hash_hexstr);
msgv3HashHex = [[NSString alloc] initWithBytes:message_v3_hash_hexstr length:(TOX_MSGV3_MSGID_LENGTH * 2) encoding:NSUTF8StringEncoding];
// HINT: set sent timestamp to now() as unixtimestamp value
msgv3tssec = [[NSNumber numberWithDouble: [[NSDate date] timeIntervalSince1970]] integerValue];
free(message_v3_hash_bin);
free(message_v3_hash_hexstr);
}
// if ((message_v3_hash_bin) && (message_v3_hash_hexstr))
// {
// tox_messagev3_get_new_message_id(message_v3_hash_bin);
// bin_to_hex((const char *)message_v3_hash_bin, (size_t)TOX_MSGV3_MSGID_LENGTH, message_v3_hash_hexstr);
//
// msgv3HashHex = [[NSString alloc] initWithBytes:message_v3_hash_hexstr length:(TOX_MSGV3_MSGID_LENGTH * 2) encoding:NSUTF8StringEncoding];
//
// // HINT: set sent timestamp to now() as unixtimestamp value
// msgv3tssec = [[NSNumber numberWithDouble: [[NSDate date] timeIntervalSince1970]] integerValue];
//
// free(message_v3_hash_bin);
// free(message_v3_hash_hexstr);
// }
__weak OCTSubmanagerChatsImpl *weakSelf = self;
OCTSendMessageOperationSuccessBlock successBlock = ^(OCTToxMessageId messageId) {

File diff suppressed because it is too large Load Diff