Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matrix-org
Olm
Commits
757be9ae
Commit
757be9ae
authored
Jan 17, 2017
by
Avery Pierce
Committed by
Richard van der Hoff
Jan 18, 2017
Browse files
OLMKit: Change OLMKitVersionString from a C function to an Obj-C static method
parent
4373ac3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
xcode/OLMKit/OLMKit.h
View file @
757be9ae
...
...
@@ -18,10 +18,6 @@
#import <Foundation/Foundation.h>
//! Project version string for OLMKit, the same as libolm.
NSString
*
OLMKitVersionString
();
// In this header, you should import all the public headers of your framework using statements like #import <OLMKit/PublicHeader.h>
#import <OLMKit/OLMAccount.h>
...
...
@@ -30,3 +26,10 @@ NSString *OLMKitVersionString();
#import <OLMKit/OLMUtility.h>
#import <OLMKit/OLMInboundGroupSession.h>
#import <OLMKit/OLMOutboundGroupSession.h>
@interface
OLMKit
:
NSObject
//! Project version string for OLMKit, the same as libolm.
+
(
NSString
*
)
versionString
;
@end
xcode/OLMKit/OLMKit.m
View file @
757be9ae
...
...
@@ -19,11 +19,15 @@
#include "olm/olm.h"
NSString
*
OLMKitVersionString
()
@implementation
OLMKit
+
(
NSString
*
)
versionString
{
uint8_t
major
,
minor
,
patch
;
olm_get_library_version
(
&
major
,
&
minor
,
&
patch
);
return
[
NSString
stringWithFormat
:
@"%tu.%tu.%tu"
,
major
,
minor
,
patch
];
}
@end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment