Search Unity

Unable to open iMessage app extension

Discussion in 'iOS and tvOS' started by killergerbah_, Mar 16, 2017.

  1. killergerbah_

    killergerbah_

    Joined:
    Oct 29, 2014
    Posts:
    5
    I was able to use the latest version of the XCode project manipulator API to add an iMessage app extension to the XCode project built by Unity in a post build hook. The project can then be built and installed on device, the iMessage app being installed alongside the containing Unity app.

    However, while the Unity app appears to work fine, the iMessage app extension fails to load, stuck on a screen with the app icon, failing to proceed, and appearing to be completely frozen. When XCode attempts to attach its debugger it complains that it "Could not attach to pid.."

    Device logs are very cryptic, the only reported errors that seem to be relevant are
    "<Error>: Hub connection error Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named <bundle ID>" UserInfo={NSDebugDescription=connection to service named <bundle ID>}"

    I was wondering if this was somehow a problem with my use of the XCode project manipulator so I attempted to repeat the process manually with an entirely new and empty Unity project. After building the XCode project I manually added an iMessage build target, and attempted again to build to device. The result was the same as before. I did find out however that a Stickers extension appears to work completely fine.

    Has anyone else had a similar experience? Is there a solution?
     
  2. killergerbah_

    killergerbah_

    Joined:
    Oct 29, 2014
    Posts:
    5
    I somehow was able to solve this problem 20 minutes after posting the original question (before which I had spent hours fumbling with XCode build settings trying to get this to work) :D.

    For whatever reason the architectures build flag defaults to only armv7 when the target is originally added to the project. Setting archs to armv7, arm64 appears to solve the above problem. I'm not sure what magic is going on for the iMessage build target to default to armv7, but it seems to be something about the Unity app build settings since this is normally not a problem with more vanilla XCode projects.
     
    Mintah and Vic_Ning like this.
  3. Vic_Ning

    Vic_Ning

    Joined:
    Sep 18, 2015
    Posts:
    1
    You’re so smart!!!!!!!!Thank you very much.
     
  4. armnotstrong

    armnotstrong

    Joined:
    Mar 3, 2017
    Posts:
    21
    Thank you very much for this !!
     
  5. BumbleMeow

    BumbleMeow

    Joined:
    Mar 30, 2016
    Posts:
    1
    Thanks for this. This helped me too.