Storing a QTMovie file to launch on Startup of App - cocoa

I'm trying to build a simple app for OSX using cocoa and the Qtkit. I would like to have a movie start playing as soon as the app is launched. I've created an app to play which can play a .mov file on my located on my desktop, by referencing the location of the file.
I would of course like to store the .mov file within the app itself, so that it will play the specific file when the user launches the app, but I am not sure where or how to store it. Should I use the Core Data library? Thank you.

No. There might be a reason to store a movie in a Core Data store, but this isn't it.
Store the movie file within your application's bundle, and use NSBundle or CFBundle to retrieve the URL to it to pass to QTKit.

Related

Xamarin-iOS: host application will not run with share extension

My app setup is a basic new app with default viewController with the default classes for share extension on iOS 11.2.
The host AppDelegate class FinishedLaunching never gets called.
Just shows the launch screen and closes the app.
The sample Xamarin app provided also has the same issue.
Link to the sample app:
Share Extension sample
Any idea whats going wrong?
Do you want to open the app which you created with the share extension, when user clicks the share button to use this share extension? If so, this app should be called Containing App.
But unfortunately, there's no way to do this on iOS8.3+ except Today Extension. From this post we know that:
The intended approach for share extensions is that they handle all of
the necessary work themselves.
Also from the Apple documentation about extension:
An extension’s UI should be simple, restrained, and focused on
facilitating a single task.
Apple doesn't recommend us to open its containing app from extensions, actually it avoids that. If you want to retrieve data in containing app, you can set up an app group so that data can be shared between these two apps.

Save file that doesn't get deleted at unistall

I want to save a file on a Windows Phone 8 system that doesn't get deleted at unistall.
The file contains data that I whould like to restore if the app gets reinstalled.
In my research I found that I can't write to a file outside my Isolated Storage. is there a way to do this on Windows Phone 8?
the only way to do this is using a web storage method (skydrive, mobile services, azure...) to upload the data and, when the user logs again in the app restore from the web that info if not present locally...

Microsoft Player Framework not playing local files

I am developing a windows 8 app in winjs and one of its features is to be able to play local video files. So far I am using:
Windows.System.Launcher.launchFileAsync
Which works fine but obviously suspends the app and opens the video with their default video program. I would rather keep the user in the app so I tried to implement it using the Microsoft Player Framework(http://playerframework.codeplex.com/). I know the framework is referenced correctly etc because it can play video files both in the 'app data' directory and online.
However when I try to play files within a folder that the user has picked (with the folder picker) or the videos library that the app has declared access to, the video fails to play. The app can however change the name, create new files in the directory and delete files so I struggle to see a permissions problem.
To get the path of the file I am using getFileAsync( and using the path property and simply using that to set the src property of the MediaPlayer control.
Do any windows 8 app gurus have any suggestions as to why it is not working?
Thanks in advance
p.s. let me know if any further info is required

WP7 how to use MediaPlayerLauncher with song in library

This article says that
MediaPlayerLauncher launches the Media Player application and plays
the specified media file. Media files are stored in isolated storage
or in the application's installation directory.
However, I want to select songs from a certain album from library (using MediaLibrary) and launch the default Media player to play it. How to do this ?
Basically you can't do that with the current API.
The MediaPlayerLauncher takes a parameter of type
MediaLocationType,
and from the documentation we can see that there's no option to access the media library
Use MediaLocationType.Data for media files that are stored in isolated storage. Use MediaLocationType.Install for media files that are part of the application project. They are bundled into the .xap file and stored in the installation directory of the application.
I've created a UserVoice request for this feature. Hopefully we'll get it with the next update if enough people vote for it.

What non-user directories can sandboxed mac app read/write to?

I have an app which needs to preserve data between times it runs. I had been using NSUserDefaults for this, but I've had a few users point this out to me: this causes different users to end up with different data, which isn't the way the app should work. It needs a single directory that it can read/write from regardless of which user is running it.
So, I need a non-user specific directory that a sandboxed mac app can read and write to.
Thanks!
(Oh, and if this directory is persistent between updates of my app, that'd be helpful, too!)
Quick barely related question: Is there a way to have a user modifiable resource file in a Mac App Store approved app? I don't want it to be modifiable via my app; I just want to make sure that users modifying it won't cause the system to kill the app for not matching a code signature hash or something.
I don't think that you will be able to read and write in a directory outside of the App Sandbox container without prompting the user to select it using Powerbox and saving a security-scoped bookmark (see App Sandbox Container Directory). From what I've gathered about App reviews lately, you won't even be able to specify a default in the open dialog if you elect to have the user choose the directory.
As for the second question, as I understand it any verification of code signatures is left to the developer. So while MAS apps have a _CodeSignature folder containing a plist with all the hashes of the resource, in my experiments changing them had no effect on app launch.

Resources