Can I bundle /package two apps into one? - ios

I have two apps. The first one checks for passwords and credentials and if all is well, then launches the second app. Can I bundle/package the two apps into one? The intent is to present the whole thing as a single app to the Appstore.
Is this approach supported for iOS and accepted by Apple?
How about framework? Although I think a customised framework is not supported for iOS which is of no use to my case.
Any hints or code samples as how to achieve this (if at all possible) is very much appreciated.
Thank you for your help.

You can't bundle two apps, but you can write your own framework that checks credentials and add that to your app. From the information you give, I can't see the reason why you need to put credential checking into an extra framework. Can't you do the check inside your app?

I suggest you to create a library for Login (where you can check the credentials of user once authentication is success use protocols to send the information of user or the status (success or failure) to the main app where your total application is presented). Creating a library (.a and .h) file is easy here you can't use Xib files and images for this you need to create a new bundle where all your Xib's and images are added for library purpose. In other case you can use images as a base64 string. So your total app is now splitter into 2 parts 1. Library for Login 2.All other features. If you need more information on this please let me know.
Hope this will give you an idea and helpful

Related

IPhone: Best way to deliver configuration file to test application

Main Problem
I have to write test application for iOS to test very complex multi platform framework.
There are already applications for other platforms which are using common configuration file (which defines test servers, user names, log level, and so on). Configuration process is quite complex so providing a complex UI will be waste of time on mobile platforms.
This file is a xml and its file name extension is xml.
Tester will have multiple configuration files (will use only one at the time)
This files should be easily uploaded by tester
tester should be able to select configuration file
What solution I'm looking for
At bagging I was thinking about iCloud service. Problem is that in 90% of cases device is shared by multiple people (testers and developers), so I'm not convinced this is best approach, since this will provide problems with sharing an iCloud account (usually there is account per device not per tester/project).
It would be best if this files could be delivered to application by using iTunes. Anyone who will do test will have this tool to install test application, so it would be nice if he could upload those files too.
Any useful hint will be appreciated (not necessary a full solution).
As a bonus opposite direction would be also useful (fetching logs). Currently usually logs are send by an email. If it is possible to easily fetch this in same meaner as configuration file it would be great.
Ok looks like it is possible to do this with iTunes.
When inspecting list of installed app for device in iTunes at the bottom there is a section "File Sharing" where you can add remove files.
If you want
That your test application for iOS, test something by readying XML File
There are different XML files
There are different testers.
In this case rather than doing too much you can
Ask testers to upload the files in dropbox.
Have a textbox in your app, in which user will type the URL of XML file (which they have uploaded on dropbox)
And next to it you have test button on click of it you can download the file and test against the logic.
Once the test is over you can grab the result by email or ask them to upload on Dropbox (manually or using api).
Ok I've finally found something like that. This perfectly solves my problem.
Files will be uploaded and downloaded by iTunes.
Another helpful link.

iOS - import file from another app into my app

I want to import a document from another app into my app like it's done in MS Outlook iOS app when you click the paperclip in an email. Then you get a list of apps (dropbox, google drive etc) + recent documents and you can select a document.
How is this done / do I need to use the app-extensions for this ?
thanks
Frank van Vliet
this is the scope of App Extensions. To add an App Extension to your Project you have to navigate to File -> New -> Target and the App Extension you are looking for is called Document Provider. Please first check the WWDC Video on best practice for App Extensions and the App Extension Programming Guide. It will help you to develop the understanding of this Feature.
EDIT:
Maybe I set you on the wrong track, but within the App Extension Programming Guide you could have found the answer to your Question. I'm using Xcode 7.0 Beta 4, but most of the following screenshots should look exactly the same in Xcode 6.*. First of all I started a new SingleView-Application written in Swift and added the Document-Provider Extension as a target to the Project as outlined above.
After building the application with the new Document Provider target I ended up starring confused onto the Share-Menu realising that we talked at cross purposes. The Documentation on this target is slightly muddled but after a while of testing and searching I realised that the thing you are looking for is the Document Picker, not the Document Provider. On this Page you can find the Relevant Chapter: Accessing Documents Link, where you can get examples for the Document Picker.
Since this will hopefully solve your Problem, I would like to shortly refer to the Document Provider and the overvalue it could add to your Application.
The Document Provider extension consists of two separate parts: the Document
Picker View Controller extension and the File Provider extension. The Document Picker View Controller extension provides your document provider’s user interface. The system displays this interface when the host app presents a document picker view controller for your document provider. This interface should let users browse through and select documents and destinations from inside your document provider. This extension can also perform basic import and export operations without any additional support.
from the App Extension Programming Guide as mentioned above
So the Document Provider is kind of an Import Feature as seen from another app. If you would implement a Document Provider Target for your Application, other Apps can access designated data. For example you could attach Files from your App to an E-Mail (left screenshot) or Open a File in Pages (right Screenshot).
When working with Files, this could be a nice feature for your users.
Also I would recommend using either a Share or a Action Extension.
Share extensions give users a convenient way to share content with other entities, such as social sharing websites or upload services. For example, in an app that includes a Share button, users can choose a Share extension that represents a social sharing website and then use it to post a comment or other content.
That doesn't sound exactly like the thing you want to achieve, but at the moment even Apple uses the Share Extension for all kinds of things.
An Action extension helps users view or transform content originating in a host app. For example, an Action extension might help users edit an image in a document that they’re viewing in a text editor. Another type of Action extension might let users view a selected item in a different way, such as viewing an image in a different format or reading text in a different language.
You said you want to import a document from another app into your app. This sounds handy. Lets assume a user opens a Document "loremIpsum.txt" in the iCloudDrive Application and wants to share it to your new app.
Now, you have to write the code to handle imported files when opened by the Document Picker, you could reuse this code to easily add a Action Extension to the Share-/Action-Menu. I hope this will help you and solves more than one problem.
Best regards
cr0ss

UIInputViewController - Disable Keys Based on User Input in Container App

So, let's say I have a container app and an extension to that app for a custom keyboard. Let's say that custom keyboard has, by default 5 keys. Doesn't matter what those keys are.
Now, I want the user to be able to DISABLE any of the 5 keys in the container app. If disabled in the container app, the keys should appear red and disabled in the keyboard.
My question is: How do I load the user preferences/serialized data from the container app, into the UIInputViewController?
If anyone could help with steps necessary to make this happen, or provide a link to a tutorial (I can't seem to find one), it would be much appreciated.
So I finally figured it out.
Here are the basic steps.
1) Create a Shared Group. This link provides step by step instructions on how to do that: https://stackoverflow.com/a/29051138/1152868. I had initially implemented these steps but I was still unable to access the shared directory (outlined in https://stackoverflow.com/a/26050187/1152868) from the extension. Turns out you have to add the entitlements file to both the container app AND the extension target. That was the biggie for me.
2) Once you confirm open access across your container app and the extension, you can share data between em. I referred to this tutorial for sharing: http://www.atomicbird.com/blog/sharing-with-app-extensions. You have two options: using a shared file directory or using a shared NSUserDefaults domain. In my app, I was saving and loading data with NSCoding. But, I experienced issues with unarchiving the data in the extension, so I decided to save to NSUserDefaults instead (the data I need in the extension can be formatted as a simple dictionary, so it was easy enough).
Using Shared Groups and NSUserDefaults, I am now able to save and load data from the container app to the extension!

iOS - Can users access App Bundle Contents (specifically the Bundle Resources)

I'm relatively new to iOS development. My question is quite simple but there seems to be a lot of un-complete answers out there.
For example, I have a few pictures that are used in my app and I don't want the users to have access to these pictures at all (due to copyright). I've included these into the "Bundle Resources" along with the "Image.cxassets" and other .xib files.
Will the user ever be able to access the pictures? (I understand that the user can't access the Library folder but it seems to be a pain to copy the pictures into the Library folder at app first launch.)
thanks ahead for answering.
I didn't understand what exactly you're asking, but for users to access your app bundle contents the file sharing for iTunes option should be set in .plist. See in the reference
Although you may put dot before file ".image.jpg" to make it hidden but it sounds like temporary solution.

Is it possible for a user to send me their whole app-directory for analysis purposes?

Is it possible for an non-beta user of my app to send me their whole app directory for analysis purposes?
I know the way via the Xcode Organizer to download the whole app directory. But is this also possible for a end user to save/export a package of the app including all document files and send me this package via email?
The application directory and its contents are not end-user accessible without the use of a third-party tool such as PhoneView or iExplorer.
Yes. I am sure there are many cheaper ways to do this, but I find PhoneView really handy for browsing the device and copying complete app folders.
Another approach I suppose - easier for the user but tougher for you - is to implement file sharing so that the user can drag stuff from your app via iTunes. It depends on how much / what kind of data you need from the user how you would implement this.

Resources