Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import via SPM doesn't display the latest version: blocks the use of SPM integration #1011

Open
AnissaBokhamy opened this issue Mar 17, 2023 · 2 comments

Comments

@AnissaBokhamy
Copy link

AnissaBokhamy commented Mar 17, 2023

Integration Method: Swift Package Manager
Xcode Version: Xcode 14.2
Library Version: 5.0.2
Platform: iOS
Language: Swift and Objective-C
Description:
While trying to import Mixpanel-iphone via Swift Package Manager, when selecting option "Exact Version", the prompt automatically selects version 3.0.0.
image

It seems that that this is linked to the fact that the field CFBundleVersion included inside the Info.plist file is set to CURRENT_PROJECT_VERSION, which seems to be set to 3.0.0 in the project.pbxproj file.

☑ Please update the CURRENT_PROJECT_VERSION of the project.pbxproj file.


I am reporting this issue because I imported Mixpanel-iPhone SDK via SPM and I had the following prompt

missing required module 'Mixpanel'

This prompt appeared even though I was following the instructions from the documentation: my project couldn't recognize the framework. I tried forking the project, changing the field CURRENT_PROJECT_VERSION = 5.0.2, re-importing it Mixpanel-iPhone in my project via SPM: it worked 🥳

(For now, I switched to using CocoaPods because the SPM import method doesn't seem to work fine on my end)

@AnissaBokhamy AnissaBokhamy changed the title Import via SPM doesn't display the latest version Import via SPM doesn't display the latest version: blocks the use of SPM integration Mar 17, 2023
@ialexhales
Copy link

If Swift Package Manager (SPM) isn't displaying the latest version, try the following steps:

  1. Update your Package.swift file with the correct version or version range for the package.
  2. Run swift package update in the terminal to fetch the latest dependencies.
  3. Clean the Xcode build folder with Shift + Command + K.
  4. Delete the DerivedData folder at ~/Library/Developer/Xcode/DerivedData.
  5. Check the package repository to ensure the latest version is available.
  6. Verify Xcode and SPM updates for any bug fixes.
  7. As a workaround, manually edit Package.swift to use the desired version.

If the issue persists, check package-specific documentation or support channels.

@pj4533
Copy link

pj4533 commented Oct 16, 2024

This is still an issue. Ran into it now. Doing the same as OP, went back to Cocoapods just for this dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants