“ExportOptions.plist” couldn’t be opened because there is no such file.”
Asked Answered
C

3

12

We are trying to run the project using terminal instead of Xcode->Product->Archieve. We have completed the clean, build and archive successfully. When export .ipa I am getting this following error “The file “ExportOptions.plist” couldn’t be opened because there is no such file.”. When I surf in stack overflow I can’t get any idea about plist file.

For example: we have an app with the original name MyApp


xcodebuild clean -workspace MyApp.xcworkspace -scheme Development

xcodebuild build -workspace MyApp.xcworkspace -scheme Development

xcodebuild archive -workspace MyApp.xcworkspace -scheme Development -archivePath ~/Users/Desktop/SampleApp/MyApp.xcarchive

The above code works fine. When using the below line I am getting “ExportOptions.plist” error.





xcodebuild -exportArchive -archivePath ~/Users/Desktop/SampleApp/MyApp.xcarchive -exportPath ~/Users/Desktop/SampleApp/MyApp -exportOptionsPlist ~/Users/Desktop/SampleApp/ExportOptions.plist

My question is : 



  1. Do we need to create plist manually? I have exported the test flight build for the previous one. I have an “ExportOptions.plist” file with .ipa file. Do we need to move the ExportOptions.plist into the output folder?

  2. Do we need to create an output folder to export all .ipa and .plist? I have created “NewFolder” and tried it’s not working.
  3. Correct me if I am using the wrong path for archive path, export path and exportOptionsPlist
Cum answered 16/10, 2019 at 8:55 Comment(5)
Found any solution?Castora
Yes, @SatishMavani . I will update you shortly.Cum
great @Harikarthik pls add it as an answer so that others can get the help of itCastora
at what path you had put the export plist file?Castora
would you be kind as to paste your ExportOptions.plist contents in the question? I'm struggling with a related issue, and would want to know what Xcode exports in this fileReneareneau
G
8

ExportOptions.plist is required in Xcode 9. It lets you to specify some options when you create an ipa file. You can select the options in a friendly UI when you use Xcode to archive your app.

Follow this blog to generate one.

https://medium.com/@marksiu/how-to-build-ios-project-with-command-82f20fda5ec5

Gondolier answered 17/6, 2020 at 13:15 Comment(0)
H
1

You need to create the plist file yourself. It tells xcodebuild how you want to export the archive.

Run xcodebuild -help command and look for “Available keys for -exportOptionsPlist” section. It describes what keys to use in the plist dictionary, what values are expected and what are default values if you omit the key. Since the keys are optional, the plist can be empty.

Hewart answered 22/10, 2020 at 15:5 Comment(1)
Alas, both the -help is quite cryptic, AND specifying values directly copied from the man page, yield errors I can't overcome. :(Reneareneau
C
-3

The Plist path should be the archived sample app folder:

#CLEAN
    xcodebuild clean -workspace Sample.xcworkspace -scheme release

    #BUILD
    xcodebuild build -workspace Sample.xcworkspace -scheme release

    #ARCHIVE
    xcodebuild archive -workspace Sample.xcworkspace -scheme release -archivePath ./build/archive/Sample.xcarchive

    #IPA
    xcodebuild -exportArchive -archivePath ./build/archive/Sample.xcarchive -exportPath ./build/adhoc -exportOptionsPlist ./build/archive/Sample.xcarchive/info.plist
Cum answered 16/12, 2019 at 10:6 Comment(9)
Sample.xcarchive would not be a directory how you place plist file in it?Castora
When archiving the project. Plist will be generatedCum
Are you facing issue when generating IPA?Cum
yes facing issue while generating ipa only, no issue with archivingCastora
When generating the Archive file you can able to see the plist file in it. You have to set the path in -exportOptionsPlistCum
Its not working like that too, exportoption.plist is a completely separate plist than info.plist how can it be used as export option.plist?Castora
Let us continue this discussion in chat.Castora
This is simply wrong in every aspect. the Info.plist inside the archive package describes what was archived, and does NOT contain ANY of the required entries for -exportOptionsPlist (see xcodebuild -help | grep exportOptionsPlist)Reneareneau
exportOptionsPlist and info.plist are totally different.Chichi

© 2022 - 2024 — McMap. All rights reserved.