Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of the ZelloAPISwift CocoaPod module #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions ZelloAPISwift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,13 @@ Pod::Spec.new do |s|
# Be mindful of this :tag. Remember to update it when releasing new versions.
s.source = { :git => 'https://github.com/zelloptt/zellowork-server-api-libs.git', :tag => s.version.to_s }

s.ios.deployment_target = '8.0'
s.ios.deployment_target = '12.4'

s.preserve_paths = "swift/CocoaPod/CommonCrypto/*"
s.source_files = "swift/CocoaPod/ZelloAPISwift/*"
s.source_files = "swift/CocoaPod/ZelloAPISwift/*.{h,m,swift}"
s.requires_arc = true

s.xcconfig = { 'SWIFT_INCLUDE_PATHS[sdk=iphonesimulator*]' => '$(PODS_ROOT)/ZelloAPISwift/swift/CocoaPod/CommonCrypto/iphonesimulator/',
'SWIFT_INCLUDE_PATHS[sdk=iphoneos*]' => '$(PODS_ROOT)/ZelloAPISwift/swift/CocoaPod/CommonCrypto/iphoneos/',
'SWIFT_INCLUDE_PATHS[sdk=appletvos*]' => '$(PODS_ROOT)/ZelloAPISwift/swift/CocoaPod/CommonCrypto/appletvos/',
'SWIFT_INCLUDE_PATHS[sdk=appletvsimulator*]' => '$(PODS_ROOT)/ZelloAPISwift/swift/CocoaPod/CommonCrypto/appletvsimulator/' }
s.xcconfig = { }

s.prepare_command = <<-CMD
mkdir -p CommonCrypto/iphoneos
Expand Down
2 changes: 1 addition & 1 deletion swift/CocoaPod/CommonCrypto/iphoneos.modulemap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module CommonCrypto [system] {
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/CommonCrypto/CommonCrypto.h"
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/usr/include/CommonCrypto/CommonCrypto.h"
export *
}
57 changes: 35 additions & 22 deletions swift/CocoaPod/ZelloAPISwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0800;
LastUpgradeCheck = 1220;
ORGANIZATIONNAME = Zello;
TargetAttributes = {
8E866C531AE8FBEC005682A2 = {
Expand All @@ -173,10 +173,11 @@
};
buildConfigurationList = 8E866C4E1AE8FBEC005682A2 /* Build configuration list for PBXProject "ZelloAPISwift" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 8E866C4A1AE8FBEC005682A2;
productRefGroup = 8E866C551AE8FBEC005682A2 /* Products */;
Expand Down Expand Up @@ -294,18 +295,28 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand All @@ -330,7 +341,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand All @@ -346,18 +357,28 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand All @@ -375,7 +396,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_INCLUDE_PATHS = "$(DERIVED_DATA_DIR)/modules";
Expand All @@ -398,18 +419,14 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/ZelloAPISwift/Info.plist";
INSTALL_PATH = "@executable_path/../Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(SDKROOT)/usr/lib/system",
);
PRODUCT_BUNDLE_IDENTIFIER = com.zello.ZelloAPISwift;
PRODUCT_NAME = ZelloAPISwift;
PRODUCT_BUNDLE_IDENTIFIER = "com.zello.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 12.4;
};
name = Debug;
};
Expand All @@ -424,17 +441,13 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/ZelloAPISwift/Info.plist";
INSTALL_PATH = "@executable_path/../Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(SDKROOT)/usr/lib/system",
);
PRODUCT_BUNDLE_IDENTIFIER = com.zello.ZelloAPISwift;
PRODUCT_NAME = ZelloAPISwift;
PRODUCT_BUNDLE_IDENTIFIER = "com.zello.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
SWIFT_VERSION = 5.0;
TVOS_DEPLOYMENT_TARGET = 12.4;
};
name = Release;
};
Expand Down
6 changes: 3 additions & 3 deletions swift/CocoaPod/ZelloAPISwift/ZelloAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ open class ZelloAPI {
// MARK: Public Variables

/// API Version
open static let version = "1.1.0"
public static let version = "1.1.0"

/// Session ID used to identify logged in client. Typically you'll want to authenticate first and store the Session ID to reuse later.
open var sessionId: String?
Expand Down Expand Up @@ -511,7 +511,7 @@ private extension String {

/// Calculates the MD5 hash of a string.
func MD5() -> String {
guard let str = cString(using: String.Encoding.utf8) else {
guard let str = cString(using: .utf8) else {
return ""
}

Expand All @@ -526,7 +526,7 @@ private extension String {
hash.appendFormat("%02x", result[i])
}

result.deallocate(capacity: digestLen)
result.deallocate()

return String(format: hash as String)
}
Expand Down