I am trying to build a complicated xcworkspace that contains 8 xcodeproj.
Main project (target app, framework, app extension)
Pods
6 cpp projects with one static library target each (these have dependencies with each other and added to the final project)
I can build the project via xcodebuild command. I am also able to Archive it, but I cannot export the IPA file, it always gets the following error:
2020-03-18 19:04:49.801 xcodebuild[28749:691158] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/vr/1fb5zcxd0gg92359ynn0r2gm0000gn/T/xxxxx_2020-03-18_19-04-49.800.xcdistributionlogs'.
2020-03-18 19:04:49.834 xcodebuild[28749:691158] [MT] IDEDistributionMethodManager: -[IDEDistributionMethodManager orderedDistributionMethodsForTask:archive:]: Error = Error Domain=IDEDistributionMethodManagerErrorDomain Code=2 "Unknown Distribution Error" UserInfo={NSLocalizedDescription=Unknown Distribution Error}
error: exportArchive: exportOptionsPlist error for key 'method': expected one of {}, but no value was provided
Error Domain=IDEFoundationErrorDomain Code=1 "exportOptionsPlist error for key 'method': expected one of {}, but no value was provided" UserInfo={NSLocalizedDescription=exportOptionsPlist error for key 'method': expected one of {}, but no value was provided}
I also tried to use the XCode 10.3 (10G8) UI in order to perform the same actions. This results to the Organizer screen where I see the xcarchive erroneous located in a group "Other Items" and not "iOS Apps" as it should.
Additionally, the option
"Validate Content" is disabled.
"Distribute Content" does not provide anything for iOS packing.
I have verified that my build commands are correct as the project was able to build with these in its previous state.
I've tried changing static project libraries dependencies but when adding all dependencies to all items it ends with a build error of multiple symbols.
I suspect that something in the build settings, or library/header references is faulty, but I cannot really troubleshoot it.
Is there any way to get additional information for the problem?
I had the same issue. I had to reset my developer certificate on our build server to resolve this.
I hope this helps others.
Related
I am trying to configure my Fastfile to get an enterprise build with over the air installation support. Here is my current lane:
lane :enterprise do
increment_build_number(xcodeproj: "myapp.xcodeproj")
build_app(
scheme: "enterprise",
output_name: "myapp.ipa",
output_directory: "build",
export_options: {
manifest: {
appURL: "my app url",
displayImageURL: "display image url",
fullSizeImageURL: "full size image url"
}
},
export_method: "enterprise",
export_xcargs: "-allowProvisioningUpdates"
)
end
The build runs withouth problem and I get both ipa and manifest.plist ffiles. The problem is when get the build with Xcode, it produces 5 files:
DistributionSummary.plist
ExportOptions.plist
manifest.plist
Packaging.log
myapp.ipa
When I try to update the files by just changing ipa and the plist files, over the air intallation failes wih this error:
Error Domain=MIInstallerErrorDomain Code=13
"Failed to verify code signature of /.../myapp.app : 0xe8008017
(A signed resource has been added, modified, or deleted.)"
UserInfo={
NSLocalizedDescription=Failed to verify code signature of /.../myapp.app : 0xe8008017
(A signed resource has been added, modified, or deleted.),
LegacyErrorString=ApplicationVerificationFailed,
FunctionName=+[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:],
SourceFileLine=77,
LibMISErrorNumber=-402620393
}
for bundle IDs ("com.myapp")
How can I make Fastlane generate all these files?
UPDATE
I have managed to get DistributionSummary.plist and ExportOptions.plistusing below code:
fastlane_require "gym"
dist_plist_path = File.join(Gym.cache[:temporary_output_path], "DistributionSummary.plist")
FileUtils.cp(dist_plist_path, "../build")
dist_plist_path = File.join(Gym.cache[:temporary_output_path], "ExportOptions.plist")
FileUtils.cp(dist_plist_path, "../build")
But I am still getting error when I try to install the app.
UODATE 2
I have tried deleting all the files except ipa and manifest with Xcode export and It is still working except it doesn't show app icon while downloading the app. So the error I am getting isn't related to other files.
I have found the problem. My app name contains a non ASCII character "ö" and it cousing the problem when I try to get an enterprise export. I gess enterprise package validation doesn't handle non ASCII characters. After changing the character the problem is solved.
I just installed the latest version of flutter and xcode and I'm getting an error when I try running the flutter app on an actual iPhone. Works on ios simulator. The weird thing is that it works when I run it from xcode, but when I run it from vsCode, I get the following error:
It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
open ios/Runner.xcworkspace
What I tried doing:
Change the bundle identifier to myEmailAddress#gmail.com.appTitle
Clean and build the ios app
clean then ran flutter build bundle
What am I doing wrong and how can I get vsCode to run the app on an iPhone?
Here's the full error:
Launching lib/main.dart on Jessica’s iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: ITYTO5RCWD
Xcode build done. 25.4s
Failed to build iOS app
Error output from Xcode build:
↳
2020-04-19 13:53:51.828 xcodebuild[2046:21215] [MT] iPhoneConnect: 📱<DVTiOSDevice ...> == Underlying device preparation errors ==
2020-04-19 13:53:51.828 xcodebuild[2046:21215] [MT] iPhoneConnect: Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode.
Domain: com.apple.platform.iphoneos
Code: 5
Failure Reason: allowsSecureServices: 1. isConnected: 0. Platform: <"...platform info...">. DTDKDeviceIdentifierIsIDID: 0
User Info: {
DVTDeviceDescription = "...device info..."
}
--
2020-04-19 13:53:51.829 xcodebuild[2046:21215] [MT] iPhoneConnect: 📱<"...platform info..."> == END: Underlying device preparation errors ==
** BUILD FAILED **
Xcode's output:
↳
/Users/Jessica/Development/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1/darwin/Classes/AudioplayersPlugin.m:88:37: warning: incompatible pointer types sending 'FlutterEngine *' to parameter of type 'NSObject<FlutterBinaryMessenger> * _Nonnull' [-Wincompatible-pointer-types]
binaryMessenger:_headlessEngine];
^~~~~~~~~~~~~~~
In module 'Flutter' imported from /Users/Jessica/Development/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.15.1/darwin/Classes/AudioplayersPlugin.h:2:
/Users/Jessica/Desktop/flutter_game2/ios/Flutter/Flutter.framework/Headers/FlutterChannels.h:178:74: note: passing argument to parameter 'messenger' here
binaryMessenger:(NSObject<FlutterBinaryMessenger>*)messenger;
^
1 warning generated.
/Users/Jessica/Desktop/flutter_game2/build/ios/Debug-iphoneos/Runner.app: resource fork, Finder information, or similar detritus not allowed
Command CodeSign failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
open ios/Runner.xcworkspace
Error launching application on Jessica’s iPhone.
Exited (sigterm)
Alright, so i solved this problem by pressing on the search icon on the top left of vscode, then searching for com.example
then i saw three search results that were in the ios folder click on it and replace all three com.example with the identifier you created in xcode.
you can change your signing identifier in Xcode
To do that, just open your workspace with app in Xcode, then go to signing and capabilities to change default com.example to anything else...
Better to use as follows to give app company / organization name
flutter create --org com.yourdomain your_app_name
Swift, Kotlin, and androidx dependencies are the default options
After just open the created project in Android Studio or in VSCode
Parameter
--org com.yourcompany
will form applicationId for Android:
com.yourcompany.yourappname
and iOS PRODUCT_BUNDLE_IDENTIFIER:
com.yourcompany.yourAppName
To explore all possible parameters type
flutter create --help
I'm trying to compile an IPA for distribution in Phonegap Build, but I'm receiving the following error:
Running command: xcodebuild -exportArchive -archivePath Releva.xcarchive -exportOptionsPlist /private/project/exportOptions.plist -exportPath /private/project/build/device
2020-02-19 14:42:12.285 xcodebuild[46455:98411165] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/37/x2444x712rnbshh_b1tlfwsm0000gp/T/************.xcdistributionlogs'.
2020-02-19 14:42:12.665 xcodebuild[46455:98411167] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks_Fall2018/IDEFrameworks-14460.46/IDEFoundation/Provisioning/IDEProfileQualification.m:509
Details: Xcode could not determine type of profile "/Library/MobileDevice/Provisioning Profiles/production-ios-1582151957--90970.mobileprovision" (could be {(
)})
Object: <IDEProfileQualification: 0x7fd1f6e0b350>
Method: -_profileTypeQualifier
Thread: <NSThread: 0x7fd1f6806dc0>{number = 4, name = (null)}
Please file a bug at https://bugreport.apple.com with this warning message and any useful information you can provide.
error: exportArchive: No signing certificate "iOS Distribution" found
Error Domain=IDECodesignResolverErrorDomain Code=1 "No signing certificate "iOS Distribution" found" UserInfo={IDEProvisioningError_UserInfoKey_IDEProvisioningErrorPlatform=com.apple.platform.iphoneos, IDEProvisioningError_UserInfoKey_IDEProvisioningErrorAction=5, NSLocalizedRecoverySuggestion=No "iOS Distribution" signing certificate matching team ID "************" with a private key was found., IDEProvisioningError_UserInfoKey_IDEProvisioningErrorSpecifier=iOS Distribution, IDEProvisioningError_UserInfoKey_IDEProvisioningErrorTeam=<IDEProvisioningBasicTeam: 0x7fd1f6e0a330; teamID='***********', teamName='(null)'>, NSLocalizedDescription=No signing certificate "iOS Distribution" found}
I tried and retried everything with the credentials and provisioning profiles, but continue to get the same error. Creating them again and again, selecting the certificate with the private key together to export the p12, etc ..
Only thing I noticed is that when I select the certifcate to create the Provisioning Profile, it says "For use in Xcode 11 or later":
And in the error log it says "Xcode could not determine type of profile" and appears "Applications/Xcode101.app" in a lot of lines what makes me think it's trying to compile it with Xcode 10.1
What can I do for Pronegap Build to use Xcode 11 when I submit it?
Is anyone else having this issue? Any workaround to this?
Well, the problem was at the moment of creating the certificate in developers.apple.com. (Not the Provisiotioning Profile)
It seems Apple changed that last year, and now you have 2 options. One is Apple Distribution for Xcode 11+ and iOS (App Store and Ad Hoc) for any version.
Hope it helps anyone else having this issue.
I am trying to export IPA from Jenkins. I have installed Jenkins in Unix. To build xcode project on this server, I have created a Slave node to build project.
Archive created successfully.
`export
PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/usr/bin/touch -c /Users/tushar/Library/Developer/Xcode/DerivedData/*-ddkzgiiehnftznefgacmhnffkdiv/Build/Intermediates.noindex/ArchiveIntermediates/OET/BuildProductsPath/Release-iphoneos/***.app.dSYM
** ARCHIVE SUCCEEDED **
Finished: SUCCESS `
I am getting following error ---
2018-02-26 16:32:31.244 xcodebuild[15086:3083978] [MT]
IDEDistribution: Step failed: : Error
Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating
signing assets failed." UserInfo={NSLocalizedDescription=Locating
signing assets failed.,
IDEDistributionSigningAssetStepUnderlyingErrors=(
"Error Domain=IDEProvisioningErrorDomain Code=9 \"\"***.app\" requires a provisioning profile.\"
UserInfo={NSLocalizedDescription=\"****.app\" requires a provisioning
profile., NSLocalizedRecoverySuggestion=Add a profile to the
\"provisioningProfiles\" dictionary in your Export Options property
list.}" )} error: exportArchive: "****.app" requires a provisioning
profile.
Can some one please help me?
You need to download the Provisioning File on your node machine and drag and drop it to Xcode installed on the node.
Furthermore, if you are using exportPlist file to sign the build then you have to mention the Provisioning Profile name in exportPlist file as well.
I am trying to upload an archive for test flight to itunesconnect. However, when I go to validate the archive I get an error message saying that code signing failed and that a .ipa file is missing. I have scoured the internet for quite some time and can't find a viable solution to fixing this problem.
Xcode: Version 8.2.1 (8C1002)
Deployment Target: iOS 8.0+
IDEDistribution.standard.log:
2017-03-15 20:25:03 +0000 [MT] Validation failed for archive ******* with issues: IDEDistributionIssue: severity(error), error(Error Domain=ITunesSoftwareServiceErrorDomain Code=-21013 \"The archive is invalid. /var/folders/yc/y1chf6z95zj63mnsw7m6qwm80000gn/T/XcodeDistPipeline.6rX/Packages/*******.ipa does not exist.\" UserInfo={NSLocalizedDescription=The archive is invalid. /var/folders/yc/y1chf6z95zj63mnsw7m6qwm80000gn/T/XcodeDistPipeline.6rX/Packages/*******.ipa does not exist., NSLocalizedFailureReason=Unable to validate your application.})
IDEDistribution.critical.log
2017-03-15 20:19:52 +0000 [MT] Presenting: Error Domain=IDEFoundationErrorDomain Code=1 "Codesign failed" UserInfo={NSLocalizedDescription=Codesign failed}
I got it working. We are using Carthage libraries in the project, and I guess the code signing of the libraries we were using didn't like our project for some reason. I manually placed the source code for the libraries into the project and it ran fine.