Removing plugins from a .pkg file - macos

I am using an user registration plugin that is included in iceberg installer. Registration dialog is appeared and everything works fine in the installer.
But the problem here is when i right click the .pkg file and go to "Show Package contents" there is the plugin folder which i included in the package and i can delete this simply.
Is there a way to prevent this by disabling "Show Packages Contents" or any other ways available to prevent this ?
Also there is "Flat Package Editor" in which we can remove the files within the package created using "Package Maker".
Is there a way to prevent this also ?
Thanks in advance,
Regards,
Balaji

No, you can not restrict a user to delete any content inside your application bundle.
However, you can use digital signatures to mitigate the problem.
Make sure that the installer is signed before you ship it. In that case, if a user deletes any content from inside the bundle, OSX will complain that the app is broken.
But, be aware that a person having decent knowledge about .pkg files can still bypass your registration.
For example, if I do a silent installation of your pkg, it will not show me the registration dialog.
You should probably look at implementing this registration inside your application as well. So, if a user bypasses the registration in your installer, your application must be able to detect that and show the popup again.

Related

Adding preferences to Mac app

I have created a Mac app, now I want to add a Preferences to this. I looked up and came to know that I need to use NSPreferencePane. I have created a separate Xcode project for this and it will get generate a .prefPane file. On running this it will ask whether to add to system preferences or not and adds it if selected.
How can I bundle my app and preferences together ?
If I package this as a dmg file should I put both .app anf .prefPane file in the dmg file ?
It sounds like you want to magically (or programmatically) copy the preference pane into the right place (~/Library/PreferencePanes or /Library/PreferencePanes).
If you're going to copy it into your user's Preference Pane folder (i.e. ~/Library/PreferencePanes), you should be able to simply copy it from your Application bundle into there.
If you want to copy it into a system-wide Preference Pane folder (i.e. /Library/PreferencePanes), you'll need to write a privileged tool or helper app that gets Administrator priviledges so it can do the copy. Creating these things is not the most trivial of tasks.
If you are not distributing via the Apple App Store, you could use an installer package to install both your application and your preference pane. The newest option from Apple is "productbuild", which is a command line tool. PackageMaker is Apple's older tool for creating installers, and you can get it as part of the Auxillary Tools for Xcode, available from the Downloads section of developer.apple.com, and there are a bunch of other installer-building tools you could use to ship your Preference Pane with your app, such as "Iceberg".
It would be much easier to simply add the preferences interface to the app itself.

ClickOnce Applications Won't Install on Windows 7, Application Cannot Be Started, Contact the Application Vendor

I am trying to install Github for Windows which is a ClickOnce application, however I am unable to start any ClickOnce application. I receive a pop up error saying "Application cannot be started, contact the application vendor".
I have seen that other users with this error have solved it by deleting the '2.0' folder in there 'users/USERNAME/AppData/Local/Apps/2.0' location. However, I do not have an 'Apps' folder in my 'AppData/Local' location and therefore unable to delete anything from it. I have tried creating an 'Apps' folder there and then trying to install the application but I receive the same error. When I run the following: '%UserProfile%\AppData\Local\Apps\2.0' it says that it refers to a location that is unavailable.
I have contacted Github support and they told me the same thing about deleting the '2.0' folder but alas I do not have the 'AppData/Local/Apps' location. They also told me to clear the cache by running this: rundll32 %SystemRoot%\system32\dfshim.dll CleanOnlineAppCache but that did not solve the problem either.
I do not have any anti-virus or firewall turned on either. I have also tried installing a different ClickOnce application and I received the same error. Is there some other folder I need to delete or some setting I need to change to get ClickOnce applications to start?
By Changing to Net Framework 4.0 got me working, changing and delete 2.0 made no difference but deleted the other apps.
The other apps were reinstalled automatically so no biggy, will try install latest 4.51 later.
I know this is a really old question. You should have a Apps folder at '%UserProfile%\AppData\Local\Apps\2.0'. You are probably unable to see the folder because you haven't enabled viewing of hidden folders in windows explorer. To resole this, launch windows explorer "windows key + e", hold down Alt and hit T (tools menu) then click folder options, click the "view" tab and then select:
"show hidden files, folders, and drives"
Uncheck:
"Hide empty drives in the Computer folder"
"Hide extensions for known file types"
"Hide protected operating system files (recommended)"
Note, not all of these are required to see the hidden folder "apps", this is how I always configure my setup though.
After this you should be able to see the folder at :
'%UserProfile%\AppData\Local\Apps\2.0'
Deleting the 2.0 folder usually works but you are also deleting any other click once applications that have been installed.

Mac app is still running after deleting Info.plist

I want to build a Mac App from scratch. I manually created the required folders of main app, Contents, MacOS, Resources, and dropped the binaries. The only one I don't know how to create from scratch is "Info.plist". So, I just copied one from the installed Applications on my machine, removed all the unfamiliar keys, except the Executable and Package type (as APP).
Then I did a test. Before I copied and editted the Info.plist file, I double-clicked the app icon in Finder. Not working, which is expected. After I copied and editted the Info.plist file, it is working, which is also expected. Next is what I don't understand. I removed the Info.plist file, and double-clicked the app icon in Finder, it is STILL working!
My question is:
Did the first time running migrate the Info.plist information to some secret place in the app bundle?
Is copying and editing an existing Info.plist file from other applications a good practice for building an app from scratch?
I know the post is old but think to answer,so that users will get benefitted as they come across this.You asked two questions:-
1)See the first run has a build and its derived data might help you to run without Info.plist(for particular case although i didn't think so it run).
But you can't run app without info.plist.
2)No.the answer is copying and editing an existing info.plist from other application is not a good practice.
Every app and plug-in uses an Info.plist file to store configuration data in a place where the system can easily access it. OS X and iOS use Info.plist files to determine what icon to display for a bundle, what document types an app supports, and many other behaviors that have an impact outside the bundle itself.
For better knowledge about this you can see this link:-
https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Introduction/Introduction.html
I think the user who asked this already got these things,Hope this will help other Users.
Thanks.

.app file not get install using package installer

I have created a package installer using Xcode's PackageMaker. I want to install a .app file into the applications folder, but when i am running installer package, it's showing that the software is installed succesfully. When i checked the applications folder, the application i m installing is not there. Can anybody help me to solve this?
While the Installer is still running you can select the Window menu and choose the Installer Log option. In the Installer Log dialog select the 'Show All Logs' from the drop down control. This might help you determine where the Installer put your .app or what happened.
BTW I'm seeing the same thing with a .pkg I have written and would love to hear if you find a solution.
I ended up getting things working with my .pkg by making it install into /Applications/ with the trailing slash. I had previously been just using /Applications. Maybe that works for your package?
The issue is that the installer can upgrade packages even if their not located in /Applications. So if there is an application with the same name or it already exists on your hard drive it will try and install over that. To fix it click on the item your trying to install in the content pane then click on the components tab and make sure the "allow relocation" check box is unchecked. Should work perfect after that

On publishing a click once installer through install from web, the installer does not appear on the webpage

I am creating a clickonce installer using the deployment strategy of Install from the Web or network share, on one of my project. I am learning how to use click once installers. When i publish my project it gets succeeded. i gave the URL of my website that i had created through google so that anyone can install from that URL. After publish gets succeeded the URL should be launched automatically but it is not. Moreover. When i check my website and in it that page whose URL i had given, there is nothing there. No installer. Please help.
Right Click on Publishing Project
Click Properties
Click "Publish"
In "Publishing Folder Location" is anything set there?
Click the button with ellipsis (...) to the right of the combobox
Click "FTP Site" (not Remote site, as this needs FrontPage extensions)
Enter the Server information, Directory (that you have access to), keep it as passive mode, uncheck the Anonymous option and put in the valid FTP instructions.
Click Open, and Republish. All should work 100% with this.
If not, have a look in your wwwroot/ folder and find the application information (if it's there) and you will have to manually upload the files.
EDIT for comment:
The website that you are uploading to, does it have FTP access? Meaning a place that you would upload file to for display on the website, even like your html content? (index.html etc.)
If not, you will need to get these details from your website hosting provider and fill in the appropriate fields for the FTP upload.
It's a while since I did this, but I'm fairly sure that you have to upload the files manually.
The installer needs the location so it can build the web page etc. All the files should be in an output folder in your project.
EDIT: I've just checked and the output folder is the one you specify on the first step of the Publish Wizard. If you specify a local folder the files will be put there for you to FTP to your website later. You can also specify a remote address as and FTP or HTTP location (which I'd forgotten when I posted my original answer). You'll have to enter the user name and password for connecting to the remote location later in the process.
Are you using Visual Studio 2008? The default behaviour of deploying a "publish.htm" page has changed.
Bring up your project's properties and switch to the "Publish" tab. Click the "Options" button and switch to the "Deployment" section of the dialog. You'll see by default that the "Deployment web page" TextBox is empty. You'll need to give that a value and also check the "Automatically generate deployment web page after every publish" CheckBox.
I've taken to filling that in with "default.htm" so that whichever folder you deploy your app into will have the ClickOnce publish page as its default page.

Resources