SD card path not found of device while testing Amazon InappPurchase - in-app-purchase

I am testing my Amazon Inapp Purchases for which i need to push a json file into the Android device mnt/sdcard path.But my phone is not showing such path.So i have created one and inserted the file into that.But still when i run my application the error log says that
The json file does not found.
Can any one tell me how i can resolve this issue?

Start android monitor(DDMS), connect the device and go to file explorer tab. You will see "sdcard" folder in that. Push the json file to this folder

Related

pkpass not downloading on physical iOS device

Background: I'm learning Apple Wallet by creating a barebones sample app and am trying to automatically update a pass. In order to do so, I understand I need to run a web server that sends push notifications to the device when it's time for the pass to update. I'm using Apple's sample code and running their Ruby webserver via localhost. It correctly generates a .pkpass file, which I can add to Apple Wallet in the simulator by visiting the localhost site or by dragging in the .pkpass file.
Problem: This process doesn't work on my physical iPhone. When I go to the localhost on my iPhone, it shows a 200 response code but comes with the popup "Safari cannot download this file." Even if I try just emailing the generated .pkpass file to myself, it won't open in Wallet.
For anyone who may be wondering, I got it to work by changing the web host to https. Then I ran into another problem getting automatic updates to work, solved here: How to allow HTTP webServiceURL in apple wallet's pass.json file

Access other .ipa's files installed on my iphone via my app

Can I access other .ipa files present on my iphone via my app and pass it to the backend server.
Will I be able to do that after jailbreak? If not on a non-jailbroken device.
The short answer is NO.
Other than that you can register the app as an app that works with different file types and the user can open them manually. Take a look of different App Extensions types Document Provider and Share.
You can't get exact IPA file.
You can get it's container from XCode if it is your app, In container you will found document directory of app where you might have saved data to get this
Goto xcode -> Device And Simulator -> Select your Device -> choose Application
Press Setting button on bottom and press download container

IOS sending Core Data via e-mail for support-reason

I have an app at the app store. Customers reporting bugs. I need the core data from the customers installation to reproduce the error.
What would be the best way in Objective C to zip the core data file to a local file on the IOS device and attach that file to an e-mail?
For the moment I am sending the following instruction to the customers to send the core data file but I would like to have a function within the app to do that job just by pressing a button "send support-request".
1.) Download iExplorer (it is free):
https://www.macroplant.com/iexplorer/download-ie3-mac
2.) Close the app on the iPhone and connect it with your MAC
3.) Start iExplorer
—> Apps —> MyApp —> drag the Documents Folder on the MAC Desktop
—> click it right and Compress it.
Please send me that zip file

JailBreak | Cannot access folders inside /private/var/mobile/Library

I am developing an app for Jailbroken iOS devices that access Safari history. History.plist file is placed at following path.
/private/var/mobile/Library/Safari/History.plist
I have successfully installed my app on jailbroken iphone by following tutorial
Use your jailbroken iPhone in Xcode for developing
When I try to access above path using fopen command of C, I can not access it. My code is below
FILE *fp = fopen("/private/var/mobile/Library/Safari/History.plist","r"); // read mode
if( fp == NULL )
{
NSLog(#"This file does not exist");
}else{
NSLog(#"This file exists");
}
It returns NULL file pointer.
I have Googled this and got to know that since my app is still in sandbox so I am not able to access above path. Couple of posts including [Why SandBox in iOS 6.1.1 still exists for App even after I have jailbreak?][2]
[2]: Why SandBox in iOS 6.1.1 still exists for App even after I have jailbreak? and [how to get the message when receiving the “kCTMessageReceivedNotification” notification on IOS5][2]
[2]: how to get the message when receiving the "kCTMessageReceivedNotification" notification on IOS5 suggest that the app needs to move outside sandbox in order to access the complete file system.
I am confused about this. Can you please guide me how can I access this path?
Best Regards
Usually you will get a message in the console saying that access was denied. If the sandbox is indeed doesn't allow you to access browser history then you need to move your application outside of the sandbox. To do that you can copy your application into /Applications directory where all system apps are. You can do it using ssh, iExplorer or anything else that can access root folder of iOS device. Read this, the "The actual signing part" part. You can skip ldid stuff, you don't really need to sign anything unless you need to sign your app with entitlements.

Retrieve files from iOS app Documents folder via command line

For the project I work on, we have to set up performance metrics. The way we do it is that the simulator writes CSV files to a known location. We then retrieve theses files and make graphs out of it. Piece of cake.
We also have these tests running on the device. In that case, the files are created in the Documents directory.
While I can retrieve these files via the organizer, I'd be much more interested in automating that.
How can I retrieve files from an iPhone app via the command line rather than the organizer?
You can actually access the content of your app from your computer, using https://github.com/phonegap/ios-deploy (originally https://github.com/ghughes/fruitstrap) .
It's as simple as :
./ios-deploy --download=/Documents --bundle_id com.mycompany.myapp -2 dest_dir
You can do much more, like listing the content of the app, debug using lldb etc.
You can use iFuse, as part of libimobiledevice
You can not access the documents folder on your iOS device from your computer without itunes.
I run an webserver within my app so i can download the files via http. For zero configuration setup i use Apples Bonjour.
look here:
https://github.com/robbiehanson/CocoaHTTPServer
https://developer.apple.com/bonjour/

Resources