Git Product home page Git Product logo

applocate_gem's Introduction

aai

does this work for orgs?

applocate_gem's People

Contributors

idyll avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

applocate_gem's Issues

1) AppLocate Restrictions Don't Work 2) The Docs in the README show incorrect parameter for device identifier

The README shows the device identifier as being the UUID parameter when the actual parameter name is UDID:

# expected options -> { uuid: "ABCD-DCCDDC-12394812389-CDC", restrictions: {"allowSafari" => false} }
Applocate::API.restrict(options)

SHOULD BE

# expected options -> { udid: "ABCD-DCCDDC-12394812389-CDC", restrictions: {"allowSafari" => false} }
Applocate::API.restrict(options)

ALSO...
The example above does not work. It never hides Safari. Does a full provisioning profile need to be sent or should fragments like that in fact work?

SOME LOVELY IRB OUTPUT

irb(main):003:0> Applocate::API.register_device
=> {"id"=>74, "uuid"=>nil, "enrollment_url"=>"https://www.applocate.com/enroll?token=cbc5ba42-b82e-4758-b394-167f19861723"}

# Visited the URL on the Device

irb(main):004:0> Applocate::API.list_devices
=> [{"id"=>9, "uuid"=>"6f9315a4d2a43cd6ce10c1adeb624e816b6b06ff", "enrollment_url"=>nil}, 
      {"id"=>32, "uuid"=>"4c465fd5eaccb8c233bb15ebf5c28ca69f1448e5", "enrollment_url"=>nil}, 
      {"id"=>33, "uuid"=>"acd900dade7c82890b0d96acc712a00acd136d85", "enrollment_url"=>nil},
      {"id"=>74, "uuid"=>"959bde1f13f8f194dbc52e8ba290d573030c6ba0", "enrollment_url"=>nil}]

# The device now shows as registered in the list
# So we send a command using UUID...

irb(main):006:0> Applocate::API.restrict({uuid: "959bde1f13f8f194dbc52e8ba290d573030c6ba0", restrictions: {"allowSafari" => false}})
=> {""=>{"id"=>2034, "device_id"=>62, "alert"=>nil, "token"=>nil, "badge"=>nil, "sound"=>nil, "options"=>nil, "mdm"=>nil, "sent_at"=>nil, "created_at"=>"2015-02-05T21:24:22.652Z", "updated_at"=>"2015-02-05T21:24:22.652Z"}}

# There is no device identifier in the output above as the key for the nested hash... also mdm and options are nil.

# Send a command using UDID:
irb(main):003:0* Applocate::API.restrict({udid: "959bde1f13f8f194dbc52e8ba290d573030c6ba0", restrictions: {"allowSafari" => false}})
=> {"959bde1f13f8f194dbc52e8ba290d573030c6ba0"=>{"id"=>2041, "device_id"=>74, "alert"=>nil, "token"=>"94c67d6f2587a7d7a704eb239433dc432293ee6e3b5f997d21c6cfcf8ca45083", "badge"=>nil, "sound"=>nil, "options"=>nil, "mdm"=>"C1F8C251-4093-4D31-98B5-85A979149C59", "sent_at"=>nil, "created_at"=>"2015-02-05T23:02:07.553Z", "updated_at"=>"2015-02-05T23:02:07.553Z"}}

# Now we get output but Safari is never restricted on the device.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.