Mac application update from dmg - macos

Currently I am developing a MacOSX app. it can be launch at startup. So it has launchitem installed.
However, when I need to update app, I drag app to ./Applications from dmg dialog window to replace current app with updated one.
Click the updated one, then reboot my Mac. Mac still show the previous app. It seems like I don't really replace or overwrite the old app.
Does anyone know how to clean the previous launch item and files when users drag new app from dmg to ./Applications ?
Thanks

The root cause is there is one deprecated app archive folder in user/developer/xcode/archive/, which is first triggered by launchitem. So the update app in applications is not called.

Related

How to delete a mac app that keeps opening by itself

Spotify keeps opening by itself on mac. How do you delete it, when macOS does not allow you to delete open apps, and the app reopens faster than you can trash it?
Possible solution: Find the app in finder and select Show Package Contents. Delete the content of this folder. Close the app, and it should be unable to open. You can now delete the app and try reinstalling it.
Use Activity monitor to force quit the app, then use app such as AppCleaner or simply drag and drop your Spotify app from your Applications folder into trash.

Archived macOS app launches with blank window

I have a macOS app with a ViewController that renames and resizes the app window, has several buttons, and a WKWebView that loads a default webpage on launch.
The project itself is an .xcworkspace file, since it includes the CocoaPod SwiftSoup for HTML scraping.
The app runs great in the simulator. When it launches, it looks like this:
I want to run this app on my Mac outside of Xcode. I am not planning on releasing it to the App Store, it is just for my personal use.
I archive the project with Products > Archive, then select "Distribute App", then "Copy App" to create a directory with the archived app. This all works great.
When I launch the app, I just get an incorrectly sized blank title-less window, without the buttons or WKWebView from my Storyboard:
The app isn't hanging. I can open the "About" menu item, etc., so I know the app is running. it just doesn't seem to be using my Storyboard to draw the UI.
What would cause an archived app to differ from the app running in the simulator?
The funny thing is that I WAS able to archive this same app back in November under High Sierra, so I'm guessing the issue is either Cocoa Pods and/or Mojave related.
My debugging leads me to suspect either CocoaPods or Mojave related
My debug:
1) While debugging, I restored a version of the project from November. When I archive that restored project, I get the same blank non running app.
2) I AM able to archive another brand new project that doesn't use Cocoa Pods, so my guess is that this is either CocoaPods and/or Mojave related issue...
Any suggestions on how to proceed debugging, or help resolving this would be greatly appreciated!
I am using Xcode 10.2.1 under Mojave 10.14.5.
This problem is caused by WKWebView.
So, you need remove WKWebView from IB and then create it with code and add it to the view.
REFER:
https://forums.developer.apple.com/thread/116047
http://www.openradar.me/23699297

Unable to update to Xcode 8

I would like to update to Xcode 8, but when I start the App Store it just shows me an Open button, but my existing Version is 7.3.1
The requirements should be El Capitan 10.11.5 - I have 10.11.6 installed.
Why is there no Update button?
Check if you have multiple installations of Xcode on your system. The App Store often gets confused and loads one you're not considering, such as the version on your back up drive. It's possible it has updated a different installation than the one it launches as well.
Executing the following command in a terminal window should list all installations of Xcode the App Store may find.
mdfind "kMDItemCFBundleIdentifier == 'com.apple.dt.Xcode'"
When you have Xcode open (from hitting Open in the store), right click the Xcode icon on your dock, select Options, and Show in Finder. Does the installation it shows match up with the one you expected it to launch?
If you specifically open each Xcode installation the mdfind command found, are any of them Xcode 8?
You can control which installation of Xcode the App Store will update. Check each of the app folders, and look for a Contents/_MASReceipt folder. Ensure the installation you want to update has that (and a receipt file inside that), and delete the _MASReceipt folder for all of the other versions.
Now the App Store app should update the correct installation for you.
All I had to do was restart my mac. Then, went to the App Store and saw "Update" instead of "Open".

xcode install cocoa project at launchpad

When I run my Mac OS X Cocoa project, Xcode says build succeeded and the application opens, but never appears as installed. When I go to launchpad I can't find the application. Seems it is only emulated. I need to watch how is shown in the launchpad with the icon and the title. How can I install the application from the xcode?
I have xcode 6.1.
Need help please.
Thanks in advance.
Only Apps inside of /Applications and ~/Applications are displayed in Launchpad. When you launch from Xcode the apps are copied to a temporary build directory. So you have to copy your app to the correct location.
If you only want the Debug version, because you want to test your app, you can simply locate the app bundle in Finder:
Open the Products group in Xcode, right click the .app file and select "Show in Finder". In Finder simply drag & drop the app into the Applications folder.
If you need the Release version you can archive the app. Select Product/Archive in the Xcode menu.
In the Organizer you choose Export, in the Export wizard you select "Export as Mac Application". You can directly save it into the Applications directory, or save it somewhere else and copy or move it into the Applications directory

Updating XCODE using different apple account

I have MAC OS 10.7.3. xcode 4.3.1 installed using different apple id as my macbook pro was used previously by my friend. Now when i try to upgrade Xcode to 4.3.2 it asking credentials for my friends account. Unfortunately App store clearly says you can upgrade an app using the account which was used to install the app.
How can i upgrade Xcode using my credentials?
Thanks in advance.
I am sure you would have solved this by now but just posting the solution here that worked for me..
Open Finder and navigate to Applications,
Ctrl+Click the application and choose "Show Package Contents" (Xcode in this case),
Expand the Contents directory and click the _MASReceipt directory to select it, Type Command+Delete to
delete the directory permanently---you will be prompted for your
credentials since this is a protected file.
Quit and restart
AppStore, then find the application. You can update with your new id now without deleting the old version of the app
Hope this helps someone coz it took me a while to figure out !!
Unfortunately had to answer my own question,
Simple Answer: NO, You cannot update xcode installed from another account.
Solution is to delete the existing installation and re-installing from new account.
To delete the existing installation, you need to delete it from Launch pad. You can do this by locating xcode icon in launch pad, long click on the icon till it starts dancing. Then delete it and wait for a while till the xcode.app is deleted from /Application. If you manually delete xcode.app from /Application, App store will continue to think its installed and will not allow you to reinstall in future.
Above solution is assuming you have installed xcode from the mac app store, usually versions later than 4.2. For earlier versions, just deleting /Application/xcode folder should work.
The solution is found:
I had this bug, it's related to Spotlight. The App Store used Spotlight in some way. My fix was to add the entire HD to the "Privacy" tab in the Spotlight System prefs pane, close the prefs and wait 30 seconds, re-open and remove your HD from the Privacy tab. Spolight begins reindexing. Re-opened the App Store and problem was fixed! Posting this here for others who might search later on. Also filed a bug report with Apple.
Source: https://discussions.apple.com/thread/2806858?start=0&tstart=0

Resources