HipByte / motion-fabric

Easily integrate Fabric in your RubyMotion application.
BSD 2-Clause "Simplified" License
14 stars 6 forks source link

fabric:upload is setting get-task-allow to true in entitlements.plist; prevents installs #2

Closed dchersey closed 8 years ago

dchersey commented 8 years ago

Hi,

I've integrated motion-fabric, set up an account, and am successfully using it with Crashlytics. I've just started using it for beta distribution and I am running into a problem installing the beta builds on any of my test devices.

After a lot of research, I found that the entitlements.plist is being generated with

        <key>get-task-allow</key>
        <true/>

This is what rubymotion does for development builds, and motion-fabric seems to be using a development build.

However the ad-hoc distribution provisioning profile does not allow this, resulting in the following error on the device log while installing:

Mar 27 13:38:40 Light installd[684] <Notice>: 0x16e1bb000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=us.leapforward.awareness; Version=1.0.74, ShortVersion=1.0>
Mar 27 13:38:40 Light securityd[96] <Error>:  secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
Mar 27 13:38:40 Light securityd[96] <Error>:  secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
Mar 27 13:38:40 Light installd[684] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]
Mar 27 13:38:41 Light securityd[96] <Error>:  secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
Mar 27 13:38:41 Light securityd[96] <Error>:  secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
Mar 27 13:38:41 Light installd[684] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]
Mar 27 13:38:41 Light profiled[605] <Notice>: (Note ) MC: Provisioning profiles changed
Mar 27 13:38:41 Light profiled[605] <Notice>: (Note ) MC: Updating MIS trust...

Mar 27 13:38:41 Light installd[684] <Notice>: MIS: entitlement 'get-task-allow' has value not permitted by provisioning profile 'Global Awareness Beta Distribution'

Mar 27 13:38:41 Light installd[684] <Notice>: MIS: entitlement 'get-task-allow' has value not permitted by provisioning profile 'Global AWARENESS Beta Distribution'
Mar 27 13:38:41 Light installd[684] <Error>: 0x16e1bb000 +[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]: 142: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.NdVDAr/extracted/Payload/Global AWARENESS.app : 0xe8008016 (The executable was signed with invalid entitlements.)

I suspect there is a simple solution here somewhere -- perhaps I can tell motion-fabric to use a release build? I don't see anything in the doc that would specify this.

Any help would be much appreciated!

dchersey commented 8 years ago

update: adding

  app.development do
    app.entitlements['get-task-allow'] = false
  end

"fixes" this issue but now I won't be able to use the debugger in development. How can I specify this only for fabric uploads?

MarkVillacampa commented 8 years ago

Sorry for the delay, I did not see the notification for this issue!

Thanks for the detective work. We should definitely remove that entitlement inside motion-fabric.

Meanwhile, you can add that piece of code inside the config.beta block so it will only be used for beta builds:

app.fabric do |config|
  config.beta do
    app.identifier = "my_identifier"
    app.codesign_certificate = "my_certificate"
    app.provisioning_profile = "my_ad_hoc_provisioning_file"
    app.entitlements['get-task-allow'] = false
  end
end

Leaving this issue open until we fix this inside the gem.

MarkVillacampa commented 8 years ago

Just published motion-fabric 0.5 fixing this. Thank you!