Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Elixxir dApps SDK Swift
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile
iOS
Elixxir dApps SDK Swift
Merge requests
!102
Release 1.0.0
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Release 1.0.0
development
into
main
Overview
0
Commits
1078
Pipelines
0
Changes
4
Merged
Dariusz Rybicki
requested to merge
development
into
main
2 years ago
Overview
0
Commits
1078
Pipelines
0
Changes
4
Expand
0
0
Merge request reports
Viewing commit
d9f89ee8
Show latest version
4 files
+
43
−
1
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
d9f89ee8
Merge branch 'feature/example-app-version' into 'development'
· d9f89ee8
Dariusz Rybicki
authored
2 years ago
Example app version See merge request elixxir/elixxir-dapps-sdk-swift!119
Examples/xx-messenger/Sources/AppCore/SharedUI/AppVersionText.swift
0 → 100644
+
31
−
0
Options
import
SwiftUI
public
struct
AppVersionText
:
View
{
public
init
()
{}
public
var
body
:
some
View
{
Text
(
"v
\(
version
)
(
\(
build
)
)"
)
}
var
version
:
String
=
Bundle
.
main
.
shortVersionString
??
"0.0.0"
var
build
:
String
=
Bundle
.
main
.
versionString
??
"0"
}
private
extension
Bundle
{
var
shortVersionString
:
String
?
{
infoDictionary
?[
"CFBundleShortVersionString"
]
as?
String
}
var
versionString
:
String
?
{
infoDictionary
?[
"CFBundleVersion"
]
as?
String
}
}
#if DEBUG
struct
AppVersionText_Previews
:
PreviewProvider
{
static
var
previews
:
some
View
{
AppVersionText
()
.
padding
()
.
previewLayout
(
.
sizeThatFits
)
}
}
#endif
Loading