@capacitor/share - there is not possible to share vcard by gmail
Maintainer thường phản hồi trong vòng 29 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- ios, typescript
- Lĩnh vực
- mobile-dev
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện sự cố với @capacitor/share trên iOS bằng mã tạo vCard và chia sẻ tệp được cung cấp, sau đó kiểm tra phần triển khai iOS của plugin về việc xử lý tệp đính kèm. Được coi là hoàn tất khi tệp .vcf được tạo có thể được chia sẻ thành công qua Gmail và Slack, với phạm vi kiểm thử hồi quy cho trường hợp này nếu plugin có các bài kiểm thử liên quan.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Report
Plugin(s)
@capacitor/share - 8.0.0
Capacitor Version
Latest Dependencies:
@capacitor/cli: 8.0.0
@capacitor/core: 8.0.0
@capacitor/android: 8.0.0
@capacitor/ios: 8.0.0
Installed Dependencies:
@capacitor/cli: 8.0.0
@capacitor/core: 8.0.0
@capacitor/android: 8.0.0
@capacitor/ios: 8.0.0
Platform(s)
iOS
Current Behavior
I am creating vcard info for sharing. The code work well for most cases but when I want to share .vcf file by Gmail or Slack, it tells me "The files you are trying to attach are invalid."
Expected Behavior
Possible to share vcard file by Gmail and Slack
Code Reproduction
if (!text) return '';
return text
.replace(/\\/g, '\\\\')
.replace(/\n/g, '\\n')
.replace(/,/g, '\\,')
.replace(/;/g, '\\;');
}
toAsciiFileName(s: string) {
return (s || '')
.normalize('NFD')
.replace(/[\u0300-\u036f]/g, '')
.replace(/[^a-zA-Z0-9_-]/g, '_');
}
generateVCard(contact: {
firstName: string;
lastName: string;
phone?: string;
email?: string;
organization?: string;
address?: string;
website?: string;
}): string {
const lines: string[] = [];
lines.push('BEGIN:VCARD');
lines.push('VERSION:3.0');
const lastName = this.escapeVCard(contact.lastName);
const firstName = this.escapeVCard(contact.firstName);
lines.push(`N:${lastName};${firstName};;;`);
lines.push(`FN:${firstName} ${lastName}`.trim());
if (contact.organization) {
lines.push(`ORG:${this.escapeVCard(contact.organization)}`);
}
if (contact.phone) {
lines.push(`TEL;TYPE=CELL:${this.escapeVCard(contact.phone)}`);
}
if (contact.email) {
lines.push(`EMAIL;TYPE=INTERNET:${this.escapeVCard(contact.email)}`);
}
if (contact.address) {
const addressParts = contact.address.split(';');
const escapedParts = addressParts.map(part => this.escapeVCard(part));
lines.push(`ADR;TYPE=HOME:;;${escapedParts.join(';')}`);
}
if (contact.website) {
lines.push(`URL:${this.escapeVCard(contact.website)}`);
}
lines.push('END:VCARD');
return lines.join('\r\n') + '\r\n';
}
async contactShare(): Promise<void> {
if (!this.vcardValue) return;
const safeFirst = this.toAsciiFileName(this.firstname);
const safeLast = this.toAsciiFileName(this.lastname);
const fileName = `${safeFirst || 'Contact'}_${safeLast || 'VCard'}.vcf`;
const dir = Directory.Documents;
await Filesystem.writeFile({path: fileName, data: this.vcardValue, directory: dir, encoding: Encoding.UTF8});
const {uri} = await Filesystem.getUri({directory: dir, path: fileName});
await Share.share({
title: `${this.firstname} ${this.lastname}`.trim(),
dialogTitle: 'Share contact',
files: [uri],
});
}
Other Technical Details
Additional Context
- Ngôn ngữ chính
- Java
- Star
- 688
- Fork
- 691
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ionic-team/capacitor-plugins
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ionic-team/capacitor-plugins#2616 ·
Maintainer thường phản hồi trong vòng 29 ngày
-
[@capacitor/app] iOS: 'Expression implicitly coerced from String? to Any' warning in getAppLanguageĐang mởtriage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
ionic-team/capacitor-plugins#2604 ·
Maintainer thường phản hồi trong vòng 29 ngày
-
platform: ios
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
ionic-team/capacitor-plugins#2624 ·
Maintainer thường phản hồi trong vòng 29 ngày
-
bug(network): Android networkStatusChange re-queries the active network inside callbacks and fires on every capability changeCó thể đã có người làm @kcjonson đã nhận 13 ngày trước. Đang mởplatform: android
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 25/100
ionic-team/capacitor-plugins#2621 ·
Maintainer thường phản hồi trong vòng 29 ngày
-
bug(network): iOS getStatus() returns the last reachability callback value instead of reading current flagsCó thể đã có người làm @kcjonson đã nhận 13 ngày trước. Đang mởplatform: ios
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
ionic-team/capacitor-plugins#2620 · 1 reaction ·
Maintainer thường phản hồi trong vòng 29 ngày
Tất cả issue của ionic-team/capacitor-plugins
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
wpilibsuite/SystemcoreTesting#446 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
frontend quality-assurance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Paul-Austin-Oswego-CSC480-HCI521/gift-app#212 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Mend: dependency security vulnerability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs: AGENTS.md agent/ module-map bullet missing AgentWriteRules — the deny-by-default write gateĐang mởdocumentation hermes-queue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
chrisalunlloyd2-sudo/mindpalace#334 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-area-label
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 2 ngày