Docs
FAQ & Troubleshooting

FAQ & Troubleshooting

Frequently Asked Questions

Q1: Xcode logs show objc[...]: ... is implemented in both ... and .... One of the two will be used. Which one is undefined.

is-implemented-in-both

This is a byproduct of Argmax Pro SDK's open-core architecture where aliased definitions (across Open-source SDK and Pro SDK) are confusing Xcode. These logs are expected and harmless. This warning will be addressed in an upcoming release with improved packaging.

In more recent versions of libobjc, the wording of this message has changed to: (still expected and harmless)

`objc[...]: ... implemented in both ... and .... This may cause spurious casting failures and mysterious crashes. One of the duplicates must be removed or renamed.

Q2: Updating SwiftPM in Xcode leads to invalid registry source archive checksum

swiftpm-invalid-checksum

Argmax validates the authenticity and integrity of each package asset with checksums. This error is observed only when a user's Xcode is open at the exact time when Argmax publishes a new SDK version to the private SwiftPM registry.

The root cause is that Xcode compares the new package against the previous package's checksum. We are working with Apple to resolve this Xcode problem.

In the interim, the recommended workaround is to delete the caches for the provenance/signing fingerprint, and to clear your app cache by replacing YourApp with the name of your app. Please run the following commands:

trash ~/Library/Developer/Xcode/DerivedData/YourApp*
trash ~/Library/Caches/org.swift.swiftpm
trash ~/.swiftpm/security/fingerprints/argmaxinc.argmax-sdk-swift.json

If you are using the alpha channel (i.e., you are getting the package from argmaxinc.argmax-sdk-swift-alpha), please run these commands:

trash ~/Library/Developer/Xcode/DerivedData/YourApp*
trash ~/Library/Caches/org.swift.swiftpm
trash ~/.swiftpm/security/fingerprints/argmaxinc.argmax-sdk-swift-alpha.json

For Xcode projects: go to File > Packages > Reset Package Caches.
For SwiftPM CLI packages (with a Package.swift in the root directory), run:

swift package purge-cache
swift package reset
trash ~/Library/Caches/org.swift.swiftpm 

We are continuously working to improve our SDK delivery experience. In the meantime, if this problem persists after clearing the caches as instructed above, please reach out to Argmax via your dedicated Slack channel.

Q3: Which architectures does the Argmax SDK support?

The Argmax SDK supports macos-arm64 , ios-arm64 and ios-arm64_x86_64-simulator. If the application integrating the SDK is expected to run on other architectures, we recommend using a pre-processor directive to check for arm64, e.g.

#if arch(arm64)
import Argmax
// Initialize SDK
#endif

Q4: Pro SDK initialization fails with Error: generic ("Loading this model is not allowed.")

Your Argmax Pro SDK licensing may have end-user device or SDK configuration constraints including:

  • minimum operating system version
  • supported devices
  • specific app bundle IDs (that you reported when signing the Argmax Pro SDK License Agreement)
  • specific model versions (Argmax runs checksum integrity tests on each loaded model)

Some common reasons for this error:

  • You are using a different version of your app whose bundle ID was not registered with Argmax.
  • You modified the model files post-download (e.g. put a README inside the model files directory) which leads to a failed checksum integrity test.

If you run into this error in a context where you believe your license should not be restricted, please reach out to Argmax via your dedicated Slack channel.

Q5: How do I set up Argmax Pro SDK in ephemeral CI runners?

Argmax Pro SDK is distributed through a private SwiftPM registry as described here. You set up the registry only once and it is persisted on your machine via Keychain.

Many teams leverage ephemeral CI runners to build their projects where the private registry needs to be set up before each build job. In these cases, we recommend using the following snippet in your environment setup:

swift package-registry set --global --scope argmaxinc https://api.argmaxinc.com/v1/sdk
swift package-registry login https://api.argmaxinc.com/v1/sdk/login --token ARGMAX_SECRET_TOKEN --netrc --no-confirm
xcodebuild -resolvePackageDependencies -packageAuthorizationProvider netrc -derivedDataPath /Volumes/workspace/DerivedData

where ARGMAX_SECRET_TOKEN is registered as a secret or environment variable in your CI infrastructure.

If you use an .xcworkspace that integrates multiple projects, please add -workspace to the xcodebuild command from above.

Q6: I get Unsupported Swift architecture when building my app because of Argmax

It is highly likely that your app supports a platform that Argmax does not: x86_64 (Intel Macs). Please see Q3 for the solution.

Q7: My users have corrupt model downloads, how do I enable download integrity checks?

Argmax's model download functionality is built on the Hub API from swift-transformers. Argmax contributed the download integrity check feature to swift-transformers such that downloaded files that fail the integrity checks are deleted and redownloaded.

Argmax SDK does not have this feature enabled because it pins an older version of swift-transformers to avoid the additional indirect dependencies introduced in later versions of swift-transformers.

However, if you would like to enable automatic download integrity checks, you may add swift-transformers as a direct dependency on your project without pinning an older version which will override Argmax's pin.