iOS : Archive option not seen after adding loadbalancing-Objc demo into existing project

I have added loadbalancing-Objc demo into existing project and try to archive it to upload app on store but there is no archive option appear only export option is there.

When i tried to build manually using Windows + B it's succeeded but archive option is not worked

Can you please help me in that?

Thanks in advance!!!

Comments

  • Hi @phsojitra.

    Does 'archive' work for you with our demo projects, for example demo_loadBalancing_objc? If yes, then please try to find out what your project does different than our demos?
    What version number of the Client SDK are you on? Does it help to update to the latest available version?

    PS:
    Please note that loadBalancing-objc is not a demo, but part of the Client libraries. All demo-projects are located inside the demos folder and have 'demo' in their name.
  • hi @Kaiserludi

    I have checked the demo as you said but still getting error.

    Error from demo_iPhone_loadBalancing_swift :

    Ld /Users/princesojitra/Library/Developer/Xcode/DerivedData/demo_iPhone_loadBalancing_swift-evatypnbmxrxasdtysmmzxclfqpm/Build/Intermediates/ArchiveIntermediates/demo_iPhone_loadBalancing_swift\ debug/IntermediateBuildFilesPath/demo_iPhone_loadBalancing_swift.build/debug-iphoneos/demo_iPhone_loadBalancing_swift.build/Objects-normal/arm64/demo_iPhone_loadBalancing_swift normal arm64
    cd "/Users/princesojitra/PRINCE_PROJECTS/BEJ_Spads/Archive R&D/Source/bj_spades_app_iphone/Photon-iOS-Sdk_v4-1-6-0 2 2/Demos/demo_loadBalancing_swift/iPhone"
    export IPHONEOS_DEPLOYMENT_TARGET=9.0
    export PATH="/Users/princesojitra/Desktop/SoftWare/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Users/princesojitra/Desktop/SoftWare/Xcode 2.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Users/princesojitra/Desktop/SoftWare/Xcode\ 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Users/princesojitra/Desktop/SoftWare/Xcode\ 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk -L/Users/princesojitra/Library/Developer/Xcode/DerivedData/demo_iPhone_loadBalancing_swift-evatypnbmxrxasdtysmmzxclfqpm/Build/Intermediates/ArchiveIntermediates/demo_iPhone_loadBalancing_swift\ debug/BuildProductsPath/debug-iphoneos -L../../../Common-objc/lib -L../../../Photon-objc/lib -L../../../LoadBalancing-objc/lib -F/Users/princesojitra/Library/Developer/Xcode/DerivedData/demo_iPhone_loadBalancing_swift-evatypnbmxrxasdtysmmzxclfqpm/Build/Intermediates/ArchiveIntermediates/demo_iPhone_loadBalancing_swift\ debug/BuildProductsPath/debug-iphoneos -filelist /Users/princesojitra/Library/Developer/Xcode/DerivedData/demo_iPhone_loadBalancing_swift-evatypnbmxrxasdtysmmzxclfqpm/Build/Intermediates/ArchiveIntermediates/demo_iPhone_loadBalancing_swift\ debug/IntermediateBuildFilesPath/demo_iPhone_loadBalancing_swift.build/debug-iphoneos/demo_iPhone_loadBalancing_swift.build/Objects-normal/arm64/demo_iPhone_loadBalancing_swift.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=9.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/princesojitra/Library/Developer/Xcode/DerivedData/demo_iPhone_loadBalancing_swift-evatypnbmxrxasdtysmmzxclfqpm/Build/Intermediates/ArchiveIntermediates/demo_iPhone_loadBalancing_swift\ debug/IntermediateBuildFilesPath/demo_iPhone_loadBalancing_swift.build/debug-iphoneos/demo_iPhone_loadBalancing_swift.build/Objects-normal/arm64/demo_iPhone_loadBalancing_swift_lto.o -Xlinker -no_deduplicate -fembed-bitcode -Xlinker -bitcode_verify -Xlinker -bitcode_hide_symbols -Xlinker -bitcode_symbol_map -Xlinker /Users/princesojitra/Library/Developer/Xcode/DerivedData/demo_iPhone_loadBalancing_swift-evatypnbmxrxasdtysmmzxclfqpm/Build/Intermediates/ArchiveIntermediates/demo_iPhone_loadBalancing_swift\ debug/BuildProductsPath/debug-iphoneos -Xlinker -final_output -Xlinker /Applications/demo_iPhone_loadBalancing_swift.app/demo_iPhone_loadBalancing_swift -fobjc-link-runtime -L/Users/princesojitra/Desktop/SoftWare/Xcode\ 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Users/princesojitra/Library/Developer/Xcode/DerivedData/demo_iPhone_loadBalancing_swift-evatypnbmxrxasdtysmmzxclfqpm/Build/Intermediates/ArchiveIntermediates/demo_iPhone_loadBalancing_swift\ debug/IntermediateBuildFilesPath/demo_iPhone_loadBalancing_swift.build/debug-iphoneos/demo_iPhone_loadBalancing_swift.build/Objects-normal/arm64/demo_iPhone_loadBalancing_swift.swiftmodule -ObjC -lstdc++ -lCommon-objc_debug_iphoneos -lPhoton-objc_debug_iphoneos -lLoadBalancing-objc_debug_iphoneos /Users/princesojitra/PRINCE_PROJECTS/BEJ_Spads/Archive\ R&D/Source/bj_spades_app_iphone/Photon-iOS-Sdk_v4-1-6-0\ 2\ 2/LoadBalancing-objc/lib/libLoadBalancing-objc_debug_iphoneos.a -Xlinker -dependency_info -Xlinker /Users/princesojitra/Library/Developer/Xcode/DerivedData/demo_iPhone_loadBalancing_swift-evatypnbmxrxasdtysmmzxclfqpm/Build/Intermediates/ArchiveIntermediates/demo_iPhone_loadBalancing_swift\ debug/IntermediateBuildFilesPath/demo_iPhone_loadBalancing_swift.build/debug-iphoneos/demo_iPhone_loadBalancing_swift.build/Objects-normal/arm64/demo_iPhone_loadBalancing_swift_dependency_info.dat -o /Users/princesojitra/Library/Developer/Xcode/DerivedData/demo_iPhone_loadBalancing_swift-evatypnbmxrxasdtysmmzxclfqpm/Build/Intermediates/ArchiveIntermediates/demo_iPhone_loadBalancing_swift\ debug/IntermediateBuildFilesPath/demo_iPhone_loadBalancing_swift.build/debug-iphoneos/demo_iPhone_loadBalancing_swift.build/Objects-normal/arm64/demo_iPhone_loadBalancing_swift

    ld: bitcode bundle could not be generated because '../../../Common-objc/lib/libCommon-objc_debug_iphoneos.a(EGTime.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Showing All Messages
    : Bitcode bundle could not be generated because '../../../Common-objc/lib/libCommon-objc_debug_iphoneos.a(EGTime.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64

    Can you please guide me on that.

    Thanks in advance!!!
  • Hi @phsojitra.

    Please either turn off bitcode or update to 4.1.8.0 as SDKs prior to that version do not support bitcode.
  • phsojitraphsojitra
    edited August 11
    Hello @Kaiserludi

    I have download the latest version of SDK 4.1.8.0 and run the demo project- "demo_iPhone_loadBalancing_swift"

    2 scenario i have tried for that

    Scenario 1 : Archive the project but no option for archive is appear only export option is there.

    Scenario 2 :

    I have added below "other c flags" in build settings for main project
    debug = -fembed-bitcode-marker
    release = -fembed-bitcode

    as well added BITCODE_GENERATION_MODE in "user defined" for main project

    //:configuration = debug
    BITCODE_GENERATION_MODE = marker

    //:configuration = release
    BITCODE_GENERATION_MODE = bitcode

    Skip install = no for sub project which is LoadBalancing-objc.xcodeproj and yes for main project

    Got below error when try to archive it.

    ld: bitcode bundle could not be generated because '../../../LoadBalancing-objc/lib/libLoadBalancing-objc_debug_iphoneos.a(EGLoadBalancingClient.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture armv7

    Please help me on that and one more thing if i m gonna set bitcode = no then will it be affect on archive if yes then what kind of ?
  • Hi @phsojitra.


    Scenario 1 : Archive the project but no option for archive is appear only export option is there.

    What do you mean, when you say that you don't have the option? You click on "product" in the Xcode main menu, and then in the "product" sub menu the "Archive" entry is grayed out?

    I have just tried it with demo_loadBalancing_swift and I could successfully archive it. Not only was the option to do so available, but the archiving procedure also finished without errors.

    The error message that you have pasted here indicates that your project still tries to link against a version of LoadBalancing-objC, that has been built without bitcode support.
    Please make sure that you are actually linking against the new libs from 4.1.8.0 (have you completely removed the old ones, so that Xcode can't any longer find them in their old location?) and do a "Product" -> "Clean" to make sure that Xcode isn't still using cached versions of the old libs instead.


    Please help me on that and one more thing if i m gonna set bitcode = no then will it be affect on archive if yes then what kind of ?

    Please see https://www.google.de/search?q=apple+bitcode+explained
  • phsojitraphsojitra
    edited August 11
    hello @Kaiserludi

    What do you mean, when you say that you don't have the option? You click on "product" in the Xcode main menu, and then in the "product" sub menu the "Archive" entry is grayed out?

    I have do the same go to product then click on archive it started the process once whole process done there will be option comes for save .ipa file with valid archive and upload to app store.

    I did Prooduct -> clean muliple time before select archive as well

    What i am trying to say is this option is not appear for me only export as build appear not as .ipa that's the problem

    Thanks in advcance!!!
  • Hi @phsojitra.

    I don't think that the grayed out "Upload to App Store" button it related to bitcode in any way.

    Please check https://stackoverflow.com/questions/10715211/cannot-generate-ios-app-archive-in-xcode for what you should check.

    Yes, that button is also grayed out for our demos, but those are just demo products on how to use Photon, not intended to be submitted to the app store in the first place, so we have not set them up appropriately.

    However this has nothing to do with the libraries and accordingly no influence on your app.
Sign In or Register to comment.