Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23780] Hyperloop: iOS - Build should copy Cocoapods-provided Bundles into the app.

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-01-05T22:25:37.000+0000
Affected Version/shyperloop 1.2.5
Fix Version/sHyperloop 2.0.1
ComponentsHyperloop, iOS, Tooling
Labelscocoapods, hyperloop, ios, qe-hyperloop
ReporterRodolfo Perottoni
AssigneeJan Vennemann
Created2016-08-12T03:50:40.000+0000
Updated2017-01-24T00:31:38.000+0000

Description

Some obj-c libraries require external bundles to work. Google VR SDK is an example: if you download it with Cocoapods (*pod 'GVRSDK'*), you get all the necessary headers + a few *.bundle* files inside *Pods//Resources*. If you try and run an app with it you'll see an error like this:
[DEBUG] 2016-08-12 10:20:38.475 loopmodules-googlevr[48694:3058797] Failed to load font: file not found at file:///Users/rodolfo/Library/Developer/CoreSimulator/Devices/72A6BC5A-112B-4499-909B-4BECED0F1262/data/Containers/Bundle/Application/68A6B27F-6964-4991-AAFF-9B09CF6592AC/loopmodules-googlevr.app/MaterialRobotoFontLoader.bundle/Roboto-Medium.ttf
I've opened the location above and couldn't see any of the Bundles there. *How to solve the issue:* Manually copying the *.bundle* files to the */app/assets* folder solve this issue. It would be nice if those bundles were automatically copied to the app to prevent these issues.

Comments

  1. Wilson Luu 2016-08-15

    I am able to reproduce this issue on: Appc CLI NPM: 4.2.7 Appc CLI Core: 5.4.0 Arrow: 1.8.2 SDK: 5.4.0.GA Node: v4.4.7 Cocoapods: 1.0.1 OS: Mac OS X (10.11.6) Xcode: 7.3.1 Device: iphone 6 plus (9.3.4)
  2. Hans Knöchel 2016-09-24

    [~rdperottoni] Are CocoaPods assets always in Pods/<podname>/Resources ?
  3. Rodolfo Perottoni 2016-09-25

    I can't guarantee that all of them work this way... I'd be shooting my own foot
  4. Hans Knöchel 2016-09-25

    I checked it. Pods can define the resources directors in their podspec file which would need to be checked for that.
  5. Jan Vennemann 2016-10-31

    PR (master): https://github.com/appcelerator/hyperloop.next/pull/98 PR (2_0_X): https://github.com/appcelerator/hyperloop.next/pull/100
  6. Jan Vennemann 2017-01-05

    PR (2_0_X): https://github.com/appcelerator/hyperloop.next/pull/113 The original PR for the 2_0_X branch contains a bug with a wrong variable name. The above PR fixes this bug.
  7. Hans Knöchel 2017-01-05

    Patch approved & merged! Please also update the Releases tab for QE, thx!
  8. Jan Vennemann 2017-01-06

    [2.0.1 Beta](https://github.com/appcelerator/hyperloop.next/releases/tag/2.0.1-beta) release updated on Github!
  9. Josh Longton 2017-01-24

    Verified as fixed, Bundles are now copied into the built application. *App.js* {noformat} var CGRectZero = require('CoreGraphics').CGRectZero; var GVRCardboardView = require('GVRSDK/GVRCardboardView'); var cardboardView = GVRCardboardView.alloc().initWithFrame(CGRectZero); {noformat} *Podfile* {noformat} install! 'cocoapods', :integrate_targets => false platform :ios, '7.0' target 'timob23780' do pod 'GVRSDK' end {noformat} *Tested on:* {noformat} macOS Sierra 10.12.2 iPhone 6 iOS simulator (10.2, 10.0) Ti SDK: 6.1.0.v20170123141052 Hyperloop: 2.0.1 Appc CLI: 6.1.0 Appc NPM: 4.2.8 Node v4.6.0 CocoaPods 1.0.1 {noformat} *Closing Ticket.*

JSON Source