Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-23570

Hyperloop: iOS - Support use_frameworks flag in Cocoapods

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Hyperloop 2.2.0
    • Component/s: Hyperloop, iOS
    • Environment:

      Hyperloop 1.2.0
      Appc CLI 5.3.1-2
      SDK 5.4.0.v20160617074028
      Pod CLI 0.39.0

      Description

      When use_frameworks! is included in Podfile, linking fails due to the framework being looked for in the wrong location. Even if the framework is placed in the expected location, the app will crash upon execution. Details provided below.

      I discovered this issue while trying to use a swift Cocoapod, but it is easily reproduced using the Hyperloop_Sample app as well. I will describe steps to reproduce for both cases.

      1. For Hyperloop_Sample, simply add `use_frameworks!` to the beginning of Podfile and change the platform to 8.0 (frameworks only supported in iOS 8+). Change the min-ios-ver to 8.0 in tiapp.xml as well. As expected, instead of creating static libraries, frameworks for each pod are created instead. These can be seen inside of `build/Release-iphonesimulator`. The first issue comes during linking. The framework is expected to be at `build/iphone/build/Products/Debug-iphonesimulator` as seen in the attached build log (see Sample.log), search for GLCalendarView to see the expected location of the framework on line 4466. I then tried manually copying the 3 frameworks from `build/Release-iphonesimulator` to `build/iphone/build/Products/Debug-iphonesimulator` which allows the app to be built, but when it runs on the simulator, immediately crashes, see the attached crash log (Sample.crash). I'm not real sure what the problem is, just that the error is "Library not loaded" for reason "image not found".

      2. Next, I created a new project, enabled hyperloop, then tried to use a swift cocoapod. Swift pods require use of `use_frameworks!`, so without this issue being resolved, we will be unable to use any swift pods. I've attached my Podfile (see Podfile). I tried building without referencing the pod in the Podfile, just to test, and while the app builds, it crashes as well, see (swift.crash).

        Attachments

        1. Podfile
          0.1 kB
        2. Sample.crash
          4 kB
        3. Sample.log
          2.36 MB
        4. swift.crash
          48 kB

          Issue Links

            Activity

              People

              • Assignee:
                jvennemann Jan Vennemann
                Reporter:
                rpiwetz Ron Piwetz
                Reviewer:
                Hans Knöchel
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-9863
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code