diff --git a/.github/workflows/ios_main.yml b/.github/workflows/ios_main.yml index c43e1fe..1463b0f 100644 --- a/.github/workflows/ios_main.yml +++ b/.github/workflows/ios_main.yml @@ -1,38 +1,72 @@ name: OpenDocumentReader-iOS -on: [push] + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true jobs: test: - name: test - runs-on: macos-11 + runs-on: macos-14 steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.10" - - name: pods + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: "15.4" + + - name: install pods run: pod install # https://stackoverflow.com/a/57758679/198996 - - name: bundler + - name: install bundler run: gem install bundler:1.17.3 - - name: fastlane + - name: install fastlane run: bundle install - - name: pip - run: python3 -m ensurepip - - name: conan - run: pip3 install conan==1.64.1 - - name: conan repo - run: | - conan remote clean - conan remote add odr https://artifactory.opendocument.app/artifactory/api/conan/conan - conan remote add conancenter https://center.conan.io + - name: install conan + run: pip3 install conan + + - name: conan remote + run: conan remote add --index 0 odr https://artifactory.opendocument.app/artifactory/api/conan/conan + - name: conan login + run: conan remote login odr admin --password ${{ secrets.ARTIFACTORY }} + + - name: conan profile + run: conan profile detect + + - name: conan install + run: > + conan install conan/ + --output-folder=conan-output + --build=missing + --profile:host=conan/profiles/ios-simulator-arm64 + -s build_type=Release + -s "&:build_type=RelWithDebInfo" + -s "odrcore/*:build_type=RelWithDebInfo" + - name: conan patch + run: bash conan/patch.sh - name: run tests run: bundle exec fastlane tests -# - uses: actions/upload-artifact@v2 -# if: ${{ always() }} -# with: -# name: logs -# path: | -# /Users/runner/Library/Developer/Xcode/DerivedData/OpenDocumentReader-*/ + + - uses: actions/upload-artifact@v4 + if: always() + with: + name: logs + path: | + /Users/runner/Library/Developer/Xcode/DerivedData/OpenDocumentReader-*/ + + - name: upload binaries to conan repo + run: conan upload "*" --check --confirm --remote odr diff --git a/.gitignore b/.gitignore index fa87ed5..5b95932 100644 --- a/.gitignore +++ b/.gitignore @@ -71,7 +71,5 @@ fastlane/test_output fastlane/report.xml -conanbuildinfo.* -conaninfo.txt -conan.lock +conan-output/ graph_info.json diff --git a/OpenDocumentReader.xcodeproj/project.pbxproj b/OpenDocumentReader.xcodeproj/project.pbxproj index ce58e9e..144597a 100644 --- a/OpenDocumentReader.xcodeproj/project.pbxproj +++ b/OpenDocumentReader.xcodeproj/project.pbxproj @@ -3,18 +3,13 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ - 22E10F353A0C09E10812EDAC /* Pods_OpenDocumentReader.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF0AB0A593247807A3F41DFA /* Pods_OpenDocumentReader.framework */; }; 523A371328CCF27400876C77 /* AdServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 523A371228CCF27400876C77 /* AdServices.framework */; }; 523A371528CCF28100876C77 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 523A371428CCF28100876C77 /* StoreKit.framework */; }; 523A371728CCF28900876C77 /* AppTrackingTransparency.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 523A371628CCF28900876C77 /* AppTrackingTransparency.framework */; }; - 52A0616C277CE114009FAB35 /* release-lite.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 52A06168277CE114009FAB35 /* release-lite.xcconfig */; }; - 52A0616D277CE114009FAB35 /* release.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 52A06169277CE114009FAB35 /* release.xcconfig */; }; - 52A0616E277CE114009FAB35 /* debug-lite.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 52A0616A277CE114009FAB35 /* debug-lite.xcconfig */; }; - 52A0616F277CE114009FAB35 /* debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 52A0616B277CE114009FAB35 /* debug.xcconfig */; }; 52A348B42A92635E00DACAB9 /* Pods_OpenDocumentReader.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52A348B32A92635E00DACAB9 /* Pods_OpenDocumentReader.framework */; }; 52DE0FAF45FE38FFAE9E4910 /* Pods_OpenDocumentReaderTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 559CD8DFE3C657DEB311030B /* Pods_OpenDocumentReaderTests.framework */; }; AC125F162435311A008AD515 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = AC125F182435311A008AD515 /* Localizable.strings */; }; @@ -24,8 +19,7 @@ ACA46529244E403900A5DA7A /* AppType.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACA46528244E403900A5DA7A /* AppType.swift */; }; ACD9BE3C2444A371009014E6 /* ConfigurationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACD9BE2D2444A371009014E6 /* ConfigurationManager.swift */; }; ACF1A3E32469EFB5000BA420 /* GoogleService-Info-Lite.plist in Resources */ = {isa = PBXBuildFile; fileRef = ACF1A3E22469EFB5000BA420 /* GoogleService-Info-Lite.plist */; }; - ACF1A3E52469F8DE000BA420 /* Info-Lite.plist in Resources */ = {isa = PBXBuildFile; fileRef = ACF1A3E42469F8DE000BA420 /* Info-Lite.plist */; }; - E19A47C42C24539E004A81C2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E19A47C32C24539E004A81C2 /* Foundation.framework */; }; + E1A78CF72C1A53DB00CD43E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E1EB6C492C1A510D003EC5A0 /* Foundation.framework */; }; E2064DFE22CFA1BA006441F8 /* iAd.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2064DDF22CFA1BA006441F8 /* iAd.framework */; }; E22B252F2557F0E2001D0C52 /* OpenDocumentReaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22B252E2557F0E2001D0C52 /* OpenDocumentReaderTests.swift */; }; E22EB716226B621200053B86 /* DocumentBrowserTransitioningDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22EB6F7226B621200053B86 /* DocumentBrowserTransitioningDelegate.swift */; }; @@ -63,11 +57,10 @@ 52A06168277CE114009FAB35 /* release-lite.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "release-lite.xcconfig"; sourceTree = ""; }; 52A06169277CE114009FAB35 /* release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = release.xcconfig; sourceTree = ""; }; 52A0616A277CE114009FAB35 /* debug-lite.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "debug-lite.xcconfig"; sourceTree = ""; }; - 52A0616B277CE114009FAB35 /* debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = debug.xcconfig; sourceTree = ""; }; + 52A0616B277CE114009FAB35 /* debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = debug.xcconfig; sourceTree = ""; wrapsLines = 0; }; 52A348B12A9262D100DACAB9 /* OpenDocumentReader.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OpenDocumentReader.app; sourceTree = BUILT_PRODUCTS_DIR; }; 52A348B22A9262D100DACAB9 /* OpenDocumentReaderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OpenDocumentReaderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 52A348B32A92635E00DACAB9 /* Pods_OpenDocumentReader.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Pods_OpenDocumentReader.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 52A348B72A9266BB00DACAB9 /* conanbuildinfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = conanbuildinfo.xcconfig; sourceTree = ""; }; 559CD8DFE3C657DEB311030B /* Pods_OpenDocumentReaderTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OpenDocumentReaderTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 97704690541D85438FC2079C /* Pods-OpenDocumentReader.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OpenDocumentReader.release.xcconfig"; path = "Pods/Target Support Files/Pods-OpenDocumentReader/Pods-OpenDocumentReader.release.xcconfig"; sourceTree = ""; }; A3BBE33791EBF379139575AB /* Pods-OpenDocumentReaderTests.release lite.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OpenDocumentReaderTests.release lite.xcconfig"; path = "Pods/Target Support Files/Pods-OpenDocumentReaderTests/Pods-OpenDocumentReaderTests.release lite.xcconfig"; sourceTree = ""; }; @@ -98,7 +91,7 @@ C39C76F36758805489D19A8D /* Pods-OpenDocumentReader.debug lite.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OpenDocumentReader.debug lite.xcconfig"; path = "Pods/Target Support Files/Pods-OpenDocumentReader/Pods-OpenDocumentReader.debug lite.xcconfig"; sourceTree = ""; }; D7F1C22195A1CA95F6A6DEF4 /* Pods-OpenDocumentReaderTests.debug lite.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OpenDocumentReaderTests.debug lite.xcconfig"; path = "Pods/Target Support Files/Pods-OpenDocumentReaderTests/Pods-OpenDocumentReaderTests.debug lite.xcconfig"; sourceTree = ""; }; DF0AB0A593247807A3F41DFA /* Pods_OpenDocumentReader.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OpenDocumentReader.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E19A47C32C24539E004A81C2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + E1EB6C492C1A510D003EC5A0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; E2064DDF22CFA1BA006441F8 /* iAd.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iAd.framework; path = System/Library/Frameworks/iAd.framework; sourceTree = SDKROOT; }; E22B252E2557F0E2001D0C52 /* OpenDocumentReaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenDocumentReaderTests.swift; sourceTree = ""; }; E22B25302557F0E2001D0C52 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -135,21 +128,31 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 52A348B42A92635E00DACAB9 /* Pods_OpenDocumentReader.framework in Frameworks */, E2064DFE22CFA1BA006441F8 /* iAd.framework in Frameworks */, - E19A47C42C24539E004A81C2 /* Foundation.framework in Frameworks */, 523A371728CCF28900876C77 /* AppTrackingTransparency.framework in Frameworks */, - 52A348B42A92635E00DACAB9 /* Pods_OpenDocumentReader.framework in Frameworks */, 523A371528CCF28100876C77 /* StoreKit.framework in Frameworks */, E23795302274844400BA7238 /* AdSupport.framework in Frameworks */, E26C39392250DC6E009C484A /* WebKit.framework in Frameworks */, 523A371328CCF27400876C77 /* AdServices.framework in Frameworks */, - 22E10F353A0C09E10812EDAC /* Pods_OpenDocumentReader.framework in Frameworks */, + E1A78CF72C1A53DB00CD43E4 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + E17AF34D2C258C5100FBED6A /* configs */ = { + isa = PBXGroup; + children = ( + 52A0616A277CE114009FAB35 /* debug-lite.xcconfig */, + 52A0616B277CE114009FAB35 /* debug.xcconfig */, + 52A06168277CE114009FAB35 /* release-lite.xcconfig */, + 52A06169277CE114009FAB35 /* release.xcconfig */, + ); + path = configs; + sourceTree = ""; + }; E20D24999F878FB3AAE258B3 /* Pods */ = { isa = PBXGroup; children = ( @@ -178,7 +181,7 @@ E2BB4B64220EF4F20056176B /* Frameworks */ = { isa = PBXGroup; children = ( - E19A47C32C24539E004A81C2 /* Foundation.framework */, + E1EB6C492C1A510D003EC5A0 /* Foundation.framework */, 52A348B32A92635E00DACAB9 /* Pods_OpenDocumentReader.framework */, 523A371628CCF28900876C77 /* AppTrackingTransparency.framework */, 523A371428CCF28100876C77 /* StoreKit.framework */, @@ -195,11 +198,7 @@ E2F7ED46220B54D600D63515 = { isa = PBXGroup; children = ( - 52A0616A277CE114009FAB35 /* debug-lite.xcconfig */, - 52A0616B277CE114009FAB35 /* debug.xcconfig */, - 52A06168277CE114009FAB35 /* release-lite.xcconfig */, - 52A06169277CE114009FAB35 /* release.xcconfig */, - 52A348B72A9266BB00DACAB9 /* conanbuildinfo.xcconfig */, + E17AF34D2C258C5100FBED6A /* configs */, E2F7ED51220B54D600D63515 /* OpenDocumentReader */, E22B252D2557F0E2001D0C52 /* OpenDocumentReaderTests */, E2BB4B64220EF4F20056176B /* Frameworks */, @@ -286,8 +285,9 @@ E2F7ED47220B54D600D63515 /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 1250; - LastUpgradeCheck = 1010; + LastUpgradeCheck = 1540; ORGANIZATIONNAME = "Thomas Taschauer"; TargetAttributes = { E22B252B2557F0E2001D0C52 = { @@ -347,16 +347,11 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 52A0616C277CE114009FAB35 /* release-lite.xcconfig in Resources */, AC125F162435311A008AD515 /* Localizable.strings in Resources */, - 52A0616E277CE114009FAB35 /* debug-lite.xcconfig in Resources */, ACF1A3E32469EFB5000BA420 /* GoogleService-Info-Lite.plist in Resources */, E2F7ED61220B54D700D63515 /* LaunchScreen.storyboard in Resources */, - ACF1A3E52469F8DE000BA420 /* Info-Lite.plist in Resources */, E22EB71C226B66B300053B86 /* Main.storyboard in Resources */, - 52A0616D277CE114009FAB35 /* release.xcconfig in Resources */, E29E4077225A4672002C06E6 /* GoogleService-Info.plist in Resources */, - 52A0616F277CE114009FAB35 /* debug.xcconfig in Resources */, E2F7ED5E220B54D700D63515 /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -546,6 +541,7 @@ 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; @@ -557,6 +553,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -571,9 +568,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "$(inherited)"; IPHONEOS_DEPLOYMENT_TARGET = 16.4; - LIBRARY_SEARCH_PATHS = "$(inherited)"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -598,7 +593,7 @@ DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 5LS6X97G6J; ENABLE_BITCODE = NO; - HEADER_SEARCH_PATHS = "$(inherited)"; + ENABLE_USER_SCRIPT_SANDBOXING = NO; INFOPLIST_FILE = "OpenDocumentReader/Info-Lite.plist"; INFOPLIST_KEY_CFBundleDisplayName = "OpenDocument Reader"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; @@ -607,28 +602,8 @@ "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = "$(inherited)"; MARKETING_VERSION = 1.31; - OTHER_CFLAGS = ( - "$(inherited)", - "-arch", - arm64, - ); - OTHER_CPLUSPLUSFLAGS = ( - "$(inherited)", - "-arch", - arm64, - ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-arch", - arm64, - "-lodr", - "-lpugixml", - "-lcryptopp", - "-lminiz", - "-luchardet", - ); + ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = at.tomtasche.reader.lite1; PRODUCT_NAME = "$(BUNDLE_DISPLAY_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = OpenDocumentReader/BridgingHeader.h; @@ -665,6 +640,7 @@ 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; @@ -676,6 +652,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -684,9 +661,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "$(inherited)"; IPHONEOS_DEPLOYMENT_TARGET = 16.4; - LIBRARY_SEARCH_PATHS = "$(inherited)"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -711,7 +686,7 @@ DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 5LS6X97G6J; ENABLE_BITCODE = NO; - HEADER_SEARCH_PATHS = "$(inherited)"; + ENABLE_USER_SCRIPT_SANDBOXING = NO; INFOPLIST_FILE = "OpenDocumentReader/Info-Lite.plist"; INFOPLIST_KEY_CFBundleDisplayName = "OpenDocument Reader"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; @@ -720,28 +695,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = "$(inherited)"; MARKETING_VERSION = 1.31; - OTHER_CFLAGS = ( - "$(inherited)", - "-arch", - arm64, - ); - OTHER_CPLUSPLUSFLAGS = ( - "$(inherited)", - "-arch", - arm64, - ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-arch", - arm64, - "-lodr", - "-lpugixml", - "-lcryptopp", - "-lminiz", - "-luchardet", - ); PRODUCT_BUNDLE_IDENTIFIER = at.tomtasche.reader.lite1; PRODUCT_NAME = "$(BUNDLE_DISPLAY_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = OpenDocumentReader/BridgingHeader.h; @@ -861,6 +815,7 @@ 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; @@ -872,6 +827,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -886,9 +842,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "$(inherited)"; IPHONEOS_DEPLOYMENT_TARGET = 16.4; - LIBRARY_SEARCH_PATHS = "$(inherited)"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -926,6 +880,7 @@ 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; @@ -937,6 +892,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -945,9 +901,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = "$(inherited)"; IPHONEOS_DEPLOYMENT_TARGET = 16.4; - LIBRARY_SEARCH_PATHS = "$(inherited)"; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; @@ -972,7 +926,7 @@ DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 5LS6X97G6J; ENABLE_BITCODE = NO; - HEADER_SEARCH_PATHS = "$(inherited)"; + ENABLE_USER_SCRIPT_SANDBOXING = NO; INFOPLIST_FILE = OpenDocumentReader/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "OpenDocument Reader"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; @@ -981,28 +935,8 @@ "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = "$(inherited)"; MARKETING_VERSION = 1.31; - OTHER_CFLAGS = ( - "$(inherited)", - "-arch", - arm64, - ); - OTHER_CPLUSPLUSFLAGS = ( - "$(inherited)", - "-arch", - arm64, - ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-arch", - arm64, - "-lodr", - "-lpugixml", - "-lcryptopp", - "-lminiz", - "-luchardet", - ); + ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = "at.tomtasche.reader$(BUNDLE_ID_SUFFIX)"; PRODUCT_NAME = "$(BUNDLE_DISPLAY_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = OpenDocumentReader/BridgingHeader.h; @@ -1026,7 +960,7 @@ DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 5LS6X97G6J; ENABLE_BITCODE = NO; - HEADER_SEARCH_PATHS = "$(inherited)"; + ENABLE_USER_SCRIPT_SANDBOXING = NO; INFOPLIST_FILE = OpenDocumentReader/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "OpenDocument Reader"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; @@ -1035,28 +969,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = "$(inherited)"; MARKETING_VERSION = 1.31; - OTHER_CFLAGS = ( - "$(inherited)", - "-arch", - arm64, - ); - OTHER_CPLUSPLUSFLAGS = ( - "$(inherited)", - "-arch", - arm64, - ); - OTHER_LDFLAGS = ( - "$(inherited)", - "-arch", - arm64, - "-lodr", - "-lpugixml", - "-lcryptopp", - "-lminiz", - "-luchardet", - ); PRODUCT_BUNDLE_IDENTIFIER = "at.tomtasche.reader$(BUNDLE_ID_SUFFIX)"; PRODUCT_NAME = "$(BUNDLE_DISPLAY_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = OpenDocumentReader/BridgingHeader.h; diff --git a/OpenDocumentReader.xcodeproj/xcshareddata/xcschemes/ODR Full.xcscheme b/OpenDocumentReader.xcodeproj/xcshareddata/xcschemes/ODR Full.xcscheme index 4406b4d..4ef0cfb 100644 --- a/OpenDocumentReader.xcodeproj/xcshareddata/xcschemes/ODR Full.xcscheme +++ b/OpenDocumentReader.xcodeproj/xcshareddata/xcschemes/ODR Full.xcscheme @@ -1,6 +1,6 @@ -#include -#include -#include #include #include #include @@ -21,6 +17,11 @@ #include #include +#include +#include +#include +#include + @implementation CoreWrapper { std::optional html; } diff --git a/build-device.sh b/build-device.sh deleted file mode 100644 index 40c5659..0000000 --- a/build-device.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# https://stackoverflow.com/a/246128/198996 -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -cd $DIR - -CONAN_REVISIONS_ENABLED=1 conan install . --profile ios --build missing diff --git a/build-simulator.sh b/build-simulator.sh deleted file mode 100644 index 745f3cf..0000000 --- a/build-simulator.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# https://stackoverflow.com/a/246128/198996 -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -cd $DIR - -CONAN_REVISIONS_ENABLED=1 conan install . --profile ios-simulator --build missing diff --git a/conan/conanfile.py b/conan/conanfile.py new file mode 100644 index 0000000..762c30d --- /dev/null +++ b/conan/conanfile.py @@ -0,0 +1,17 @@ +from conan import ConanFile +from conan.tools.apple import XcodeDeps, XcodeToolchain + +class Pkg(ConanFile): + settings = "os", "compiler", "arch", "build_type" + options = {"configuration": ["Debug", "Debug Lite", "Release", "Release Lite"]} + default_options = {"configuration": "Debug"} + requires = "odrcore/3.0.0" + + def generate(self): + xcode = XcodeDeps(self) + xcode.configuration = self.options.configuration + xcode.generate() + + tc = XcodeToolchain(self) + tc.configuration = self.options.configuration + tc.generate() diff --git a/conan/patch.sh b/conan/patch.sh new file mode 100644 index 0000000..28f513d --- /dev/null +++ b/conan/patch.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -e + +echo "patch conan generated xcconfig files" + +# patch xcconfig - see https://github.com/conan-io/conan/issues/16526 +sed -i '' -E 's/\]\[arch=arm64\]\[/][/g;t' conan-output/*.xcconfig +sed -i '' -E 's/\]\[arch=x86_64\]\[/][/g;t' conan-output/*.xcconfig + +echo "done" diff --git a/conan/profiles/ios b/conan/profiles/ios new file mode 100644 index 0000000..ba0078e --- /dev/null +++ b/conan/profiles/ios @@ -0,0 +1,9 @@ +include(default) + +[settings] +os=iOS +os.sdk=iphone +os.version=14.0 +os.sdk=iphoneos +arch=armv8 +build_type=Release diff --git a/conan/profiles/ios-simulator-arm64 b/conan/profiles/ios-simulator-arm64 new file mode 100644 index 0000000..785af5b --- /dev/null +++ b/conan/profiles/ios-simulator-arm64 @@ -0,0 +1,8 @@ +include(default) + +[settings] +os=iOS +os.version=14.0 +os.sdk=iphonesimulator +arch=armv8 +build_type=Release diff --git a/conan/profiles/ios-simulator-x64 b/conan/profiles/ios-simulator-x64 new file mode 100644 index 0000000..8c3766f --- /dev/null +++ b/conan/profiles/ios-simulator-x64 @@ -0,0 +1,9 @@ +include(default) + +[settings] +os=iOS +os.sdk=iphonesimulator +os.version=14.0 +os.sdk=iphonesimulator +arch=x86_64 +build_type=Release diff --git a/conan/setup-all.sh b/conan/setup-all.sh new file mode 100644 index 0000000..ee3063d --- /dev/null +++ b/conan/setup-all.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +# https://stackoverflow.com/a/246128/198996 +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +cd $DIR/.. + +# device +for configuration in "Debug" "Debug Lite" "Release" "Release Lite"; do + conan install conan/ \ + --output-folder=conan-output \ + --build=missing \ + --profile:host=conan/profiles/ios \ + -s build_type=Release \ + -s "&:build_type=Release" \ + -s "odrcore/*:build_type=RelWithDebInfo" \ + -o "configuration=${configuration}" +done + +# simulator +for arch in "arm64" "x64"; do + for configuration in "Debug" "Debug Lite" "Release" "Release Lite"; do + conan install conan/ \ + --output-folder=conan-output \ + --build=missing \ + --profile:host=conan/profiles/ios-simulator-${arch} \ + -s build_type=Release \ + -s "&:build_type=Release" \ + -s "odrcore/*:build_type=RelWithDebInfo" \ + -o "configuration=${configuration}" + done +done + +bash conan/patch.sh diff --git a/conanfile.txt b/conanfile.txt deleted file mode 100644 index c6bcd30..0000000 --- a/conanfile.txt +++ /dev/null @@ -1,6 +0,0 @@ -[requires] -odrcore/3.0.0@ - -[generators] -xcode - diff --git a/debug-lite.xcconfig b/configs/debug-lite.xcconfig similarity index 69% rename from debug-lite.xcconfig rename to configs/debug-lite.xcconfig index 87ebb08..c86e8e0 100644 --- a/debug-lite.xcconfig +++ b/configs/debug-lite.xcconfig @@ -1,2 +1,3 @@ #include "Pods/Target Support Files/Pods-OpenDocumentReader/Pods-OpenDocumentReader.debug lite.xcconfig" -#include "conanbuildinfo.xcconfig" + +#include "conan-output/conan_config.xcconfig" diff --git a/debug.xcconfig b/configs/debug.xcconfig similarity index 68% rename from debug.xcconfig rename to configs/debug.xcconfig index 6d0b85d..945b666 100644 --- a/debug.xcconfig +++ b/configs/debug.xcconfig @@ -1,2 +1,3 @@ #include "Pods/Target Support Files/Pods-OpenDocumentReader/Pods-OpenDocumentReader.debug.xcconfig" -#include "conanbuildinfo.xcconfig" + +#include "conan-output/conan_config.xcconfig" diff --git a/release-lite.xcconfig b/configs/release-lite.xcconfig similarity index 69% rename from release-lite.xcconfig rename to configs/release-lite.xcconfig index c5f79d0..87778ae 100644 --- a/release-lite.xcconfig +++ b/configs/release-lite.xcconfig @@ -1,2 +1,3 @@ #include "Pods/Target Support Files/Pods-OpenDocumentReader/Pods-OpenDocumentReader.release lite.xcconfig" -#include "conanbuildinfo.xcconfig" + +#include "conan-output/conan_config.xcconfig" diff --git a/release.xcconfig b/configs/release.xcconfig similarity index 68% rename from release.xcconfig rename to configs/release.xcconfig index 49c0e97..f5534e8 100644 --- a/release.xcconfig +++ b/configs/release.xcconfig @@ -1,2 +1,3 @@ #include "Pods/Target Support Files/Pods-OpenDocumentReader/Pods-OpenDocumentReader.release.xcconfig" -#include "conanbuildinfo.xcconfig" + +#include "conan-output/conan_config.xcconfig" diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 6d017cb..94d383a 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -18,7 +18,6 @@ default_platform(:ios) platform :ios do desc "Push a new release build to the App Store" lane :deployPro do - sh("bash", "../build-device.sh") clear_derived_data build_app(workspace: "OpenDocumentReader.xcworkspace", scheme: "ODR Full", xcargs: "-allowProvisioningUpdates") upload_to_app_store( @@ -26,13 +25,11 @@ platform :ios do skip_screenshots: true, skip_metadata: true ) - sh("bash", "../build-simulator.sh") clear_derived_data end desc "Push a new release build to the App Store" lane :deployLite do - sh("bash", "../build-device.sh") clear_derived_data build_app(workspace: "OpenDocumentReader.xcworkspace", scheme: "ODR Lite", xcargs: "-allowProvisioningUpdates") upload_to_app_store( @@ -40,12 +37,10 @@ platform :ios do skip_screenshots: true, skip_metadata: true ) - sh("bash", "../build-simulator.sh") clear_derived_data end lane :tests do - sh("bash", "../build-simulator.sh") clear_derived_data run_tests( workspace: "OpenDocumentReader.xcworkspace", diff --git a/ios b/ios deleted file mode 100644 index 12e29ef..0000000 --- a/ios +++ /dev/null @@ -1,14 +0,0 @@ -include(default) - -[settings] -os=iOS -os.sdk=iphone -os.version=14.0 -arch=armv8 -build_type=Release -compiler=apple-clang -compiler.version=12.0 -compiler.libcxx=libc++ - -[build_requires] -darwin-toolchain/1.0.8@ diff --git a/ios-simulator b/ios-simulator deleted file mode 100644 index eed1a24..0000000 --- a/ios-simulator +++ /dev/null @@ -1,14 +0,0 @@ -include(default) - -[settings] -os=iOS -os.sdk=iphonesimulator -os.version=14.0 -arch=x86_64 -build_type=Release -compiler=apple-clang -compiler.version=12.0 -compiler.libcxx=libc++ - -[build_requires] -darwin-toolchain/1.0.8@