I have made an app with Flutter in Android Studio that I'm able to run on my android device, but trying to do so on iOS is just leading to the errors below. Essentially it seems to be saying that I'm not logged in and my session has expired. I've gone into Xcode->Preferences->Accounts, and on occasion it says my session has expired, but more often than not it doesn't.

So far I have tried:

  • Logging out of Xcode
  • Closing and reopening Xcode
  • Killing Xcode in the terminal.
  • Ensuring I'm logged in online and everywhere else I can possibly think of! (iTunes etc)

I did manage last week to install on another iOS device.

Any ideas?

Launching lib/main.dart on Caroline’s iPhone in debug mode...
Signing iOS app for device deployment using developer identity: "iPhone Developer: [email protected] (V8CM7C23TN)"
Running Xcode clean...
Starting Xcode build...
Xcode build done
Failed to build iOS app
Error output from Xcode build:
↳
    2018-05-01 12:32:44.639 xcodebuild[42223:480929]  DVTPortal: Service '<DVTPortalViewDeveloperService: 0x7ffab7f64160; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100')
    2018-05-01 12:32:44.640 xcodebuild[42223:480929]  DVTPortal: Error:
    Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired.  Please log in." UserInfo={payload=<CFBasicHash 0x7ffab816b030 [0x7fff90e4eaf0]>{type = mutable dict, count = 9,
entries =>
        0 : responseId = <CFString 0x7ffab814f990 [0x7fff90e4eaf0]>{contents = "f45bf0e1-07c9-4a47-8afb-326537af4d8c"}
        2 : <CFString 0x7fff90d71b58 [0x7fff90e4eaf0]>{contents = "protocolVersion"} = QH65B2
        3 : <CFString 0x7ffab811b260 [0x7fff90e4eaf0]>{contents = "requestUrl"} = <CFString 0x7ffab817ff60 [0x7fff90e4eaf0]>{contents = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"}
        6 : <CFString 0x7ffab81511d0 [0x7fff90e4eaf0]>{contents = "userLocale"} = en_US
        8 : resultCode = <CFNumber 0x44c37 [0x7fff90e4eaf0]>{value = +1100, type = kCFNumberSInt64Type}
        9 : userString = <CFString 0x7ffab814bd30 [0x7fff90e4eaf0]>{contents = "Your session has expired.  Please log in."}
        10 : <CFString 0x7ffab8148890 [0x7fff90e4eaf0]>{contents = "resultString"} = <CFString 0x7ffab7de29d0 [0x7fff90e4eaf0]>{contents = "authentication.failed"}
        11 : httpCode = <CFNumber 0xc837 [0x7fff90e4eaf0]>{value = +200, type = kCFNumberSInt64Type}
        12 : <CFString 0x7ffab8114340 [0x7fff90e4eaf0]>{contents = "creationTimestamp"} = <CFString 0x7ffab81299c0 [0x7fff90e4eaf0]>{contents = "2018-05-01T11:32:42Z"}
}
    , NSLocalizedDescription=Your session has expired.  Please log in.}
    2018-05-01 12:32:47.344 xcodebuild[42223:480931]  DVTPortal: Service '<DVTPortalViewDeveloperService: 0x7ffab80a0c00; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100')
    2018-05-01 12:32:47.344 xcodebuild[42223:480931]  DVTPortal: Error:
    Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired.  Please log in." UserInfo={payload=<CFBasicHash 0x7ffab7f889d0 [0x7fff90e4eaf0]>{type = mutable dict, count = 9,
entries =>
        0 : responseId = <CFString 0x7ffab7f6c930 [0x7fff90e4eaf0]>{contents = "09bf6865-a820-442c-879d-f9f1a2e54503"}
        2 : <CFString 0x7fff90d71b58 [0x7fff90e4eaf0]>{contents = "protocolVersion"} = QH65B2
        3 : <CFString 0x7ffab7fbe590 [0x7fff90e4eaf0]>{contents = "requestUrl"} = <CFString 0x7ffab7feead0 [0x7fff90e4eaf0]>{contents = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"}
        6 : <CFString 0x7ffab7f1c270 [0x7fff90e4eaf0]>{contents = "userLocale"} = en_US
        8 : resultCode = <CFNumber 0x44c37 [0x7fff90e4eaf0]>{value = +1100, type = kCFNumberSInt64Type}
        9 : userString = <CFString 0x7ffab7f22a40 [0x7fff90e4eaf0]>{contents = "Your session has expired.  Please log in."}
        10 : <CFString 0x7ffab7fed460 [0x7fff90e4eaf0]>{contents = "resultString"} = <CFString 0x7ffab7fa5a80 [0x7fff90e4eaf0]>{contents = "authentication.failed"}
        11 : httpCode = <CFNumber 0xc837 [0x7fff90e4eaf0]>{value = +200, type = kCFNumberSInt64Type}
        12 : <CFString 0x7ffab7f7d720 [0x7fff90e4eaf0]>{contents = "creationTimestamp"} = <CFString 0x7ffab7fa07d0 [0x7fff90e4eaf0]>{contents = "2018-05-01T11:32:42Z"}
}
    , NSLocalizedDescription=Your session has expired.  Please log in.}
    2018-05-01 12:32:47.505 xcodebuild[42223:480929]  DVTPortal: Service '<DVTPortalViewDeveloperService: 0x7ffab7f641e0; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100')
    2018-05-01 12:32:47.505 xcodebuild[42223:480929]  DVTPortal: Error:
    Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired.  Please log in." UserInfo={payload=<CFBasicHash 0x7ffab8146dc0 [0x7fff90e4eaf0]>{type = mutable dict, count = 9,
entries =>
        0 : responseId = <CFString 0x7ffab81659e0 [0x7fff90e4eaf0]>{contents = "d82179cb-a7da-499a-b09d-cf07ab7e733b"}
        2 : <CFString 0x7fff90d71b58 [0x7fff90e4eaf0]>{contents = "protocolVersion"} = QH65B2
        3 : <CFString 0x7ffab814f2f0 [0x7fff90e4eaf0]>{contents = "requestUrl"} = <CFString 0x7ffab819a950 [0x7fff90e4eaf0]>{contents = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"}
        6 : <CFString 0x7ffab8117620 [0x7fff90e4eaf0]>{contents = "userLocale"} = en_US
        8 : resultCode = <CFNumber 0x44c37 [0x7fff90e4eaf0]>{value = +1100, type = kCFNumberSInt64Type}
        9 : userString = <CFString 0x7ffab814d150 [0x7fff90e4eaf0]>{contents = "Your session has expired.  Please log in."}
        10 : <CFString 0x7ffab8180bc0 [0x7fff90e4eaf0]>{contents = "resultString"} = <CFString 0x7ffab8136d30 [0x7fff90e4eaf0]>{contents = "authentication.failed"}
        11 : httpCode = <CFNumber 0xc837 [0x7fff90e4eaf0]>{value = +200, type = kCFNumberSInt64Type}
        12 : <CFString 0x7ffab81958e0 [0x7fff90e4eaf0]>{contents = "creationTimestamp"} = <CFString 0x7ffab813e860 [0x7fff90e4eaf0]>{contents = "2018-05-01T11:32:45Z"}
}
    , NSLocalizedDescription=Your session has expired.  Please log in.}
** BUILD FAILED **

Xcode's output:
↳
    === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
    Code Signing Error: The operation couldn’t be completed. Unable to log in with account '[email protected]'. The login details for account '[email protected]' were rejected.
    Code Signing Error: No profiles for 'mikeashelby.kxDeclarations' were found:  Xcode couldn't find any iOS App Development provisioning profiles matching 'mikeashelby.kxDeclarations'.
    The use of Swift 3 @objc inference in Swift 4 mode is deprecated. Please address deprecated @objc inference warnings, test your code with “Use of deprecated Swift 3 @objc inference” logging enabled, and then disable inference by changing the "Swift 3 @objc Inference" build setting to "Default" for the "Runner" target.
    Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.3'
    Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.3'
    Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.3'
Could not build the precompiled application for the device.

Error launching application on Caroline’s iPhone.


Solution 1: benjlin

I was just having this issue and found an answer here:

Xcode export/upload error: Your session has expired. Please log in

I had just changed the password to my developer account and needed to sign in again Xcode > Preferences > Accounts.


Solution 2: Syed Zahid Shah

Delete the installed app from the phone/simulator and try from terminal

flutter clean
flutter run