-Invest in SimpleX Chat. [Learn more on Wefunder](https://wefunder.com/simplexchat).
+Invest in SimpleX Chat. [Learn more on Wefunder](https://wefunder.com/simplex.chat?utm_source=github).
# SimpleX - the first messaging platform that has no user identifiers of any kind - 100% private by design!
diff --git a/apps/ios/Shared/Views/NewChat/NewChatView.swift b/apps/ios/Shared/Views/NewChat/NewChatView.swift
index a87b9b46f4..51746766bd 100644
--- a/apps/ios/Shared/Views/NewChat/NewChatView.swift
+++ b/apps/ios/Shared/Views/NewChat/NewChatView.swift
@@ -859,8 +859,8 @@ enum ConnectTarget {
func strConnectTarget(_ str: String) -> ConnectTarget? {
let parsedMd = parseSimpleXMarkdown(str)
let links = parsedMd?.filter { $0.format?.isSimplexLink ?? false } ?? []
- return if links.count == 1, case let .simplexLink(_, linkType, _, smpHosts) = links[0].format {
- .link(text: links[0].text, linkType: linkType, linkText: simplexLinkText(linkType, smpHosts))
+ return if links.count == 1, case let .simplexLink(showText, linkType, simplexUri, smpHosts) = links[0].format {
+ .link(text: showText != nil ? simplexUri : links[0].text, linkType: linkType, linkText: simplexLinkText(linkType, smpHosts))
} else if links.isEmpty,
let nameFt = parsedMd?.first(where: { if case .simplexName = $0.format { true } else { false } }),
case let .simplexName(nameInfo) = nameFt.format {
diff --git a/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift b/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift
index b7753e8539..4495fd8cc2 100644
--- a/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift
+++ b/apps/ios/Shared/Views/Onboarding/WhatsNewView.swift
@@ -8,6 +8,7 @@
// Spec: spec/client/navigation.md
import SwiftUI
+import StoreKit
import SimpleXChat
private struct VersionDescription {
@@ -41,6 +42,11 @@ private struct FeatureView {
let view: () -> any View
}
+let isInUS = {
+ let code = SKStorefront().countryCode
+ return code == "USA" || code == ""
+}()
+
private let versionDescriptions: [VersionDescription] = [
VersionDescription(
version: "v4.2",
@@ -665,9 +671,15 @@ private let versionDescriptions: [VersionDescription] = [
]
),
VersionDescription(
- version: "v7.0",
+ version: isInUS ? "v7.0.1" : "v7.0",
post: nil,
- features: [
+ features: (isInUS ? [
+ .view(FeatureView(
+ icon: nil,
+ title: "You can now invest in SimpleX Chat",
+ view: { InvestInSimpleXChat() }
+ ))
+ ] : []) + [
.feature(Description(
icon: "at",
title: "SimpleX public names (BETA)",
@@ -762,6 +774,134 @@ fileprivate struct CreateUpdateAddressShortLink: View {
}
}
+fileprivate struct InvestInSimpleXChat: View {
+ @EnvironmentObject var theme: AppTheme
+ @State private var showGetStakeSheet = false
+
+ var body: some View {
+ VStack(alignment: .leading, spacing: 4) {
+ Text("You can now invest in SimpleX Chat! 🚀").font(.title3).bold()
+ (Text("Crowdfunding on Wefunder.") + Text(verbatim: " ") + Text("Learn more").foregroundColor(theme.colors.primary))
+ .multilineTextAlignment(.leading)
+ .onTapGesture { showGetStakeSheet = true }
+ #if SIMPLEX_ASSETS
+ Image("crowdfunding_1")
+ .resizable()
+ .scaledToFit()
+ .cornerRadius(12)
+ .padding(.vertical, 4)
+ .onTapGesture { showGetStakeSheet = true }
+ #endif
+ }
+ .frame(maxWidth: .infinity, alignment: .leading)
+ .sheet(isPresented: $showGetStakeSheet) {
+ GetStakeView(fromSettings: false)
+ }
+ }
+}
+
+fileprivate let getStakeSlides: [(image: String, heading: String, info: String?, text: String)] = [
+ (
+ "crowdfunding_1",
+ "The first and the only messaging network without any user IDs",
+ nil,
+ "By investing, you can benefit from the company growth, and help us build the future of private and secure communications."
+ ),
+ (
+ "crowdfunding_2",
+ "480,000+ users joined on their own",
+ nil,
+ "SimpleX users have been more than doubling every year without any paid marketing, and donated over $650,000."
+ ),
+ (
+ "crowdfunding_3",
+ "Developers already bet on SimpleX success",
+ "Independent developers created moderation and AI bots, Telegram bridges, and a public server registry.",
+ "Every service developers build on SimpleX Network may increase its value, and bring new users to SimpleX Chat."
+ ),
+ (
+ "crowdfunding_4",
+ "Revenue plan: free for users, channels & businesses pay",
+ "SimpleX Chat plans to earn from the infrastructure and services that creators, businesses and large communities need as they grow.",
+ "Read about how we plan to make SimpleX Chat and network profitable, and about all the investment terms on Wefunder."
+ ),
+]
+
+private let wefunderURL = URL(string: "https://wefunder.com/simplex.chat?utm_source=app")!
+
+private let simplexCrowdfundingURL = URL(string: "simplex:/a#JxGcOA1_QhlmVFzYYabloMbvMZk5Y9d9iS3ITDnhzYo?h=smp11.simplex.im")!
+
+struct GetStakeView: View {
+ @Environment(\.dismiss) var dismiss: DismissAction
+ @EnvironmentObject var chatModel: ChatModel
+ var fromSettings: Bool
+
+ var body: some View {
+ ZoomablePageView {
+ VStack(alignment: .leading, spacing: 18) {
+ Text(verbatim: "Get a stake in\nSimpleX Chat")
+ .font(.largeTitle)
+ .bold()
+ .fixedSize(horizontal: false, vertical: true)
+ .if(!fromSettings) { $0.padding(.top) }
+ if fromSettings {
+ slideImage(getStakeSlides[0])
+ }
+ (Text(verbatim: getStakeSlides[0].text) + Text(verbatim: " Learn more and invest on Wefunder.").bold().foregroundColor(.accentColor))
+ .multilineTextAlignment(.leading)
+ .onTapGesture {
+ UIApplication.shared.open(wefunderURL)
+ }
+ .padding(.bottom)
+ ForEach(getStakeSlides[1...3], id: \.image) { slide in
+ VStack(alignment: .leading) {
+ slideImage(slide)
+ Text(slide.text)
+ }
+ .padding(.bottom)
+ }
+
+ Button {
+ UIApplication.shared.open(wefunderURL)
+ } label: {
+ Text(verbatim: "Learn more on Wefunder")
+ }
+ .buttonStyle(OnboardingButtonStyle())
+
+ Button {
+ dismiss()
+ DispatchQueue.main.async {
+ ChatModel.shared.appOpenUrl = simplexCrowdfundingURL
+ }
+ } label: {
+ Text(verbatim: "or ask SimpleX team")
+ .font(.callout)
+ }
+ .disabled(chatModel.chatRunning != true)
+ .frame(maxWidth: .infinity)
+ }
+ .padding()
+ }
+ .ignoresSafeArea(edges: .bottom)
+ .modifier(ThemedBackground(grouped: true))
+ }
+
+ @ViewBuilder
+ func slideImage(_ slide: (image: String, heading: String, info: String?, text: String?)) -> some View {
+ #if SIMPLEX_ASSETS
+ Image(slide.image)
+ .resizable()
+ .scaledToFit()
+ .cornerRadius(12)
+ #else
+ Text(slide.heading).font(.title3).bold()
+ if let info = slide.info {
+ Text(info)
+ }
+ #endif
+ }
+}
+
private enum WhatsNewViewSheet: Identifiable {
case showConditions
diff --git a/apps/ios/Shared/Views/UserSettings/SettingsView.swift b/apps/ios/Shared/Views/UserSettings/SettingsView.swift
index 4bd5f7db1b..ae317cd864 100644
--- a/apps/ios/Shared/Views/UserSettings/SettingsView.swift
+++ b/apps/ios/Shared/Views/UserSettings/SettingsView.swift
@@ -380,6 +380,17 @@ struct SettingsView: View {
Text(verbatim: "v\(appVersion ?? "?")")
}
}
+
+ if isInUS {
+ Section(header: Text("You can now invest in SimpleX Chat").foregroundColor(theme.colors.secondary)) {
+ NavigationLink {
+ GetStakeView(fromSettings: true)
+ .navigationBarTitle("", displayMode: .inline)
+ } label: {
+ settingsRow("dollarsign.circle", color: theme.colors.secondary) { Text("Crowdfunding on Wefunder") }
+ }
+ }
+ }
}
.navigationTitle("Your settings")
.modifier(ThemedBackground(grouped: true))
diff --git a/apps/ios/Shared/Views/ZoomableScrollView.swift b/apps/ios/Shared/Views/ZoomableScrollView.swift
index 83528b593a..87eb645822 100644
--- a/apps/ios/Shared/Views/ZoomableScrollView.swift
+++ b/apps/ios/Shared/Views/ZoomableScrollView.swift
@@ -58,3 +58,54 @@ struct ZoomableScrollView{{ "index-hero-p1" | i18n({}, lang) | safe }}
-{{ "index-hero-invest" | i18n({}, lang) | safe }} {{ "index-hero-invest-cta" | i18n({}, lang) | safe }}
+{{ "index-hero-invest" | i18n({}, lang) | safe }} {{ "index-hero-invest-cta" | i18n({}, lang) | safe }}