File location of compiled iPhone app? - iphone

I'm writing an iPhone app in simulator/debug mode at the moment. I'd like to know, after I build it, where does the binary go? I want to send this file to my friend to show him what I'm doing so far.
Also, how do I package apps into .dmg files? That seems to be the better format to send app to other people?

Have you joined the iPhone Developer Program?
If so you will need your friend's device ID to generate a provisioning profile.
I recommend that you read Publishing Applications for Testing for more details.
Your binary files will be on {Project Folder}/build/, there you will have one directory for each of the possible options: Release/Debug and iphoneos/iphoneSimulator.
To create the DMG read Creating a .DMG.

by default, the built results are located in {Project Folder}/build/Debug (or Release if you build in that config). You can use the hdiutil command-line tool to generate a DMG of your app - have a look at its man page which is quite comprehensive.

Related

Source code security - working with companies iOS

I am currently working for a company on a rather big scale e-commerce project for iOS. Of course, they want to publish their project under their iTunes account. My concern is, all I want to do is to develop the project and upload the project in their behalf, from their account and keep my code to myself, just in case they want to do a similar project.
Will my ipa or code be safe? Any way they can reach the ipa or code only from the itunesconnect account ? Any thoughts and knowledge will be great from experienced developers.
Your client must use Application Loader
They have to give you an App Store provisionning profile
Archive your app with "com.compagny.appname" with the provisionning profile
Organizer should open after the process. Select your archive and click on Distribute button.
Select Save for Enterprise or AdHoc Deployment
Select the App Store provisionning profile
Save your ipa on your disk (e.g Documents dir)
Open terminal and go to Documents and execute : sudo chmod 755 yourApp.ipa
Send your ipa to your client and that's all !
With this method your client won't get your code
I would recommend having them add your developer account as a developer for them and having you upload it for them. This will reduce any possibility of any issues when you send them the IPA and they upload the file.
Once your IPA is created, they cannot retrieve the source code. They only thing they could do is get the images and the binary file. They could however reverse engineer the binary from assembly but that is VERY unlikely.
Note that is this is an ecommerce application (handles credit cards) and in the US, PCI legal requirements would likely not allow them to have you upload anything, nor for that matter not have the source code. Their legal team should know this.

How to codesign automatically generated iOS apps?

Greetings,
I'm in the progress of writing a web server script that lets you create custom iOS apps (basically exchanging logos and a few other things). The web server customizes a previously uploaded "shell" .ipa and re-zips the whole container to send it to the user's browser. That is: we customize a previously uploaded .ipa on the web server and let the user download it for submission to the App Store.
The next step would be to re-codesign the whole .ipa - because we changed the .IPA contents and the user must use his own signing identity - so that he can actually upload it to the App Store.
From what I understand, there is a "CodeResources" file which contains some kind of hash for each resource file in the bundle, and the executable contains some kind of embedded signature as well. To generate these, you'd have to use the "codesign" utility on the user's computer, then use Application Loader to submit it to the App Store. Correct so far?
What I'm trying to find out is:
Is there a way to codesign the .ipa on the server (with having the user upload his certificate beforehand), so that he does not have any extra work to do?
If 1) is not possible, is there some kind of tool that allows to re-codesign the .ipa without much hassle? Xcode seems to require some project setup work to do just a bit of code signing - if possible at all.
Are there any alternative ways to codesign the .ipa files for the user - possibly without having to manually do it by hand?
Thanks in advance!
Xcode uses the codesign command line utility to create the CodeResources folder and the digital signature, you can invoke it yourself to sign an app bundle outside of Xcode. You could probably automate this on a server if the server was running Mac OS X; if you're really clever you might be able to figure out how to create the signature yourself using openssl (the signing certificates, etc. are all standard stuff). Or, if you can count on the user having the dev tools installed, provide them with an app that automates the signing for them.
Here's a blog entry describing some of the process (though the use case is a little different).
I don't like to answer my own question, but I want to close this after so long.
We ended up using Xcode's targets and schemes to ease up the generation of many different apps. Since we have a reasonable number of app variants, this seems to be OK for now.
Code signing is a mess and Apple constantly changes the technical process behind it - so it's a moving target and requires a lot of hacking and trial-and-error work.

How to build an app for Cydia store?

I have built an app for Apple's App Store, now I want to submit the app to the Cydia store. How can I do this? Should I just post the app.zip file built for the App Store to the Cydia store?
There are a few differences compiling your app for Cydia vs the App Store. Big Boss does a good job explaining the difference in his post:
How to Compile for Cydia Submission
You should check out iOSOpenDev. It incorporates a lot of Cydia tweaks, Theos, Activator and all kinds of other things into Xcode. It allows you to create a new (Cydia) tweak of your choice and you can even launch that tweak on your device from Xcode.
To submit an "App Store" app, you would need to make sure you adjust the user directories. Since you will install the app into /Applications, there will be no sandbox; no Documents directory dedicated to just your application.
You will also need to sign your app with ldid. This "fake" code-signs your application so it can run in iOS. To submit the app to Cydia, you would need to find a repo you are comfortable with hosting the app, like BigBoss.
Be careful though, submitting an App Store app to Cydia could potentially get your app thrown out of the App Store and your developer account revoked.
In terms of building an actual full application, I believe the development process is the same but the compiling and preperation of the binary is different. The provided link is a good resource
If you intend to make a tweak which hooks into existing Apple classes and methods then you need something like theos by DHowett, a good basic tutorial is here
u need to create a repo. or send them to MMi's collection
to make a repo read Saurik's Guide: Here
Or read the easier guide that MYI made for us at: Here
to submit a package to the MMI repo,
try the Developer Portal:
http://modmyi.com/mmi/
Some info regarding paid packages:
http://modmyi.com/cydia/cydiastorefaq/
Basically, all the content in your theme must be your own original work.
All the graphics / sounds must be created and owned by you.
If you have further questions, drop a note to the admins:
http://modmyi.com/sendmessage.php
Well first of al if your app.zip is the .app file found in the payload folder of a .ipa file, then disregard this next step. Anyway, open up app.zip, go to payload, and then take out app.app. Make the app.app app.zip. Now go to http://www.myrepospace.com/iDeb and upload your app.zip. Then when it's done, download your new .deb file.
Despite of the title you seem to ask about submission rather than (or in addition to) building. I'd consider this the one best reference:
http://cydia.saurik.com/faq/repositories.html
It is from Cydia itself and includes sschunara's links and other BigBoss references plus more.

Decompile iPhone app binary

Is there a way to decompile an iPhone binary file in order to extract it's resources like images and sound files?
If you have sync the app to you Mac, just open the following folder:
/Users/YOUR_USER_NAME/Music/iTunes/iTunes Media/Mobile Applications
Or open iTunes and go to Apps and right mouse button on the app and select "show in Finder"
Copy the app you want to inspect, f.e. Demo.ipa
Change the extension ipa to zip => Demo.zip
Extract the zip
Open the folder and then the folder "Payload"
Right Mouse Click Demo.app and select "Show Package Content"
Change your .app file extension to zip and then extract the files. You will be able to get all resource files.
An iPhone .app file is simply a folder. If you're viewing it on a Mac (or even on the iPhone with iFile), just remove the .app extension and you should be able to view the resources. On Windows and Linux (tested with Ubuntu 14.04), it should "just work" and you'll be able to view the folder's contents without any renaming.
Edit: Removed the assumption that images/sound would be used in another application.
First, off you shouldn't be reverse compiling code so that you can get images/sound files from an iPhone or any other application for that matter.
Second, reverse compiling does not always guarantee a successful file generation of whatever file you're looking for. Whether it's an audio or image file.
It would be a much better approach for you in the long run, and in the process of learning that you either contact the authors of the app and ask for permission to use the images/audio that you're seeking (since you think it's such an awesome sound/image that you can't live without). Or you can do an audio mixing or image generation yourself.
If your lacking the time, skills or applications that would get you the quality of work you're looking for. I would recommend bring in a graphic artist or sound engineer/mixer.
You'd be learning how to manage a group or individual, convey your ideas correctly and informative, and you're more likely to build a better application as a result. And that is something you can't get from reverse compiling an iPhone application :-)

Updating resource files for iPhone app

I've developed a generic iPhone app, intended for customization via a myapp.cfg file. I've successfully deployed the app to my adhoc testers via iTunes. My question is, how do I update their myapp.cfg file via iTunes. In other words, if they edit the .cfg file on their Windows PC or Macbook, how do they get it into the apps bundle in the iPhone?
You'll need to provide your own mechanism to download the config file into the application's Documents area; as app bundles are effectively sealed by the code signing process there's no way to modify the bundle post facto. As you have no interface to iTunes you need to provide your own mechanism - you might choose to do something like OmniFocus which uses Bonjour to discover the computer from which it retrieves its sync settings.
Looking at it another way; why use a config file at all? Other iPhone applications use a settings bundle and the standard application preferences as recommended by Apple, why do something different? There's always a chance that you'll confuse the user.