iOS, update app to swift 4

Preparing for iOS 11.0 and xCode 9.0

Change-Id: I9e7dc9b6c55bf5606eae859baa47fcd95fdc5ed8
This commit is contained in:
jan Iversen 2017-10-08 12:17:49 +02:00
parent bb4acb26b2
commit f0836b511f
3 changed files with 25 additions and 9 deletions

View File

@ -43,7 +43,7 @@ run and compile LibreOffice, also used by the TDF builds:
* Build: GCC 4.8.1 or Clang * Build: GCC 4.8.1 or Clang
* iOS (only for LibreOfficeKit): * iOS (only for LibreOfficeKit):
* Runtime: 10.3 (only support for newer i devices == 64 bit) * Runtime: 10.3 (only support for newer i devices == 64 bit)
* Build: Xcode 8.3 and iPhone SDK 10.3 * Build: Xcode 9.0 and iPhone SDK 10.3
If you want to use Clang with the LibreOffice compiler plugins, the minimal If you want to use Clang with the LibreOffice compiler plugins, the minimal
version of Clang is 3.4. Since Xcode doesn't provide the compiler plugin version of Clang is 3.4. Since Xcode doesn't provide the compiler plugin

View File

@ -50,6 +50,7 @@
3992D8591E5B762A00BEA987 /* DocumentController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DocumentController.swift; path = LibreOfficeLight/DocumentController.swift; sourceTree = SOURCE_ROOT; }; 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; }; 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; }; 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 = "<group>"; };
39B084E51E5F0BB400682A59 /* fundamentalrc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = fundamentalrc; path = ../generated/resources/fundamentalrc; sourceTree = SOURCE_ROOT; }; 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; }; 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; }; 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 */ = { 3911D89F1E5993600050D6BC /* Support files */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
39ACF4181F8A317600DA7334 /* loApp.xcconfig */,
39022C221EDC303200100066 /* InfoPlist.strings */, 39022C221EDC303200100066 /* InfoPlist.strings */,
39B092501E5F3DEA00682A59 /* LibreOfficeLight-Prefix.pch */, 39B092501E5F3DEA00682A59 /* LibreOfficeLight-Prefix.pch */,
397275391E77D9F1006ACDCC /* LibreOfficeLight.entitlements */, 397275391E77D9F1006ACDCC /* LibreOfficeLight.entitlements */,
@ -171,13 +173,13 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastSwiftUpdateCheck = 0820; LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 0830; LastUpgradeCheck = 0900;
ORGANIZATIONNAME = jani; ORGANIZATIONNAME = jani;
TargetAttributes = { TargetAttributes = {
397E08F91E597BD8001374E0 = { 397E08F91E597BD8001374E0 = {
CreatedOnToolsVersion = 8.2; CreatedOnToolsVersion = 8.2;
DevelopmentTeam = TM977DU7EF; DevelopmentTeam = TM977DU7EF;
LastSwiftMigration = 0820; LastSwiftMigration = 0900;
ProvisioningStyle = Automatic; ProvisioningStyle = Automatic;
SystemCapabilities = { SystemCapabilities = {
com.apple.ApplicationGroups.iOS = { com.apple.ApplicationGroups.iOS = {
@ -284,6 +286,7 @@
/* Begin XCBuildConfiguration section */ /* Begin XCBuildConfiguration section */
397E09231E597BD8001374E0 /* Debug */ = { 397E09231E597BD8001374E0 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 39ACF4181F8A317600DA7334 /* loApp.xcconfig */;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
@ -291,7 +294,9 @@
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = NO; CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
@ -299,7 +304,11 @@
CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -359,6 +368,7 @@
}; };
397E09241E597BD8001374E0 /* Release */ = { 397E09241E597BD8001374E0 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = 39ACF4181F8A317600DA7334 /* loApp.xcconfig */;
buildSettings = { buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO; ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NONNULL = YES;
@ -366,7 +376,9 @@
CLANG_CXX_LIBRARY = "libc++"; CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = NO; CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
@ -374,7 +386,11 @@
CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@ -429,7 +445,6 @@
397E09261E597BD8001374E0 /* Debug */ = { 397E09261E597BD8001374E0 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ARCHS = "$(ARCHS_STANDARD)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = NO; CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
@ -459,7 +474,8 @@
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "LibreOfficeLight/lokit-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "LibreOfficeLight/lokit-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0; SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = 2; TARGETED_DEVICE_FAMILY = 2;
VALID_ARCHS = "arm64 x86_64"; VALID_ARCHS = "arm64 x86_64";
}; };
@ -468,7 +484,6 @@
397E09271E597BD8001374E0 /* Release */ = { 397E09271E597BD8001374E0 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ARCHS = "$(ARCHS_STANDARD)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = NO; CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
@ -487,7 +502,8 @@
PRODUCT_BUNDLE_IDENTIFIER = com.jani.Editors.LibreOfficeLight; PRODUCT_BUNDLE_IDENTIFIER = com.jani.Editors.LibreOfficeLight;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "LibreOfficeLight/lokit-Bridging-Header.h"; 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; TARGETED_DEVICE_FAMILY = 2;
VALID_ARCHS = "arm64 x86_64"; VALID_ARCHS = "arm64 x86_64";
}; };

View File

@ -20,8 +20,8 @@
// Force reference to libreofficekit_hook // Force reference to libreofficekit_hook
extern "C" __attribute__((used)) void *libreofficekit_hook(const char *); //extern "C" __attribute__((used)) void *libreofficekit_hook(const char *);
static __attribute__((used)) void *(*foop)(const char *) = libreofficekit_hook; //static __attribute__((used)) void *(*foop)(const char *) = libreofficekit_hook;
// pointers to our instance // pointers to our instance
static LibreOfficeKit* kit; static LibreOfficeKit* kit;