mailchimp / mailchimp-sdk-ios Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://mailchimp.com/developer/guides/mobile-sdk/
License: Other
Home Page: https://mailchimp.com/developer/guides/mobile-sdk/
License: Other
Is your feature request related to a problem? Please describe.
I'm using the mobile device sdk to update my audience tags so that I can segment my audience. I'd also like to send up the language so that my email campaigns can be sent in the right languages.
Describe the solution you'd like
It'd be great if it were possible to send up the device language (or optionally the app-specific language) through the mobile SDK.
Describe alternatives you've considered
I could set up a server instance which would use the marketing API, but this means a fair amount of overhead for something that seems like it could easily be supported.
Additional context
N/A
I can successfully initialize Mailchimp in debug mode and I am trying to create a contact from my app. But I receive an error:
Error: The operation couldn’t be completed. (appname.APIError error 4.)
What I do is:
var contact: Contact = Contact(emailAddress: "[email protected]")
let emailPermission = Contact.MarketingPermission(marketingPermissionId: "emailPermissinon", enabled: true)
let mailPermission = Contact.MarketingPermission(marketingPermissionId: "mailPermission", enabled: true)
let adPermission = Contact.MarketingPermission(marketingPermissionId: "adPermission", enabled: true)
contact.marketingPermissions = [emailPermission, mailPermission, adPermission]
MailchimpSDK.createOrUpdate(contact: contact) { result in
switch result {
case .success:
print("Successfully added or updated contact")
case .failure(let error):
print("Error: \(error.localizedDescription)")
}
}
What am I doing wrong?
Is it possible to add an interest group when creating/updating a contact?
I'm collecting emails on the web via an embedded form and (to my knowledge) you can't automatically tag users, only add them to interest groups. It looks like this SDK is the exact opposite, you can tag users but can't add them to interest groups. I would like to only use one way of segmenting my audience, tags or interest groups.
Thanks in advance!
The minimum deployment target is iOS 12, not iOS 11 as per SDK description.
testing 1 2 3
For v0.1.0, following the README instructions leads to the error Failed to load module 'MailchimpSDK'
. This appears to be an Apple issue discussed September 26, 2019, with no fix yet: https://forums.developer.apple.com/thread/123253
The immediate fix is to navigate to the Mailchimp.xcframework
directory (the framework itself is a directory) and run: find . -name "*.swiftinterface" -exec sed -i -e 's/MailchimpSDK\.//g' {} \;
We will be doing this post-processing step prior to future releases, and releasing a new version where this manual step does not need to be taken. That fix will resolve this issue, so watch this issue for updates.
Hello,
I just integrate your framework in my app.
static func updateSubscriber(email: String!, firstname: String!, lastname: String!, compagny: String!) {
do {
try MailchimpSDK.initialize(token: KEY, autoTagContacts: true, debugMode: true)
var contact: Contact = Contact(emailAddress: email)
let mergeFields = ["FNAME": MergeFieldValue.string(firstname),
"LNAME": MergeFieldValue.string(lastname)]
contact.mergeFields = mergeFields
contact.tags = [Contact.Tag(name: compagny, status: .active)]
MailchimpSDK.createOrUpdate(contact: contact) { result in
switch result {
case .success:
print("Successfully added or updated contact")
case .failure(let error):
print("Error: \(error.localizedDescription)")
}
}
} catch {
}
}
When I launch my app and call my method I got a result success :
Mailchimp SDK Initialized. Version: 0.1.1
Adding auto-tag "iOS" to create contact request.
Adding auto-tag "Phone" to create contact request.
Successfully added or updated contact
When I go on my Mailchimp account I didn't see my contact updated with name and last name or a new tag.
I create an Api Key to give as Token to the SDK.
I don't know why it's not working even I get a result successful.
Best
Jean-Philippe
Hi,
I can't archive my project with the sdk embed and sign.
it says that 'MailchimpSDK' is unavailable: cannot find Swift declaration for this class
Do you need more info ?
Best
Jean-Philippe
Feature
This issue relates to be GDPR compliant in general. This means to have a double opt-in option like with form builder so the user receives an email where she finally can sign up for the newsletter.
Question
Is there any option like that and if not is that on your schedule?
Describe the bug
I'm seeing "This person is only eligible for transactional emails" for contacts signed up from the iOS sdk, even though i copy pasted the permissions from the client key website and set enabled
to true
on all of them:
//Email Marketing Permission
let permissiondXXX = Contact.MarketingPermission(marketingPermissionId: "XXX", enabled: true)
//Direct Mail Marketing Permission
let permissionXXX = Contact.MarketingPermission(marketingPermissionId: "XXX", enabled: true)
//Customized Online Advertising Marketing Permission
let permissionXXX = Contact.MarketingPermission(marketingPermissionId: "XXX", enabled: true)
contact.marketingPermissions = [permissiondXXX, permissionXXX, permissionXXX]
Is there something else i have to do if i want to signup users to newsletters from an ios app?
Expected behavior
The user should be able to receive newsletters.
Development Environment Information:
Hi Support,
API Key:
Username:
I am getting a success message after adding/update contact with your SDK but it's not reflecting on the mailchimp dashboard. I am using Swift SDK for my iOS app.
Code for mailchimp SDK initialisation:
do {
try MailchimpSDK.initialize(token: "<Redacted>", autoTagContacts: true, debugMode: true)
} catch MailchimpSDK.InitError.invalidToken {
}
Adding/Update Contact:
var contact: Contact = Contact(emailAddress: "[email protected]")
let mergeFields = ["FNAME": MergeFieldValue.string("Example"), "LNAME": MergeFieldValue.string("User")]
contact.mergeFields = mergeFields
MailchimpSDK.createOrUpdate(contact: contact) { result in
switch result {
case .success:
print("Successfully added or updated contact")
case .failure(let error):
print("Error: \(error.localizedDescription)")
}
}
SDK We are using:https://github.com/mailchimp/Mailchimp-SDK-iOS
Describe the bug
API returns a unrelevant error for some emails, i.e. email "[email protected]" successfully created (screenshot_0) but "[email protected]" is not (screenshot_1) and it's returning strange error (screenshot_2). If it's some internal validation of emails I thinks it's better to provide more useful descriptions of what went wrong as well as adding more meaningful status code. Thanks
Screenshots
Development Environment Information:
Feature
Event Property
Question
What is max length of Event Property String value?
Dear Mailchimp developers,
I am trying to integrate Mailchimp SDK to my social media app by installing with cocoapods but it returns an error.
I tried it in a clean project and also in another Macbook. No luck. It returns the same error and cannot find the framework.
I also followed your guide to install it manually with XCFramework and still the same error.
To be sure it is not problem on my side, I tried many other new pods to check if they will fail... No, they all work fine.
I hope you can let me know what is the problem here.
Describe the bug
the response of createOrUpdate SDK API is:
["Contact request failed with error: Impossibile completare l'operazione. (Errore MailchimpSDK.APIError 2)."]
["API Error status: 404"]
["API Error detail: Unknown"]
["API Error type: Unexpected response"]
To Reproduce
created an SDK key for the default audience
installed latest version of SDK 2.0.4 via cocoapods
used this code:
Future { promise in
print("endBetaTest called with email: (email)")
do {
try Mailchimp.initialize(token: Environment.MAILCHIMP_KEY, autoTagContacts: true, debugMode: true)
} catch {
promise(.failure(error))
return
}
var contact = Contact(emailAddress: email)
Mailchimp.createOrUpdate(contact: contact) { result in
switch result {
case .success:
print("Successfully added or updated contact")
promise(.success(true))
case .failure(let resError):
print ("Mailchimp error: (resError.localizedDescription)")
switch resError {
case .jsonParsingError(let err):
print ("Mailchimp json parsing error: (err)")
promise(.failure(RDError(err)))
case .requestError(let err):
print ("Mailchimp request error: (err)")
promise(.failure(RDError(err)))
default:
promise(.failure(RDError(resError.localizedDescription)))
}
}
}
}
Expected behavior
the contact added in the audience
Development Environment Information:
Podfile contents
platform :ios, '13.0'
target 'MyApp' do
pod 'MailchimpSDK'
end
Additional context
Tried also Android with same 404 result, logcat gives these logs:
--> POST https://us21.api.mailchimp.com/clientapi/1.0/contacts
<-- 404 https://us21.api.mailchimp.com/clientapi/1.0/contacts (456ms)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.