ARTIFACTORY: Fix CocoaPods Indexing Failure in Artifactory Caused by macOS ._ Files

Products
Frog_Artifactory
Content Type
Use_Case
AuthorFullName__c
Yanxiu Wu
articleNumber
000007092
FirstPublishedDate
2026-07-30T08:26:05Z
lastModifiedDate
2026-07-30

ARTIFACTORY: Fix CocoaPods Indexing Failure in Artifactory Caused by macOS ._ Files

Problem Statement
When you upload a CocoaPods package (`.tar.gz`) built on macOS to JFrog Artifactory, Artifactory may fail to generate repository metadata and CDN index files (located under the `.specs/` virtual directory). Consequently, CocoaPods clients cannot locate or download the package during `pod install`, with returning an error such as: `[!] Unable to find a specification for '<pod_name>'`.
Root Cause Analysis
  1. AppleDouble Sidecar Files (`._*`):
    On macOS, the operating system creates hidden AppleDouble files (prefixed with `._`) to store file metadata and Extended Attributes (`xattr`).
  2. Indexer Parsing Conflict:
    When `tar` creates an archive on macOS, these hidden files (e.g., `._awk.podspec`) are included in the `.tar.gz` package alongside legitimate files.
  3. Artifactory Metadata Processing:
    Artifactory automatically scans `.tar.gz` archives to extract embedded `.podspec` files for index generation. When the Java-based indexer encounters binary garbage inside `._<pod_name>.podspec`, a stream parsing error occurs. This halts the metadata indexing process entirely, leaving the repository unable to serve the package via the CocoaPods CDN specification index.


Solution
To resolve this issue, suppress the creation of AppleDouble metadata files when creating the `.tar.gz` archive on macOS.


Step 1: Remove Affected Artifacts from Artifactory
Delete the corrupted version directory (e.g., `awk/3.0.5/`) from your Artifactory Local Repository via the Web UI or REST API to clear any broken indexing states.


Step 2: Re-archive Using `COPYFILE_DISABLE=1`
Prepend the `COPYFILE_DISABLE=1` environment variable to the `tar` command during packaging. This instructs macOS `tar` to ignore Extended Attributes and omit `._` files.
ShellCOPYFILE_DISABLE=1 tar -czf awk-3.0.5.tar.gz awk.xcframework awk.podspec


Step 3: Verify Archive Contents
Verify that no `._` files are present in the newly created archive:
Shelltar -tzf awk-3.0.5.tar.gz | grep "._"
Expected Result: The output should be completely empty.


Step 4: Re-upload to Artifactory
Upload the clean `.tar.gz` archive (and optional external `.podspec` file) to the designated Artifactory path:
Shellcurl -u "<username>:<password>" -X PUT \
  "https://<artifactory-domain>/artifactory/<repo-name>/awk/3.0.5/awk-3.0.5.tar.gz" \
  -T awk-3.0.5.tar.gz


Verification
  1. Artifactory UI Check:
    Navigate to the repository in the Artifactory Artifact Tree. Refresh the view and confirm that metadata files under `.specs/` and `.pod/` are automatically generated.
  2. Client Installation:
    On the client machine, clear the local CocoaPods cache and run the installation command:
    Shellpod cache clean --all
    pod install --repo-update
    The installation should complete successfully with the output `Pod installation complete!`: