can't run program on device (OK on simulator)

Discussion in 'iOS Programming' started by medasmx, Sep 6, 2010.

  1. medasmx macrumors member

    Joined:
    Nov 9, 2008
    #1
    I get the following message when I try to install programs from a book onto my iPhone --

    "The Info.plist for application at /Users/adammartin/HypnoTime/build/Debug-iphoneos/HypnoTime.app specifies a minimum OS version of 4.0, which is too high to be installed on Adam Martin’s iPhone."

    My iPhone is old (late 2007) but I downloaded the latest software update. Possibly I am doing something wrong in the process of getting a provisioning profile. I don't know.

    Any help is appreciated.

    Adam
     
  2. Luke Redpath macrumors 6502a

    Joined:
    Nov 9, 2007
    Location:
    Colchester, UK
    #2
    What version of iOS is your phone running?

    What does your info plist contain?

    What about your build settings? (base SDK and deployment target).
     
  3. medasmx thread starter macrumors member

    Joined:
    Nov 9, 2008
    #3
    info-plist

    Below is my plist

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    	<key>CFBundleDevelopmentRegion</key>
    	<string>English</string>
    	<key>CFBundleDisplayName</key>
    	<string>${PRODUCT_NAME}</string>
    	<key>CFBundleExecutable</key>
    	<string>${EXECUTABLE_NAME}</string>
    	<key>CFBundleIconFile</key>
    	<string></string>
    	<key>CFBundleIdentifier</key>
    	<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
    	<key>CFBundleInfoDictionaryVersion</key>
    	<string>6.0</string>
    	<key>CFBundleName</key>
    	<string>${PRODUCT_NAME}</string>
    	<key>CFBundlePackageType</key>
    	<string>APPL</string>
    	<key>CFBundleSignature</key>
    	<string>????</string>
    	<key>CFBundleVersion</key>
    	<string>1.0</string>
    	<key>LSRequiresIPhoneOS</key>
    	<true/>
    	<key>NSMainNibFile</key>
    	<string>MainWindow</string>
    </dict>
    </plist>
    
    I suppose this part "<key>LSRequiresIPhoneOS</key>" is the problem? I have downloaded iOS 4.02 and the latest XCode. Also updated my iPhone.

    I appreciate your response. Adam
     
  4. Luke Redpath macrumors 6502a

    Joined:
    Nov 9, 2007
    Location:
    Colchester, UK
    #4
    What are your base SDK and deployment target build settings?
     
  5. medasmx thread starter macrumors member

    Joined:
    Nov 9, 2008
    #5
    Thanks

    Appreciate the help, Luke.

    Looks like the problem was the deployment target. For my phone it is 3.1.3. It doesn't seem to matter what the base SDK is set as.

    Thanks, again.

    Adam
     
  6. ianray macrumors 6502

    Joined:
    Jun 22, 2010
    Location:
    @
    #6
    • Base SDK defines the APIs that are available for use.
    • Deployment target defines the minimum SDK version that will run your software.

    Typically 'Base SDK' is set to the latest SDK, whereas the 'Deployment target' depends upon whether there are APIs that are mandatory for your App, or whether you can gracefully degrade for older software versions.

    There are various techniques for checking whether APIs are supported, including NSClassFromString, and class methods such as 'canSendMail' etc. :)
     

Share This Page