codenameone / CodenameOne

Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.
https://www.codenameone.com/
Other
1.71k stars 408 forks source link

AppStore Distribution builds gets the CodenameOne embedded.mobileprovision instead of mine #1166

Closed codenameone closed 9 years ago

codenameone commented 9 years ago

Original issue 1167 created by codenameone on 2014-08-16T23:33:43.000Z:

I've created certificate/provisioning profiles for IOS Development and Distribution, and configured the CodenameOne plugin in my IDE (Netbeans) accordingly.

When I use the files for Development, the install packages that are produced on the buildserver include the correct mobileprovision file in Payload/[Appname].app/embedded.mobileprovision, and the install packages can be installed on my test devices without problems.

But when I do the same for Distribution builds, the embedded.mobileprovision file contents in the install packages are wrong. They do not contain the mobileprovision I specified, but instead a mobileprovision from Codename One (see the attached file). I noticed this since I repeatedly failed to upload my binary to iTunes Connect due to "Invalid Provisioning Profile".

I've tried to set invalid certificate passwords and then "Send IOS Appstore build" in order to see if the mobileprovision and certificate files that I provide are even used during the build, and the build server correctly responds with an error indicating the invalid password. I've also tried shorter filenames/directory paths for the dist files. I've also have regenerated all cert/provisioning files a several times following all the available guides, but nothing seems to help.

It would be nice if the build failed instead silently falled back on using a generic Codename One mobileprovision file, if something really is wrong with the cert/provisioning files.

codenameone commented 9 years ago

Comment #1 originally posted by codenameone on 2014-08-19T00:39:31.000Z:

The issue described using the issue template:

What steps will reproduce the problem?

  1. Configure the IOS/Distribution part of the Codename One IDE plugin GUI with:

* Please note that the files here should not belong to CodenameOne, or else it is not possible to reproduce the error. * -Certificate (iOS Distribution) -Certificate Password -Provisioning Profile (Distribution)

  1. Trigger "Send IOS AppStore build" from the CodenameOne IDE plugin context menu.
  2. Download and check the contents of the install package from the CodenameOne Buildserver (.ipa file).

What is the expected output?

-The iOS application archive (.ipa) should have been created using the provided iOS Distribution Certificate and Distribution Provisioning Profile (reproduce step # 1 above).

OR

-A build error from the CodenameOne server, providing an error log file which indicates the cause of the failure.

What do you see instead?

-A iOS application archive that cannot be uploaded to iTunes Connect due to "Mobile Provisioning/Code Signing Error".

-->Unpack the iOS application archive locally and inspect the file "embedded.mobileprovision": It is invalid since it contains the generic wildcard CodenameOne Provision Profile instead of the one that was provided in reproduce step # 1 above. This also indicates that the code has not been signed with the correct Certificate when produced, causing rejection from iTunes Connect during binary upload.

What version of the product are you using? On what operating system?

For coding/building (Windows PC): -Latest CodenameOnePlugin (up-to-date checked) -System: Windows 7 version 6.1 -NetBeans IDE 8.0 (Build 201403101706) -IOS AppStore builds (Distribution)

For uploading .ipa to iTunes Connect (MacBook Pro): -Latest version of OSX Mavericks. -Latest version of Application Loader.

Please provide any additional information below.

-Please note the the error ONLY applies to IOS Distribution builds: Development builds are created correctly using the provided certificate/mobileprovision files, and can be installed/tested on Devices that has been registered in the Provisioning Profile for Development. This was also verified by inspecting the contents of the embedded.mobileprovision file in the archive.

-This is a BLOCKER, since we cannot distribute our apps to the AppStore until this problem is solved, or we at can see the cause of why the CodenameOne Buildserver use the CodenameOne Certificate and Provisioning Profile instead of the one we provide.

codenameone commented 9 years ago

Comment #2 originally posted by codenameone on 2014-08-19T15:20:52.000Z:

We made a fix for this, it seems to be related to some of our newer Mavericks servers which is why only some of the builds were affected.

codenameone commented 9 years ago

Comment #3 originally posted by codenameone on 2014-08-19T21:23:52.000Z:

Thank you for the fast fix. Works like a charm now.