1

I downloaded the MSCollectionViewCalendarLayout and now I wanted to try out the example. If I open the Example.xcodeproj I only get errors e.g.

Lexical or Preprocessor Issue 'RestKit/RestKit.h' file not found

I tried the tip from the troubleshooting guide to change the project settings but it didn't worked. If I open the Example.xcworkspace I also only get errors.

Seems that the libraries are outdated. Is there a chance to get this project running?

Edit:

Now I tried to install cocoapods. I created a .profile file in my home directory (where Documents, Desktop, Downloads resides in). I put this text into the file

export GEM_HOME=$HOME/.gem
export PATH=$GEM_HOME/bin:$PATH

and then I run

gem install cocoapods --user-install

Because he didn't do something (was in the next line in terminal) I pressed q. Then he did something and I got the following warning

WARNING: You don't have /Users/my-user/.gem/ruby/2.0.0/bin in your PATH, gem executables will not run.

Full output of terminal

Fetching: i18n-0.7.0.gem (100%)
WARNING:  You don't have /Users/my-user/.gem/ruby/2.0.0/bin in your PATH,
      gem executables will not run.
qSuccessfully installed i18n-0.7.0
Fetching: thread_safe-0.3.5.gem (100%)
Successfully installed thread_safe-0.3.5
Fetching: tzinfo-1.2.2.gem (100%)
Successfully installed tzinfo-1.2.2
Fetching: minitest-5.6.1.gem (100%)
Successfully installed minitest-5.6.1
Fetching: activesupport-4.2.1.gem (100%)
Successfully installed activesupport-4.2.1
Fetching: nap-0.8.0.gem (100%)
Successfully installed nap-0.8.0
Fetching: fuzzy_match-2.0.4.gem (100%)
Successfully installed fuzzy_match-2.0.4
Fetching: cocoapods-core-0.37.1.gem (100%)
Successfully installed cocoapods-core-0.37.1
Fetching: claide-0.8.1.gem (100%)
Successfully installed claide-0.8.1
Fetching: colored-1.2.gem (100%)
Successfully installed colored-1.2
Fetching: xcodeproj-0.24.1.gem (100%)
Successfully installed xcodeproj-0.24.1
Fetching: cocoapods-downloader-0.9.0.gem (100%)
Successfully installed cocoapods-downloader-0.9.0
Fetching: cocoapods-plugins-0.4.2.gem (100%)
Successfully installed cocoapods-plugins-0.4.2
Fetching: cocoapods-try-0.4.4.gem (100%)
Successfully installed cocoapods-try-0.4.4
Fetching: netrc-0.7.8.gem (100%)
Successfully installed netrc-0.7.8
Fetching: cocoapods-trunk-0.6.0.gem (100%)
Successfully installed cocoapods-trunk-0.6.0
Fetching: molinillo-0.2.3.gem (100%)
Successfully installed molinillo-0.2.3
Fetching: escape-0.0.4.gem (100%)
Successfully installed escape-0.0.4
Fetching: cocoapods-0.37.1.gem (100%)
Successfully installed cocoapods-0.37.1
Parsing documentation for i18n-0.7.0
Installing ri documentation for i18n-0.7.0
Parsing documentation for thread_safe-0.3.5
Installing ri documentation for thread_safe-0.3.5
Parsing documentation for tzinfo-1.2.2
Installing ri documentation for tzinfo-1.2.2
Parsing documentation for minitest-5.6.1
Installing ri documentation for minitest-5.6.1
Parsing documentation for activesupport-4.2.1
unable to convert "\x84" from ASCII-8BIT to UTF-8 for lib/active_support/values/unicode_tables.dat, skipping
Installing ri documentation for activesupport-4.2.1
Parsing documentation for nap-0.8.0
Installing ri documentation for nap-0.8.0
Parsing documentation for fuzzy_match-2.0.4
Installing ri documentation for fuzzy_match-2.0.4
Parsing documentation for cocoapods-core-0.37.1
Installing ri documentation for cocoapods-core-0.37.1
Parsing documentation for claide-0.8.1
Installing ri documentation for claide-0.8.1
Parsing documentation for colored-1.2
Installing ri documentation for colored-1.2
Parsing documentation for xcodeproj-0.24.1
Installing ri documentation for xcodeproj-0.24.1
Parsing documentation for cocoapods-downloader-0.9.0
Installing ri documentation for cocoapods-downloader-0.9.0
Parsing documentation for cocoapods-plugins-0.4.2
Installing ri documentation for cocoapods-plugins-0.4.2
Parsing documentation for cocoapods-try-0.4.4
Installing ri documentation for cocoapods-try-0.4.4
Parsing documentation for netrc-0.7.8
Installing ri documentation for netrc-0.7.8
Parsing documentation for cocoapods-trunk-0.6.0
Installing ri documentation for cocoapods-trunk-0.6.0
Parsing documentation for molinillo-0.2.3
Installing ri documentation for molinillo-0.2.3
Parsing documentation for escape-0.0.4
Installing ri documentation for escape-0.0.4
Parsing documentation for cocoapods-0.37.1
Installing ri documentation for cocoapods-0.37.1
19 gems installed

Then I reopened the Xcode example, but I'm still getting the error that RestKit.h can't be found. What I'm doing wrong?

Edit 2:

Now I tried to use pod install in the example directory, but the pod command was not found. So I edited the PATH in .profile to this

export PATH=$GEM_HOME/ruby/2.0.0/bin:$PATH

Then I restarted terminal and run the command again

Analyzing dependencies
Creating shallow clone of spec repo `master` from `https://github.com/CocoaPods/Specs.git`

Fetching podspec for `MSCollectionViewCalendarLayout` from `../`
Downloading dependencies
Installing AFNetworking 1.3.3 (was 1.3.3)
Installing CupertinoYankee 0.1.1 (was 0.1.1)
Installing ISO8601DateFormatterValueTransformer (0.5.0)
Using MSCollectionViewCalendarLayout (0.1.3)
Installing Masonry 0.4.0 (was 0.4.0)
Installing RKValueTransformers (1.0.1)
Installing RestKit 0.22.0 (was 0.22.0)
Installing SOCKit 1.1 (was 1.1)
Installing TransitionKit 2.0.0 (was 2.0.0)
Installing UIColor-HexString (1.0.1)
Generating Pods project
Integrating client project

Afterwards I opened Example.xcworkspace and got the error described by Jakub Vano. Then I unlocked and edited the MASUtilities.h according to this link (commented enum and added the static const).

Now I got the project running!

Community
  • 1
  • 1
grabner
  • 1,219
  • 3
  • 13
  • 23
  • When I reinstalled CocoaPods it compiled almost fine except for known issue with Masonry: https://github.com/SnapKit/Masonry/issues/82 – Jakub Vano May 18 '15 at 11:33
  • Thanks for your comment. Now I tried to install CocoaPods, but it still doesn't work (see my edited question). Do you know whats wrong? – grabner May 18 '15 at 12:06
  • After you installed CocoaPods utility, you need to run `pod install` in the Example directory, and open from `.xcworkspace` after that. – Jakub Vano May 18 '15 at 12:19
  • Thank you very much. Now it works! Can you post your comments as an answer? Then I can accept it. – grabner May 18 '15 at 13:34

1 Answers1

3

You need to re-install CocoaPods for Example project:

  • run pod install in the Example project directory
  • run the project from the .xcworkspace

There will still be compile errors caused by known issue with Masonry - as mentioned on linked issue, workaround is to replace problematic enum with

typedef float MASLayoutPriority;
static const MASLayoutPriority MASLayoutPriorityRequired = UILayoutPriorityRequired;
static const MASLayoutPriority MASLayoutPriorityDefaultHigh = UILayoutPriorityDefaultHigh;
static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 500;
static const MASLayoutPriority MASLayoutPriorityDefaultLow = UILayoutPriorityDefaultLow;
static const MASLayoutPriority MASLayoutPriorityFittingSizeLevel = UILayoutPriorityFittingSizeLevel;
Jakub Vano
  • 3,833
  • 15
  • 29
  • Perhaps you can help out another time. Now I tried it again and I get `ndefined symbols for architecture i386: "_RKLogCoreDataError", referenced from: ___33-[RKEntityByAttributeCache load:]_block_invoke in libRestKit.a(RKEntityByAttributeCache.o) ___43-[RKManagedObjectImporter finishImporting:]_block_invoke in libRestKit.a(RKManagedObjectImporter.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)`. Only found [this thread](https://github.com/CocoaPods/CocoaPods/issues/2876), but that didn't helped. – testing Jul 29 '15 at 10:43
  • Please consider opening another question with new problem - that way questions wont get mixed up, and you might get solutions from other people as well.. – Jakub Vano Jul 29 '15 at 15:05
  • Yes, sir! [Here](http://stackoverflow.com/questions/31704466/mscollectionviewcalendarlayout-example-undefined-symbols-for-architecture) you are. – testing Jul 29 '15 at 15:14