iOS Build Error

I still haven’t managed to solve the problem. So I wanted to try uploading with the Application Loader. But it says there is no provisioning file inside it: 

ERROR ITMS-90174: "Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision."

Anyone has idea how can I make sure the provisioning file is inside the IPA file? By the way, I created the IPA file by creating a folder and putting Application file and dSYM file generated by Corona Build inside the folder, compressing it and changing the extension to .ipa

I deleted Xcode and re-installed it, delete Corona and re-installed it, it’s still the same error when I try to select “Send to App Store”  :frowning:

Open up your terminal and run this command:

defaults write com.coronalabs.Corona\_Simulator debugBuildProcess -int 5

This will cause Corona to emit build log in much greater detail. I don’t know if it will help or not, but it may give more information to help solve this.

Use a service like pastebin.com to copy the entire build log and paste it in there then post the link here.

Rob

Rob, as soon as I click on the Build button, I get the same error when I try to build and upload to App Store. 

Now I am trying to build with checking “Show in Finder” option, and then will try to convert it to ipa file and upload using Application Uploader. I will provide the build process log when it’s finished. 

I tried Application Uploader but it gave me error again. 

ERROR ITMS-90174: "Missing Provisioning Profile - Apps must contain a provisioning profile in a file named embedded.mobileprovision."

The logs are here: https://pastebin.com/0nLUWyLj

I also tried putting the provisioning file inside ipa file and changing the name to embedded.mobileprovision but it did not help either. 

You should not have to do any hand signing. You should not be putting provisiioning profiles in your own .ipa files. You have something else going on that’s making your provisioning profiles not be recognized.

The log file you posted doesn’t seem to have any errors in it. There were a lot of warnings and this might help filter those out. Add this to the plist section of your build.settings:

settings = { iphone = { plist = { MinimumOSVersion = "9.0" } } }

And regenerate the build log when trying to send to the app store. I need to see it with the errors.

Given that everyone else can successfully do this, it has to be an issue with your certificate/profile setup causing it.

Something else you can do is try and build one of our sample apps and try to send it to the store. This will rule out things in your project that may be causing the problem. I would suggest maybe building HelloWorld. Also look to make sure you don’t have any provisioning profiles in the folder with your main.lua or any children folders.

Rob

Rob, thanks for your help. I have been struggling with it for almost two weeks. It happened after I had to format my Mac. Before formatting it, I remember I had to open another account on my Mac and sign in with the credentials I sign in to Apple Connect account. Do you think it could be the reason? 

When I select “Send to App Store”, it gives the below error message on Corona Simulator Console:

ERROR: Cannot Send To App Store: Only apps built with distribution profiles can be sent to the App Store. Choose a provisioning profile signed with an "iPhone Distribution" certificate and note that the provisioning profile used should not specify any devices (i.e. is not "ad hoc").

@bamazy, I really want to help you. But unless you do the tasks I ask, I don’t know how much more help I can be?

  1. have you put the MinOSVersiojn in your build.settings yet? This will hopefully mask the pages of Warnings coming from the Appdoeal plugins. If you have, where is the link to the pastebin of the “entire” console log that I asked for? You have to build for the store so I can see the errors and the messages that led up to the build failure.

  2. Have you tried building the HelloWorld sample app using your provisioning profile and tried to upload it with Application Loader from Corona’s build options? This is important to rule out problem in your project or with your build.settings or plugins that you’re using. Please let me know the results.

With out these two I can’t provide you any further help.

As to your questions two posts up. Xcode should probably be logged in with your Apple Developer account. Logins to the web portal for App Store Connect and the Certificates, IDs and Profiles site probably doesn’t matter. That’s all setup and once you download a valid provisioning profile for the store, the websites are not used again.

You do need to be logged in to your developer account inside Application Loader, but the error you’re showing seems to be happening before you get to Application Loader.

Keychain Access keeps track of your public/private keys (I.e. certificates). You may need to be logged in there to get your certificates installed correctly.

Generally Corona will check your provisioning profiles to make sure they are valid (built against a valid certificate, if you choose upload to the App Store it’s got to be a valid distribution profile, etc.). Its the last condition that is failing.

In one of your screenshots above, you posted the contents of your provisioning profile folder, but it looks weird. First it’s case sensitive so it should be "Provisioning Profile with capital letters. Please open a terminal and paste in this command:

ls -l ~/Library/MobileDevice/Provisioning\ Profiles/\*

exactly like that and then copy/paste the results back. 

Please do **all** of this and share the results. Multiple posts for each step would likely be helpful.

Rob

@Rob, I really appreciate your help.  :rolleyes:

I tried the second option to build a TestApp. First, I went to the Developer Central and added an identifier, then I added to provisioning profiles for Development and Distribution. Then I downloaded and installed the profiles. Then from App Store Connect, I added a new app, chose the exact identifier I have just created as bundle id. And then I restarted the Corona, restarted it, created a new project, clicked on CTRL+B to get the build form menu. Then chose the distribution profile for the newly created TestApp, and chose “Send to App Store”, it asked me the password for the keychain. I typed my root password which I use to sign in to Mac. I got the same error message. Which means I can not build with the option “Send to App Store” selected. 

I selected “Show in Finder” option and clicked on the Build button. After 25 seconds the build is ready. I opened Xcode and then I opened Application Loader. On Application Loader, when I try to choose the newly built file, I can not select it as it is passive. I think it’s because it looks for .ipa files. So, I create a new folder named TestApp, put the newly built application inside it and compress it by right clicking on the folder. Then I have zip file and I change the extension to ipa so that I have TestApp.ipa file. Then again from the Application Loader I chose the TestApp.ipa and this time it shows me the name I gave to the app on App Store Connect page. After some time sending assets for verification, I get the same error message that apps must contain a provisioning profile in a file named embedded.mobileprovision.

This is the log from the built process: https://pastebin.com/RwVWU8HD

I think something related to the keychain or keychain password might be the problem. 

Rob, I deleted mobile provisions folder, deleted everything related to Apple Developer Certificate, Distribution, etc. from Keychain Access, restarted the Mac, tried to select the appropriate profile from the build screen but there was none there. I installed the previously downloaded profiles, but again none was available to select. Then I went to the Developer Portal and edited the sample app keys and noticed that for the distribution, I needed either select the newly created certificate or the previous one. I chose the new certificate, saved, downloaded and installed the new profiles, then restarted Corona and this time I was able to select the app profile from the list. And I was able to select Send to App Store and build the sample app!!!  B)

It’s almost two weeks that I have been trying to solve this problem. During this time you spent your precious time to help me to solve the problem! I deeply appreciate your help and your time! 

So you’re good to go?

Rob

Yes, Rob. So far I have uploaded one app to App Store and tested on TestFlight. Thanks a lot for the help. 

Are you trying to build for iOS Simulator? Looks like the Facebook Audience network library does not have the i386 bits. Build and deploy to device and it should work or remove the FAN plugin from the list of plugin for the iOS Simulator.

@agramonte, the logs are from the build for iOS Simulator. Before that I tried to build and deploy to a device, build and upload to App Store but none worked. 

I suspect the other error would be different. Can you post those? The error you posted is specific to FAN plugin not having i386 portion for iOS Simulator.

@agramonte, I commented out the FAN plugin and was able to build. But this time I got error on startup on both device and simulator. I think the problem was related to the problem on this link: https://forums.coronalabs.com/topic/76047-ios-appodeal-fails-to-build/

I added the plugin.notification plugin and built it. Now it works. I will enable the FAN plugin and build again to see if it works with that one. I’ll do that tomorrow as it’s late and I don’t want to wait for half an hour more. By the way, does your mac also take half an hour for a build to finish?

Yes if it finishes. Problems downloading plugins usually. It might be my fiber connection to the internet. 0_o

I was successful to build and copy to device. It’s ok now but this time I want to build and copy to Simulator in order to take screenshots. I tried two times without having success. I also tried uploading to App Store, it keeps giving me this message: “Only apps built with distribution profiles can be sent to the App Store. Choose a provisioning profile signed with an “iPhone Distribution” certificate and note that the provisioning profile used should not specify any devices (i.e. is not “ad hoc”).” However, I have already downloaded the distribution profile. I deleted all the provisioning files and downloaded and installed again. I still get the same error. 

Anyone knows how to solve the problem?  :wacko: