I am experiencing an issue with the Ampli Wrapper in our Swift and Kotlin projects. We set up Amplitude Data and installed the Ampli Wrapper successfully.
We had to rename one of the User Properties from createdAt to created_at to avoid a conflict with our projects’ properties. However, when we pull the updated data on the client sides, the property still appears as createdAt despite being correctly named in the Amplitude workspace.
Screenshots are attached for reference.
Could you please assist us in resolving this issue?
It seems like you're encountering an issue where two properties are mapping to the same variable name. This can occur when the properties are named in a way that, when converted to camelCase, they become identical. For example, "media_source" and "_mediaSource" both convert to "mediaSource" in camelCase.
For your specific case you are doing createdAt to created_at which for iOS/Swift will resolve to camel case which would both result in createdAt.
To resolve this, you could rename one of the properties in your Data tracking plan to ensure it's unique. However, please be cautious when using underscores (_), periods, and other non-alphabet characters, as they can sometimes lead to unexpected results.
Here's an example of how to properly use camelCase:
// Good
camelCase("media_source") =>"mediaSource"
camelCase("media_source_2") =>"mediaSource2"
It seems like you're encountering an issue where two properties are mapping to the same variable name. This can occur when the properties are named in a way that, when converted to camelCase, they become identical. For example, "media_source" and "_mediaSource" both convert to "mediaSource" in camelCase.
For your specific case you are doing createdAt to created_at which for iOS/Swift will resolve to camel case which would both result in createdAt.
To resolve this, you could rename one of the properties in your Data tracking plan to ensure it's unique. However, please be cautious when using underscores (_), periods, and other non-alphabet characters, as they can sometimes lead to unexpected results.
Here's an example of how to properly use camelCase:
// Good
camelCase("media_source") =>"mediaSource"
camelCase("media_source_2") =>"mediaSource2"
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. You can also create a Guest account below!
If you're a current customer, select the domain you use to sign in with Amplitude.
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. Want to sign up as a guest? Create a Community account.
If you're a current customer, select the domain you use to sign in with Amplitude.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.