Migration from Carthage to Cocoapods – React Native

Migration from Carthage to Cocoapods – React Native

In the beginning, we originally opted in for Carthage and steered away from Cocoapods. With react native’s upgrade of 0.60 and higher, we had to migrate from Carthage to Cocoapods. Here is how I did it!

1. Open Terminal

2. Install Cocoapods, if you do not have it already installed.

$ brew install cocoapods

3. Create a podfile in the project ios directory

$ cd {project}/ios
$ Pod init

4. The Podfile will contain a default setup where you can add any libraries you choose. In order for us to run the react-native app though, we will need the following in our Podfile:

# The target name is most likely the name of your project.
target 'NumberTileGame' do
# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSockepod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
end

The following is retrieved from the react native docs.

5. Depending if you had added these frameworks manually or linked using react-native link , make sure that you unlink by running react-native unlink in your terminal and removing any of the frameworks or libraries in your xcode project folders. Make sure you also remove in Link Binary with Libraries in your Build Phases section of your Target Project.Screen Shot 2019-09-27 at 6.55.51 PM.png

6. This step is dependent on what you currently have in your Carthage File. Most dependencies have a Cocoapod alternative, so you can easily transfer those dependencies. Each library will have a set of instructions on how to install.

7. Once you have migrated your Carthage dependencies, I would remove everywhere Carthage is mentioned. Do a quick search in both your Javascript code and iOS code and remove any instances of Carthage.

8. Make sure that you have added your libPods.{projectname}.a to your Frameworks by adding it to Link Binary with Libraries in your Build Phases of you project

Screen Shot 2019-09-27 at 7.03.19 PM.png

9. Once you finish setting Cocoapods up and removing all your Carthage files, you can now run the following your terminal. Make sure to run this in your ios folder to build and install cocoapods.

$  pod install

That’s about it! Your project should be up and running!

Depending on how your Carthage file was previously configured, you may receive the following error:

    1. No podspec found for `React-fishhook` in `../node_modules/react-native/Libraries/fishhook`

Solution: You can easily remove this file.

Note To Self – Useful Travel Tips for Greece

Note To Self – Useful Travel Tips for Greece

On my trip to Greece, my first stop was Mykonos. Mykonos is an interesting island. It’s known for it’s intense party scene, but honestly, I didn’t party or explore the nightlife that much. Considering this trip was my first time in Greece, I really wanted to experience the Greek culture.

Exploring Mykonos was first on my list. The first day I arrived, I was traveling solo and stayed at the Grand Beach Mykonos which was situated walking distance from Mykonos town. The staff was so sweet and super helpful. This hotel also had amazing instagrammable spots, like their roof 😍

My room was upgraded and I must say the balcony was absolutely stunning!

Walking to Mykonos town was a short 15 minute walk. The shops open at about 10am, but they don’t have a set time. If you want to take pictures arrive early at the windmills right before shopping.

IMG_2442

Note to self: Wear comfortable, sturdy shoes

My sandal strap broke while I was walking so I ended up having to buy a pair of shoes. The shoes here are absolutely adorable and cute! They are made out of real leather and some are even handmade. 

Mykonos had a bunch of small shops that were super cute! You can get some deals, but for major purchases, I would recommend just buying it in Athens. Remember, Mykonos is the island of millionaire and billionaires so the price is increased on everything!

Note to self: Rent an ATV/Moped to Explore the island

Once the boys arrived, we ended up switching hotels to one that was located away from Mykonos town on Elia Beach. It was about 25-30 minute drive from Mykonos town. Though the resort had everything available on site, if you want to explore Mykonos and run errands, I would recommend renting an ATV.

Note to self: Check bus schedules 

One of the great things about Mykonos is the public transportation and the hotel transfers! The first day the boys arrived, we ended up calling a cab multiple times. One way cost a whopping 35-40€ from Myconian Villas to Scorpios! WTF? I’m glad the locals are able to make some money, but this seemed a bit over priced. The next day, we found out the resort actually had a bus that would take you from your hotel to Mykonos Town FOR FREE! There is a schedule so be very cognizant of time! 

Note to self: Take pictures early

The first night when I was by myself, Mykonos town was absolutely empty. But I had left around 9am to check out the town. The most instagrammable spots are actually in this tiny quaint town about 5 minutes walking distance from each other!

I took the boys during sunset, but it was absolutely crowded with so many people! So if ya want your Instagram photo, I would recommend going early and shopping early to beat the crowd!

F3B01915-E08B-4C7F-8D9F-EAA295ACC313