How to automatically update an iPhone app from within the app itself? - iphone

This link shows a video where an app upgrade is "forced" from within the app itself:
http://buzzworks.de/blog/update-ios-beta-apps-from-within-the-app
The App Store is not called in and it's said to work only for AdHoc
apps.
Anyone knows how is this possible?
edit: please give a look to the video before answering. AdHoc apps are signed by the developer and they do not come from the App Store. This sort of forced update is useful when doing beta testing and in enterprise applications.

I've found that it's all explained here:
http://developer.apple.com/iphone/library/featuredarticles/FA_Wireless_Enterprise_App_Distribution/Introduction/Introduction.html
The developer should create an .ipa with the app and a manifest in plist format with the URL to the .ipa and a few other things.
The app can optionally implement its own way to find if an update is available and open
the URL to the manifest.

I didn't it's really possible because the app has to somehow sign itself. The best I can think of right now is that the app is not signed?

You can always force people to go to the app store when a new version is out. Simply make the app connect to a webservice first. Other solutions are not accepted by Apple, or will quite simply not work because of other issues (signing is one of many).
You could also design your app in such a way that forced updates are never a requirement. You can load your user interfaces from the web (Apple has presented some valuable information about that during the previous WWDC), your data can come from the web, and if there is any other correction to do just ensure your app is backwards compatible.
That's how the app store works. And it never requires a 'forced update' ... Well, almost never ;-)

Related

Can't update iPhone apps

After making an update to an iPad app I released some time ago, I've been getting reports that people are unable to actually update the app without deleting and re-installing. However, as far as I know, nothing in the update should be causing this. (All the update deals with is letting people email PDF documents, nothing major.) When people attempt to update, they're asked for their iTunes password, but after entering it, it merely goes back to the update screen and nothing happens. Additionally, it would seem that this only happens with my app, the people in question aren't having any issues with the other various apps on the App Store. Does anyone know what might be causing this and how I could fix it?
Thanks in advance!
(Also, if it matters, the app is a custom B2B app, the general public can't purchase it.)
I'm removing the text of my answer because it's so inaccurate it's embarrassing. I mistook "B2B" for "Enterprise" and answered based off of that. To make up for it, I'll look into the problem a bit more and if I find anything I will edit this answer accordingly.
Edit:
Okay, I can see why you put a bounty for this question on SO; there's not really any data on a problem like this anywhere. Frankly, there's not much available information on B2B in general. I'll post what I found anyway, in case it can be of any help to you.
I found the details reason behind Maggie's question, there. Per Editing and Updating App Information:
Updates keep the same Apple ID and bundle ID, which means they are
associated with your first version and free to your customers
Also, apparently, "You can't change the CFBundleIdentifier of a released app if you want to release updates for it, the App Store will automatically reject it when you upload." which is something I can vouch for, having experienced this with a normal app. I do know that for a B2B app you do have to submit it to Apple for review, but I can't tell from the documentation I found if you need to actually submit it to the App Store, so it may not go through the various checks that normal apps go through, so this could be your problem.
Aside from that, according to the VPP guide, if your customers are installing the apps on the devices with Apple Configurator (broken right now, per app store reviews) the updates also have to be done with the Configurator. You haven't said that Configurator was involved, but I did find this tidbit.
• Use Apple Configurator to install apps on new or supervised devices.
Apple Configurator on a Mac makes it easy to mass configure and deploy
devices that are centrally controlled. Redemption code spreadsheets
acquired through the Volume Purchase Program can be imported by Apple
Configurator, tracking the number of apps installed on each device. To
update deployed apps using Apple Configurator, you must reconnect to
the same Mac from which the apps were installed. Learn more at
itunes.apple.com/us/app/apple-configurator
Anyway, good luck. Wish I could be more help.
What you are describing (assuming that it is accurate) would certainly be a bug on Apple's side. If users are trying to update the app and the update is not being processed, then in one way or another that is a bug that Apple needs to address. Nothing that you do as a developer should be able to cause that situation to happen. I would suggest contacting Apple and possibly filing a bug report.
It seems that apple wants you to develop the Iphone apps in the latest build. Sometimes this cause issues between realeases (diferent versions of Itunes, OSX, IOS, etc) when you try to update your apps.
Try to publish the app in the latest version of xcode.
That happens a lot in iphone development testing.
Hope this help.
When updating an app, iOS looks for the bundleId and if there is another app with the same bundleId, it updates the app with the highest version number. Maybe the version number is not set correctly or maybe people have issues because an other app (from the AppStore or an other B2B app) have the same bundleID but a higher version number.
I'm by far not an iPhone expert, but it seems something related might have been fixed in iOS 6.0.1.
Fixes a bug that prevents iPhone 5 from installing software updates
wirelessly over the air

Is there a way to directly download an iOS app (without using the app store)

I would like to have users be directed to a link which will immediately start downloading an app on an iOS device. I know you can register for Enterprise application or do limited ad-hoc distribution, but this is not the case here. The app I would like to link to is already on the app store. I would like to know if users can download the app directly without going through the app store.
Thanks in advance.
As mentioned above, you cannot provide a direct link to the application. There are ways of circumventing the app store, such as ad-hoc distribution and ADC's enterprise program. However, neither of these would provide the convenience you seek as potential users would have to install certificates generated by you before installing your application. Your best option would be to use the app store or possibly a web app.As David V mentioned, you can provide a direct link to your app in the app store!
Good luck,
-Alex
They will need to go through the App Store. You can provide them a link to your app in the App Store though.
In fact, even in jailbroken devices, you need to use a store. Apple seems not to have a auto-installing url scheme implemented.
Would be nice, though.
No. This is not possible on stock OS iOS devices
You can do that if your app is based on Safari (web app) instead of native (iOS).

Can I force a user to upgrade my app?

Can I force a user to upgrade my app? Does Apple recommend it?
Yes, you can. Just check the version number when the application starts and if needed, bail out with an error screen. I don’t think Apple explicitly prohibits this. (And I doubt they would find out during the review.) Of course it’s annoying from the user’s viewpoint, I would only write something like that if there was no other option.
Yes you can force an upgrade to the user. You can call a webservice when your app start and check on your server if an update is available (you have to add an update when an update available on app store). If an update is available then you can present a view that will have the update button. When pressed this button will redirect the user to the installed app store app and open the upgraded app in it. (you should return this url in your webservice). Let me know in comments if you need more explanations.
And I don't know apple recommend this way. But I have seen this in one or two apps.
Extremely bad approach. My perfectly fine working app forces upgrade, which can not be supported due to obsolete iOS. I am not only forced, but moving away from the coupon app in determination to never use it web-based either.
Security issue, if that is the reason for upgrade, should be patched for existing iOS.

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.

How to programmatically determine if DRM was removed from iPhone application?

How can I determine if DRM was removed from iPhone application bundle (to protect it from piracy)?
I have an iPhone app which integrates with a third party web service. I use the technique described in this question to find pirates and then have the app "phone home" with the user's device ID and user ID for the web service (I haven't done anything with this information yet, but I was thinking about contacting them and asking them nicely to purchase my app).
In addition, once a user has used my app for a certain amount of usage, I limit functionality and direct the pirates to the App Store for full functionality.
To my knowledge, there's only one way to remove DRM: Crackulous.
So to find out what to look for in a cracked application, I would run Crackulous on your app and compare the app bundles. It should be fairly easy to determine what's been changed by looking at filesizes and running a diff on the files in the bundle.
Once you know what the changes are and to what file(s), just look for those changes in your application to determine if the application has been cracked.
If you find out exactly which files should be checked, please post your findings here so others can benefit from your research.
My previous Stack Overflow question may help you out: Reducing piracy of iPhone applications
Its probably worth pointing out that there are no casual "pirates". Casual users cannot download your app from the app store without buying it. All the DRM-removal schemes require to be run on a legitimately purchased copy.
As to looking at the bundle for changes, as I recall all you need to do is step through the link-loader commands and ensure that the code bundle is still tagged as encrypted. No need to compare it with anything. You'll need to read about Mach-O file format to do this, but thats not difficult, its all documented on developer.apple.com