[iOS SDK] iTunes Connect’s Routing App coverage file (geojson)

Or, as said in Spanish, “Archivo de cobertura de la app de encaminamiento”. If you are submitting your App to iTunes Store, and you get an error message saying it needs the “Routing App Coverage File”, have a look at the nice explanation on Giacomo Balli’s blog.

If you are just going for the quick solution, create an empty file with your favorite text editor and add this sample content inside:

 "type": "MultiPolygon",
 "coordinates": [[[

IMPORTANT: note that the first and last coordinates are the same. This is a must when declaring a MultiPolygon. It must be “closed”.

This sample MultiPolygon contains a region located in Madrid, Spain. Include your own coordinates in a  location of your choice. geojsonlint is a good source for testing/debugging your region.

Save the file to .geojson format, and upload it as the “Routing App Coverage File” in iTunes Store.


[iOS SDK] Xcode option “Product – Archive” not enabled when deploying to App Store

It may seem a silly question, but i’m pretty sure you are in the rush to submit your App, and you get scared when you see the “Archive” option disabled:

Captura de pantalla 2014-12-10 a la(s) 20.08.05

Keep calm my friend. You may be deploying to simulator. Check out that your “Product > Destination” is a valid iOS device.

Captura de pantalla 2014-12-10 a la(s) 20.08.15

Hope it saves time and panic situations!

Have a nice coding day

[iOS SDK] Installing CocoaPods – MWPhotoBrowser into your Xcode project

This seems to be quite simple in the beginning, but the truth is that i had to fight with it for several hours/days. I’ll post the simplest step-by-step version of the process. For deeper info, visit cocoapods site and MWPhotoBrowser‘s page on GitHub.

1.- Installing Cocoapods:

Open a terminal (for beginners, CMD+Space, write “Terminal”, enter) and when open, write

sudo gem install cocoapods

the cursor will remain blank for a few minutes; This is normal. Be patient and wait for the process to finish. If you find conflicts during the install, mostly because of an old cocoapods install, you may want to try to delete cocoapods, as it is explained in this thread.

sudo rm -rf ~/.cocoapods

Captura de pantalla 2014-12-01 a la(s) 17.42.47

Once you get a green “Setup completed” message, time to create your Xcode project and configure cocoapods into it.

2.- Creating an Xcode projects that uses cocoapods

Create an Xcode project with “File > New > Project”, for example a “Single view application”. Name it whatever you want.

Now, on the terminal, go into recently created project’s folder, and create a file named “Podfile”.

cd projects/iOS/MyRecentlyCreatedProject/
touch Podfile

Now edit Podfile with a text editor of your choice, and include the desired libraries on it. In my case, i’ll include MWPhotoBrowser.

platform :ios, 7
pod 'MWPhotoBrowser'

Save the Podfile, and again inside your project’s directory, execute:

pod install

It should now download MWPhotoBrowser library and its dependencies.

Captura de pantalla 2014-12-01 a la(s) 17.35.45

When done, do an ls. You may notice a new file named MyRecentlyCreatedProject.xcworkspace that was not there before. Double-click it to open the project with Xcode.

You are now able to import MWPhotoBrowser’s sources into your classes.

 Captura de pantalla 2014-12-01 a la(s) 17.37.46

Hope this helped you! Have fun & happy coding!