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

Migrating from Amplitude-iOS to Amplitude-Swift gives error in generated Ampli code #223

Closed
khurram18 opened this issue Sep 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@khurram18
Copy link

Expected Behavior

The Ampli should work without any errors when migrate from Amplitude-iOS to Amplitude-Swift.

  • In generated Ampli.swift file it should containimport AmplitudeSwift instead of import Amplitude
  • It should not refer any types that are not present in the new SDK.
  • It should compile without any errors.

Current Behavior

There are various compile time errors when using Ampli.

  • No such model Amplitude
  • Another compiler error is
Cannot find AMPlan in scope

Possible Solution

Please update Ampli to properly support Amplitude-Swift.

Steps to Reproduce

Previously I am using Ampli with Amplitude-iOS and it works smoothly.

  1. Remove Amplitude-iOS as dependency.
  2. Add Amplitude-Swift as dependency.
  3. Run ampli pull
  4. Now compile the project and it will give the compile time errors.

Environment

  • SDK Version: Amplitude-Swift 1.9.0
  • OS Info: 14.6.1
@khurram18 khurram18 added the bug Something isn't working label Sep 4, 2024
@crleona
Copy link
Collaborator

crleona commented Sep 4, 2024

Hi @khurram18, in the future, please open Ampli related issues on the https://github.com/amplitude/ampli-examples repo. When updating SDKs, run ampli configure then ampli pull again. (if that does not work, you can delete ampli.json from your project's root then run ampli init again, which is equivalent to a full reset.)

@crleona crleona closed this as completed Sep 4, 2024
@khurram18
Copy link
Author

Thank you @crleona
It worked by using ampli config and then ampli pull again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants