Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24384] Hyperloop: iOS - Build should detect Podfile changes and do a clean build

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionNot Our Bug
Resolution Date2017-11-29T14:59:36.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterHans Knöchel
AssigneeUnknown
Created2017-02-08T08:36:58.000+0000
Updated2018-08-06T17:52:08.000+0000

Description

Ok, here is the use-case: Someone plays around with Cocoapods, adds the required dependencies after each other. After adding the first one, the app is ran, then the second Pod is added, the app wants to start again. The build fails due to classes not being found:
[DEBUG] Overwriting /Users/hknoechel/Documents/Apps/fbtest/Resources/app.js => /Users/hknoechel/Documents/Apps/fbtest/build/iphone/build/Products/Debug-iphonesimulator/fbtest.app/app.js

/Users/hknoechel/Documents/Apps/fbtest/plugins/hyperloop/2.0.1/hooks/ios/hyperloop.js:428
						throw new Error('The iOS class "' + className + '" could not be found in the framework "' + pkg + '". Are you trying to use "' + frameworkName + '" instead? (' + relPath+ ')');
            ^
Error: The iOS class "FBSDKMessageDialog" could not be found in the framework "FBSDKMessengerShareKit". Are you trying to use "FBSDKCoreKit" instead? (../build/iphone/build/Products/Debug-iphonesimulator/fbtest.app/app.js)
    at HyperloopiOSBuilder.<anonymous> (/Users/hknoechel/Documents/Apps/fbtest/plugins/hyperloop/2.0.1/hooks/ios/hyperloop.js:428:13)
    at Array.forEach (native)
    at HyperloopiOSBuilder.<anonymous> (/Users/hknoechel/Documents/Apps/fbtest/plugins/hyperloop/2.0.1/hooks/ios/hyperloop.js:422:34)
    at String.replace (native)
    at HyperloopiOSBuilder.patchJSFile (/Users/hknoechel/Documents/Apps/fbtest/plugins/hyperloop/2.0.1/hooks/ios/hyperloop.js:380:67)
    at HyperloopiOSBuilder.copyResource (/Users/hknoechel/Documents/Apps/fbtest/plugins/hyperloop/2.0.1/hooks/ios/hyperloop.js:86:7)
    at /usr/local/lib/node_modules/titanium/lib/hook.js:235:13
    at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:689:13
    at iterate (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:265:13)
    at async.forEachOfSeries.async.eachOfSeries (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:284:9)
---------------------------------------------
    at iOSBuilder.<anonymous> (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/iphone/cli/commands/_build.js:5618:5)
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/async/dist/async.js:3047:20
    at replenish (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/async/dist/async.js:884:21)
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/async/dist/async.js:888:13
    at eachLimit$1 (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/async/dist/async.js:3136:26)
    at Object.<anonymous> (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/async/dist/async.js:920:20)
    at iOSBuilder.processJSFiles (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/iphone/cli/commands/_build.js:5617:10)
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:718:13
    at Immediate.iterate (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:262:13)
---------------------------------------------
    at Object.setImmediate (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:194:9)
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:272:35
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:44:16
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:723:17
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:167:37
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/lib/async.js:64:51
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:718:13
    at Immediate.iterate (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:262:13)
---------------------------------------------
    at Object.setImmediate (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:194:9)
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:272:35
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:44:16
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:723:17
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:167:37
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/lib/async.js:64:51
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:718:13
    at Immediate.iterate (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:262:13)
---------------------------------------------
    at Object.setImmediate (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:194:9)
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:272:35
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:44:16
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:723:17
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:167:37
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/lib/async.js:64:51
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:718:13
    at Immediate.iterate (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:262:13)
---------------------------------------------
    at Object.setImmediate (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:194:9)
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:272:35
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:44:16
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:723:17
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:167:37
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/lib/async.js:64:51
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:718:13
    at iterate (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:262:13)
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:274:29
---------------------------------------------
    at Object.setImmediate (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:194:9)
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:272:35
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:44:16
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:723:17
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:167:37
    at iOSBuilder.<anonymous> (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/iphone/cli/commands/_build.js:5097:6)
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:718:13
    at iterate (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:262:13)
    at async.forEachOfSeries.async.eachOfSeries (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:281:9)
---------------------------------------------
    at Object.setImmediate (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:194:9)
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:272:35
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:44:16
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:723:17
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:167:37
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/lib/async.js:64:51
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:718:13
    at iterate (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:262:13)
    at async.forEachOfSeries.async.eachOfSeries (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:281:9)
---------------------------------------------
    at Object.setImmediate (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:194:9)
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:272:35
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:44:16
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:723:17
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:167:37
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/lib/async.js:64:51
    at /Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:718:13
    at Immediate.iterate (/Users/hknoechel/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/node_modules/node-appc/node_modules/async/lib/async.js:262:13)
Podfile (before):
install! 'cocoapods',
         :integrate_targets => false

platform :ios, '9.0'
target 'fbtest' do
	pod 'FBSDKCoreKit'
#	pod 'FBSDKShareKit'
#	pod 'FBSDKMessengerShareKit'
end
Podfile (after):
install! 'cocoapods',
         :integrate_targets => false

platform :ios, '9.0'
target 'fbtest' do
	pod 'FBSDKCoreKit'
	pod 'FBSDKShareKit'
	pod 'FBSDKMessengerShareKit'
end
Proposals: - Watch the Podfile and force a clean build if it's changed. The Cocoapods post-install hooks do the same with native projects - Validate that this also works for LiveView projects (when the reload blocker is resolved). Just so we don't forget it. The workaround is very simple, so it's no high prio issue: Clean the project and run it again -> Works!

Comments

  1. Hans Knöchel 2017-02-08

    Might be invalid. I tried to access a class from the wrong framework. Will keep until until re-validated.
  2. Hans Knöchel 2017-11-29

    Not an issue anymore, resolving.
  3. Eric Merriman 2018-08-06

    Closing as "not our bug". If you disagree, please reopen.

JSON Source