title: Possible Unhandled Promise Rejection (id:0) TypeError: undefined is not an object (evaluating 'ImagePicker.Permissions.askAsync)
body: <p>I am building an iOS app using React-Native and Expo. I have figured out how to access the user's Photo Library but am unable to request permissions from their device. It instead just accesses the camera roll without asking, which is obviously not allowed in iOS. Below is some of my code:</p>
  <pre><code>    import React, {useState, useEffect, useRef} from 'react';
      import * as ImagePicker from 'expo-image-picker';
      import Permissions, {usePermissions} from 'expo-permissions';
      import Constants from 'expo-constants'
  </code></pre>
  <p>//The useEffect function is what is ran when checking to see if the async function has been accepted or not</p>
  <pre><code>const Screen = ({navigation}) =&gt; {
  
  const [ imagePicker1, setImagePicker1 ] = useState(null);
  
  useEffect(() =&gt; {
      const permission_get1 = async ()=&gt; {
          if (Platform.OS !== 'web'){
              let { status } = await ImagePicker.Permissions.askAsync(Permissions.MEDIA_LIBRARY);
              if (status !== 'granted'){
                  console.log('No permission given')
                  alert('Camera roll required for to upload photo from your library');
                  return;
              }
              /*if (status === 'granted'){
                  console.log('Permission granted')*/
  
              let imagePicker1 = await ImagePicker.getMediaLibraryAsync()
                  setImagePicker1(imagePicker1)
                  console.log('It worked')
              }
  
      };
              permission_get1();
  }, []);
  </code></pre>