[TIMOB-24384] Hyperloop: iOS - Build should detect Podfile changes and do a clean build
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2017-11-29T14:59:36.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Hans Knöchel |
Assignee | Unknown |
Created | 2017-02-08T08:36:58.000+0000 |
Updated | 2018-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!
Might be invalid. I tried to access a class from the wrong framework. Will keep until until re-validated.
Not an issue anymore, resolving.
Closing as "not our bug". If you disagree, please reopen.