I have requirement to attach a doc file or a .rtf file with my project source code as a resource.
I want to invoke it on application installation time after saving permission.
I am working on a backgroung application not on a Ui application.
I dont have no idea about how to attach these files with source code and use them.
You can treat these files as a resource to the project and place them in the resource folder and package the project.
Thanks
Naveen M
Related
I have an iOS project that includes a framework and a .dat file which is used by framework. I add the framework file and the .dat file to a folder in my project and things are working in this way.
However, the .dat file is so big and this makes my project size bigger. I want to download this file after installation to make my app size smaller.
Is it possible? If yes, how can I do that?
First you need to store .dat file on server and get link of that file and download it in app at very first launch.
When app is launched you need to check that .dat file is already exists in your device's doc. folder or not.
If not then you need to download it from url and store it in doc. dir.
When you successfully downloaded file you need to add a bool in user default to true to identify that file is dowloaded correctly, and you can check that too to identify whether file is downloaded or not.
if .dat file download is not successful than file will not be available in app. and you can perform some operations based on that.
Alternatively, you can just check the bool flag in user defaults to check for the successful download of file.
you can place that code in AppDelegate as there are several methods available for different app states.
Hope it will help you:)
Check this [On-Demand Resources]
https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/On_Demand_Resources_Guide/index.html#//apple_ref/doc/uid/TP40015083-CH2-SW1
I want to have a custom project file that a user selects in a UIDocumentBrowserViewController. That project file would then reference files in the same directory which would be opened and written to programmatically. I can't seem to get access to the project's sibling files programmatically (presumably due to sandbox restrictions). What's the best way to get this to work?
I ended up making the enclosing folder a document package, i.e. a folder that shows up in the file browser as a single file. I then had access to read all the files in it.
https://developer.apple.com/library/content/documentation/CoreFoundation/Conceptual/CFBundles/DocumentPackages/DocumentPackages.html
What are the different ways available so that We avoid code tempring in ios. Please suggest any good way that we can check at server level to avoid code tempring not in source code. And how we can check that server call from app is from authorize app.
iOS apps are most secured itself. It can not be tempered easily. While building your app no code file and XIB's kept as it is.
You can check it in these steps:
Right click on .ipa file and select Open With and then Archive Utility
Then it will create folder named Payload with .app file in it.
Now Right Click on .app file and select Show Package Contents
This will show you one folder with multiple files in it. Now try to open each file and read it. It will be in encrypted way.
For reference read this link
I'm developing a tile engine with actionScript-3 for IOS machines. Is there a way to package JPG files with IPA and then read them with Adobe Air's FileStream Class. I need to read files asynchronously. Embeding them or putting them in a swc wouldn't help.
I understand how it works on desktop.
var file:File = File.documentsDirectory.resolvePath("myfile.txt");
On desktop, means:
[user_dir]/Documents/myfile.txt
On IOS:
[app_dir]/Documents/myfile.txt
How can I package the IPA that has "myAsset.jpg" in "[app_dir]/Documents/" directory?
I tried to open a "Documents" directory and put some files in it and include it in the package content section of the run configration of flash builder 4.5.1. But that didn't work.
Thank you.
When you package the image files with your application, they will be in the application directory, which you can access with the File.applicationDirectory property. You should be able to load your images directly from there. If you want the images in the documents directory, you will have to copy them there after installation.
One Addition to Joes answer:
When you add a folder over adt the actual folder is added not its contents.
So if you add the Folder assets you access your images like this:
File.applicationDirectory.resolvePath("assets/image.jpg");
i a developing blackberry aplication using eclipse can any one tell where to find the following library
package com.rim.samples.docs.notifications;
i have downloaded it from blackberry site but i dont know how to use it
com.rim.samples.docs namespace is common for samples BlackBerry Application Developer Guide.
On the other hand, "package" token defines the packege namespace, not the import.
If you have downloaded code and post it to namespace with other name, you may have trouble to compile it. Resolve it in two ways:
1. if your code file is placed directly in project src folder, simply remove
package com.rim.samples.docs.notifications;
from code, this will set namespace to default.
2. in project src folder create folder "com\rim\samples\docs\notifications" and move file to folder "notifications".