Is it possible to get information out of install plist? - iphone

I'm trying to find out if it's possible to get any information out of the plist used to install an enterprise app onto a device to then store for the app to use.
What I'm trying to do is pass some information to an app on install so that it can then use that information within the app. I can't make this data static, so it can't be stored in the Info.plist file in the root; it needs to be dynamic and will change on an install by install basis. I also can't pass the information by a web service etc, it needs to happen on install.
Many thanks,
Davoc

Since you're distributing for enterprise (ie not through the App Store), here's a thought: since you can re-codesign an app package after it has been built, and an ipa is simply a renamed zip, why don't you put the app on the server as an unzipped package, and have a server side script insert the settings.plist, zip and codesign the app every time someone downloads the app?
In Summary:
1. Compile the package, but don't code-sign it.
2. Place the app folder (*.app) onto a server.
3. When the user downloads it by requesting a link, have the server generate your desired url into a plist and overwrite the existing settings.plist in the bundle
4. Code-sign the package using apple's codesign tool via command line
5. Zip the whole thing and rename to .ipa
6. Serve the package to the client.

Related

Invalid Swift Support - The SwiftSupport folder is missing

I have updated a currently submitted Titanium app and added a watch extension using swift.
Everything works fine if I build and test on sim and build directly to device. I only get an issue when I submit the app to the Apple app store (via XCode Organizer).
The binary submits, passing validation but I get am email from iTunes Connect as follows:
Dear developer,
We have discovered one or more issues with your recent delivery for "xxxxxxxxxxx". To process your delivery, the following issues must be corrected:
Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it.
Once these issues have been corrected, you can then redeliver the corrected binary.
It seems as though it may be related to a build setting: Embedded Content Contains Swift Code.
It looks like this needs to be set to Yes if the Titanium project contains embedded Swift.
As of now I am stuck as I cannot submit the app. Is this a Ti problem or is there another step I should follow?
XCode: 7.3, SDK: 5.2.2.GA - Project created and built using only the Ti CLI.
First you should check your .ipa file by
unzip yourapp.ipa
If the only Payload exists, the Apple reject your app.
You should create SwiftSupport/iphoneos directory and put the appropriate
swift library files.
You can know which libraries are necessary by checking Payload/yourapp.app/Framesworks. But this library files can not be used as SwiftSupport/iphoneos.
You must copy the appropriate libraries from your mac's /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos directory. The file names are same as the above Payload/yourapp.app/Frameworks but the contents are different.
After you get the Payload and SwiftSupport directory, do package these directories by
$ zip -r yournewapp.ipa Payload SwiftSupport
(Remark: remove all .DS_Store files if exist)
Then Apple accespt yournewapp.ipa.
For future reference: I had to Archive the Titanium project through Xcode because one of my third-party libraries requested to execute a script in the Build phases.
Received the same message from Apple and fortunately fixed it just changing the Embedded Content Contains Swift Code to No.
You should choose "Save for iOS App Store Deployment" option at the time of exporting ipa file.
This issue has now be resolved, there is a new version of the Titanium SDK, 6.0.1.GA that specifically has a fix in for this issue. I have now created, submitted and have a Titanium app with associated watch app now published in the app store.

How to create .ipa file & how to install .ipa in iphone/ipad?

I have developed a mobile native app using jquerymobile.
Now I want to deploy that app on iPhone.
For this one I want .ipa file. How to create .ipa & install .ipa file in the iPhone?
To complete this you will need to do the following:
In Xcode, Go To Product -> Archive (this will build the app)
after the build is complete the Organizer - Archives window will show (this lists all of your archived versions of the app)
at the top left above the list there will be a Distribute button, click it
this will bring up a 'wizard' for creating the .ipa file
Select the Save for Enterprise or Ad-Hoc Deployment option
click next
you will now need to select a Code Signing Identity (this is created in the Provisioning area of the apple developer portal
if you do not have a Development or Distribution cert to create one go to https://developer.apple.com/ios/manage/provisioningprofiles/index.action and create one for the app you plan to create the ipa file for
note: you will need to have the cert installed on your keychain before it will become an option, as well if you are in the process of
creating the file you may need to restart after installing the cert
to the keychain
select the cert that you created for Development/Distribution
click next
this will take a few moments so be patient, once complete it will ask what you would like to name the new file
enter the name of your new ipa file and this will be what you will need to send out or make available to your users
After that for your users who need to install the ipa on their devices you can check out http://www.itexico.com/blog/bid/41187/iPhone-or-iPad-Testing-Installing-applications-with-a-ipa-file
note: my users have not been required to use the .mobileprovision file, but that has been my experience
Hope this helps!
Look into PhoneGap that probably does what you need
In Xcode, Go To Product -> Archive then after build archived it will show a screen there will a option like Share. Once you will click you will get the other options in which one of them is .ipa. Select and build it. For installing you need to add via through iTunes.

iPhone App:Test the newer version of app first and after make it available for other users for download

I have an iPhone App which is available on App Store.
Now I have made some changes in my existing App which can be tested only when an App is available on App Store.
So I want to release newer version but I want to test it first before it it available on App Store for all users
And once it is tested and if it works fine as per expectation then only I want to make it available for other user.
How can I do that?
The short answer is: NO - there is no way to make an app available on the app store that only you can download and test.
If you can specify exactly what it is that you are trying to test that only works when the app is live, we may be able to suggest a different approach.
EDIT: if you just want to test the upgrade process, you can just install the new version on top of the old one - there's no need to delete the one already on the phone. For example if you download the version from the app store, run it, and then build and install a version from Xcode, it will install on top of the app store version, and keep all the settings and documents from that version, just like if a user was upgrading.
Also read up on "wireless distribution" for adhoc apps. Using wireless distribution, you can download and install the app from a link on your phone, just as if you were doing it from the app store, except the link will only work for UDIDs that were included in the adhoc profile.
Two choices:
OTA AdHoc Distribution
Set up over-the-air Ad Hoc distribution. These guys can help: https://testflightapp.com/
A user can install an adhoc build over an appstore build without deleting data, and vice-versa.
Side-by-side Builds
Ok, so your question is about side-by-side installation: you want a user to have the real app and a test version on the phone at the same time. To do that you just need to create version of the app with a different bundle Id. So if your app is com.myco.MyApp, create a copy of it as com.myco.testing.MyApp. Then use Ad Hoc distribution (or whatever) to get it to testers.
I've got a build script that updates the bundle version with the build number. I'm actually just about to update the script so that it will modify the bundle Id so I can have side-by-side testing. This is what I do for the bundle version on my build server:
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion '${PROJECTBUNDLEVERSION}'" $PROJECT/Info.plist
Presumably can do something similar for the CFBundleID:
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier '${PROJECTTESTBUNDLEID}'" $PROJECT/Info.plist

Can app's download data during the installation process on iPad

So for example - while its installing it downloads a bunch of images from a server
No. You can download at first invocation (or later, as needed), or bundle data with the app inside the .ipa. Downloading/installing is entirely handled by the OS, and you have no say in the process.

How Do You Embed a Provisioning Profile in an iOS App

I read in the iOS Enterprise Developer Program docs that a provisioning profile can be embedded with the application.
I am wondering how this is done. Is it simply added to the Payload directory of an IPA, or included in the project directory?
I also wonder whether this technique is generally available for all deployment modes/Programs, or is it just for Enterprise distribution deployments?
The file should be called embedded.mobileprovision
It should be placed inside the .ipa zip file, in the directory Payload/.app/
XCode's "Build and Archive" then "Share..." functionality automatically adds it (so you can use unzip on the .ipa generated by XCode's share feature to see where the files should go).
I'm unclear exactly which scenarios this is supported in, however it definitely works for adhoc builds when you're installing directly from the web onto the device (ie. using the method described here: http://developer.apple.com/iphone/library/featuredarticles/FA_Wireless_Enterprise_App_Distribution/Introduction/Introduction.html )