urbanairship / ios-library

Urban Airship iOS SDK
http://urbanairship.com
Apache License 2.0
478 stars 265 forks source link

Attempting to build Airship 17.4.0 via Carthage fails against AirshipDebug #380

Closed eventbasedev closed 1 year ago

eventbasedev commented 1 year ago

Preliminary Info

What Airship dependencies are you using?

17.4.0

What are the versions of any relevant development tools you are using?

Carthage 0.39.1, Fastlane 2.7.0 XCode 15.0

Report

What unexpected behavior are you seeing?

We are consistently seeing Carthage fail to compile the framework -- specifically, it complains about the single import AirshipPreferenceCenter in AirshipDebug.

What is the expected behavior?

Framework should compile successfully.

What are the steps to reproduce the unexpected behavior?

We use fastlane to trigger Carthage to run. https://docs.fastlane.tools/actions/carthage/

Run bundle exec fastlane ios dependencies command:'update' new_resolver:true which triggers:

carthage(
  command: options: "update",
  use_submodules: options: false,
  no_build: true,
  platform: 'iOS',
  use_xcframeworks: true,
  use_binaries: false,
  new_resolver: true,
  log_path: carthage_log_path
)

Do you have logging for the issue?

FastlaneCore::Interface::FastlaneShellError: [!] Exit status of command 'carthage bootstrap ios-library --no-use-binaries --platform iOS --cache-builds --new-resolver --log-path ./output/2023-10-09-10.39.14_02-carthage-build-binary-dependencies-from-source-code.log --use-xcframeworks' was 1 instead of 0.
*** Checking out ios-library at "17.4.0"
*** No cache found for ios-library, building with all downstream dependencies
*** xcodebuild output can be found in /Users/dorothymin/Documents/notifications-ios/output/2023-10-09-10.39.14_02-carthage-build-binary-dependencies-from-source-code.log
*** Building scheme "AirshipNotificationContentExtension" in Airship.xcworkspace
*** Building scheme "AirshipNotificationServiceExtension" in Airship.xcworkspace
*** Building scheme "AirshipAutomation" in Airship.xcworkspace
*** Building scheme "AirshipAutomationSwift" in Airship.xcworkspace
*** Building scheme "AirshipBasement" in Airship.xcworkspace
*** Building scheme "AirshipCore" in Airship.xcworkspace
*** Building scheme "AirshipDebug" in Airship.xcworkspace
Build Failed
    Task failed with exit code 65:
    /usr/bin/xcrun xcodebuild -workspace /Users/user/Documents/notifications-ios/Carthage/Checkouts/ios-library/Airship.xcworkspace -scheme AirshipDebug -configuration Release -derivedDataPath /Users/dorothymin/Library/Caches/org.carthage.CarthageKit/DerivedData/15.0_15A240d/ios-library/17.4.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive VALIDATE_WORKSPACE=NO -archivePath /var/folders/mq/tspl28zx07ng1w42yhyg8pd40000gq/T/ios-library SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/user/Documents/notifications-ios/Carthage/Checkouts/ios-library)

This usually indicates that project itself failed to compile.
rlepinski commented 1 year ago

Looks like its missing a target dependency, will get it fixed in the next release.

For now, you can use the prebuilt binaries. Any reason why you are not using those?

eventbasedev commented 1 year ago

Thank you for the quick response. We will investigate using prebuilt binaries for our projects in the meantime!

rlepinski commented 1 year ago

You probably want to point to https://github.com/urbanairship/ios-library-prebuilt/blob/main/Carthage/Airship.json or https://github.com/urbanairship/ios-library-prebuilt/blob/xcode-15/Carthage/Airship.json

That will give you some control over what Xcode version is being used for the prebuilts. The ones attached to the release are currently using Xcode 14

rlepinski commented 1 year ago

This should be fixed in 17.5.0