Tuesday, November 5, 2019

Upgrade SSD on Mac with BootCamp Portion Take 2

In 2017, I post an article “Upgrade SSD on Mac with BootCamp Portion”, after I successfully upgrade my Mac Pro 15 from 512GB to 1TB.

Well, 2 years came and gone, my other Mac Pro 13 is facing the same problem, running out of space.  It is Mac Pro 13 early 2015 model and has 512 GM on it. and again, I have BootCamp implemented on it, both Mac OS and BootCamp portions are about the same size.

I went to OWC (Other world Computing) web site (this is the site that specialized in Apple products, it is highly recommended among many other sites). And found 2TB SSD is available at the price of $650 with Upgrade Kit, and $580 without upgrade kit.  1TB SSD is about the half price.

2 years ago, when I did my first upgrade, I wanted to go up to 2TB SSD, but it was not available at that time. I was excited to see it is available now.

Thinking I have an upgrade kit with me, to save some money, I decided to buy the SSD without upgrade kit. (later on, I realized it is not a smart decision. But I managed to recover from it, I will get to it in detail later).

This is my plan: upgrade my Mac Pro 15 from 1TB to 2TB, and then upgrade my Mac Pro 13 from 512GB to 1TB.

Preparation work:

Back up Bootcamp partition using WinClone. As the time goes by, WinClone has progressed from Version 6 to version 8, but I have got free upgrade to WinClone 7.  I paid another $20 to upgrade it to WinClone 8. I installed the WinClone 8 to my Mac Pro 13 and leave WinClone 7 on my Mac Pro 15.

And I used Time Machine in both computers to back up the Mac systems volume.

Okay, all preparation works are done, it is time to open the box.

I first replaced the 1TB SSD with 2TB SSD. And put the 1TB SSD into the Upgrade Kit enclosure.

Then I start the Mac computer into Disk utility and try to copy the system volume into the new SSD.

The external SSD went dark in the middle of copying. I took a closer look and realized the SSD chip is a bit thicker. It does not fit well in the enclosure. (should I have had the newer enclosure, there would be no problem).

I then turned to the Time Machine backup. And I got the system up with “Restore from Time Machine”. First hurdler overcome.

Then, I used the WinClone7 created BootCamp partition ion and restored the volume image into it.

Boot up the computer with Window patriation, to my surprise, I got the following message:


INACCESSABLE BOOT DEVICE 


I had no idea how to fix it, almost to give it up.

I did some search using google, and found a article in TWOCANORS knowledge base, Resolving INACCESSIBLE_BOOT_DEVICE Error after restoring Winclone image

When migrating Windows between different hardware or hard drives, Windows may start up with a INACCESSIBLE_BOOT_DEVICE error. This error is caused by the lack of the correct mass storage device driver. To resolve this issue, the correct mass storage device driver can be injected into Windows. This document outlines what is needed to inject the correct mass storage driver into Windows.


Following up the steps, I injected the mass storage device driver into windows system. And finally, my windows 10 back to live, with bigger volume.   The second hurdler is conquered.  

Move on to m y Mac Pro 13.

I replace the 512 GB SSD with 1TB SSD. 

Use Time machine restored the mac Volume.

Start the Mac without issue.

Used WinClone 8 to restore BootCamp image to Bootcamp partition.  

Start the Windows 8.1 without issue. (I am suspect that WinClone 8 is smarted than WinClone 7, it fix the INACCESSABLE BOOT DEVICE issue automatedly.  If you are going to do what I did. Install the latest version WinClone might save you from some unnecessary drama. 

Last, but not least, I want to upgrade my Bootcamp windows from 8.1 Enterprise to Windows 10 Pro or Enterprise.

I have MSDN subscription, so I went to MSDN and downloaded Windows 10 Enterprise LTSC 2019. And load the ISO into a USB drive and run the setup in windows. 
Guess what, after it completed installation process,  I realized my previous windows OS, applications and files are gone, I got a new fresh installed windows 10!  This is not what I want, I want to do in place upgrade rather than fresh installation.

Luckily, my WinClone image is there, I started mac and re-run WinClone restored the Bootcamp partition, then start over again.

Did some search, and found this article in MS web site:



It says: In-place upgrade from Windows 7, Windows 8.1, or Windows 10 semi-annual channel to Windows 10 LTSC is not supported.


I am dead in the water!   I told myself.

Did not want to give it up, I continue my search.

And I found this link Download Windows 10 Disc Image (ISO File). in MS site

Interesting enough, after I downloaded the ISO, copied it to a USB drive, run the setup in windows.

About 30 minutes, installation completed. Restart the windows to, got a screen telling me the system is updating. And it last very long time. I decided to let it do its stuff overnight and I went to sleep.

The next morning, I rush to my home office and restarted the computer, the machine started nice looking window 10 screen with my previous app and data / accounts in place. God is great, I got my windows 8.1 in placed upgraded to Windows 10!

Friday, October 6, 2017

Upgrade SSD on Mac with BootCamp Portion

About 4 years ago, I got a Mac Pro 15 , Model Number ( MacBookPro11,3).  due to budget constant, I did not upgrade SSD storage from 512GB to 1TB, at that time, it would cost one thousand Dollar more on top of $2600 price tag on it.

As I was a Microsoft guy and newly formed apple fan, I decided to cut the 512GB storage into half-half and use Bootcamp to setup Windows OS inside my Mac box.

well, 4 yeas has come and gone, I enjoy my dual boot Mac Pro box.  however, since last year, I found I am run short of storage in both Mac OS and Windows OS.  and I started looking for ways to enlarge my storage. I first got a 256GB SSD card plug to the extension slot, which lasted me for a while and started looking into upgrade the internal SSD. 

after talking to friends, and people in Apple Stores, I figured that OWC ( Other Wold Computing) is my answer,   if you want to take up this adventure, please pay attention on the model number of your Mac Book. it must be match, otherwise you would run into trouble you do not want to.

The price of the 1TB SSD for MacBookPro11,3 is $677.5 with Upgrade Kit, $627.5 for SSD only, I strongly encourage you spend $50 extra to get the upgrade kit,  you will need it to migrate the system over, unless you want to have a fresh install of the OS.

The OWC web site has the video showing you how to open your MacBook and replace the SSD and put it back, but do not do it just yet. because you have a Bootcamp portion to take care first.

after much research, I found a piece of software named WinClone, at the time of writing, the latest version is 6. there are 3 editions, Basic, Standard Professional.  the prices are $20, $40 and  $250. for the purpose of migration, I could get a Basic edition,  but consider I own 3 mac Book and 2 of them with Bootcamp, I decided to get standard edition. with the discount, I only paid $28. 

I have gone through the process back and forth. that is the main purpose I writing this up so that you do not need to go through the trouble.


Step 1: install WinClone6 on your Mac OS

Step 2,   create a WinClone Image for your BootCamp portion, save the image in external device.  ( note: you do not need to backup your MacOS portion, you can direct copy it from the original SSD to the new SSD).

step 3: showdown your Mac Book and replace the SSD, put your original SSD into a upgrade Kit to make a external USB drive.

Step 4:  get to Internet Recovery Mode by holding down the Command () – Option () – R combination immediately upon hearing the startup chime. Holding the keys until the animated globe appears on the screen.

Step 5: select Disk Utility

step 6: copy your MacOS portion of your original SSD from the USB drive into your new SSD.

Step 7: reboot your Mac into MacOS
Step 8: run BookCamp to install a version of Windows OS ( I was told you could just use disk utility to create the portion without install Windows OS, but I did that before I read  WinClone manual)

Step 9. rebook the MacBook into MacOS.

Step 10: use WinClone to restore the image you made into the Bootcamp portion


step 11: reboot  the MacBook while holding <Option> key, you will see boot option of both Windows and Mac showing up. select Window,  after a while, you will see a familiar face of your original windows OS image in original bootcamp portion.  you can repeat the similar process to boot up your original MacOS portion. they look exactly the same as they were before, the only difference is the storage is doubled.

Wednesday, September 30, 2015

Deploy to iOS 9 devices with Xcode 6.4

If you like me have a large codebase app developed in Xcode 6.4 with Swift 1.2, with apple’s releasing of iOS 9, you might encounter problem when you run your app in your iOS device upgraded to iOS 9.x.

Likely you will get messing “iOS 9.01 is not supported by Xcode 6.4”

If you get this message, the first option ahead of you would be updating your Xcode  from 6.4 to Xcode 7.0, which also means upgrading form Swift 1.2 to Swift 2.0.  

Well, if you have a large codebase, and is scheduled to release the app to the store soon, this may not be the good time for you. The following is the process to bypass the problem. Thanks to Apple for not providing backwards compatibility.


  1. Upgrade your Xcode 6.4 to Xcode 7
  2. Download Xcode 6.4 from apple developer site again, and install it to different name , (e.g.  XCode2 in my case)
The goal is to make Xcode 6.4 and Xcode 7 available in your Mac, you may not need to Install Xcode 7, but you need Xcode 7 dmg file. You could stay with Xcode 6.4 and download Xcode 7 but do not even install it.

Then right click on the Xcode dmg file select "Show Package Contents” to browse the dmg file. Navigate to /Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport.  copied the folder named 9.0 (13A340) into the same location of your Xcode 6.4 installation folder. Then re-start your Xcode 6.4. 

With that, if you are as lucky as I am, you should be able to run deploy your app to iOS 9 devices with Xcode 6.4

Saturday, August 29, 2015

How to implement Delegate using Protocol in swift

More than often you, as an iOS app developer, are required to implement protocols then defining you own protocols and use them. However, defining your own protocols, delegates is an elegant way passing data from one class to another. This technic is especially useful in the context of view Controllers. I am giving a simple example below; you can test it in a playground. Once you understand the theory behind it, you can apply it anyway you want.

This example is created in the context of a smaller company who retrieves packages for its clients from specified locations and stores them in its warehouse waiting for client to pick up.  As part of the business operation, there are dispatchers and retrievers. Dispatchers tells retrievers where to pick up the packages, the retrievers retrieve the package and pass them back to dispatcher for to stock up. A important point to note is that the retrievers do not know the location of the warehouse, dispatchers do.

Let’s get it started


I start with defining a protocol as following:

protocol DispatcherDelegate {
    func stockUp (package : String)
    var  package : String { get set}

}

This is the simplest protocol you can get, only one method and one property. Yon can add more to it. E.g. add some properties, and/or add more methods.  But do remember that the implementers of the protocol need to implement all members it defines, though you can make some of them optional.


Then I process with defining Retriever class. It uses the protocol as its delegate and a method simulating the retrieving logic

class Retriever  {
     var dispatcherDelegate: DispatcherDelegate?
    func retrieve (location : String) {
        // go to the location to retrievbe the package
        switch location {
        switch location {
        case "location-1":
            dispatcherDelegate?.stockUp("Dell PC")
            dispatcherDelegate!.package = "Dell PC"
        case "location-2":
            dispatcherDelegate?.stockUp("Apple MacBook")
             dispatcherDelegate!.package = "Apple MacBook"
        default:
            dispatcherDelegate?.stockUp("something else")
             dispatcherDelegate!.package = "something else"
        }

    }
}

As the last step if the setting up, I define dispatcher class as following, the important part is it implements DispatcherDelegate protocol by proving the implementation of stockUp method.


class Dispatcher : DispatcherDelegate {
  
    func stockUp (package : String) {
       println("\(package) is stcoked in")
   
    }
    func dispatch (location : String) {
       var retriever = Retriever()
       retriever.dispatcherDelegate = self
       retriever.retrieve(location)
    }
}

This is class, I have a method call dispatch, which instantiates retriever class and set itself as the retriever’s dispatcherDelegate, then it calls the retrieve’s retrieve method.


Finally, let’s put them all in test by putting the following line of code in playground:


var testDispatcher = Dispatcher()
testDispatcher.dispatch("location-1")
testDispatcher.package
testDispatcher.dispatch("location-2")
testDispatcher.package
testDispatcher.dispatch("somewhere else")

testDispatcher.package

if you put this code block in playground you will see the result at the right panel, showing

{package "Dell PC"}
"Dell PC"
{package "Apple MacBook"}
"Apple MacBook"
{package "Something else"}
"Something else"



Bingo, they all work as expected for me, Hope they do the same for you.

Sunday, August 2, 2015

Cocoa pods and Alamofire

as a iOS app developer, more then likely, you would need to accessing resful service using swift 

if you are like me, do not want to write code if I do not have do, you would be happy to know there is a good framework which can help  you in a big way, it is Alamofire. you c an find it in Cocoa Pods and installed it from that.


The following resource are provide you with the information you need and step by step tutorials on how to use cocoa pods to install Alamofile and how to use alamofire  






Hope you find them informative and useful.

The Best way to demo your apps on your iO device

you and your team worked day and night got the app ready.  It is the show time with you clients.

you would want to walk around the conference room with the device in your hand, talking to your audience. they would see what happened on your device from a big projected listen to the audio from the best sound system the conference room is equipped with.

Yeah, that is what you are dreaming for. the Answer is AirPlay.

Install air server into your PC or Mac. download air server from apple app store into your devices. you are all set!

http://www.airserver.com/Download/Referrer/6288008

Sunday, January 11, 2015

iOS Storyboards

Scene : from visual representation point of view, scene is nothing but View Controller.  you add scenes into your storyboard by dragging view controllers into your storyboard.  There are many different type of view controllers provided to you by the framework.  The basic view controller is UIViewController.  All other view controllers are its sub-class. UITableViewController, UICollectionViewController are a few examples of various view controllers.

View Controller: once you added a view controller into your storyboard, you will see a visual representation of the controller, it is referred as "scene". however, more than likely, you need to create a class for the scene.  that is class you put you business logic for a specific scene.