[TIMOB-25413] Hyperloop: iOS - Pods with hyphens not supported
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Hyperloop 2.2.0 |
Fix Version/s | n/a |
Components | Hyperloop, iOS |
Labels | n/a |
Reporter | Jan Vennemann |
Assignee | Unknown |
Created | 2017-10-19T12:36:33.000+0000 |
Updated | 2018-02-28T19:55:12.000+0000 |
Description
*Steps to reproduce the behavior*
Add the following Podfile and replace
Add the following to
Create a new empty app
Add the following Podfile and replace <project_name>
with the name of your test project.
install! 'cocoapods',
:integrate_targets => false
platform :ios, '8.0'
target '<project_name>' do
pod 'Flurry-iOS-SDK/FlurrySDK'
end
Add the following to app/controllers/index.js
var Flurry = require('Flurry-iOS-SDK/Flurry');
var FlurrySessionBuilder = require('Flurry-iOS-SDK/FlurrySessionBuilder');
var builder = new FlurrySessionBuilder();
builder.withCrashReporting(true)
.withSessionContinueSeconds(10)
.withAppVersion('0.1.2');
Flurry.startSessionWithSessionBuilder('key', builder);
*Actual behavior*
The build crashes with the following log output
[TRACE] #import <Flurry-iOS-SDK/Flurry-iOS-SDK.h>
[TRACE] ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[TRACE] 1 error generated.
[TRACE]
...
[ERROR] ** BUILD FAILED **
[ERROR] The following build commands failed:
[ERROR] CompileC build/Intermediates/Hyperloop_Sample.build/Debug-iphonesimulator/Hyperloop_Sample.build/Objects-normal/x86_64/flurry-ios-sdk.o /Users/jvennemann/Development/appc/hyperloop-examples/build/hyperloop/ios/js/flurry-ios-sdk/flurry-ios-sdk.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
[ERROR] (1 failure)
*Expected behavior*
The build runs successful and the user is able to use the provided demo code.
*Additional notes*
In addition to the build failure the generated js and native module wrapper files will be generated with a hyphen in their name, which is invalid and needs to be normalized to generate a valid name.
This may be solved by [Hyperloop 3.0.1](https://github.com/appcelerator-modules/hyperloop-builds/releases/tag/v3.0.1) and TIMOB-25554 + TIMOB-25564.
Those tickets resolve only a part of the issue. With Hyperloop 3.0.1 this now works (with
use_frameworks!
set in the Podfile), however only on the first build after cleaning the build directory. Incremental builds throw an error again due to some naming issues caused by the hyphens. Should be easy to fix though so we can schedule this for one of the next patch releases. For now the remaining issue can be worked around with a hard reset of the build directory by runningrm -rf build/ && appc run -p ios
.