Messagekit: Doesn't complile with swift 4 or 4.2

Created on 19 Jan 2019  路  13Comments  路  Source: MessageKit/MessageKit

Hello,
I have installed the pods and I'm having compiler issues. Most of them are related to api, its look like they are not updated to support latest apis.

I know 4.2 support isn't out yet, but it was worth a short trying.

The issue is that your page says that it supports swift 4 but it doesn't seem to.

I'm using it for iOS 9 (also tried with IOS 10) and swift 4 (also tried swift 4.2)

screen shot 2019-01-19 at 6 08 37 pm

stale

Most helpful comment

Yeah I fixed the issue thank you!

For anyone having the same issue:

  1. Go back to version 1.0
  2. Migrate your entire project to swift 4.2
  3. run pod update
  4. $$$$

All 13 comments

Swift 4.2 is supported. Issue is your build settings. Please take a look at the other closed issues people have raised, I list off multiple possible problems.

Sent with GitHawk

Yes, I had looked at the other issues but couldn't find anything helpful. And I did change the version to 4.2 in the settings, are you referring to some other settings?

Yes, I had looked at the other issues but couldn't find anything helpful.

Several possible culprits have been listed off. I'm not sure why you deem them as not helpful when it sounds like you haven't tried any of them. Could be an issue with your cocoa pods or maybe your podfile itself. MessageKit is on Swift 4.2 so this would be a client side error that unfortunately I am not able to reproduce.

957

949

941

I am having a similar issue @sajadkhan, I ran pod update and the same errors popped up. My project is on swift 4.0, ill let you know if I find out how to resolve them.

to be clear about my comment above^ I was on MessageKit 1.0, ran pod update and then the errors appeared after opening the new xcworkspace.

This is my pod file

# Uncomment the next line to define a global platform for your project
#platform :ios, '11.0'

target 'project' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Froomy
    pod 'CodableFirebase'
    pod 'Firebase/Core'
    pod 'Firebase/Auth'
    pod 'Firebase/Storage'
    pod 'Firebase/Firestore'
    pod 'SVProgressHUD'
    pod 'Firebase/Database'
    pod "CTPanoramaView"
    pod 'Koloda'
    pod 'Fabric'
    pod 'Crashlytics'
    pod 'AlamofireImage'
    pod 'MessageKit'

    target 'projectTests' do
        inherit! :search_paths
    # Pods for testing
    end

    target 'projectUItests' do
        inherit! :search_paths
    # Pods for testing
    end
end

@ven1xus If you ran pod update then you would have updated to MessageKit 2.0 which is on Swift 4.2, you will need to specify 1.0 in your podfile

Sent with GitHawk

Yeah I fixed the issue thank you!

For anyone having the same issue:

  1. Go back to version 1.0
  2. Migrate your entire project to swift 4.2
  3. run pod update
  4. $$$$

This issue has been marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

This issue has been auto-closed because there hasn't been any activity for at least 21 days. However, we really appreciate your contribution, so thank you for that! 馃檹 Also, feel free to open a new issue if you still experience this problem 馃憤.

What i've found (since the same issue appears when i update my pods) is to into the pod, open build settings and set the version of swift to 4.2, then it just works. This is happening because when i update cocoa pods message kit comes through in swift 4.0. Also, my project is currently swift 4.2..

@Guy783 that would mean your local Cocoapods repo is out of date

Sent with GitHawk

@Guy783 that would mean your local Cocoapods repo is out of date

Sent with GitHawk

Hmm, I did update the cocoa pods repo. To no avail. The app was also a brand new project. It's working now, but I'll try repo update again to see if it works.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChandraPrakashJangid picture ChandraPrakashJangid  路  3Comments

JulienLevallois picture JulienLevallois  路  4Comments

nitrag picture nitrag  路  3Comments

pawankmrai picture pawankmrai  路  3Comments

asn111 picture asn111  路  3Comments