From 829d30fbe167c7dff36442e9280e4f192948e12b Mon Sep 17 00:00:00 2001 From: Avery Pierce Date: Tue, 17 Jan 2017 20:27:10 -0600 Subject: [PATCH 1/2] OLMKit: Exclude private headers from pod library --- OLMKit.podspec | 1 + 1 file changed, 1 insertion(+) diff --git a/OLMKit.podspec b/OLMKit.podspec index 133e23d..f843f93 100644 --- a/OLMKit.podspec +++ b/OLMKit.podspec @@ -32,6 +32,7 @@ Pod::Spec.new do |s| } s.source_files = "xcode/OLMKit/*.{h,m}", "include/**/*.{h,hh}", "src/*.{c,cpp}", "lib/crypto-algorithms/sha256.c", "lib/crypto-algorithms/aes.c", "lib/curve25519-donna/curve25519-donna.c" + s.private_header_files = "xcode/OLMKit/*_Private.h" # Those files (including .c) are included by ed25519.c. We do not want to compile them twice s.preserve_paths = "lib/ed25519/**/*.{h,c}" -- 2.10.1 (Apple Git-78) From a7a8e5e0745dd591806a9e31115357dc4d60835e Mon Sep 17 00:00:00 2001 From: Avery Pierce Date: Tue, 17 Jan 2017 20:36:01 -0600 Subject: [PATCH 2/2] OLMKit: Change OLMKitVersionString from a C function to an Obj-C static method --- xcode/OLMKit/OLMKit.h | 11 +++++++---- xcode/OLMKit/OLMKit.m | 10 +++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/xcode/OLMKit/OLMKit.h b/xcode/OLMKit/OLMKit.h index e23a9f1..455d11b 100644 --- a/xcode/OLMKit/OLMKit.h +++ b/xcode/OLMKit/OLMKit.h @@ -18,10 +18,6 @@ #import - -//! 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 #import @@ -30,3 +26,10 @@ NSString *OLMKitVersionString(); #import #import #import + +@interface OLMKit : NSObject + +//! Project version string for OLMKit, the same as libolm. ++ (NSString*)versionString; + +@end diff --git a/xcode/OLMKit/OLMKit.m b/xcode/OLMKit/OLMKit.m index e7bfd25..c383650 100644 --- a/xcode/OLMKit/OLMKit.m +++ b/xcode/OLMKit/OLMKit.m @@ -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 -- 2.10.1 (Apple Git-78)