I'am creating a Mac OS application in which user will choose a font to display a text. All fonts will be in an application folder in finder. I need a code (swift or objective-c) to load it directly (without installing) to Xcode so user feel free to add any font to the folder to use.
Related
I have created an two installer of java application using install4j.
One for Windows system and one for Mac OS X.
Setup.exe file of windows installer have custom icon which I have given but mac os installer don't have icon which is provided by me even when installing application desktop shortcut also don't have the icon.
So, Can you please help me how to use custom icon for mac application installer.
My file is a png file of 32x32.
In window it is working perfectly but for mac it is not showing my icon on desktop shortcut as well as on application icon.
Am I need to give image with any specific size for mac ?
Please help me setting icon for mac.
Thanks.
You should add icons sizes 16x16, 32x32, 64x64 and 128x128 for optimal performance.
The desktop link icon will come from the icon that has been set for the launcher, not for the installer. install4j will generate ICNS icon files from these images. Alternatively, you can specify your own ICNS files in all icon configurations.
Double clicking the icon does launche the application but it do not accept files to launch itself.
But in windows same application icon accepts the file and launches it.
I'm using
NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE,
onInvokeEvent);
to start the app if some file is dropped on it. Windows does it, mac does not. Any expertise?
Flex documentation says:
File type association
To associate your application with public or custom file types on Mac OS X, you must edit the info.plist file in the bundle to set the CFBundleDocumentTypes property. See Mac OS X Developer Library: Information Property List Key Reference, CFBundleURLTypes.
I have Mac OS 10.7.3, with Xcode 4.3 , I am not able to see iPhone simulator folder in Application Support folder on MACINTOSH HD drive.
MACINTOSH HD/Library/Application Support/
There is no Library folder in User directory either.
Please help Let me know the solution.
Thanks
The Simulator is stored in ~/Library/Application Support/iPhone Simulator
To see the Library Folder in your user directory you need to choose the Go menu in finder, then hold down the option key on your keyboard and then choose Library, because Apple has hidden it in Lion.
You can also go to the Finder and use the keyboard shortcut ⌘-Shift-G. Paste ~/Library/Application Support/iPhone Simulator into the dialog box and click Go.
I can run a FireMonkey Application on Mac OSX with PAServer. But now, I would like to deploy the application Mac OS (something like MSI under Windows). How can I do this?
You'll want to read more about Application Bundles.
Using the application bundle that Delphi creates and deploys via PAServer
Since you're using the PAServer, you'll find that it has already created an application bundle for you. After you run the program via the PAServer, look in the following folder on the Mac for the application bundle:
/Users/[username]/Applications/Embarcadero/PAServer/scratch-dir/[profilename]
If your project is named Project1, you'll see an application bundle in that folder named Project1.
If you read the above wiki article, you'll know that Project1 has a "hidden" extension of .app, and the whole thing is really a folder with all of the required files to run the application.
Go ahead and run this application bundle directly on the Mac. If it complains about missing dylibs, such as libmidas.dylib, simply copy them from the PAServer folder into the application bundle's MacOS folder.
To the Mac OS user, the application bundle appears as a single program file, complete with an icon. The user can double-click the application bundle to run the application, drag it to their dock, etc.
Changing the icon
The application bundle will have the Delphi icon by default, but you can replace it with your own icon. On the Mac, simply right-click on the application bundle in Finder, and select Show Package Contents. In there, look in the Contents/Resources folder for the .icns file.
Use the Icon Composer application that was installed with XCode to create your .icns icon file from existing image files.
Peeking inside the bundle
Peek around inside at the rest of the contents. You'll see the required dylib, your program file, and the Info.plist file, which is a text file with things like application IDs, signatures, and other important things.
More about deployment
If your application can be self contained in an app bundle, the standard method is to put the application bundle inside a disk image .dmg file, which allows the user to drop the application into the applications folder.
If your application requires the installation of additional files, libraries, databases, or frameworks, etc., you should create a package. You can utilize PackageMaker to do this. A package is similar to the "msi" installer on Windows that you mention.
When the user double-clicks the package, it's run by Installer. It has a wizard style interface and walks the user through installing the application. You can also sign the package with your code signing certificate.
If you want to include your application bundle in the app store, you'll need to sign it. You'll also need to sandbox it.
Sandboxing and the Mac App Store - Nov 2, 2011
The vast majority of Mac users have been free from malware and we're
working on technologies to help keep it that way. As of March 1, 2012
all apps submitted to the Mac App Store must implement sandboxing.
Sandboxing your app is a great way to protect systems and users by
limiting the resources apps can access and making it more difficult
for malicious software to compromise users' systems. Learn more by
visiting the App Sandbox page.
You must create an Application Bundle in order to deploy you app on a OSX System .
Check these links for more information
Deploying Your Application (Mac OS X installers )
Application Bundle
Building Fancy DMG Images on Mac OS X
I created a simple testbed app in Delphi XE2, and compiled both a Win32 and OSX version of the application.
I zipped up the OSX version, along with a copy of the libcgunwind dylib runtime file and copied this files to a Mac i have access to.
When I unzipped the file, the mac recognized my OSX application and I double clicked it.
This, in turn, opened up a terminal window for some unknown reason along with my simple app's form.
The application itself ran and behaved just fine, but I'm curious why a terminal window would open up on the Mac?
There is a free tool available for Delphi XE2 that will create the OSX deployment app bundle for you, from Windows, without the need for PAServer.
http://enesce.com/delphiosx_bundler
Check the readme for instructions.
IIRC this happens if you execute the binary directly instead via a bundle
Lazarus/FPC apps had the same problem. IIRC the directly executed binary also didn't get events under those circumstances, but those apps were Carbon based. That problem also went away when running via a bundle setup (which is pretty much a manifest, a few dirs and a symlink)
Your application needs to be run from the application bundle. If you run it directly, you'll get the side effect of seeing the terminal window with the command line that is running the application.
You'll want to read more about Application Bundles.
If you're using PAServer, after you run the program for the first time on the Mac, look in the following folder on the Mac for the application bundle:
/Users/[username]/Applications/Embarcadero/PAServer/scratch-dir/[profilename]
If your project is named Project1, you'll see an application bundle in that folder named Project1.
If you read the above wiki article, you'll know that Project1 has a "hidden" extension of .app, and the whole thing is really a folder with all of the required files to run the application.
To the Mac OS user, the application bundle appears as a single program file, complete with an icon. The user can double-click the application bundle to run the application, drag it to their dock, etc.
The application bundle will have the Delphi icon by default, but you can replace it with your own icon. On the Mac, simply right-click on the application bundle in Finder, and select Show Package Contents. In there, look in the Contents/Resources folder for the .icns file.
Use the Icon Composer application that was installed with XCode to create your .icns icon file from existing image files.
Peek around inside at the rest of the contents. You'll see the required dylib, your program file, and the Info.plist file, which is a text file with things like application IDs, signatures, and other important things.