Skip to content
This repository was archived by the owner on Jan 17, 2023. It is now read-only.

Conversation

jshier
Copy link
Member

@jshier jshier commented Apr 19, 2020

Issue Link 🔗

Original Package.swift introduced in 4.0.0 didn't work due to an improper header search path.

Goals ⚽

This PR fixes the Package.swift file by setting the publicHeadersPath value correctly.

Implementation Details 🚧

As explained here, the publicHeadersPath value is relative to the target directory, not the package file, so it should've been "" instead of "AFNetworking".

Testing Details 🔍

Tested manually with a test project that was broken previously.

@jshier jshier merged commit c646ed6 into master Apr 20, 2020
@jshier jshier deleted the bug/spm branch April 20, 2020 01:43
@jshier jshier added this to the 4.0.1 milestone Apr 20, 2020
jshier added a commit that referenced this pull request Apr 20, 2020
* Fix serverTrust crash (#4542)

* Update readme, add stale bot, add issue template, add pull request template

* Update copy from Alamofire

* Fix crash on nil serverTrust

* Expose server trust error

* add test for error throws

* Fix nullability

* Fix evaluateServerTrust determination (#4552)

Co-authored-by: Jon Shier <jon@jonshier.com>

* Revert changes making error generation public.

This reverts commit 111352b.

# Conflicts:
#	AFNetworking/AFURLSessionManager.m

* Make static error function a method instead.

* Make trust generatio part of AFTestCase.

* Add test cases for server trust error generation.

* Mark parameters explicitly nullable.

* Fix nullability (#4551)

* Replace instead of appending to the default header (#4550)

* Replace instead of appending to the default header

* Add tests for setting HTTP headers per request

* Fix SPM usage with better publicHeadersPath. (#4554)

Co-authored-by: Jakub Kašpar <kaspikk@gmail.com>
Co-authored-by: Elf Sundae <elf.sundae@gmail.com>
@zarghol
Copy link

zarghol commented Jun 5, 2020

Hi ! I think this leads a problem in our side :

/Users/XXXX/Library/Developer/Xcode/DerivedData/YYYY/Build/Intermediates.noindex/ArchiveIntermediates/ZZZZ/IntermediateBuildFilesPath/GeneratedModuleMaps/iphoneos/AFNetworking.modulemap:2:10: umbrella directory '/Users/XXXX/Library/Developer/Xcode/DerivedData/AAAAAA/SourcePackages/checkouts/AFNetworking/AFNetworking/AFNetworking' not found

I don't know the specification of public header path in SPM, but maybe it searches it at the root with a string empty, but it is inside the folder AFNetworking, not at the root...

parkboo added a commit to parkboo/AFNetworking that referenced this pull request Sep 22, 2020
* commit '77ef5fed64d98107acd177a90182163a20ba4567': (31 commits)
  Use low priority queue instead of background for SCNetworkReachabilityGetFlags() (AFNetworking#4587)
  Exempt "needs investigation" from stalebot.
  Only mark unlabeled issues as stale.
  Loop over only changed keypaths in request serializer (AFNetworking#4581)
  Disable 'Zombie Objects' diagnostics for tvOS scheme (AFNetworking#4572)
  Fix docblock for setAuthenticationChallengeHandler (AFNetworking#4574)
  Fix type in CHANGELOG. (AFNetworking#4562)
  Prepare 4.0.1 Release (AFNetworking#4555)
  Fix ServerTrustError crash. (AFNetworking#4553)
  Fix SPM usage with better publicHeadersPath. (AFNetworking#4554)
  Replace instead of appending to the default header (AFNetworking#4550)
  Fix nullability (AFNetworking#4551)
  Update CHANGELOG.md (AFNetworking#4537)
  Fix UIKit+AFNetworking.h (AFNetworking#4536)
  Remove unused UIImage+AFNetworking.h (AFNetworking#4535)
  Separate bundle identifier for watchOS target (AFNetworking#4533)
  Fix MobileCoreServices renamed warning, close #4520 (AFNetworking#4532)
  Add FOUNDATION_EXPORT for AFJSONObjectByRemovingKeysWithNullValues (AFNetworking#4529)
  (Infra) Make infra changes to cleanup project and simplify its maintenance (AFNetworking#4531)
  Improve podspec (AFNetworking#4528)
  ...

# Conflicts:
#	Framework/AFNetworking.h
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants