LC 5.5.5 - xCode 5.0.2 - code signing failed

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: LC 5.5.5 - xCode 5.0.2 - code signing failed

Post by LCNeil » Fri Dec 06, 2013 12:43 pm

Hi LC4iOS,


Thats great to see you can now build for iOS!! What was the process you went through to eventually resolve the issue?

Knowing this will help other LiveCode users with the same issue.

As a test, I too went through the process of revoking my certificate on the apple developer portal and then re-creating them from scratch. I then used Xcode to refresh everything in my keychian and was again able to successfully build iOS apps from LiveCode


Kind Regards

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding


LC4iOS
Posts: 88
Joined: Tue Dec 03, 2013 8:15 pm

Re: LC 5.5.5 - xCode 5.0.2 - code signing failed

Post by LC4iOS » Fri Dec 06, 2013 12:53 pm

At the moment I believe it was selecting Universal that was the issue.

More testing needed.
Thanks to RunRev.
Thanks to LiveCode forum members.

LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member

LC4iOS
Posts: 88
Joined: Tue Dec 03, 2013 8:15 pm

Re: LC 5.5.5 - xCode 5.0.2 - code signing failed

Post by LC4iOS » Fri Dec 06, 2013 9:40 pm

Install xCode versions with their SDKs

1. Download and install xCode versions in this order:
xCode 4.4 install includes 5.1 SDK
xCode 4.6 install includes 6.1 SDK
xCode 5.0.2 install includes iOS 7.0.3 SDK - NOTE: iOS 7.0.3 SDK is NOT compatible with LiveCode 5.5.5 but we are after the tools in xCode 5.0.2 - you can't install 5.0.2 without iOS 7.0.3 SDK - we won't be referencing iOS 7.0.3 SDK in LiveCode 5.5.5 so it's not an issue


Create an xCode Account with Development and Distribution Certificates

1. Execute xCode 5.0.2
2. Goto menu xCode | Preferences | Accounts
3. Add an Apple ID by clicking the + Add button on the bottom left corner and select Add Apple ID...
4. Follow the instruction of the dialog by entering an Apple ID associated with an Apple Developer Program and its Password.
5 Click Add.
6. Click View Details.
7. Allow xCode to automatically generate your Certificates.
Click the Refresh button on the bottom left corner.
...
... 7a. Here xCode will install these two Certificates (if not already present):
...... a) the Apple Worldwide Developer Relations Certification Authority Certificate
...... b) the Developer ID Certification Authority Certificate
...
... 7b. xCode will then ask you if you want to create another two Certificates (if not already present):
...... c) an iOS Development Signing Certificate
...... d) an iOS Distribution Signing Certificate
...... (These automatically generated Certificates will be generated based upon
...... your current computers ID and the name you used for creating your Apple ID)
...
8. Click the button to accept both.
9. Wait for the spinning refresh button to stop spinning.
10. Then verify the new Signing Identities are listed.
And that both are Valid.

11. Execute Keychain Access from your Application folder
12. Click the Certificate Category
13. Verify that Certificates a, b, c, d are present
14. Also take this opportunity to clean up any expired or invalid Certificates
15. Click the Keys Category in Keychain Access.
16. Verify there are private and public key pairs for both iOS Developer and iOS Distribution.
17. Verify there are NO exact duplicate certificates.


Create An App ID (Application ID - NOT Apple ID)

You Will need To create an App id for your app. This is a unique identifier required by Apple to
identify an app. you will use the Apple developer portal site to create an App id. A different App id is required for each app that you create.
1. on the Apple ios developer site, go to “certificates, identifiers & Profiles”
2. click identifiers, and make sure that App ids is selected.
you need to create a different App id for each app that you create. (please note: you can use a wildcard app id that can be used for multiple test apps)
3. click the Plus icon in the upper right corner of the window to create an App id.
4. Type a description, such as the name of your app.
5. for App services, leave game center and in-App Purchase selected (Apple enables these by default),
and do not select data Protection, icloud, or Passbook. Also, do not select Push notifications
6. for App id Prefix (previously called “Bundle seed id”), leave the option set at generate new (if this is the first App id you’ve generated) or use Team id (for additional App ids). in other words, don’t do anything here unless you really know what you’re doing
7. specify a Bundle id. The Bundle id (or Bundle identifier) is usually specified in a form called reverse domain name or com.domainname.applicationname. in other words, if you work for PluralistDe-sign, your website is www . pluralistdesign . com, and your application is called “Pluralist lookbook,” your App id would be com.pluralistdesign.pluralistlookbook. i f you are just testing how to create an App id, use something like com.acme.test so that you don’t “waste” an App id.
8. click the continue button.
9. if the settings look correct, click the submit button, and then click done.
The App id will appear in the list. This same App id will appear in various screens in later steps in this
process. for example, when you build the mobileprovision files for your app, you’ll specify this App id


Register your test devices with Apple

The easiest method to do this is to open the Organizer within Xcode and when your iOS device is connected select the “Use For Development” button as shown in the following image-


Create a Provisioning Profile

The provisioning profile files determine which iPads can install and use your app.
The development mobileprovision file includes a list of iPad ids called Unique Device IDs (UDIDs).

1. in the Apple ios developer site click Provisioning Profiles on the left side of the window.
2. click the development tab.
3. click the Plus icon in the upper right corner of the window.
4. select ios App development, and click continue
5. specify the App id, and click continue
6. select your ios development certificate.
7. specify the devices you want to provision.
The development app you create for testing will work only on devices included in the development provisioning profile
8. specify a name. include “development” in the name to distinguish it from the distribution file,
but don’t include any special characters (such as asterisks) in the name. you can rename these files after
generating them. Then click the generate button.
9. Click download
10. Click Done - else the portal does't update its provisioning list
11. and then download the development provisioning profile file to a known location.
12. You should now connect your iOS Device to Xcode via a USB to Lightening cable.
13. Manually install this provisioning profile by double clicking on it
or by dragging the provisioning profile onto your device in the xCode | Organizer window.


Verify the Provisioning Profiles will be available to LiveCode 5.5.5

1. xCode | Preferences | Accounts | View Details ...
2. If the Provisioning Profiles you just created are not listed then
...... 2a. click the Refresh button on the bottom left.
...... 2b. Wait for the spinning refresh button to stop spinning.
3. You should now see the name of the provisioning profile you just installed.
4. You may find that the Developers Portal has automatically created an iOS Team Provisioning Profile for you as well.
5. If the Provisioning Profile does not appear you may have left the Developers Portal open on the Download screen.
You will need to press Done. And try these 5 steps again.


Set LiveCode iOS SDKs and LiveCode 5.5.5 Stand Alone Settings correctly

1. Launch xCode
2. Goto menu item xCode | Preferences | Accounts
3. View your current Provisioning Profiles
4. If you feel you are missing a Provisioning Profile click the Refresh Button.

5. Launch LiveCode 5.5.5
6. Goto menu item LiveCode | Preferences | Mobile Support
7. Check the iOS SDKs list
8. ARM 7 requires iOS 6.1 SDK installed with xCode 4.6 or Later
ARM 6 requires iOS 5.1 SDK installed with Xcode 4.4
NOTE: I have NOT been able to build an iOS app with LiveCode 5.5.5 using Universal.
That is why I have NOT listed its requirements.

9. Make sure you have a stack loaded in iOS 5.5.5
10. Goto File | Standalone Application Settings .... | iOS
11. Be sure your setting are:
Build for iOS is ticked
iPhone and iPad is selected or iPod, iPhone and iPad is selected
3.1.3 or later is selected
Arm v 6 or Arm v7 is selected
You can see that Universal is the default. Thats a shame.
- I have NOT been able to build for iOS using Universal - Never select Universal
You will be reminded if Universal is selected when you get a Code Signing Failed message when Saving as a Standalone Application

12. Select the (Provisioning) Profile you've setup for this app in the field labeled Profile:

13. Select menu item File | Save as Standalone Application


Install the iOS app on your device

1. Make sure your device is plugged into your computer.
2. Open xCode | Window | Organizer
3. Click on Applications under your device name.
4. Use the Add button and finder dialog to locate the iOS .app file you've just created
or you can drag and drop the iOS .app file onto the device in Organizer






.
Last edited by LC4iOS on Fri Jan 24, 2014 6:42 am, edited 7 times in total.
Thanks to RunRev.
Thanks to LiveCode forum members.

LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member

FireWorx
Posts: 362
Joined: Wed Sep 07, 2011 9:39 pm

Re: LC 5.5.5 - xCode 5.0.2 - code signing failed

Post by FireWorx » Thu Dec 19, 2013 5:54 pm

I have been building and testing apps with Livecode 5.5 and Xcode 4.6.3. I use an application called ApResigner after I build the app to assist in the code sign process. You might want to try that.

LC4iOS
Posts: 88
Joined: Tue Dec 03, 2013 8:15 pm

Re: LC 5.5.5 - xCode 5.0.2 - code signing failed

Post by LC4iOS » Fri Dec 20, 2013 10:26 pm

Thanks Fireworx.

I tried that app before solving my issue
but it would't work/run on iMac for me.
I wrote to the author to report it.
I believe he sent some apple script that I never got around to sorting out.

So far the procedures above (including NOT selecting Universal)
have been working for distributing on test devices.
Without having to introduce another app.

It's so complex now it probably wouldn't matter if we did.

It's a shame the Universal is the default.
Catches me every time!
Thanks to RunRev.
Thanks to LiveCode forum members.

LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member

LC4iOS
Posts: 88
Joined: Tue Dec 03, 2013 8:15 pm

Re: LC 5.5.5 - xCode 5.0.2 - code signing failed

Post by LC4iOS » Mon Jan 06, 2014 12:24 am

Another weird happening:

Trying to build to a folder:

LiveCode | File | save as standalone application | Documents | LiveCode Projects | $Projects
works fine

LiveCode | File | save as standalone application | Documents | LiveCode Projects | $Apps
Gives the code singing failed error again

$apps is empty until after my first build then it has the appropriate folder for the project

However, $project builds without issue but does NOT have a folder.
And when Using $Project the .app is created in the $Projects folder.

This may have been one of the contributing factors in taking so long to figure out how to build for iOS test.
Thanks to RunRev.
Thanks to LiveCode forum members.

LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member

Post Reply

Return to “iOS Deployment”