Search Unity

save screenshot to gallery/ios

Discussion in 'Scripting' started by fa4da, Mar 29, 2021.

  1. fa4da

    fa4da

    Joined:
    Feb 3, 2021
    Posts:
    15
    hello,

    so i have a button to save screenshot for the current scene to the gallery, i need code to implement that in an ios devices

    please help me i'll appreciate it.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    Definitely start with any of the thousands of videos on this topic.

    Screen Shot 2021-03-28 at 9.07.10 PM.png

    This is extremely well-covered ground, no need for anyone here to retype it all!
     
  3. fa4da

    fa4da

    Joined:
    Feb 3, 2021
    Posts:
    15
    for sure i searched on google first, but the none of solutions i've found worked
     
  4. fa4da

    fa4da

    Joined:
    Feb 3, 2021
    Posts:
    15
    I still didn't find solution, could you help me please if you know how? :(
     
  5. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
  6. fa4da

    fa4da

    Joined:
    Feb 3, 2021
    Posts:
    15
  7. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    Did you read the FAQ and do 100% of all the items required?


    . Manual Setup for iOS
    - set the value of ENABLED to false in NGPostProcessBuild.cs
    - build your project
    - enter a Photo Library Usage Description to Info.plist in Xcode
    - also enter a "Photo Library Additions Usage Description" to Info.plist in Xcode, if exists
    - set Info.plist's "Prevent limited photos access alert" property's value to 1 in Xcode, if exists
    - insert "-weak_framework PhotosUI -weak_framework Photos -framework AssetsLibrary -framework MobileCoreServices -framework ImageIO" to the "Other Linker Flags" of Unity-iPhone Target (if your Deployment Target is at least 8.0, it is sufficient to insert "-weak_framework PhotosUI -framework Photos -framework MobileCoreServices -framework ImageIO")
    - lastly, remove Photos.framework and PhotosUI.framework from Link Binary With Libraries of Unity-iPhone Target in Build Phases, if exists
     
    Last edited: Mar 31, 2021
    fa4da likes this.