How can I install an unsigned application on an iPhone from Xcode? - iphone

How can I install an unsigned application on an iPhone from Xcode? I am using last version of Xcode and the iOS 5 SDK.

You can't.
Apple wants people to sign up with their developer program, and so the only way to install an unsigned app might involve jail breaking, but I don't know enough as I've never jailbroken an iOS device.

Maybe you're not ready to purchase the license yet. That's when you require JailCoder - an easy to use app for tweaking your project and Xcode. Purchase the license and publish your app when you're happy testing with JailCoder.
Note: Here also a jailbroken device is required.

CAUTION! This DOES require a jailbroken iOS Device.
Yes, you CAN!
If you've built it on your own, you can simply use your phone as developer device (if you don't know how, just google it, I don't remember yet).
The trick is to force Xcode to don't try to code sign your app. If you don't, you'll get an error every time, you try to build it.
Go to Terminal and type:
sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/SDKSettings.plist
(You might replace iPhoneOS5.0 with your target SDK)
You'll be asked for your admin password.
Now change the value for the key CODE_SIGNING_REQUIRED to NO.
You are almost done.
Go to your project settings, look for "Code Signing" and set all values to Don't Code Sign.
Set the active scheme to your iPhone instead of iPhone 5.0 Simulator and go to Product → Build For → Build For Archiving
Now go to your Organizer Window, head for your iPhone, go to Applications, press the plus sign at left bottom and choose your build path.
In Xcode4 it's /Users/you/Library/Developer/Xcode/DerivedData/yourApp/Build/Products/Release-iphoneos/ by default.
Select your App binary (it will have a "forbidden" badge, because you're on Mac architecture) and click open.
Wait a few seconds and now your app should be available from your SpringBoard.

It would require jailbreaking, which I don't see why not because my jailbroken iPad doesn't have a virus after probably 300 apps. All the apps from the default repositories are checked and don't have a virus.

Related

How to deploy test app on iPhone?

I want to know how to deploy test app on iPhone 4.3.2. with XCode 4.3 but without buying a licence.
I have jailbreak on it and installed AppSync4.0+
The reason why I ask this is because I am porting an app from Qt and I want to see it how it behaves under iOS.
I have been using Qt4iOS and got everything build when using simulator.
Now I want to see it on my device.
When I try it I got some key chain error.
Provide me with some links or ideas.
... everything is possible. It's about the effort needed. And the effort for this can be very low. Especially because your device is are already jailbroken.
You'll need to change Xcode's code signing for building for an device. Instructions can be found here: http://iphonedevwiki.net/index.php/Xcode#Developing_without_Provisioning_Profile
(better save copies of the original files). Since Xcode 4.3 doesn't use the /Developer folder any more you'll have to edit the files inside the Xcode.app (./Xcode.app/Contents/Developer/...)
Build your app for the device. Make sure the target isn't a fat binary (instead just build an ARMv6 executable) or it won't work on your device if pseudo-signed with ldid.
Find the .app bundle for your app
Copy the .app bundle to /Applications/ (not /var/mobile/Applications!!!) (for example via ssh). Make sure the permissions of your executable are set to 755. Reboot or respring and if you did everything correctly you'll be able to launch and test your app.
Have fun!
I have had the same issue.
No matter how hard we try to apply any trick in order to test the app on real device without license, the bottom line is that you can't do it.
You must register with apple by paying $99 and thereafter you can set the device to your real device within XCode before running the app.
Note that it's quite a task to create *.api file even after you are registered with Apple.
Simple: Spend $99 for the iOS developer program.
I'm sure it is much more expensive to waste your time trying to find another way around.

Anyone else having problems installing iPhone Enterprise apps on released IOS 5?

Anyone having problems deploying Enterprise apps on iPhone/iPads running the released version of iOS 5 using the OTA ("over the air") methodology?
During the installation process, we get the alert box: "the app could not be installed at this time". Tapping the Retry button does nothing. In some cases, repeated tapping of the Retry button eventually results in a gray, empty launch icon being left on the home screen. No app installed. No other errors.
Anyone else seeing this or have a resolution?
The below description is a bit involved, but please bear with me as it may help others who run into the situation. I will post the resolution if get a resolution from Apple. So far, no joy there.
Our app refuses to install OTA on iOS 5. This same app WILL install on iPhone/iPad devices running iOS 4.x.x AND the same app will install on iOS 5 devices physically connected to a desktop machine using the iTunes app.
The Apple Developer forums under the IOS 5 Beta category complained about the problem but no indication of resolution as of last week just before the official release of iOS 5.
Cookies are set to be accepted.
Bowser cache and history cleared.
Using mobile safari originally installed with original iOS version 4.x.x.
System hardware and operating system configuration
iPad 2, iPhone 4 or any iPhone device running iOS 5 RELEASED version.
Browser and version
Mobile safari that is installed with iOS 4 on ipad2. Don't know if mobile safari upgrades with ios 5 upgrade.
Using a corporate wifi network. Yes, we are behind a firewall and use a proxy server. Since iOS4 devices install without problems, I don't think installation being blocked by the proxy or firewall.
Enterprise app built with Xcode 4 and ios5 sdk provided with it. Built to be backward compatible with iOS 4.0.
Distribution provisioning profile is correct as we have been using it for several weeks.
This app installs properly on iOS 4 devices both over the air and via iTunes application method.
This app installs properly on ios5 devices through the physical connection with iTunes application on the Mac desktop.
Steps to reproduce:
User types in the URL in mobile safari on iPhone/iPad running ios5.
The resulting webpage shows the download app link.
User taps on the link and is asked if they want to install the app.
User taps the yes, install button.
App proceeds to install.
A gray launch icon shows up on the home screen with the progress bar empty at the bottom of the icon.
Message below the icon indicates "loading".
Seconds later, user gets the "cannot download app at this time" error message as seen in screen shot attached.
Tapping the retry button results in the same action just described.
Tapping done results in the download stopping.
If you tap retry several times, user sometimes is left with the gray empty launch icon, which will not launch and cannot be deleted.
Note: In the apple developer forums, under the iOS 5 beta category, people are describing the exact same problem with no resolution.
Had the same problem, and was able to resolve it. However, the error noted is not specific to a single cause that handles every case... some detailed investigation needs to occur.
Your best bet is to connect the device to your Mac, and using the Organizer of xCode view the console logs while you are attempting to do a wireless deployment. There will be some useful information available -- please post the logs.
For my case -- the icon files were missing from the build, as a result of moving from xCode3 to xCode4 and also, the distribution plist was referencing an image that returned a 404. Both were logged in the console, but not very clearly.
Also, as a sanity check, manually verify the URL to your IPA file also.
I had this same problem and was sure everything was correct in my project; but restarting Xcode and doing a clean revealed my Enterprise scheme had somehow defaulted to the wrong provisioning profile.
Re-selecting the correct profile and re-archiving the app fixed the issue for me, I'm able to install an enterprise app on both iOS4 and 5.
I wanted to chime in after fighting this for a few hours. It is iOS 5 specific.
We had an htaccess password protection on the directory. Removing this allowed the app to finally download. So if you have htaccess, perhaps you can point the user to a parent directory that is password protected, then navigate to the subdirectory containing the app that isn't password protected. This is a temporary solution, apple needs to fix this.
Another thing to consider is the URL you specified in your over-the-air Application.plist file. I received the same error message ("-application- could not be installed at this time") because the URL I specified was too unspecific. Rather than writing "directory/directory/application.ipa", I had written "directory/directory/". You must include your application in the complete URL of the plist file's configuration.
If you didn't do this, don't fret! You don't have to rebuild the entire thing from step one, you can open your .plist file in any standard text editor and simply change the URL.
We had the same thing.
Our mistake was to point to a wrong 512.png icon in the manifest.
Which was no problem on iOS4 but turned out to stop iOS5 into a "...at this time" alert.
Wanted to chime in on my experience.
In my case, we were changing the address where the IPA file was hosted. Although I updated the PLIST file with the proper URL to the IPA file, iOS was still going after the old URL almost as if it cached the PLIST data. Creating a copy of the PLIST file and renaming it resolved the issue (data within the file remained unchanged)
I met the same problem today. The app can be installed in ios4, but failed in ios5 with "** could not be installed at this time" alert.
According to patricksan's suggestion, I download iPhone Configuration Utility 3.5 for Mac OS X, and try to catch the log while install the app through OTA.
The log helped me finally, one sentence of the log says entitlement 'get-task-allow' has value not permitted by a provisioning profile. It remind me that if the code signing identity in build settings of Project and Targets are correct, after checking them in Xcode, I found the code signing identity are not correct one, they should be iPhone distribution:.... other than iPhone developer:..... After correcting them, and re-Archiving the ipa file, it can be installed in iOS 5 now.
Check your Info.plist for Required device capabilities property. I recommend to delete completely this property if you haven't any restrictions on use.

Deploy an iphone app from xcode to iphone

I am doing a school project and I am required to deploy an iphone app to my phone. I have some really noob questions to ask. I have tried to read some solutions from this website but I dont understand! like from these questions: iPhone app minus app store and How can I deploy an iphone application from xcode to real iPhone device.
Can anyone here give me an easier way to understand please?
Easy:
Sign up for an iOS Developer account. This includes signing up for an Apple ID, enrolling as an Apple developer, then opting that dev account into the Developer Program. That link walks you through the process.
Hook up your device to your machine and look at it in the Xcode organizer (Window > Organizer).
Tell Xcode your want to use it for development.
I believe Xcode will now help you out more than it used to. If it doesn't, then Apple has step-by-step instructions. In short, you need to:
Use Keychain Access to generate a CSR (certificate signing request)
Submit that to Apple via the dev portal
Download the resulting development signing certificate and install it along with Apple's intermediate certificate in your keychain by double-clicking on the files.
You then need to create a provisioning profile.
Add your device ID to it.
Download it and stick it on your device, e.g., by dragging it to your device in iTunes.
Then, you can build and run your app on the device. It's a pain to explain, but pretty easy to feel your way through once you get started.
My fuller answer with pictures is available here.
With Xcode 7 for an iOS 9 target device there is now free provisioning. You don't have to sign up for the Apple Developer Program in order to test an app on a real device.
Summary from the Apple docs:
If you don’t join the Apple Developer Program, you can still build and
run your app on your devices using free provisioning....
In Xcode, add your Apple ID to Accounts preferences
In the project navigator, select the project and your target to display the project editor.
Click General and choose your name from the Team pop-up menu.
Connect the device to your Mac and choose your device from the Scheme toolbar menu.
Below the Team pop-up menu, click Fix Issue.
Click the Run button.
When you run your app on a device, you will also have to trust the developer first. On your device go to Settings > General > Profile > developer account name > Trust.
Related articles:
Xcode 7 allows anyone to download, build and ‘sideload’ iOS apps for free
iOS Untrusted Developer error when testing app
iOS9 Untrusted Enterprise Developer with no option to trust
This SO question here gives detailed steps of how to do what Jeremy suggests.
How can I deploy an iPhone application from Xcode to a real iPhone device?
Take note that /Developer was moved to /Applications/Xcode.app/Contents/Developer in Xcode 4.3.
And, this SO question says what to do if you get an [sed: RE error : Illegal byte sequence].
RE error: illegal byte sequence on Mac OS X
But in XCode-5.1/MacOS-10.9, this still didn't work - I lost the devices tab in XCode-Organizer after editing the plist file!

Putting my iPhone app on my phone to test?

How do I take my working iPhone app and put it on my phone to test with? I dont seem to see how and my googleing doesn't turn up what I think I am looking for...
I am a registered developer and have paid my $99 already.
Would anyone know?
Note: I have already placed the same answer somewhere else for the same question.
There are some steps you need to follow to test your app on your personal iPhone. Below you can find all the steps:
Create a MAC certificate at first step.
Upload that certificate to developer account.
Open developer account at https://developer.apple.com
You can now find an option for device id in your developer account on left side.
Register your iPhone device.
It is time to create your unique identifier on developer account, download your certificate and install it on XCode organize
Now open your project and embed your unique identifier in your project.
These steps can be beneficial for all software testing gusy involved in mobile application testing.
You need to register as an Apple developer. This will cost you $99/year.
That is the only way that I know of apart from Jailbreaking your phone.
Open Xcode Organizer window and provision your device for development. This will register the device UID with Apple and install the development provisioning profile on it. If you don't have provisioning profile, Xcode will create one automatically.
Once this is done, you need to set your build to use your DEV cert to aign your app. Then you can switch the build configuration from Simulator to Device and build and run on your phone.
Did you just complie your project or you complied and Run? If you Build your project and you have no errors it means everything it's ok. The next step is to Build and Run your project or just Run your project.
If you Run your project and nothing happens it means that you have something worn in your target configuration. Did you change anything there? In the Project Tab in your XCode go to Edit Active Target Settings and check that your Base SDK and Target SDK match your iDevice SDK.
IF you don't find out what the problem is, contact me, i could help you in anything you need.

Personal iPhone application without paying?

I want to develop a little iPhone application, just for my personal needs. I don't want to sell it or give it to anybody as it will not be useful to anybody.
Can I have this application on my iPod/iPhone, without having to pay/suscribe/be on the Apple store ?
You need to pay the $99 for the iPhone Developer Program in order to be able to install your application onto the iPhone/iPod.
You can, by Jailbreaking your iPhone and then installing the AppSync program from Cydia. Then you can either build your app as a release and drag it into iTunes and sync your phone or change some settings (look it up on google, putting Xcode project on jailbroken device) in the Xcode project settings and open the organizer window and click on the use for development button on the device's page.
Jailbreaking your device will void your warranty if Apple find out (ie if you go into a shop and ask them to fix your device if it ever breaks without clicking restore in itunes to unjailbreak it)
With the Spirit jailbreak, Jailbreaking is as simple as plugging in your phone and pressing jailbreak.
(and the US Government has said that Jailbreaking is legal: http://www.pcworld.com/article/201892/us_government_iphone_jailbreaking_is_fair_use.html)
You could write you program and test in the simulator with the free SDK.
When you are satisfied you could send the source code to a licensed developer, I'd suggest some friend, that can build an AdHoc version for you to run on your own device.
A little tricky and you need to let another developer see the code. This app will also only last a year or less as certificates and profiles are time limited.
Why don't you write it as a website that is iPhone friendly then go to the site in your phone's browser and save a link to the site? It will show up on your desktop similar to an app. To have a true "app" I am sure you have to pay apple.
No, you can not.
It depends on what your definition of "pay/subscribe/be on the Apple Store" is.
Yes, you have to pay a subscription to the Apple iPhone Developer programme to get access to a provisioning profile to enable you to put an app you have built onto your iPhone/iPod. This will cost you $99.
The dev tools (Xcode/Interface Builder) are all free, but without the dev programme subscription you will not be able to put your app onto a physical device, only the emulator.
But no, you do not need to distribute your app via the app store to deploy it to your own phone. However, if you do not distribute the app via the app store then it ultimately doesn't get digitally signed by Apple and when your provisioning profile expires you will not be able to run the app on your phone until you have renewed the provisioning profile.
Well you may be able to do it if you jailbreak your iPhone. I haven't tried it myself but I found this link.
You'll have to decide for yourself about the moral implications of by passing apple's security.