From 9a2b45c2f1c3753f5f61eb9922328b43d347601a Mon Sep 17 00:00:00 2001 From: Ulrik Gammelby Date: Tue, 10 May 2022 21:58:59 +0200 Subject: [PATCH] add dependencies to podspec; add necessary post_install hook in example to set BUILD_LIBRARY_FOR_DISTRIBUTION=yes for dependencies to prevent crash (cocoapods does not seem to support this automatically as of version 1.11.3 (see https://github.com/CocoaPods/CocoaPods/issues/9232 and more)) --- .../project.pbxproj | 28 +++++++++---------- NabtoEdgeClientHello/Podfile | 11 +++++++- NabtoEdgeClientHello/Podfile.lock | 19 +++++++++---- NabtoEdgeClientSwift.podspec | 6 ++-- 4 files changed, 42 insertions(+), 22 deletions(-) diff --git a/NabtoEdgeClientHello/NabtoEdgeClientHello.xcodeproj/project.pbxproj b/NabtoEdgeClientHello/NabtoEdgeClientHello.xcodeproj/project.pbxproj index a5cff0c..47981d0 100644 --- a/NabtoEdgeClientHello/NabtoEdgeClientHello.xcodeproj/project.pbxproj +++ b/NabtoEdgeClientHello/NabtoEdgeClientHello.xcodeproj/project.pbxproj @@ -7,7 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 3A1455DB42FB96180B906C59 /* Pods_NabtoEdgeClientHello.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 737250C3CFDBC01EBB41D143 /* Pods_NabtoEdgeClientHello.framework */; }; + 5ADC57CBCCEF424032856205 /* Pods_NabtoEdgeClientHello.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A2EDBC7EDE6F62AAC71EA2A /* Pods_NabtoEdgeClientHello.framework */; }; D42A03CA24CEE221008E4B2D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D42A03C924CEE221008E4B2D /* AppDelegate.swift */; }; D42A03CC24CEE221008E4B2D /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D42A03CB24CEE221008E4B2D /* SceneDelegate.swift */; }; D42A03CE24CEE221008E4B2D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D42A03CD24CEE221008E4B2D /* ViewController.swift */; }; @@ -17,9 +17,8 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 01A4CF5EC724C56222A6AA4E /* Pods-NabtoEdgeClientHello.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NabtoEdgeClientHello.release.xcconfig"; path = "Target Support Files/Pods-NabtoEdgeClientHello/Pods-NabtoEdgeClientHello.release.xcconfig"; sourceTree = ""; }; - 57272FA3526750CE0FBBA591 /* Pods-NabtoEdgeClientHello.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NabtoEdgeClientHello.debug.xcconfig"; path = "Target Support Files/Pods-NabtoEdgeClientHello/Pods-NabtoEdgeClientHello.debug.xcconfig"; sourceTree = ""; }; - 737250C3CFDBC01EBB41D143 /* Pods_NabtoEdgeClientHello.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NabtoEdgeClientHello.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 4A2EDBC7EDE6F62AAC71EA2A /* Pods_NabtoEdgeClientHello.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NabtoEdgeClientHello.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7A985177468AB383CB597995 /* Pods-NabtoEdgeClientHello.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NabtoEdgeClientHello.release.xcconfig"; path = "Target Support Files/Pods-NabtoEdgeClientHello/Pods-NabtoEdgeClientHello.release.xcconfig"; sourceTree = ""; }; D42A03C624CEE221008E4B2D /* NabtoEdgeClientHello.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NabtoEdgeClientHello.app; sourceTree = BUILT_PRODUCTS_DIR; }; D42A03C924CEE221008E4B2D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; D42A03CB24CEE221008E4B2D /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; @@ -29,6 +28,7 @@ D42A03D524CEE222008E4B2D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; D42A03D724CEE222008E4B2D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D4B54C4A24D0539000BBC161 /* NabtoEdgeClient.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NabtoEdgeClient.framework; path = "../../../Library/Developer/Xcode/DerivedData/NabtoEdgeClient-airyzqgoxhoasfekujhyzdhomdkz/Build/Products/Debug-iphonesimulator/NabtoEdgeClient.framework"; sourceTree = ""; }; + D955A55F29114682769B7C44 /* Pods-NabtoEdgeClientHello.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NabtoEdgeClientHello.debug.xcconfig"; path = "Target Support Files/Pods-NabtoEdgeClientHello/Pods-NabtoEdgeClientHello.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -36,7 +36,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 3A1455DB42FB96180B906C59 /* Pods_NabtoEdgeClientHello.framework in Frameworks */, + 5ADC57CBCCEF424032856205 /* Pods_NabtoEdgeClientHello.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -46,8 +46,8 @@ C410674EE8C6389A140F80FF /* Pods */ = { isa = PBXGroup; children = ( - 57272FA3526750CE0FBBA591 /* Pods-NabtoEdgeClientHello.debug.xcconfig */, - 01A4CF5EC724C56222A6AA4E /* Pods-NabtoEdgeClientHello.release.xcconfig */, + D955A55F29114682769B7C44 /* Pods-NabtoEdgeClientHello.debug.xcconfig */, + 7A985177468AB383CB597995 /* Pods-NabtoEdgeClientHello.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -88,7 +88,7 @@ isa = PBXGroup; children = ( D4B54C4A24D0539000BBC161 /* NabtoEdgeClient.framework */, - 737250C3CFDBC01EBB41D143 /* Pods_NabtoEdgeClientHello.framework */, + 4A2EDBC7EDE6F62AAC71EA2A /* Pods_NabtoEdgeClientHello.framework */, ); name = Frameworks; sourceTree = ""; @@ -100,11 +100,11 @@ isa = PBXNativeTarget; buildConfigurationList = D42A03DA24CEE222008E4B2D /* Build configuration list for PBXNativeTarget "NabtoEdgeClientHello" */; buildPhases = ( - 94B6CC9FA7559F6CF9A8B4BB /* [CP] Check Pods Manifest.lock */, + CAAE2A51698F617CB656C9A5 /* [CP] Check Pods Manifest.lock */, D42A03C224CEE221008E4B2D /* Sources */, D42A03C324CEE221008E4B2D /* Frameworks */, D42A03C424CEE221008E4B2D /* Resources */, - C53946DE042ED9206A6CB445 /* [CP] Embed Pods Frameworks */, + F2F56422B380A2740ED85111 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -162,7 +162,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 94B6CC9FA7559F6CF9A8B4BB /* [CP] Check Pods Manifest.lock */ = { + CAAE2A51698F617CB656C9A5 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -184,7 +184,7 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - C53946DE042ED9206A6CB445 /* [CP] Embed Pods Frameworks */ = { + F2F56422B380A2740ED85111 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -352,7 +352,7 @@ }; D42A03DB24CEE222008E4B2D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 57272FA3526750CE0FBBA591 /* Pods-NabtoEdgeClientHello.debug.xcconfig */; + baseConfigurationReference = D955A55F29114682769B7C44 /* Pods-NabtoEdgeClientHello.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; @@ -371,7 +371,7 @@ }; D42A03DC24CEE222008E4B2D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 01A4CF5EC724C56222A6AA4E /* Pods-NabtoEdgeClientHello.release.xcconfig */; + baseConfigurationReference = 7A985177468AB383CB597995 /* Pods-NabtoEdgeClientHello.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; diff --git a/NabtoEdgeClientHello/Podfile b/NabtoEdgeClientHello/Podfile index d5ee0ab..4825aec 100644 --- a/NabtoEdgeClientHello/Podfile +++ b/NabtoEdgeClientHello/Podfile @@ -2,5 +2,14 @@ source 'https://github.com/CocoaPods/Specs.git' target 'NabtoEdgeClientHello' do use_frameworks! - pod 'NabtoEdgeClientSwift' + pod 'NabtoEdgeClientSwift', '2.2.0-beta.4' + + post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES' + end + end + end + end diff --git a/NabtoEdgeClientHello/Podfile.lock b/NabtoEdgeClientHello/Podfile.lock index 459e902..d74cff9 100644 --- a/NabtoEdgeClientHello/Podfile.lock +++ b/NabtoEdgeClientHello/Podfile.lock @@ -1,16 +1,25 @@ PODS: - - NabtoEdgeClientSwift (1.1.0) + - CBORCoding (1.3.2): + - Half (~> 1.3) + - Half (1.3.1) + - NabtoEdgeClientSwift (2.2.0-beta.4): + - CBORCoding (~> 1.3.2) + - Half (~> 1.3.1) DEPENDENCIES: - - NabtoEdgeClientSwift + - NabtoEdgeClientSwift (= 2.2.0-beta.4) SPEC REPOS: https://github.com/CocoaPods/Specs.git: + - CBORCoding + - Half - NabtoEdgeClientSwift SPEC CHECKSUMS: - NabtoEdgeClientSwift: 8e74e40059d65d12476659d8c090bd60fb494cb2 + CBORCoding: bc4b677abf83b603535f6af7158b88b86ac07744 + Half: 53808d877fd489901434883eb5ca91d6be65f0b3 + NabtoEdgeClientSwift: 86273c3df62f3c6899f47f0acab3da9f7d5bd4d6 -PODFILE CHECKSUM: fc0826c0e7508f1533de654e5d4fef5a0dcff67d +PODFILE CHECKSUM: 06824334e802ee7f0e0154953306d71cd38d744e -COCOAPODS: 1.11.2 +COCOAPODS: 1.11.3 diff --git a/NabtoEdgeClientSwift.podspec b/NabtoEdgeClientSwift.podspec index 1817e69..972d5c8 100644 --- a/NabtoEdgeClientSwift.podspec +++ b/NabtoEdgeClientSwift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'NabtoEdgeClientSwift' - s.version = "2.1.1" + s.version = "2.2.0-beta.4" s.summary = "Nabto 5/Edge Client for Swift" s.description = <<-DESC This pod installs the high level Nabto Edge Client for Swift: It wraps the most common functionality of the low-level ANSI C Nabto Edge Client SDK (provided in the NabtoEdgeClientApi pod). @@ -13,11 +13,13 @@ The Nabto Edge platform supersedes the Nabto Micro platform with many new featur DESC s.homepage = 'https://docs.nabto.com/developer/guides/overview/platform-overview.html' s.license = { :type => 'Commercial', :file => 'NabtoEdgeClient.xcframework/LICENSE' } - s.source = { :http => "https://downloads.nabto.com/assets/edge/ios/nabto-client-swift/#{s.version}/NabtoEdgeClient.xcframework.zip"} + s.source = { :http => "https://downloads.nabto.com/assets/edge/ios/nabto-client-swift/2.2.0-beta.1/NabtoEdgeClient.xcframework.zip"} s.readme = 'https://downloads.nabto.com/assets/edge/ios/nabto-client-swift/#{s.version}/README.md' s.changelog = 'https://downloads.nabto.com/assets/edge/ios/nabto-client-swift/#{s.version}/CHANGELOG.md' s.author = { 'nabto' => 'apps@nabto.com' } s.vendored_frameworks = 'NabtoEdgeClient.xcframework' + s.dependency 'CBORCoding', '~> 1.3.2' + s.dependency 'Half', '~> 1.3.1' s.platform = :ios s.ios.preserve_paths = 'NabtoEdgeClient.xcframework' s.ios.libraries = 'c++', 'stdc++'