Ios11+xcode9 build fail

Before yesterday, everything was OK.
Yesterday, I updated Xcode to version 9 and iPhone 6 s plus to iOS11.

when I run command “cordova build ios --release --buildConfig build.json” to build ios, it build fail, and the error message is :

2017-09-21 09:40:12.369 xcodebuild[55625:10520306] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/p4/flc_ppz12bb33pb3tk4bcyg00000gn/T/MyApp_2017-09-21_09-40-12.369.xcdistributionlogs'.
2017-09-21 09:40:12.460 xcodebuild[55625:10520306] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fec69a52d60>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
    "Error Domain=IDEProvisioningErrorDomain Code=9 \"\"MyApp.app\" requires a provisioning profile.\" UserInfo={NSLocalizedDescription=\"MyApp.app\" requires a provisioning profile., NSLocalizedRecoverySuggestion=Add a profile to the \"provisioningProfiles\" dictionary in your Export Options property list.}"
)}
error: exportArchive: "MyApp.app" requires a provisioning profile.

Error Domain=IDEProvisioningErrorDomain Code=9 ""MyApp.app" requires a provisioning profile." UserInfo={NSLocalizedDescription="MyApp.app" requires a provisioning profile., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}

** EXPORT FAILED **

Error: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,MyApp.xcarchive,-exportOptionsPlist,/Users/jiangyb/Documents/ts_workspace/myapp/platforms/ios/exportOptions.plist,-exportPath,/Users/jiangyb/Documents/ts_workspace/myapp/platforms/ios/build/device

Does anybody know what is this problem?

Did you define any developer id for your app with Xcode ?

Yes, I had defined as follow:

{
    "ios": {
        "debug": {
            "codeSignIdentity": "iPhone Developer",
            "developmentTeam": "*****************************",
            "packageType": "development",
            "provisioningProfile": "*****************************",
            "buildFlag": [
                "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
                "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
                "LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
            ]
        },
        "release": {
            "codeSignIdentity": "iPhone Developer",
            "developmentTeam": "*****************************",
            "packageType": "app-store",
            "provisioningProfile": "*****************************",
            "buildFlag": [
                "EMBEDDED_CONTENT_CONTAINS_SWIFT = YES",
                "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO",
                "LD_RUNPATH_SEARCH_PATHS = \"@executable_path/Frameworks\""
            ]
        }
    }
}

‘*****************************’ means secret messge

Same build failure here. This will probably bite many devs.

Same error here. Waiting for the solution.

Same error here! I’m using the newest xcode

error: exportArchive: "MyApp.app" requires a provisioning profile.

Have you try define the provisioning profile manually in Xcode and then to define it again to automatic? I’ve the feeling that this operation sometimes set back to provisioning profile correctly again, but no warranty that it’ll work

p.s.: could confirm I don’t face this problem, I was able to build my app after having upgraded to Xcode 9

p.p.s.: if that could help, my infos

cli packages:

@ionic/cli-utils  : 1.10.2
ionic (Ionic CLI) : 3.10.3

global packages:

Cordova CLI : 7.0.1 
Gulp CLI    : CLI version 1.2.2 Local version 3.9.1

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : android 6.2.3 ios 4.5.0
Ionic Framework    : ionic-angular 3.6.1

System:

Android SDK Tools : 26.0.1
ios-deploy        : 1.9.2 
ios-sim           : 5.0.13 
Node              : v8.5.0
npm               : 5.3.0 
OS                : macOS Sierra
Xcode             : Xcode 9.0 Build version 9A235

Also getting the same error. Any help would be appreciated.

And without --release, does it work?

On iOS I never use this. I use it on android only.

For me, simply running cordova build ios fails.

I’m able to build and release an update with Xcode9 and run on ios11.

Xcode9 did loose a lot of my config but opening my xcodeproj file in Xcode and tinkering with things did help.

Despite Xcode showing my signing cert and provisioning profile, I had to uncheck and recheck the little checkbox.

Then Xcode9 requires a 1024x1024 icon now. running ionic resources ios would not generate this, so I made one manually and then opened up Images.xcassets file in my xcode project and dragged the 1024 icon onto the placeholder.

[EDIT]: looks like ionic cli 3.11 fixes this resource issue: Ionic CLI 3.11.0

Built and submitted an update yesterday.

It also build fail without --release

But when I use cordova command line to build release, it fail.

Yes, it can be built at xcode9

An icon so big? Source?

It’s the icon for the App Store listing, you’re suppose to include it on your app bundle now, not upload to itunesconnect - the change was announced at WWDC 17 they say:

https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/

1 Like

Thx for finding that!

Look like 3.12.0 solve the icon question:

P.S.: Yep, it creates a 1024x1024 icon and add an entry about it in config.xml

1 Like

I’m watching this PR for Codova-iOS, hopefully it will get fixed soon

1 Like

Try installing the PR mentioned above using:

npm i --save apache/cordova-ios#pull/338/head

Worked for me.

1 Like

Looks like this PR has been merged now.