Skip to content

iOS Troubleshooting Guide

vnramachandra edited this page Jun 23, 2017 · 17 revisions
  1. Missing Frameworks

    If you choose to install the Pyze Framework manually and and forget to add frameworks CoreTelephony and SystemConfiguration, you will see the following compilation errors.

     "_CNCopyCurrentNetworkInfo", referenced from: ...
     "_CNCopySupportedInterfaces", referenced from: ...
     "_OBJC_CLASS_$_CTTelephonyNetworkInfo", referenced from: ...
     "_SCNetworkReachabilityCreateWithAddress", referenced from: ...
     "_SCNetworkReachabilityCreateWithName", referenced from: ...
     "_SCNetworkReachabilityScheduleWithRunLoop", referenced from: ...
     "_SCNetworkReachabilitySetCallback", referenced from: ...
     "_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from: ...
    

    Resolution: Add frameworks CoreTelephony and SystemConfiguration
    iOS Developer Center

  2. Missing CoreTelephony framework Missing CoreTelephony framework would generate the following compilation errors.

     "_OBJC_CLASS_$_CTTelephonyNetworkInfo", referenced from: ...
     "_CNCopySupportedInterfaces", referenced from: ...
    

    Resolution: Add CoreTelephony framework
    iOS Developer Center

  3. Missing SystemConfiguration framework Missing SystemConfiguration framework would generate the following compilation errors.

     "_SCNetworkReachabilityCreateWithAddress", referenced from: ...
     "_SCNetworkReachabilityCreateWithName", referenced from: ...
     "_SCNetworkReachabilityScheduleWithRunLoop", referenced from: ...
     "_SCNetworkReachabilitySetCallback", referenced from: ...
     "_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from: ...
    

    Resolution: Add SystemConfiguration framework
    iOS Developer Center

  4. Following exception will be raised by calling empty PyzeAppKey passed to initializeWithKey method.

     *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', 
     reason: 'PyzeAppKey needs to be set via initializeWithKey: method. 
     Log on to growth.pyze.com to get it.'
    
  5. Screen flows will not automatically get updated at growth.pyze.com if you have missed adding ‘ObjC’ value to ‘Other Linker Flags’ under ‘Linking’ of your project’s build settings.

    Resolution: Add ObjC flag
    iOS Developer Center

  6. Following error will be shown upon compiling your project if you are using Cocoapods and opened .xcodeproj instead of .xcworkspace.

     *** ld: library not found for -lPods-Project_Name-ObjC
     clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
  7. If you encounter following error while using Cocoapods, please ensure that your deployment target is set to 8.0.

     Specs satisfying the `pyze-sdk-iOS` dependency were found, but they required a higher minimum deployment  target.
    
  8. If you get a build spec validation error in cocoapods while installing or updating Pyze SDK as show below, please either change the target in your app to iOS 8 (from iOS 7), or use the framework version of Pyze from GitHub. See here for installing Pyze using Framework.

    ERROR | [iOS] dynamic: Dynamic frameworks and libraries are not supported on iOS 8.0 and onwards

  9. If you get 'Image not found' error while running as shown below, ensure that '@executable_path/Frameworks' is added to 'Runpath Search Paths' under 'Linking' section of your project build settings. This usually happens if you created Xcode project version 5.x or 6.x.

    dyld: Library not loaded: @rpath/Pyze.framework/Pyze Referenced from: <path_to_your_app> Reason: image not found

More info provided in this link

  1. Before submitting your app to the AppStore (especially through Application Loader.app) we need to get rid of the simulator binaries, to achieve this please follow the below steps.

    • Go to your project target.

    • Navigate to Build phase.

    • Click + to add ‘New Run script’

    • Copy and paste the below script.

      #************************************************************************************** echo "Target architectures: $ARCHS"

      APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"

      find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK do FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable) FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME" echo "Executable is $FRAMEWORK_EXECUTABLE_PATH" echo $(lipo -info $FRAMEWORK_EXECUTABLE_PATH)

      FRAMEWORK_TMP_PATH="$FRAMEWORK_EXECUTABLE_PATH-tmp"

      remove simulator's archs if location is not simulator's directory

      case "${TARGET_BUILD_DIR}" in *"iphonesimulator") echo "No need to remove archs" ;; *) if $(lipo $FRAMEWORK_EXECUTABLE_PATH -verify_arch "i386") ; then lipo -output $FRAMEWORK_TMP_PATH -remove "i386" $FRAMEWORK_EXECUTABLE_PATH echo "i386 architecture removed" rm $FRAMEWORK_EXECUTABLE_PATH mv $FRAMEWORK_TMP_PATH $FRAMEWORK_EXECUTABLE_PATH fi if $(lipo $FRAMEWORK_EXECUTABLE_PATH -verify_arch "x86_64") ; then lipo -output $FRAMEWORK_TMP_PATH -remove "x86_64" $FRAMEWORK_EXECUTABLE_PATH echo "x86_64 architecture removed" rm $FRAMEWORK_EXECUTABLE_PATH mv $FRAMEWORK_TMP_PATH $FRAMEWORK_EXECUTABLE_PATH fi ;; esac

      echo "Completed for executable $FRAMEWORK_EXECUTABLE_PATH" echo $(lipo -info $FRAMEWORK_EXECUTABLE_PATH)

      done #**************************************************************************************

If above does not solve your problem, please open a ticket and we will help you. Contact us at support@pyze.com

Clone this wiki locally