Dateien zippen mit Swift

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • Bei mir gibt es leider keine Schaltfläche "Alle Probleme lösen (und Weltfrieden aktivieren)"...

    In dem Archiv gibt es zwei Xcode-Projektdateien: Sample.xcodeproj und Zip.xcodeproj - beide laufen nicht.
    In dem Projekt Zip.xcodeproj gibt es den Befehl import minizip - der Ordner minizip ist allerdings leer!

    In der README.md steht noch "Run `pod install` in each sample project directory to set up their dependencies."
    Wenn ich aber "pod install" auf der Konsole eingebe kommt die Fehlermeldung -bash: pod: command not found

    Tut mir leid, aber ein Beispiel-Projekt sollte doch auch ohne zutun laufen. Dafür ist es ja ein Beispiel...
  • Diese "Unart" scheint wohl immer mehr bei macOS Projekten Einzug zu halten.

    In der Java Entwicklung ist es wohl ganz normal für Projekte z.B. Maven zu verwenden, um fremde jars ins Projekt einzubinden. Wenn dies denn mal immer problemlos funktionieren würde, dann wäre dies ja eine Option. Ich finde dies als macOS Entwickler jedoch eher lästig, fehlerträchtig und nicht wirklich produktiv. Mir gefallen die klassischen Frameworks in einem Projekt doch deutlich besser und man kann ein Projekt nach dem Download direkt bauen und testen. :thumbsup:

    Aber egal und zurück zur Frage.

    Ich tippe mal, dass Du cocoapods nicht installiert hast und somit "pod install" auf der Konsole natürlich nicht funktionieren wird. ;)
  • Danke, dass bringt mich schon mal weiter.

    Wenn ich $ sudo gem install cocoapods ausführe, passiert folgendes:

    Quellcode

    1. Fetching: i18n-0.7.0.gem (100%)
    2. Successfully installed i18n-0.7.0
    3. Fetching: thread_safe-0.3.5.gem (100%)
    4. Successfully installed thread_safe-0.3.5
    5. Fetching: tzinfo-1.2.2.gem (100%)
    6. Successfully installed tzinfo-1.2.2
    7. Fetching: minitest-5.9.0.gem (100%)
    8. Successfully installed minitest-5.9.0
    9. Fetching: concurrent-ruby-1.0.2.gem (100%)
    10. Successfully installed concurrent-ruby-1.0.2
    11. Fetching: activesupport-5.0.0.gem (100%)
    12. ERROR: Error installing cocoapods:
    13. activesupport requires Ruby version >= 2.2.2.
    Alles anzeigen

    Ruby scheint auf meinem El Capitan nicht aktuell genug zu sein.
    Nur damit ich keinen Fehler mache: ist hier mit "Ruby" Ruby on Rails gemeint?
    Reicht es, wenn ich dieser Anleitung folge?
  • Busty schrieb:

    Bei mir gibt es leider keine Schaltfläche "Alle Probleme lösen (und Weltfrieden aktivieren)"...
    Kommt mit Swift 5. Sonst kann Apple nicht mehr damit Werbung machen, dass Swift die Hungerprobleme in der dritten Welt löst.
    Es hat noch nie etwas gefunzt. To tear down the Wall would be a Werror!
    25.06.2016: [Swift] gehört zu meinen *Favorite Tags* auf SO. In welcher Bedeutung von "favorite"?
  • Busty schrieb:

    Danke, Wenn ich $ sudo gem install cocoapods ausführe, passiert folgendes:
    ERROR: Error installing cocoapods:
    activesupport requires Ruby version >= 2.2.2
    Ruby scheint auf meinem El Capitan nicht aktuell genug zu sein.


    Dann solltest Du Dich bei denen mal melden, denn siehe:

    Cocoapods schrieb:

    CocoaPods is built with Ruby and it will be installable with the default Ruby available on macOS.


    Busty schrieb:

    Nur damit ich keinen Fehler mache: ist hier mit "Ruby" Ruby on Rails gemeint?
    Reicht es, wenn ich dieser Anleitung folge?
    Nein. Mit "Ruby" ist Ruby gemeint. Rails ist ein Framework.
    * Kann Spuren von Erdnüssen enthalten.
  • Amin Negm-Awad schrieb:

    Busty schrieb:

    Bei mir gibt es leider keine Schaltfläche "Alle Probleme lösen (und Weltfrieden aktivieren)"...
    Kommt mit Swift 5. Sonst kann Apple nicht mehr damit Werbung machen, dass Swift die Hungerprobleme in der dritten Welt löst.
    Genau. Endlich. Nachdem das Objective-C 30 Jahre lang nicht geschafft hat. :D
    Das iPhone sagt: "Zum Antworten streichen". Wie? Echt Jetzt? Muß ich erst die Wohnung streichen!?
  • Busty schrieb:

    Ruby scheint auf meinem El Capitan nicht aktuell genug zu sein.
    Ging bei mir ohne Probleme. Allerdings hatte ich anscheinend vorhin schon activesupport (< 5) drauf.


    Shell-Script

    1. $ which ruby
    2. /usr/bin/ruby
    3. $ ruby --version
    4. ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
    5. $ sudo gem install cocoapods
    6. Password:
    7. Fetching: cocoapods-core-1.0.1.gem (100%)
    8. Successfully installed cocoapods-core-1.0.1
    9. Fetching: xcodeproj-1.1.0.gem (100%)
    10. Successfully installed xcodeproj-1.1.0
    11. Fetching: cocoapods-1.0.1.gem (100%)
    12. Successfully installed cocoapods-1.0.1
    13. Fetching: concurrent-ruby-1.0.2.gem (100%)
    14. Successfully installed concurrent-ruby-1.0.2
    15. Parsing documentation for cocoapods-core-1.0.1
    16. Installing ri documentation for cocoapods-core-1.0.1
    17. Parsing documentation for xcodeproj-1.1.0
    18. Installing ri documentation for xcodeproj-1.1.0
    19. Parsing documentation for cocoapods-1.0.1
    20. Installing ri documentation for cocoapods-1.0.1
    21. Parsing documentation for concurrent-ruby-1.0.2
    22. Installing ri documentation for concurrent-ruby-1.0.2
    23. 4 gems installed
    24. $ gem list
    25. *** LOCAL GEMS ***
    26. actionmailer (4.2.3)
    27. actionpack (4.2.3)
    28. actionview (4.2.3)
    29. activejob (4.2.3)
    30. activemodel (4.2.3)
    31. activerecord (4.2.3)
    32. activesupport (4.2.3)
    33. arel (6.0.2)
    34. bigdecimal (1.2.7, 1.2.0)
    35. builder (3.2.2)
    36. CFPropertyList (2.3.1, 2.2.8)
    37. claide (1.0.0)
    38. cocoapods (1.0.1, 1.0.0)
    39. cocoapods-core (1.0.1, 1.0.0)
    40. cocoapods-deintegrate (1.0.0)
    41. cocoapods-downloader (1.0.0)
    42. cocoapods-plugins (1.0.0)
    43. cocoapods-search (1.0.0)
    44. cocoapods-stats (1.0.0)
    45. cocoapods-trunk (1.0.0)
    46. cocoapods-try (1.0.0)
    47. colored (1.2)
    48. concurrent-ruby (1.0.2)
    49. erubis (2.7.0)
    50. escape (0.0.4)
    51. fourflusher (0.3.0)
    52. fuzzy_match (2.0.4)
    53. globalid (0.3.5)
    54. i18n (0.7.0)
    55. io-console (0.4.2)
    56. json (1.8.3, 1.7.7)
    57. libxml-ruby (2.8.0, 2.6.0)
    58. loofah (2.0.2)
    59. mail (2.6.3)
    60. mime-types (2.6.1)
    61. mini_portile (0.6.2)
    62. minitest (5.7.0, 4.3.2)
    63. molinillo (0.4.5)
    64. nap (1.1.0)
    65. netrc (0.7.8)
    66. nokogiri (1.6.6.2, 1.5.6)
    67. power_assert (0.2.4)
    68. psych (2.0.13, 2.0.0)
    69. rack (1.6.4)
    70. rack-test (0.6.3)
    71. rails-deprecated_sanitizer (1.0.3)
    72. rails-dom-testing (1.0.6)
    73. rails-html-sanitizer (1.0.2)
    74. rake (0.9.6)
    75. rdoc (4.0.0)
    76. sqlite3 (1.3.10, 1.3.7)
    77. test-unit (3.1.2, 2.0.0.0)
    78. thor (0.19.1)
    79. thread_safe (0.3.5)
    80. tzinfo (1.2.2)
    81. xcodeproj (1.1.0, 1.0.0)
    Alles anzeigen
    Such danach bissl im Internet: github.com/CocoaPods/CocoaPods/issues/4789 zeigt z.B. was funktionieren könnte.

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von manoh ()

  • NSObject schrieb:

    Dann solltest Du Dich bei denen mal melden, denn siehe:
    Ja, ich habe mal eine E-Mail abgesetzt (an info@CocoaPods.org)
    Wird aber wohl nicht viel bringen...

    NSObject schrieb:

    Nein. Mit "Ruby" ist Ruby gemeint. Rails ist ein Framework.
    Ich hatte die Installationsanleitung für Ruby on Rails vor deiner Antwort dann doch schon begonnen. - Ruby ist da wohl mit dabei, denn anschließend lief $ sudo gem install cocoapods durch.
    Ich habe dann pod install in dem Ordner ausgeführt, wo sich auch die Datei Podfile befindet. Es hat sich dann auf der Konsole folgendes getan:

    Quellcode

    1. Setting up CocoaPods master repo
    2. Setup completed
    3. Analyzing dependencies
    4. Pre-downloading: `Zip` from `https://github.com/marmelroy/Zip.git`, submodules `true`
    5. Downloading dependencies
    6. Installing Zip (0.4.3)
    7. Generating Pods project
    8. Integrating client project
    9. [!] Please close any current Xcode sessions and use `Sample.xcworkspace` for this project from now on.
    10. Sending stats
    11. Pod installation complete! There is 1 dependency from the Podfile and 1 total
    12. pod installed.
    13. [!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
    Alles anzeigen
    Wenn ich nun Sample.xcworkspace öffne, wird ein Projekt mit folgenden Dateien gestartet:


    Xcode.png

    Wie bekomme ich die nun aber in mein eigenes Projekt? Und werden wirklich alle Dateien benötigt?
    Einfacher wäre es, wenn ich meinen Code in dieses Projekt übertrage - das geht aber leider nicht, weil ich eine macOS-Anwendung programmiere, dieses Beispile-Projekt aber ein iOS-Projekt ist.
  • Busty schrieb:

    Ja, ich habe mal eine E-Mail abgesetzt (an info@CocoaPods.org)
    Wird aber wohl nicht viel bringen...

    Support schrieb:

    I didn't find the solution to my problem!

    We have multiple avenues for support, here they are in the order we prefer.
    • Stack Overflow, get yourself some internet points. This keeps the pressure off the CocoaPods dev team and gives us time to work on the project and not support. One of the advantages of using Stack Overflow is that the answer is then easily accessible for others.
    • CocoaPods Mailing List, the mailing list is mainly used for announcements of related projects and for support.
    • If your question is regarding a library (to be) distributed through CocoaPods, refer to the spec repo.
    I think this is a bug with CocoaPods
    In this case we want to get it on a GitHub issues tracker, we use this to keep track of the development work we have to do.
    • Search tickets before you file a new one. Add to existing tickets if you have new information about the issue.
    • Only file tickets about the CocoaPods tool itself. This includes CocoaPods, CocoaPods/Core, and Xcodeproj.
    • Keep tickets short but sweet. Make sure you include all the context needed to solve the issue. Don't overdo it. Great tickets allow us to focus on solving problems instead of discussing them.

  • Busty schrieb:

    NSObject schrieb:

    Nein. Mit "Ruby" ist Ruby gemeint. Rails ist ein Framework.
    Ich hatte die Installationsanleitung für Ruby on Rails vor deiner Antwort dann doch schon begonnen. - Ruby ist da wohl mit dabei,
    Nein. Das musst Du selbst installieren.

    Busty schrieb:

    denn anschließend lief $ sudo gem install cocoapods durch.
    Das hat manoh bereits beantwortet/verlinkt.
    * Kann Spuren von Erdnüssen enthalten.
  • NSObject schrieb:

    Nein. Das musst Du selbst installieren.
    Ich bin aber nur der Anleitung für Ruby on Rails gefolgt - danach lief $ sudo gem install cocoapods ohne Fehler bis zum Schluss, vorher aber nicht.

    NSObject schrieb:

    Das hat manoh bereits beantwortet/verlinkt.
    verstehe ich nicht... Er wollte doch nur anmerken, dass ich mich an die falsche Stelle für Bugs gerichtet habe (hatte auf der Seite aber nichts anderes gefunden), oder täusche ich mich?
    Wichtiger wäre mir aber auch das neue Problem: Wie kann ich die Dependencies in mein eigenes Projekt einbinden?
  • Busty schrieb:

    NSObject schrieb:

    Nein. Das musst Du selbst installieren.
    Ich bin aber nur der Anleitung für Ruby on Rails gefolgt...
    Nein. Du bist nicht der Anleitung von Ruby on Rails gefolgt, weil das nicht die Seite von Ruby on Rail ist.

    Das wäre sie gewesen: Ruby on Rails

    Busty schrieb:

    - ...danach lief $ sudo gem install cocoapods ohne Fehler bis zum Schluss, vorher aber nicht.
    Hallo...!?
    Du hast doch nach dieser fremden Anleitung eine andere Ruby Version installiert.
    Und noch Rails dazu.
    Und rbenv.
    Und Homebrew.
    Und MySQL.
    Und PostgreSQL.

    Busty schrieb:

    NSObject schrieb:

    Das hat manoh bereits beantwortet/verlinkt.
    verstehe ich nicht... Er wollte doch nur anmerken, dass ich mich an die falsche Stelle für Bugs gerichtet habe (hatte auf der Seite aber nichts anderes gefunden), oder täusche ich mich?Wichtiger wäre mir aber auch das neue Problem: Wie kann ich die Dependencies in mein eigenes Projekt einbinden?

    Nein. manoh schrieb Dir:

    manoh schrieb:

    Busty schrieb:

    Ruby scheint auf meinem El Capitan nicht aktuell genug zu sein.
    Ging bei mir ohne Probleme. Allerdings hatte ich anscheinend vorhin schon activesupport (< 5) drauf.

    Shell-Script

    1. $ which ruby
    2. /usr/bin/ruby
    3. $ ruby --version
    4. ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
    5. ....
    Such danach bissl im Internet: github.com/CocoaPods/CocoaPods/issues/4789 zeigt z.B. was funktionieren könnte.
    Da hatte er den Issue verlinkt. Das Problem ist dass die Fehlermeldung irreführend ist. Du hättest bloß active support updaten müssen.
    * Kann Spuren von Erdnüssen enthalten.

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von NSObject ()