Open ipa within an ipa in iOS - ios

As stated in my question above, is it possible to have an ipa file within another ipa? To further explain, here is my situation:
I have two apps and the first one calls the other through URL Scheme. I don't have problem with this. But what I need is to install only one ipa file instead of two. And the first thing that came into my mind is to put a .ipa file inside the other .ipa file. I really don't know if this is possible that's why I need your take on this. But if this is not possible, I hope someone can tell me what would be the best practice to doing this kind of thing.
I can make it as one application, but that would be my last solution.

There are no way to use another app in side app. but you can set a screen like.
You need to check with schema that application install in device or not. If not then user need to redirect to app store. User need to install and then while you go with same flow in app that open second app.
referance answer for check app install or not is following: Detecting programmatically whether an app is installed on iPhone

Related

How to put file manually to iOS persistentDataPath?

{to the point}
So I want to create some Quiz Game on Unity that the questions data using external file (in this case I using JSON). I want to keep my questions data can access/edit by myself separately. And then I just have to copy-paste it manually to persistentDataPath in iOS but I don't know how to do it. Anyone can help me?
Note : I don't wanna use any script/code to do it, just manually Copy-Paste it...\
thank you,
You need to set "Application Supports iTunes file sharing" key in the info plist of your app in Xcode.
...and then you can access persistentDataPath through iTunes.
(In the example screenshot below I copied midi.csv from my MacBook to excel in my iPad)
To make it more comfy add a PostProcessBuild-script like this one (gist).
It applies the setting after each build, so no manual steps.

iOS File Retrieval - NSDocumentDirectory

I am working on a library with a very verbose logger module that, on iOS, writes xml logs to NSDocumentDirectory in a consistent file tree. I want to come up with a way for the user of this library to easily access these logs.
I know it is simple to programatically retrieve files from this directory, but is it possible to access this directory on an iOS physical device in any way from outside Xcode to retrieve these logs? I feel like I have seen it somewhere before, something in the manner of extracting the .ipa file and going into the package contents, but I could be wrong.
---------------------------------------------------------EDIT------------------------------------------------------------------
This (Browse the files created on a device by the IOS application I'm developing, on workstation?) is how to do it with Xcode on a device, but I have to assume that there is some way we can create that gets the logs off of a device for a user.
is it possible to access this directory on an iOS physical device in any way from outside Xcode to retrieve these logs?
It is possible to expose the Documents directory by enabling iTunes file sharing. When file sharing is enabled through this method, the contents of Documents directory would be visible to the user in iTunes, which can also be exported. The documents would also be visible for export through some third party desktop apps like iExplorer.
Here is the link to Apple documentation. You may also refer this thread to understand how this is done.
If you're using a simulator (apparently your task doesn't seem to need te real device) you are in luck.
You should go to a folder similar to this one:
/Users/[YOUR_USER_NAME]/Library/Developer/CoreSimulator/Devices/[RANDOM_HASH_YOU_SHOULD_DISCOVER]/data/Containers/Data/Application/[RANDOM_HASH_2_YOU_SHOULD_ALSO_DISCOVER]
Once there, with finder, you'll get the "documents" folder of the simulator and the app you're trying to retrieve your logs from.
You might say: I don't know which 2 RANDOM_HASHES should I go to.
Yes, you're right. If you have MANY simulators installed and or being used, it might be tricky to discover which one is the one you're trying to debug.
The same thing with your APP, your app will live in another RANDOM_HASH folder, and you should browse them, one by one, and then discover your documents folder.
Someone needed to solve this "mess" and created a Xcode Alcatraz Extension that leads you to the exact live simulator and APP you're debugging in any given moment, and then you don't need to guess which 2 random_hash paths you need to navigate to.
If Xcode + Alcartaz plugin extension manager is somewhat out of your reach, you might need to google it. It's not a difficult process.
PS: That magical Alcatraz Extension is named "XCodeWay" (in case you are brave enough to install Alcatraz onto your copy of XCode).
EDIT: Useful link to get Alcatraz: http://alcatraz.io/ Follow its easy instructions and you're done.
EDIT2: If Xcode cannot be used, then the last question in this other thread might come in handy: Browse the files created on a device by the IOS application I'm developing, on workstation?
(Still, an external application in your users machine will be needed )

Is there a way to get the search result i get in the App Store app on the iOS device? ( How to get the ipa file of "App Store"? )

Updated on 2015-11-1:
One solution I am trying is to start App Store using Applium, so that I can record/monitor iOS UI elements. just like what we did Selenium.
Let's treat App Store as a standard iOS app, is it possible to:
uninstall App Store from my iphone.
get the ipa file of App Store
unzip the ipa file and get the app bundle
run Appium with App Store's app file
Is it possible to get App Store 's ipa file?
======
I want to know the position of my apps when I search on the App Store. When I use the iTunes Search API. I notice the result returned from the iTunes search API for a specific search term are different from the result on the iOS App Store app.
I found This Question is also about this, the owner of that has find out the reason about this condition.
But there is no answer to solve this problem.
Actually I've been trying to build the search request, but it cames that the iOS Appstore is using the HTTPs request, so I don't know what to do with this.
Hope someone can help, I'll be very appreciate.
There is at this time no way to specify that you want the results you would get from an iOS device.
The most obvious solution that comes to mind is to build a search request that appears as I it came from ios in your app code.
I'm sure its possible to determine that by basically proxying an actual iPhone using say your router on your home network to log the traffic from an iphone.
Once you have that you can then basically reverse engineer the call in your app code.
As you can refer from Apple's guidance: Search API, there are too many ways of parameter combination.(Parameters includes:term, country, media, entity, attribute, callback, limit, lang, version, explicit, etc.) So it's almost impossible to find out the way of combination that App Store is adapting so as to get the same search results as users get directly from App Store.
You might want to see if you can get this to work:
In Mac OS X:
Launch iTunes
Under Library menu, click on [Apps] menu.
The iTunes will display all installed app
Right-click on one of those apps
Then click “Show in Finder” option
An alternative to this is simply open the directory of .ipa files stored by using this path: User/Music/iTunes/Mobile Applications
This probably only works with apps you downloaded, but it is worth trying.
It's possible to listen in on https connections by installing a trusted ssl certificate on the device and running traffic through a proxy - basically performing a man-in-the-middle attack on yourself. I've previously used Charles Proxy to do this - here's the guide how to set this up. That way you should be able to see exactly what request the App Store app is sending and what response it is getting. And thus it should also be possible to spoof this request and parse the results elsewhere.

Writing to a file in my iOS app

I have an app that downloads files that need to be edited and submitted back to the server through the app. These files could be anything, but are most likely to be .docs. I want to be able to open and edit these files in another app on the device, such as a .doc editor.
I've been able to get this functionality to work in similar Android and Chrome apps, but I'm very new to iOS so I'm not sure what my options are.
Is there a way to give permission for another app to edit a file that is in my app's sandbox? If not, is there a way to get the file back for submittal (like finding it through a file explorer launched through my app - similar to an 'Open..." file explorer dialog used in Windows/Mac OS/Chrome)? Am I going to have to create a way for the editor app to share the edited file back to my app?
Thanks in advance for your help!
To manage the file and the paths take a look at the documentation for NSFileManager:
https://developer.apple.com/LIBRARY/mac/documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/Reference/Reference.html
I usually write using NSFileHandle for reading and writing:
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSFileHandle_Class/Reference/Reference.html
Hope this helps.
iOS8 will provide methods to allow apps to co-operate with "extensions".
See "Creating Extensions for iOS and OS X, Part 1 & 2` in the WWDC14 videos.
Also see the Apple "App Extension Programming Guide".
I ended up sending the file to a 3rd party app for editing and then sending the file back from the 3rd app to my app.

Bundled iOS app using two IPAs

I am exploring into the possibility of creating a bundled app out of TWO of my apps (app1.ipa & app2.ipa). Is it possible to create a shell app (bundle.ipa) which would load app1 or app2 using their respective ipa’s (app1.ipa or app2.ipa) based on user selection? Or Do I have to merge the source codes and assets on both apps to create a bundled app? Basically, is it possible to load an ipa with-in an ipa?
No. It's not possible to create apps with more then one binary.
Instead of trying to have more than one .ipa - which I'm pretty sure isn't possible - creating a class by which the app can introspect whether or not the person has paid for the app. So if they have, the feature is available, and if not... its not available.
Use Facebook's SDK integration as a reference of how this works: before an app can retrieve items from the user's Facebook, the app must make sure that the user has signed in with Facebook.
I wish I knew of a more precise example, but honestly, this should give you the gist of it all.

Resources