robbiehanson / XMPPFramework

An XMPP Framework in Objective-C for Mac and iOS
Other
5.91k stars 2.09k forks source link

[Carthage]: Not able to install through Carthage #1192

Open ankitagarwal007 opened 3 years ago

ankitagarwal007 commented 3 years ago

As cocoalumberjack has set its minimum deployment target to 9.0 but xmppframework has still set its minimum deployment target to 8.0 fresh installing is failing.

XMPPBookmarksModule.swift:14:12: error: compiling for iOS 8.0, but module 'CocoaLumberjackSwift' has a minimum deployment target of iOS 9.0

chaurasiyadilip commented 3 years ago

I am also facing same problem. I get the following error

Fetching XMPPFramework Fetching CocoaLumberjack Fetching KissXML Fetching CocoaAsyncSocket Fetching libidn-framework Checking out CocoaLumberjack at "3.7.0" Checking out libidn-framework at "1.35" Checking out KissXML at "5.3.2" Checking out CocoaAsyncSocket at "7.6.4" Checking out XMPPFramework at "4.0.0" xcodebuild output can be found in /var/folders/q1/mkvxk_9n7r1812whx8qx124r0000gn/T/carthage-xcodebuild.Lfpfjg.log Downloading CocoaAsyncSocket.framework binary at "Version 7.6.4" Downloading libidn-framework.framework binary at "Version 1.35" Building scheme "CocoaLumberjack" in Demos.xcworkspace Build Failed Task failed with exit code 65: /usr/bin/xcrun xcodebuild -workspace /Users/dilipchaurasiya/Documents/Test3/Carthage/Checkouts/CocoaLumberjack/Demos/Demos.xcworkspace -scheme CocoaLumberjack -configuration Release -derivedDataPath /Users/dilipchaurasiya/Library/Caches/org.carthage.CarthageKit/DerivedData/11.5_11E608c/CocoaLumberjack/3.7.0 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/q1/mkvxk_9n7r1812whx8qx124r0000gn/T/CocoaLumberjack SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/dilipchaurasiya/Documents/Test3/Carthage/Checkouts/CocoaLumberjack)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/q1/mkvxk_9n7r1812whx8qx124r0000gn/T/carthage-xcodebuild.Lfpfjg.log

In log file following error is mentioned

ARCHIVE FAILED

The following build commands failed: CompileC /Users/dilipchaurasiya/Library/Caches/org.carthage.CarthageKit/DerivedData/11.5_11E608c/CocoaLumberjack/3.7.0/Build/Intermediates.noindex/ArchiveIntermediates/CocoaLumberjack/IntermediateBuildFilesPath/Lumberjack.build/Release/CocoaLumberjack.build/Objects-normal/x86_64/DDFileLogger+Buffering.o /Users/dilipchaurasiya/Documents/Test3/Carthage/Checkouts/CocoaLumberjack/Sources/CocoaLumberjack/Extensions/DDFileLogger+Buffering.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler CompileC /Users/dilipchaurasiya/Library/Caches/org.carthage.CarthageKit/DerivedData/11.5_11E608c/CocoaLumberjack/3.7.0/Build/Intermediates.noindex/ArchiveIntermediates/CocoaLumberjack/IntermediateBuildFilesPath/Lumberjack.build/Release/CocoaLumberjack.build/Objects-normal/x86_64/DDOSLogger.o /Users/dilipchaurasiya/Documents/Test3/Carthage/Checkouts/CocoaLumberjack/Sources/CocoaLumberjack/DDOSLogger.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (2 failures)

pixelskull commented 3 years ago

same over here, is there a known way to fix. Have to finish my project very soon (tm)

AlTavares commented 3 years ago

As a workaround you can use this script

# carthage.sh
# Usage example: ./carthage.sh build --platform iOS

set -euo pipefail

xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT

echo 'IPHONEOS_DEPLOYMENT_TARGET = 9.0' >> $xcconfig

export XCODE_XCCONFIG_FILE="$xcconfig"
carthage "$@"

Save it as carthage.sh and run chmod +x carthage.sh

then you can use ./carthage.sh bootstrap/build/update

The script is based on this documentation here https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md

ankitagarwal007 commented 3 years ago

@AlTavares This script is to fix the issue of carthage for xcode>12. But here the issue is in your framework as mentioned above. You have to release an update with minimum deployment target set to ios 9.0

AlTavares commented 3 years ago

The script I made was based on the one that fixes the issues on Xcode 12, it's not the same. Mine will change the deployment target for all the dependencies to the one set, in your case, 9.0

infostans823 commented 2 years ago
:0: error: compiling for iOS 8.0, but module 'CocoaLumberjack' has a minimum deployment target of iOS 9.0: /Users/amutechnologies/Library/Developer/Xcode/DerivedData/Runner-alewopaxiyghwdffvdabzyaseepd/Build/Products/Debug-iphonesimulator/CocoaLumberjack/CocoaLumberjack.framework/Modules/CocoaLumberjack.swiftmodule/x86_64-apple-ios-simulator.swiftmodule ![Screenshot 2021-10-14 at 4 00 27 PM](https://user-images.githubusercontent.com/74964971/137300843-40085186-25d1-4f7e-9b25-6da0300ec693.png) Please advice what can i do for build xcode version 12.4
vitalyster commented 2 years ago

You can bump target platform version for each pod in your Podfile, like this:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
    end
  end
vitalyster commented 2 years ago

For Carthage issue you should use workaround mentioned before: https://github.com/robbiehanson/XMPPFramework/issues/1192#issuecomment-741084785

haithngn commented 2 years ago

@infostans823 Let's use this workaround repository, I will create a pull request later. I also check tested the framework files, they work fine

github "Snapble/XMPPFramework" "master"

Screen Shot 2021-10-16 at 12 29 58 AM

infostans823 commented 2 years ago

You can bump target platform version for each pod in your Podfile, like this:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
    end
  end

Use this code but can't work i am using for flutter ios build in my pod file this pod installer code

post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' end end