Can't seem to build for iOS

94 views
Skip to first unread message

jam...@fastlaneinnovations.com

unread,
Jan 16, 2017, 10:25:37 PM1/16/17
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: Eclipse
Mac OSX 10.12.2

I've got an app that I've been building just fine for Android and iOS for a while, both development and distribution builds. I recently had to generate new certificates, and now I can't build anymore. My developer account is current, and I have no problems generating certificates and provisioning profiles on iTunes Connect. I just cannot get a build to upload to the CN1 servers and get the message "A certificate from Apple with the appropriate password is required for building an iOS native app!" when it says the build failed.

I have tried
1) Manually generating the certificates and provisioning profiles, and exporting the p12 files for the certificates, and then selecting all of these in the Codename One settings menu along with the passwords and app ID
2) Using the signing wizard but not overwriting the certificates
3) Using the signing wizard to generate/overwrite new certificates
4) #2 but on a Windows 7 PC

For the app ID, I have tried it with and without adding the alphanumeric bundle id that Apple provides. The codenameone_settings.properties file seems to get the right app ID.

Is there something I'm missing? What else can I try?

Shai Almog

unread,
Jan 17, 2017, 12:03:14 AM1/17/17
to CodenameOne Discussions, jam...@fastlaneinnovations.com
#3 should always work and should always generate a valid state.
Also is there something special about your apple account (enterprise etc.?).

jam...@fastlaneinnovations.com

unread,
Jan 17, 2017, 12:17:27 AM1/17/17
to CodenameOne Discussions, jam...@fastlaneinnovations.com
No, nothing special. It's just a normal business account. I also tried building a fresh project and copying my src directory over from the old project. For the app ID in the signing wizard do I need to use (number from Apple).com.company.package, or just skip the number from Apple? I'm very puzzled, I've never had trouble with this before.

jam...@fastlaneinnovations.com

unread,
Jan 17, 2017, 12:21:43 AM1/17/17
to CodenameOne Discussions, jam...@fastlaneinnovations.com
On Monday, January 16, 2017 at 10:17:27 PM UTC-7, jam...@fastlaneinnovations.com wrote:
> No, nothing special. It's just a normal business account. I also tried building a fresh project and copying my src directory over from the old project. For the app ID in the signing wizard do I need to use (number from Apple).com.company.package, or just skip the number from Apple? I'm very puzzled, I've never had trouble with this before.

Are there any issues with special characters in the password? I know on Android some need to be escaped. What password is used with the wizard? CN1, iTunes Connect?

jam...@fastlaneinnovations.com

unread,
Jan 17, 2017, 8:49:17 PM1/17/17
to CodenameOne Discussions, jam...@fastlaneinnovations.com
I've also tried just building one of the demos, and even tried using Netbeans and a demo, and the error is always the same. The build fails very quick and says that it failed in the IDE console, it never makes it to the build server I don't think. I'm at a total loss as to next steps. I deleted all of the certificates and provisioning profiles in my Apple Developer account. Nothing changes, it always fails the same. I can try to contact Apple, but I don't know how to explain it to them since it's 3rd party.

I had another sample XCode project from someone, I was able to build it and install it on my phone, but it seems like XCode handles all of the signing tasks automatically.

Shai Almog

unread,
Jan 17, 2017, 11:42:23 PM1/17/17
to CodenameOne Discussions, jam...@fastlaneinnovations.com
If it fails in the IDE and doesn't reach the server then what does it print to the console?
Did you generate the certificates to a directory with spaces or special characters?
Try moving them to your project directory and see if that helps.

jam...@fastlaneinnovations.com

unread,
Jan 18, 2017, 12:02:22 AM1/18/17
to CodenameOne Discussions, jam...@fastlaneinnovations.com
Here is what's in the console:

Buildfile: /Users/James/Documents/Eclipse Workspace/RallyPacControl/build.xml

clean-override:

copy-ios-override:
     [copy] Copying 6 files to /Users/James/Documents/Eclipse Workspace/RallyPacControl/bin

copy-libs:

jar:
     [echo] Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
     [echo]             code size and wider device support
     [copy] Copying 48 files to /Users/James/Documents/Eclipse Workspace/RallyPacControl/build/tmp
     [copy] Copying 7 files to /Users/James/Documents/Eclipse Workspace/RallyPacControl/build/tmp
    [javac] /Users/James/Documents/Eclipse Workspace/RallyPacControl/build.xml:147: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 26 source files to /Users/James/Documents/Eclipse Workspace/RallyPacControl/build/tmp
    [javac] Note: /Users/James/Documents/Eclipse Workspace/RallyPacControl/src/com/fastlaneinnovations/rpcontrol/ChartShareButton.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
      [jar] Building jar: /Users/James/Documents/Eclipse Workspace/RallyPacControl/dist/RallyPacControl.jar
    [javac] /Users/James/Documents/Eclipse Workspace/RallyPacControl/build.xml:171: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds

build-for-ios-device:
[codeNameOne] Prompting for password
[codeNameOne] Building for username: (my correct username was here)

BUILD FAILED
/Users/James/Documents/Eclipse Workspace/RallyPacControl/build.xml:344: A certificate from Apple with the appropriate password is required for building an iOS native app!
You can generate this certificate using our certificate wizard by right clicking on the project and followingthe steps. Notice you will need an Apple IO developer account.

Total time: 6 seconds

I deleted any certificates I generated and used the settings wizard generate new ones. I see them and the provisioning profiles in the iosCerts directory of the project. They have names like appstore_certificate.p12 and development_certificate.p12. Similar for the provisioning profiles.

Shai Almog

unread,
Jan 18, 2017, 11:44:24 PM1/18/17
to CodenameOne Discussions, jam...@fastlaneinnovations.com
It doesn't see the certificates. Again:

jam...@fastlaneinnovations.com

unread,
Jan 18, 2017, 11:48:54 PM1/18/17
to CodenameOne Discussions, jam...@fastlaneinnovations.com
I did all that, no special characters, files in the correct directory. I solved the mystery. It was defaulting to enabling push. Even if I go to Codename One Settings and uncheck it and save, it wouldn't actually turn off push. I went in the properties file and set it to false, and now I can build again.
Message has been deleted

Shai Almog

unread,
Jan 21, 2017, 11:39:15 PM1/21/17
to codenameone...@googlegroups.com
No you don't need to do any of those. If it doesn't work it means that one of the files isn't in a proper path. Check that you don't get the same error of the missing certificate and change that provisioning/certificate files as well as everything else is identical to the Mac project.

On Fri, Jan 20, 2017 at 5:22 AM, <jam...@fastlaneinnovations.com> wrote:
Looks like my excitement was premature. It only works on Windows PC I have. The same steps don't work on Mac. I tried deleting all of my certs and profiles at Apple and started fresh using the CN1 wizard. It created the certs and profiles and I double-checked that push wasn't included, but it fails the same way as I posted before.

Do I need to generate some CSR or something to do this on a Mac? I'm not sure what to try next.

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/6a6357a0-2737-4da4-9627-a3f8ceacc909%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

thomas....@gmail.com

unread,
Feb 5, 2018, 2:21:24 PM2/5/18
to CodenameOne Discussions
I know this is old but I have experienced the same issues.  Please remove any spaces from the path names.  I keep my projects under Google Drive for portability but the space in the folder name doesn't work.

Thomas

Shai Almog

unread,
Feb 6, 2018, 12:10:02 AM2/6/18
to CodenameOne Discussions
Yes. This seems to be a bug in the Codename One Settings app. There is an issue related to it in the issue tracker. The workaround is to edit the paths to the files manually in codenameone_settings.properties.
Reply all
Reply to author
Forward
0 new messages