does this work for orgs?
aai / applocate_gem Goto Github PK
View Code? Open in Web Editor NEWThe Applocate Client gem.
License: MIT License
The Applocate Client gem.
License: MIT License
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.
You should be able to call the API to request a ticket to register a device.
Call should return a UUID to access the device in the future.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.