gpt4 book ai didi

ios - 如何让 MSCollectionViewCalendarLayout 的示例正常工作

转载 作者:行者123 更新时间:2023-12-01 18:52:12 26 4
gpt4 key购买 nike

我下载了MSCollectionViewCalendarLayout现在我想试试这个例子。如果我打开 Example.xcodeproj,我只会收到错误,例如

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



我尝试了 troubleshooting guide 中的提示更改项目设置,但没有奏效。如果我打开 Example.xcworkspace 我也只会得到错误。

似乎图书馆已经过时了。有没有机会让这个项目运行起来?

编辑:

现在我尝试 install cocoapods .我在我的主目录(Documents、Desktop、Downloads 所在的位置)中创建了一个 .profile 文件。我将此文本放入文件中
export GEM_HOME=$HOME/.gem
export PATH=$GEM_HOME/bin:$PATH

然后我跑
gem install cocoapods --user-install

因为他没有做任何事情(在终端的下一行),所以我按了 q。然后他做了一些事情,我得到了以下警告

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



终端全输出
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

然后我重新打开了 Xcode 示例,但我仍然收到找不到 RestKit.h 的错误。我做错了什么?

编辑 2:

现在我尝试使用 pod install在示例目录中,但 pod command was not found .所以我编辑了 PATH在 .profile 到这个
export PATH=$GEM_HOME/ruby/2.0.0/bin:$PATH

然后我重新启动终端并再次运行命令
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

之后我打开 Example.xcworkspace 并得到 Jakub Vano 描述的错误.然后我解锁并编辑了 MASUtilities.h根据 this link (注释枚举并添加静态常量)。

现在我让项目运行起来了!

最佳答案

您需要为示例项目重新安装 CocoaPods:

  • 运行 pod install在示例项目目录中
  • .xcworkspace 运行项目

  • 仍然会出现由已知 issue 引起的编译错误。使用砌体 - 如链接问题所述,解决方法是替换有问题的 enum
    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;

    关于ios - 如何让 MSCollectionViewCalendarLayout 的示例正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30301897/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com