From f0836b511f01beec873735185b21f7d2d6bd5095 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Sun, 8 Oct 2017 12:17:49 +0200 Subject: iOS, update app to swift 4 Preparing for iOS 11.0 and xCode 9.0 Change-Id: I9e7dc9b6c55bf5606eae859baa47fcd95fdc5ed8 --- .../LibreOfficeLight.xcodeproj/project.pbxproj | 28 +++++++++++++++++----- ios/LibreOfficeLight/LibreOfficeLight/lokit.mm | 4 ++-- 2 files changed, 24 insertions(+), 8 deletions(-) (limited to 'ios') diff --git a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj index 3480b02cffee..bb17d65ddccc 100644 --- a/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj +++ b/ios/LibreOfficeLight/LibreOfficeLight.xcodeproj/project.pbxproj @@ -50,6 +50,7 @@ 3992D8591E5B762A00BEA987 /* DocumentController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DocumentController.swift; path = LibreOfficeLight/DocumentController.swift; sourceTree = SOURCE_ROOT; }; 3992D85B1E5B764A00BEA987 /* SideMenu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SideMenu.swift; path = LibreOfficeLight/SideMenu.swift; sourceTree = SOURCE_ROOT; }; 399648461E5B87DC00E73E83 /* ViewProperties.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewProperties.swift; path = LibreOfficeLight/ViewProperties.swift; sourceTree = SOURCE_ROOT; }; + 39ACF4181F8A317600DA7334 /* loApp.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = loApp.xcconfig; path = ../../../../../../../Users/jani/lo_ios/workdir/ios/loApp.xcconfig; sourceTree = ""; }; 39B084E51E5F0BB400682A59 /* fundamentalrc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = fundamentalrc; path = ../generated/resources/fundamentalrc; sourceTree = SOURCE_ROOT; }; 39B084E61E5F0BB400682A59 /* offapi.rdb */ = {isa = PBXFileReference; lastKnownFileType = file; name = offapi.rdb; path = ../generated/resources/offapi.rdb; sourceTree = SOURCE_ROOT; }; 39B084E71E5F0BB400682A59 /* oovbaapi.rdb */ = {isa = PBXFileReference; lastKnownFileType = file; name = oovbaapi.rdb; path = ../generated/resources/oovbaapi.rdb; sourceTree = SOURCE_ROOT; }; @@ -74,6 +75,7 @@ 3911D89F1E5993600050D6BC /* Support files */ = { isa = PBXGroup; children = ( + 39ACF4181F8A317600DA7334 /* loApp.xcconfig */, 39022C221EDC303200100066 /* InfoPlist.strings */, 39B092501E5F3DEA00682A59 /* LibreOfficeLight-Prefix.pch */, 397275391E77D9F1006ACDCC /* LibreOfficeLight.entitlements */, @@ -171,13 +173,13 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0820; - LastUpgradeCheck = 0830; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = jani; TargetAttributes = { 397E08F91E597BD8001374E0 = { CreatedOnToolsVersion = 8.2; DevelopmentTeam = TM977DU7EF; - LastSwiftMigration = 0820; + LastSwiftMigration = 0900; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.ApplicationGroups.iOS = { @@ -284,6 +286,7 @@ /* Begin XCBuildConfiguration section */ 397E09231E597BD8001374E0 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 39ACF4181F8A317600DA7334 /* loApp.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -291,7 +294,9 @@ 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_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = NO; @@ -299,7 +304,11 @@ 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_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + 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; @@ -359,6 +368,7 @@ }; 397E09241E597BD8001374E0 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 39ACF4181F8A317600DA7334 /* loApp.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -366,7 +376,9 @@ 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_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = NO; @@ -374,7 +386,11 @@ 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_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + 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; @@ -429,7 +445,6 @@ 397E09261E597BD8001374E0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = NO; @@ -459,7 +474,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "LibreOfficeLight/lokit-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 2; VALID_ARCHS = "arm64 x86_64"; }; @@ -468,7 +484,6 @@ 397E09271E597BD8001374E0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = NO; @@ -487,7 +502,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.jani.Editors.LibreOfficeLight; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "LibreOfficeLight/lokit-Bridging-Header.h"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = 2; VALID_ARCHS = "arm64 x86_64"; }; diff --git a/ios/LibreOfficeLight/LibreOfficeLight/lokit.mm b/ios/LibreOfficeLight/LibreOfficeLight/lokit.mm index 609493076cd4..e538b5fbce57 100755 --- a/ios/LibreOfficeLight/LibreOfficeLight/lokit.mm +++ b/ios/LibreOfficeLight/LibreOfficeLight/lokit.mm @@ -20,8 +20,8 @@ // Force reference to libreofficekit_hook -extern "C" __attribute__((used)) void *libreofficekit_hook(const char *); -static __attribute__((used)) void *(*foop)(const char *) = libreofficekit_hook; +//extern "C" __attribute__((used)) void *libreofficekit_hook(const char *); +//static __attribute__((used)) void *(*foop)(const char *) = libreofficekit_hook; // pointers to our instance static LibreOfficeKit* kit; -- cgit