Start a new topic

iOS Distribution to AppStores fails - Invalid Signature

Hi Wikitude-Team, 


we added the new WikitudeSDK 7.1 to our App with the cordova-plugin (v7.1.0-3.5.2). But we have problems to upload the App to the AppStore. 


We get the following two distribution errors:

  

iTunes Store Operation Failed
ERROR ITMS-90035: "Invalid Signature. Code object is not signed at all. The file at path [SCIO AR.app/Frameworks/WikitudeSDK.framework/strip_wikitude_framework.sh] is not properly signed. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html" 

   

iTunes Store Operation Failed
ERROR ITMS-90035: "Invalid Signature. Code object is not signed at all. The file at path [SCIO AR.app/Frameworks/WikitudeSDK.framework/wikitude_bitcode.sh] is not properly signed. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html"


The building of the App on our testing devices ran without problems, we just had to put the WikitudeSDK to the Embed Frameworks Build Phase. 


In the AppStore Upload Wizard we get a the info that for WikitudeSDK.framework no profie is required. And its also not possible to set one. 



Best regards,

Philipp



1 person has this problem

Hi Philipp,

Did you already discovered the new section in our documentation regarding App Store uploads? When running this script, it removes simulator architectures and the script file itself. Did you already add a 'Run Script Phase' like described in the documentation?


Best regards,

Andreas

Hi Andreas,


my documented errors  in my first post have nothing to do with the simulator architectures bug/workaround. We use already the strip_wikitude_framework.sh as a build step after Embed Framework phase.

I think you see the real problem if you read the error messages is posted. Your Scripts 

  • strip_wikitude_framework.sh
  • wikitude_bitcode.sh


should not be part of the app bundle as it's only used while building. And this files are not signed so that we get the Invalid Signature Error Message for these two files. 

We solved the problem by changing the build process:

1) use the strip_wikitude_framework.sh from project directory and not from the build directory

sh "$PROJECT_DIR"/"$TARGET_NAME"/Plugins/com.wikitude.phonegap.WikitudePlugin/WikitudeSDK.framework/strip_wikitude_framework.sh -s -p "$BUILT_PRODUCTS_DIR"/"$FRAMEWORKS_FOLDER_PATH"/WikitudeSDK.framework

 2) remove all *.sh file from the build directories framework folder, because this files are not signed after you create a archive for the app store. 

find "$BUILT_PRODUCTS_DIR"/"$FRAMEWORKS_FOLDER_PATH"/WikitudeSDK.framework -name "*.sh" -type f -delete

 


Development Platform

  • macOS Sierra
  • Xcode 9.0
  • cordova-wikitude-plugin v7.1.0-3.5.2
  • cordova-cli 6.5.0
  • cordova-ios 4.5.1


Best regards

Hi Philipp,

I replied with this answer because our scripts already contain the functionality to remove themselves.

 

if [ "$ACTION" == "install" ]; then
        for FRAMEWORK_MANIPULATION_SCRIPT in ${FRAMEWORK_MANIPULATION_SCRIPTS[@]}
        do
            FULL_FRAMEWORK_MANIPULATION_SCRIPT_PATH="${WIKITUDE_FRAMEWORK_PATH}"/$FRAMEWORK_MANIPULATION_SCRIPT
            if [ -e $FULL_FRAMEWORK_MANIPULATION_SCRIPT_PATH ]; then
                rm -f $FULL_FRAMEWORK_MANIPULATION_SCRIPT_PATH
            fi
        done
    fi

Are you performing an 'Archive' build?


Best regards,

Andreas

Yes we perform a "Archive" build. 

 FULL_FRAMEWORK_MANIPULATION_SCRIPT_PATH
=> We have a SPACE in our App Name, we just surrounded the VARIABLES with QUOTES ;-)


if [ "$ACTION" == "install" ]; then
        for FRAMEWORK_MANIPULATION_SCRIPT in ${FRAMEWORK_MANIPULATION_SCRIPTS[@]}
        do
            FULL_FRAMEWORK_MANIPULATION_SCRIPT_PATH="${WIKITUDE_FRAMEWORK_PATH}"/$FRAMEWORK_MANIPULATION_SCRIPT
            if [ -e "$FULL_FRAMEWORK_MANIPULATION_SCRIPT_PATH" ]; then
                rm -f "$FULL_FRAMEWORK_MANIPULATION_SCRIPT_PATH"
            fi
        done
    fi

 

Hello,

Just to let you guys know, this bug is alive and kicking still. In my case, the solution was to move out of the project directory the files: wikitude_bitcode.sh & strip_wikitude_framework. After this action, the 'signature' validation error disappeared.

Cheers!

Yeah I got this bug recently again, I had to remove the .sh files manually from the project (then I don't know if the bitcode stuff was executed as the file was not here anymore). I am using the cordova plugin.

In our case it was native swift + Javascript Wikitude SDK.

 

Hi @all,

We will release an updated version of our SDK in the next weeks. This release contains updated scripts that remove themselves after running. This should resolve the issues. Please respond to this entry if you need early access.


Best regards,

Andreas

This issue is fixed in our 7.2.0 release.  Please update to 7.2.0 if you haven't already updated to the latest version.

Thx and greetings

Nicola

 

The issue still persists in SDK 7.2. 

image

image

image

image

Hello,


I am also experiencing this issue. It is delaying the launch of a client project, so I would be grateful for a swift response. I've attached a screenshot of the errors that Xcode is throwing, as well as a screenshot of the scripts that I was instructed to add according to this post: http://www.wikitude.com/external/doc/documentation/latest/ios/ios-framework-scripts-architect.html?_ga=2.248495175.1330971994.1524838121-1849422747.1519160432#ios-app-store-submissions



Thank you,


Blake Ross



errors.png
(86.2 KB)

For the record, I was able to circumvent this issue by:

- going into the directory created by Unity when I built the project.

- for me, that was _PROJECTDIR_/Frameworks/Plugins/iOS/WikitudeNativeSDK.framework

- in that WikitudeNativeSDK.framework "folder" I deleted the two .sh and two sh.meta files

- then built the app in Xcode


Xcode was able to build it without the two errors I mentioned above.

Hi @all,

I'm not sure if the following part of our documentation is known: iOS App Store submissions 

It mentions that a custom script build phase needs to be added in which a shell scripts prepares the framework for submission.


Please let me know if that solves the problem/confusion.


Best regards,
Andreas Schacherbauer





Login or Signup to post a comment