How can I get the actual payload that the phone downloads when it installs my app from the app store? - app-store

I want to inspect the payload to answer questions like, is the whole __TEXT segment encrypted or just the __text section? The furthest I've gotten is, with a jailbroken phone, disabling SSL and then sniffing the download. However, that requires me to be on wi-fi, and on wi-fi, it downloads a pre-thinned version of the app that's larger. This is OK, except that I want to see what a fully thinned version looks like and see how close it is to the 100 MB WWAN limit. When I do find / -name '*.ipa', I don't find the app. So I guess it's immediately decompressing the .ipa upon download and then deleting it? But in that case, I don't know how to intercept it.

To get an iOS app .ipa (zipped bundle) file, just download the app from the App Store using iTunes on a Mac.
Added: Or download with Apple Configurator 2 on a Mac.
It might be easier on a Mac to sniff the ipa file read when installing an app from macOS iTunes to an iOS device (during a Sync).

Related

Is there a way to password protect the download of mac app from appstore?

In one of our project we have 2 binaries, one for iPhone and other for mac. These two application communicate each other to achieve the functionality. We want the user to download and install the iOS app first and then let him download the Mac application.
Is there a way to restrict the user, if the user try to download the mac app before downloading the iPhone app?
Short answer: If you're referring to the Mac App Store, then no.
Long answer: Both, the App Store and the Mac App Store give you no way to control who downloads your app and you are not able to get information about what a user already downloaded.
You could of course ask for an e-mail address in your iOS app and make sure your users register to a server before you e-mail them a link to a private download page (not the Mac App Store).
General advice: I think there is something wrong with the design of your app. It's not clear to me what you're trying to achieve and I bet your users won't either. If you want to make sure they pay for the iOS app before using the Mac app then just alert them in case they downloaded the Mac app first. You need to write some custom service to check for this of course. If there is some functional problem that requires the iOS app to be launched first then you should solve this yourself and not put that burden on the shoulders of your users.
You could allow anyone to download, but simply block any operation until the iOS app has sent some kind of approval token to a server or iCloud for example.
You have to download mac application first, and after downloading you can check if user downloaded iOS app or not, but before downloading you can't check the downloading state of iOS app, because application will upload on appStore not on your personal store.
After downloading iOS app set some flag value on server, and check this flag value on mac app downloading, it it is 1 then download else show alert.
After iOS app downloading -> Set flag value (ios Download=1) to your server.(make web service for this).
After downloading mac app -> Call you web service to check that flag value. if it is 0 then show alert to download iOS app first.

Testing the ipa file on iPad

I have a .ipa file which i want to test in iPad before submitting to iTunes. i can't synchronize it with Xcode because we did not develop the code..we just have a iPad and .ipa file was sent to us in email, but even i cannot download it through safari shows an error. Is there any possible way to test it.
Any suggestion will be appreciated.
If you don't have a source code it is possible to resign the app using another profile which includes your iPad and even publish to AppStore. You will need Apple Developers account for that.
You can try www.aironapp.com. You need to configure Apple Developers account there and then it could resign the IPA for you and provide OTA download.
This is impossible to do with an application compiled for distribution. If it would be possible it would mean you could get the ipa's from any device and just run them via iTunes.
You can however ask the developer to send you an ipa compiled for debugging.
Here are the steps to installing your App on your iPhone or iPad using .ipa files.
We will send you one or two files. One will be a .ipa file and the other will be a .mobileprovision file. Save them in a convenient location
Open iTunes. Then drag the downloaded .mobileprovision (if provided) & the .ipa files and drop it into iTunes Library.
In iTunes select your iPhone (or iPad) under devices.
Go to the Apps tab and make sure the checkbox for the new App is checked. If not, check it yourself.
Press Sync. After it is synced, you should be able to unplug you iPhone and play with the App.
The app probably needs to be signed with a different provisioning profile that includes your iPad.

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.

How can I run the iPhone/iPad simulator with only the binary

I would like to send my iPad app to testers who have xcode on their macs but do not own an iPad. I don't want to send them my source code. Is there a way I can send them the app to run in the simulator without sending source code?
Thanks
No, you cannot send them a Simulated binary. Xcode installs the application just as AppStore would, by assigning a GUID. You could possibly send the whole folder that contains your app (including the Documents folder, Library, etc.) That may possibly work. If your friends have iPads, you can always build for Ad-Hoc and let them test that way.

iOS Question. Can I distribute the Xcode simulator versions of my app?

I would like to send someone the Xcode simulator version - not the device version - of my iPad app. I have located the .app file in the Finder. Do I just zip it up and send it off or is it more complicated than that?
Thanks,
Doug
UPDATE
Chrisbtoo got the answer on this one however he left of some critical bits for those of you trying this at home:
Path to Xcode simulator (the simulator can be run standalone.):
/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app
Path to app that appears in the home screen of the simulator:
/Users/turner/Library/Application Support/iPhone Simulator/3.2/Applications/{GUID}
It is instructive to watch what happens in the app simulator directory as you build for simulation, delete apps from the simulator desktop and generally use the simulator as an actual device.
Bottom line: This is a viable approach for sharing apps in a "simulated" ad hoc manner without the mind numbing, soul sucking process of true ad hoc app sharing.
Cheers,
Doug
Assuming the other person already has the simulator installed, you can just zip up the stuff under ~/Library/Application Support/iPhone Simulator/3.2/Applications/{GUID} (includes both the .app and any data directories needed) and send it to them - they'll need to unzip it under that same directory. What I've done in the past was to rename the {GUID} part to a more friendly name - the sim will still pick it up.
If they don't already have the simulator, they will need to sign up for a free iphone dev account and download Xcode, etc.
We just put up a little tool that will help you with this. It manages both what you need on the dev side and also the tester.
Here it is
http://blog.placeit.net/ios-app-packager/
It basically creates a little zip that you can pass to the tester and it'll install the app in the right directory and also open it up for the user with the right device selected.
I would think you want to send the entire project folder to the other person- presumably you are expecting them to open it in their XCode- and presumably they have the sdk for the app.
You have to distribute via AdHoc or App Store for beta testing.
Become a developer and then look into how to do this.
You need to have a provisioning profile, and then select the UDID's for the device you want to beta test to.
Go to the iPhone Provisioning Portal
and here is a document with more detail