Git Product home page Git Product logo

mailchimp-sdk-ios's People

Contributors

chez-browne avatar jeremy-fox avatar jey-starratt avatar joemasilotti avatar joy-collier avatar julian-fordyce avatar katie-ham avatar michael-heard-mc avatar michael-patzer avatar shawn-veader avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mailchimp-sdk-ios's Issues

[Feature] Ability to send the device language to Mailchimp

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

Adding user to contact list is failing

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?

[QUESTION] How to add interest group(s) to contact?

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!

Failed to load module 'MailchimpSDK'

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.

No change in my Audience list

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

Can not archive my app with Mailchimp framework

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

[Question] Double opt-in via SDK

Feature question

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?

[BUG] This person is only eligible for transactional emails

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:

  • Xcode Version: 12.0.1
  • iOS Deployment Target (Deployment Info > Target > iOS version): iOS 12.4
  • Mailchimp SDK Version: 2.0.6

Unable to add/Update contact with SWIFT SDK in iOS

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

[BUG] not relevant APIErrorResponse and strange behaviour

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

image

Screenshot 2021-02-16 at 00 01 46

Screenshot 2021-02-16 at 00 00 05

Development Environment Information:

  • Xcode Version: 12.4
  • iOS Deployment Target (Deployment Info > Target > iOS version): iOS 11.4
  • Mailchimp SDK Version: 2.0.2

Mailchimp SDK not integrating

Dear Mailchimp developers,

I am trying to integrate Mailchimp SDK to my social media app by installing with cocoapods but it returns an error.

problem

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.

SDK won't work, unexpected response API ERROR 2

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:

  • Xcode Version: 14.3
  • iOS Deployment Target: iOS 13.0
  • Mailchimp SDK Version: 2.0.4

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)

Apache Server at us21.api.mailchimp.com Port 80 Worker result RETRY for Work [ id=a8c0a846-a06f-4808-b565-5749120d6a8c, tags={ com.mailchimp.sdk.audience.AudienceWorker } ]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.