Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1048] Run On Device doesn't detect my iPhone and Provisioning

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2011-04-15T02:42:32.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsdevice, ios, iphone, mac, osx, provisioning, snowleopard
ReporterHugo Josefson
AssigneeReggie Seagraves
Created2011-04-15T02:42:29.000+0000
Updated2017-03-09T21:23:48.000+0000

Description

Titanium Developer fails to detect my iPhone and Provisioning Profile, when I try to do Run on Device -> iPhone.

Please see attached screenshot.

I can build and run the app without problems in XCode, so the phone, iPhone SDK and provisioning stuff should be in order. These are the relevant software versions:

  • Titanium Developer 1.2.1 + Titanium SDK 1.3.0.
  • "Xcode 3.2.2 developer tools for Mac SDK 10.6 and iPhone SDK 3.2"
  • Snow Leopard
$ /Library/Application\ Support/Titanium/mobilesdk/osx/1.3.0/iphone/prereq.py project
{"success":true, "sdks":["3.1","3.1.2","3.1.3","3.2"],"ipad":true}

$ xcodebuild -showsdks
Mac OS X SDKs:
    Mac OS X 10.5                   -sdk macosx10.5
    Mac OS X 10.6                   -sdk macosx10.6

iPhone OS Device SDKs:
    Device - iPhone OS 3.0          -sdk iphoneos3.0
    Device - iPhone OS 3.1          -sdk iphoneos3.1
    Device - iPhone OS 3.1.2        -sdk iphoneos3.1.2
    Device - iPhone OS 3.1.3        -sdk iphoneos3.1.3
    Device - iPhone OS 3.2          -sdk iphoneos3.2

iPhone OS Simulator SDKs:
    Simulator - iPhone OS 3.0       -sdk iphonesimulator3.0
    Simulator - iPhone OS 3.1       -sdk iphonesimulator3.1
    Simulator - iPhone OS 3.1.2     -sdk iphonesimulator3.1.2
    Simulator - iPhone OS 3.1.3     -sdk iphonesimulator3.1.3
    Simulator - iPhone OS 3.2       -sdk iphonesimulator3.2

What could be the issue here?

Thanks,
Hugo

Attachments

FileDateSize
run-on-device-iphone-fails-to-detect.png2011-04-15T02:42:30.000+000062159

Comments

  1. Hugo Josefson 2011-04-15

    This may or may not be related to the fact that I get dead links in the UI. Reported as separate issue #1050.

  2. Jeff Haynie 2011-04-15

    can you paste the output of

    /Library/Application\ Support/Titanium/mobilesdk/osx/1.3.0/iphone/prereq.py package

    also? that's the one that prints out your correct provisioning profile info we use to populate.

    also, are you running 1.3 just to double check the version?

  3. Jeff Haynie 2011-04-15

    one more thing, in your screen shot, the certs inside Developer aren't correctly checked.

    Just curious, did you previously have certs installed before Titanium and not install them via titanium?

    if so, try and click the "Upload.." link and select your cert. Titanium will then note them in its internal DB - and this is safe if you already have them installed in Organizer - will just let us know that you have them and the proper names.

  4. Hugo Josefson 2011-04-15

    Hi Jeff! Thanks for getting back to me. Here's the output:

       $ /Library/Application\ Support/Titanium/mobilesdk/osx/1.3.0/iphone/prereq.py package
       
       {"wwdr":true,"ipad":true,"sdks":["3.1","3.1.2","3.1.3","3.2"],"iphone_dev_name":["Hugo Josefson (2XHRP877F6)"],"iphone_dist_message":"Missing iPhone Distribution Certificate","wwdr_message":null,"itunes_message":null,"itunes":true,"iphone_dev_message":null,"iphone_dev":true,"iphone_dist":false,"itunes_version":"9.1.1"}
       

    "Missing iPhone Distribution Certificate" doesn't sound good...

    Yes, I'm using 1.3.0.

    And also yes, I installed the certificates outside of Titanium, both before installing Titanium and also reinstalled Titanium completely afterwards to test. (Including deleting ~/Library/Application Support/Titanium)

    I have filed a separate issue for all the links being incorrect: #1050. This means that even the Upload link doesn't work right.

    The Install Now button seems to be disabled, or it only does something quietly in the background.

    Please advice.

    Thanks,
    Hugo

  5. Jeff Haynie 2011-04-15

    Weird. so this says you don't have a distribution cert but you're saying you've got one right?

    Just to be sure ... there's 2 types of certifications. A development certificate and a distribution certificate. You'll need both. I assume that you already know this given your comment above that you can run in XCode. :)

    If we're not detecting this, that means something weird in your keychain or something. Do you have multiple keychains by chance?

    We simply run security -dump-keychain

    And grep (sort of) for "iPhone Distribution" and pull our your details.

    What do you get when you run this command:

    security dump-keychain | grep "iPhone "

  6. Hugo Josefson 2011-04-15

    Right. No, I think I only have the Developer cert. Don't count too much into me sounding confident :) I'm really new to all this iPhone stuff. I only really started to deploy to iPhone because the Facebook module in Titanium isn't ported to Android yet.

    When I say I can build and run the app in XCode, I reconfigure the XCode project to sign with "iPhone Developer" instead of "iPhone Distribution". I have a provisioning profile though, which makes it possible for me to try the app on any of our iPhones listed in the profile. In my humble opinion, Titanium should at least make it possible for me build and run the app on the iPhone I have connected to my iTunes, even without a Distribution cert, because I don't need one when doing the same thing in XCode.

    I only have one keychain, I think. The only thing I have done which has to do with different keychains, is that when I installed Apple's intermediate cert (or whatever it was called; their certificate from their CA), I chose to put it in the system keychain.

    When I run security dump-keychain | grep "iPhone " I only see "iPhone Developer" and no "iPhone Distribution". Since I'm not sure what all bytes in the output really contains, I'm reluctant to posting the exact output publicly.

    Here's the gist of it though:

       $ security dump-keychain|grep "iPhone "
       
           "alis"<blob>="iPhone Developer: Hugo Josefson (XXXXXXXXXX)"
       
           "labl"<blob>="iPhone Developer: Hugo Josefson (XXXXXXXXXX)"
       
           "subj"<blob>=0x..........[a-bunch-of-stuff]..........,iPhone Developer: Hugo Josefson (XXXXXXXXXX)..........[more-stuff].........."
       

    Will I really need a distribution cert? And should I have to (in possible future versions of Titanium)?

    Thanks for debugging with me,
    Hugo

  7. Jeff Haynie 2011-04-15

    OK - yeah, this means you simply have a developer cert. This means you can
    run only on device for testing - but not for distribution. You'll need a
    separate certification for distribution. However, this means you should be
    able to do all your testing on device - you just can't submit it to the
    appstore for approval until you get a distribution certificate.

    I'm going to forward this to our support guys who see this type of stuff
    more than me...

  8. Hugo Josefson 2011-04-15

    Yes, that was my plan. Someone else will have to submit to AppStore when it's time.

    I hope the support guys can help me figure out how to get it to install on device :)

    Thank you for your help so far,
    Hugo

  9. Jeff Haynie 2011-04-15

    here's what they said:

    so I think he just needs to click the upload link on the 'run on device' screen to give Developer his provisioning profile. it sounds like he's installed his profile via XCode Organizer, but he needs to upload it to Developer as well (that's how we pass it to xcodebuild)

    which is what i thought (mentioned above).

  10. Hugo Josefson 2011-04-15

    Wow! This is so strange. I could have sworn I clicked the Upload link before, but now it prompts for the Provisioning Profile file just as you say. Apparently I made a mistake before with that (at least twice!)...

    After having selected the Provisioning Profile, the UI changes and I am able to install to device successfully.

    You can close this issue now.

    Thank you so much for your patience and help!
    /Hugo

  11. Jeff Haynie 2011-04-15

    Hey no problem! thanks for your patience working through it. glad you got it working.

  12. Lee Morris 2017-03-09

    Closing ticket as invalid.

JSON Source