'package build' fails in release mode only (due to facebook plugin)


#1

Hi
I am trying to ionic package a release.

$ ionic package build ios --profile profile_development works well: BUILD SUCCEEDED.

But $ ionic package build ios --release --profile profile_production lead to an error: BUILD FAILED

Can you please help me ?

App id: bc689f0f

$ ionic pacakge info 85 shorten log:


  e[33mide[39m       │ 85                     
  e[33mstatuse[39m   │ e[31mFAILEDe[39m                 
  e[33mplatforme[39m │ ios                    
  e[33mmodee[39m     │ release                
  e[33mstartede[39m  │ Jan 31st, 2016 5:46:28 

e[33moutpute[39m:

=== BUILD TARGET BoardLine OF PROJECT BoardLine WITH CONFIGURATION Release ===

Check dependencies
...
normal/armv7/FacebookConnectPlugin.dia -c /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/BoardLine/Plugins/cordova-plugin-facebook4/FacebookConnectPlugin.m -o /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/armv7/FacebookConnectPlugin.o
/Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/BoardLine/Plugins/cordova-plugin-facebook4/FacebookConnectPlugin.m:415:35: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
        NSError *error = [NSError errorWithDomain:nil code:-1 userInfo:userInfo];
                                  ^               ~~~
1 warning generated.

CompileC build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/armv7/MainViewController.o BoardLine/Classes/MainViewController.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios
    export LANG=en_US.US-ASCII
    export 
    cd /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios
    export LANG=en_US.US-ASCII
  ...
normal/armv7s/FacebookConnectPlugin.dia -c /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/BoardLine/Plugins/cordova-plugin-facebook4/FacebookConnectPlugin.m -o /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/armv7s/FacebookConnectPlugin.o
/Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/BoardLine/Plugins/cordova-plugin-facebook4/FacebookConnectPlugin.m:415:35: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
        NSError *error = [NSError errorWithDomain:nil code:-1 userInfo:userInfo];
                                  ^               ~~~
1 warning generated.

CompileC build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/armv7s/CDVDevice.o BoardLine/Plugins/cordova-plugin-device/CDVDevice.m normal armv7s objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7s -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fobjc-arc -
...
normal/arm64/FacebookConnectPlugin.dia -c /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/BoardLine/Plugins/cordova-plugin-facebook4/FacebookConnectPlugin.m -o /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/arm64/FacebookConnectPlugin.o
/Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/BoardLine/Plugins/cordova-plugin-facebook4/FacebookConnectPlugin.m:415:35: warning: null passed to a callee that requires a non-null argument [-Wnonnull]
        NSError *error = [NSError errorWithDomain:nil code:-1 userInfo:userInfo];
                                  ^               ~~~
1 warning generated.

CompileC build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/arm64/CDVDevice.o BoardLine/Plugins/cordova-plugin-device/CDVDevice.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios
    export LANG=en_US.US-ASCII
    export
 ...
Ld build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/armv7s/BoardLine normal armv7s
    cd /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios
    export IPHONEOS_DEPLOYMENT_TARGET=6.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -L/Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/device -F/Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/device -FBoardLine/Plugins/cordova-plugin-facebook4 -FBoardLine/Plugins/cordova-plugin-googleplus -filelist /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/armv7s/BoardLine.LinkFileList -miphoneos-version-min=6.0 -dead_strip -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -ObjC -fobjc-arc -fobjc-link-runtime -framework AssetsLibrary /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/device/libCordova.a -framework CoreGraphics -framework MobileCoreServices -framework FBSDKCoreKit -framework FBSDKLoginKit -framework FBSDKShareKit -weak_framework Social -weak_framework MessageUI -weak_framework SystemConfiguration -framework CoreTelephony -framework GoogleOpenSource -framework GoogleSignIn -weak_framework AddressBook -weak_framework CoreText -weak_framework Security -weak_framework StoreKit -weak-lz -weak-lz -Xlinker -dependency_info -Xlinker /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/armv7s/BoardLine_dependency_info.dat -o /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/armv7s/BoardLine
ld: file is universal (4 slices) but does not contain a(n) armv7s slice: BoardLine/Plugins/cordova-plugin-googleplus/GoogleSignIn.framework/GoogleSignIn file 'BoardLine/Plugins/cordova-plugin-googleplus/GoogleSignIn.framework/GoogleSignIn' for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Ld build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/arm64/BoardLine normal arm64
    cd /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios
    export IPHONEOS_DEPLOYMENT_TARGET=6.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -L/Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/device -F/Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/device -FBoardLine/Plugins/cordova-plugin-facebook4 -FBoardLine/Plugins/cordova-plugin-googleplus -filelist /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/arm64/BoardLine.LinkFileList -miphoneos-version-min=6.0 -dead_strip -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -ObjC -fobjc-arc -fobjc-link-runtime -framework AssetsLibrary /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/device/libCordova.a -framework CoreGraphics -framework MobileCoreServices -framework FBSDKCoreKit -framework FBSDKLoginKit -framework FBSDKShareKit -weak_framework Social -weak_framework MessageUI -weak_framework SystemConfiguration -framework CoreTelephony -framework GoogleOpenSource -framework GoogleSignIn -weak_framework AddressBook -weak_framework CoreText -weak_framework Security -weak_framework StoreKit -weak-lz -weak-lz -Xlinker -dependency_info -Xlinker /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/arm64/BoardLine_dependency_info.dat -o /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/arm64/BoardLine

Ld build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/armv7/BoardLine normal armv7
    cd /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios
    export IPHONEOS_DEPLOYMENT_TARGET=6.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -L/Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/device -F/Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/device -FBoardLine/Plugins/cordova-plugin-facebook4 -FBoardLine/Plugins/cordova-plugin-googleplus -filelist /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/armv7/BoardLine.LinkFileList -miphoneos-version-min=6.0 -dead_strip -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -ObjC -fobjc-arc -fobjc-link-runtime -framework AssetsLibrary /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/device/libCordova.a -framework CoreGraphics -framework MobileCoreServices -framework FBSDKCoreKit -framework FBSDKLoginKit -framework FBSDKShareKit -weak_framework Social -weak_framework MessageUI -weak_framework SystemConfiguration -framework CoreTelephony -framework GoogleOpenSource -framework GoogleSignIn -weak_framework AddressBook -weak_framework CoreText -weak_framework Security -weak_framework StoreKit -weak-lz -weak-lz -Xlinker -dependency_info -Xlinker /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/armv7/BoardLine_dependency_info.dat -o /Users/package/workspace/apps-bc689f0f-85/cordova/platforms/ios/build/BoardLine.build/Release-iphoneos/BoardLine.build/Objects-normal/armv7/BoardLine
ld: warning: object file (BoardLine/Plugins/cordova-plugin-facebook4/FBSDKCoreKit.framework/FBSDKCoreKit(FBSDKGraphRequestPiggybackManager.o)) was built for newer iOS version (7.0) than being linked (6.0)
ld: warning: object file (BoardLine/Plugins/cordova-plugin-facebook4/FBSDKCoreKit.framework/FBSDKCoreKit(FBSDKServerConfigurationManager.o)) was built for newer iOS version (7.0) than being linked (6.0)
ld: warning: object file (BoardLine/Plugins/cordova-plugin-facebook4/FBSDKCoreKit.framework/FBSDKCoreKit(FBSDKGraphRequest.o)) was built for newer iOS version (7.0) than being linked (6.0)

** BUILD FAILED **


EDIT seems related to this maybe: https://github.com/jeduan/cordova-plugin-facebook4/issues/3
and this: http://stackoverflow.com/questions/29466683/could-not-build-module-fbsdkcorekit-for-facebooksdk-4


#2

Hi @LouisR

I’m facing exactly the same issue with cordova-plugin-facebook4.

Were you able to resolve this?

Thanks


#3

Same problem here, someone could solve?