├── Example └── Example │ ├── MessagesExtension │ ├── Assets.xcassets │ │ ├── Contents.json │ │ └── iMessage App Icon.stickersiconset │ │ │ └── Contents.json │ ├── RawImages.xcassets │ │ ├── Contents.json │ │ ├── .DS_Store │ │ ├── elephant01.imageset │ │ │ ├── elephant01.png │ │ │ └── Contents.json │ │ ├── elephant02.imageset │ │ │ ├── elephant02.png │ │ │ └── Contents.json │ │ ├── elephant03.imageset │ │ │ ├── elephant03.png │ │ │ └── Contents.json │ │ ├── elephant04.imageset │ │ │ ├── elephant04.png │ │ │ └── Contents.json │ │ ├── elephant05.imageset │ │ │ ├── elephant05.png │ │ │ └── Contents.json │ │ ├── elephant06.imageset │ │ │ ├── elephant06.png │ │ │ └── Contents.json │ │ ├── elephant07.imageset │ │ │ ├── elephant07.png │ │ │ └── Contents.json │ │ ├── elephant08.imageset │ │ │ ├── elephant08.png │ │ │ └── Contents.json │ │ ├── elephant09.imageset │ │ │ ├── elephant09.png │ │ │ └── Contents.json │ │ ├── elephant10.imageset │ │ │ ├── elephant10.png │ │ │ └── Contents.json │ │ ├── elephant11.imageset │ │ │ ├── elephant11.png │ │ │ └── Contents.json │ │ ├── elephant12.imageset │ │ │ ├── elephant12.png │ │ │ └── Contents.json │ │ ├── elephant13.imageset │ │ │ ├── elephant13.png │ │ │ └── Contents.json │ │ ├── elephant14.imageset │ │ │ ├── elephant14.png │ │ │ └── Contents.json │ │ ├── elephant15.imageset │ │ │ ├── elephant15.png │ │ │ └── Contents.json │ │ ├── elephant16.imageset │ │ │ ├── elephant16.png │ │ │ └── Contents.json │ │ ├── elephant17.imageset │ │ │ ├── elephant17.png │ │ │ └── Contents.json │ │ ├── elephant18.imageset │ │ │ ├── elephant18.png │ │ │ └── Contents.json │ │ ├── elephant19.imageset │ │ │ ├── elephant19.png │ │ │ └── Contents.json │ │ ├── elephant20.imageset │ │ │ ├── elephant20.png │ │ │ └── Contents.json │ │ ├── elephant21.imageset │ │ │ ├── elephant21.png │ │ │ └── Contents.json │ │ ├── elephant22.imageset │ │ │ ├── elephant22.png │ │ │ └── Contents.json │ │ ├── elephant23.imageset │ │ │ ├── elephant23.png │ │ │ └── Contents.json │ │ ├── elephant24.imageset │ │ │ ├── elephant24.png │ │ │ └── Contents.json │ │ ├── elephant25.imageset │ │ │ ├── elephant25.png │ │ │ └── Contents.json │ │ ├── elephant26.imageset │ │ │ ├── elephant26.png │ │ │ └── Contents.json │ │ ├── elephant27.imageset │ │ │ ├── elephant27.png │ │ │ └── Contents.json │ │ ├── elephant28.imageset │ │ │ ├── elephant28.png │ │ │ └── Contents.json │ │ ├── elephant29.imageset │ │ │ ├── elephant29.png │ │ │ └── Contents.json │ │ ├── elephant30.imageset │ │ │ ├── elephant30.png │ │ │ └── Contents.json │ │ ├── elephant31.imageset │ │ │ ├── elephant31.png │ │ │ └── Contents.json │ │ ├── elephant32.imageset │ │ │ ├── elephant32.png │ │ │ └── Contents.json │ │ ├── elephant33.imageset │ │ │ ├── elephant33.png │ │ │ └── Contents.json │ │ ├── elephant34.imageset │ │ │ ├── elephant34.png │ │ │ └── Contents.json │ │ ├── elephan_bigt02.imageset │ │ │ ├── elephan_bigt02.png │ │ │ └── Contents.json │ │ ├── elephant_big01.imageset │ │ │ ├── elephant_big01.png │ │ │ └── Contents.json │ │ ├── elephant_big03.imageset │ │ │ ├── elephant_big03.png │ │ │ └── Contents.json │ │ ├── elephant_big04.imageset │ │ │ ├── elephant_big04.png │ │ │ └── Contents.json │ │ ├── elephant_big05.imageset │ │ │ ├── elephant_big05.png │ │ │ └── Contents.json │ │ └── elephant_big06.imageset │ │ │ ├── elephant_big06.png │ │ │ └── Contents.json │ ├── Resources │ │ ├── invalid_file_size.png │ │ └── invalid_image_size.png │ ├── Example-Bridging-Header.h │ ├── StickerData.swift │ ├── Info.plist │ ├── ExampleCollectionViewCell.swift │ ├── MessagesViewController.swift │ └── Base.lproj │ │ └── MainInterface.storyboard │ ├── Example.xcodeproj │ ├── xcuserdata │ │ └── radif.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ └── MessagesExtension.xcscheme │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── project.pbxproj │ └── Example │ ├── Info.plist │ └── Assets.xcassets │ └── AppIcon.appiconset │ └── Contents.json ├── .gitignore ├── Classes ├── mcbAnimatedImagePersister.h ├── mcbAnimatedImagePersister.m └── MSSticker+Images.swift ├── LICENSE └── README.md /Example/Example/MessagesExtension/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/.DS_Store -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/Resources/invalid_file_size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/Resources/invalid_file_size.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/Resources/invalid_image_size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/Resources/invalid_image_size.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /Example/Example/.DS_Store 2 | /Example/.DS_Store 3 | /.DS_Store 4 | /Example/Example/Example.xcodeproj/project.xcworkspace/xcuserdata/radif.xcuserdatad/UserInterfaceState.xcuserstate 5 | -------------------------------------------------------------------------------- /Example/Example/Example.xcodeproj/xcuserdata/radif.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/Example-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "mcbAnimatedImagePersister.h" 6 | -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant01.imageset/elephant01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant01.imageset/elephant01.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant02.imageset/elephant02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant02.imageset/elephant02.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant03.imageset/elephant03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant03.imageset/elephant03.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant04.imageset/elephant04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant04.imageset/elephant04.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant05.imageset/elephant05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant05.imageset/elephant05.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant06.imageset/elephant06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant06.imageset/elephant06.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant07.imageset/elephant07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant07.imageset/elephant07.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant08.imageset/elephant08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant08.imageset/elephant08.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant09.imageset/elephant09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant09.imageset/elephant09.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant10.imageset/elephant10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant10.imageset/elephant10.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant11.imageset/elephant11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant11.imageset/elephant11.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant12.imageset/elephant12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant12.imageset/elephant12.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant13.imageset/elephant13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant13.imageset/elephant13.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant14.imageset/elephant14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant14.imageset/elephant14.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant15.imageset/elephant15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant15.imageset/elephant15.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant16.imageset/elephant16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant16.imageset/elephant16.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant17.imageset/elephant17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant17.imageset/elephant17.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant18.imageset/elephant18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant18.imageset/elephant18.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant19.imageset/elephant19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant19.imageset/elephant19.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant20.imageset/elephant20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant20.imageset/elephant20.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant21.imageset/elephant21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant21.imageset/elephant21.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant22.imageset/elephant22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant22.imageset/elephant22.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant23.imageset/elephant23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant23.imageset/elephant23.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant24.imageset/elephant24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant24.imageset/elephant24.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant25.imageset/elephant25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant25.imageset/elephant25.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant26.imageset/elephant26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant26.imageset/elephant26.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant27.imageset/elephant27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant27.imageset/elephant27.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant28.imageset/elephant28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant28.imageset/elephant28.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant29.imageset/elephant29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant29.imageset/elephant29.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant30.imageset/elephant30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant30.imageset/elephant30.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant31.imageset/elephant31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant31.imageset/elephant31.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant32.imageset/elephant32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant32.imageset/elephant32.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant33.imageset/elephant33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant33.imageset/elephant33.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant34.imageset/elephant34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant34.imageset/elephant34.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephan_bigt02.imageset/elephan_bigt02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephan_bigt02.imageset/elephan_bigt02.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant_big01.imageset/elephant_big01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant_big01.imageset/elephant_big01.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant_big03.imageset/elephant_big03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant_big03.imageset/elephant_big03.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant_big04.imageset/elephant_big04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant_big04.imageset/elephant_big04.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant_big05.imageset/elephant_big05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant_big05.imageset/elephant_big05.png -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant_big06.imageset/elephant_big06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/radif/MSSticker-Images/HEAD/Example/Example/MessagesExtension/RawImages.xcassets/elephant_big06.imageset/elephant_big06.png -------------------------------------------------------------------------------- /Example/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/StickerData.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StickerData.swift 3 | // Example 4 | // 5 | // Created by Radif Sharafullin on 8/24/16. 6 | // Copyright © 2016 Radif Sharafullin. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | struct StickerData{ 12 | let images:[String] 13 | let name:String 14 | let fps:Float 15 | var frameDelay:Float{ get{ return 1.0/fps } } 16 | } 17 | -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant01.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant01.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant02.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant02.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant03.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant03.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant04.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant04.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant05.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant05.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant06.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant06.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant07.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant07.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant08.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant08.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant09.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant09.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant10.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant10.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant11.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant11.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant12.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant12.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant13.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant13.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant14.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant14.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant15.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant15.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant16.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant16.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant17.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant17.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant18.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant18.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant19.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant19.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant20.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant20.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant21.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant21.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant22.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant22.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant23.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant23.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant24.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant24.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant25.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant25.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant26.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant26.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant27.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant27.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant28.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant28.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant29.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant29.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant30.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant30.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant31.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant31.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant32.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant32.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant33.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant33.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant34.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "elephant34.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephan_bigt02.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "filename" : "elephan_bigt02.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant_big01.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "filename" : "elephant_big01.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant_big03.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "filename" : "elephant_big03.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant_big04.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "filename" : "elephant_big04.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant_big05.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "filename" : "elephant_big05.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/RawImages.xcassets/elephant_big06.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "filename" : "elephant_big06.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Classes/mcbAnimatedImagePersister.h: -------------------------------------------------------------------------------- 1 | // 2 | // mcbAnimatedImagePersister.h 3 | // 4 | // Created by Radif Sharafullin on 6/30/16. 5 | // Copyright © 2016 Radif Sharafullin. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @interface mcbAnimatedImagePersister : NSObject 11 | +(instancetype)shared; 12 | 13 | -(void)persistAnimatedImageSequenceGIF:(NSArray *)images frameDelay:(CGFloat)frameDelay numberOfLoops:(NSInteger)numberOfLoops toURL:(NSURL *)toURL; 14 | -(void)persistAnimatedImageSequenceAPNG:(NSArray *)images frameDelay:(CGFloat)frameDelay numberOfLoops:(NSInteger)numberOfLoops toURL:(NSURL *)toURL; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example/Example/Example.xcodeproj/xcuserdata/radif.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MessagesExtension.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 49F9DE5C1D6E087C0022C8D2 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | NSExtension 24 | 25 | NSExtensionMainStoryboard 26 | MainInterface 27 | NSExtensionPointIdentifier 28 | com.apple.message-payload-provider 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 radif 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/Assets.xcassets/iMessage App Icon.stickersiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "60x45", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "60x45", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "ipad", 15 | "size" : "67x50", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "74x55", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "size" : "27x20", 25 | "idiom" : "universal", 26 | "scale" : "2x", 27 | "platform" : "ios" 28 | }, 29 | { 30 | "size" : "27x20", 31 | "idiom" : "universal", 32 | "scale" : "3x", 33 | "platform" : "ios" 34 | }, 35 | { 36 | "size" : "32x24", 37 | "idiom" : "universal", 38 | "scale" : "2x", 39 | "platform" : "ios" 40 | }, 41 | { 42 | "size" : "32x24", 43 | "idiom" : "universal", 44 | "scale" : "3x", 45 | "platform" : "ios" 46 | }, 47 | { 48 | "size" : "1024x768", 49 | "idiom" : "ios-marketing", 50 | "scale" : "1x", 51 | "platform" : "ios" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MSSticker-Images 2 | Initializes a new animated sticker with an array of images and animation settings 3 | 4 | # Usage: 5 | ```swift 6 | var images = [UIImage]() 7 | 8 | ...populate 9 | 10 | let sticker: MSSticker 11 | do { 12 | try sticker=MSSticker(images: images, format: .apng, frameDelay: 1.0/14.0, numberOfLoops: 0, localizedDescription: localizedDescription) 13 | }catch MSStickerAnimationInputError.InvalidDimensions { 14 | try! sticker=MSSticker(contentsOfFileURL: urlForImageName("invalid_image_size"), localizedDescription: "invalid dimensions") 15 | }catch MSStickerAnimationInputError.InvalidStickerFileSize { 16 | try! sticker=MSSticker(contentsOfFileURL: urlForImageName("invalid_file_size"), localizedDescription: "invalid file size") 17 | } catch { fatalError("other error:\(error)") } 18 | ``` 19 | 1. insert `#import "mcbAnimatedImagePersister.h"` into your swift bridging header 20 | 2. frameDelay aka frame rate 21 | 3. numberOfLoops: 0 = forever 22 | 23 | The current limitation imposed by Apple is 500kb file size and the image dimensions varying from 300x300 to 618-618 px. The initializer will throw MSStickerAnimationInputError: .InvalidDimensions or .InvalidStickerFileSize if the conditions are not met. 24 | 25 | To familarize yourself with the use case, see the example project, particularly, files: ExampleCollectionViewCell.swift, MessagesViewController.swift, StickerData.swift 26 | -------------------------------------------------------------------------------- /Example/Example/Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Example/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /Classes/mcbAnimatedImagePersister.m: -------------------------------------------------------------------------------- 1 | // 2 | // mcbAnimatedImagePersister.m 3 | // 4 | // Created by Radif Sharafullin on 6/30/16. 5 | // Copyright © 2016 Radif Sharafullin. All rights reserved. 6 | // 7 | 8 | #import "mcbAnimatedImagePersister.h" 9 | #import 10 | #import 11 | 12 | @implementation mcbAnimatedImagePersister 13 | +(instancetype)shared{ 14 | static mcbAnimatedImagePersister * instance=nil; 15 | static dispatch_once_t onceToken; 16 | dispatch_once(&onceToken, ^{ 17 | instance=mcbAnimatedImagePersister.new; 18 | }); 19 | return instance; 20 | } 21 | -(void)persistAnimatedImageSequenceGIF:(NSArray *)images frameDelay:(CGFloat)frameDelay numberOfLoops:(NSInteger)numberOfLoops toURL:(NSURL *)toURL{ 22 | NSDictionary *fileProperties = @{ 23 | (__bridge id)kCGImagePropertyGIFDictionary: @{ 24 | (__bridge id)kCGImagePropertyGIFLoopCount: @(numberOfLoops), // 0 means loop forever 25 | } 26 | }; 27 | 28 | NSDictionary *frameProperties = @{ 29 | (__bridge id)kCGImagePropertyGIFDictionary: @{ 30 | (__bridge id)kCGImagePropertyGIFDelayTime: @(frameDelay), // a float (not double!) in seconds, rounded to centiseconds in the GIF data 31 | } 32 | }; 33 | 34 | 35 | CGImageDestinationRef destination = CGImageDestinationCreateWithURL((__bridge CFURLRef)toURL, kUTTypeGIF, images.count, NULL); 36 | CGImageDestinationSetProperties(destination, (__bridge CFDictionaryRef)fileProperties); 37 | for (UIImage * image in images) { 38 | CGImageDestinationAddImage(destination, image.CGImage, (__bridge CFDictionaryRef)frameProperties); 39 | } 40 | 41 | if (!CGImageDestinationFinalize(destination)) { 42 | NSLog(@"failed to finalize image destination"); 43 | } 44 | CFRelease(destination); 45 | } 46 | -(void)persistAnimatedImageSequenceAPNG:(NSArray *)images frameDelay:(CGFloat)frameDelay numberOfLoops:(NSInteger)numberOfLoops toURL:(NSURL *)toURL{ 47 | NSDictionary *fileProperties = @{ 48 | (__bridge id)kCGImagePropertyPNGDictionary: @{ 49 | (__bridge id)kCGImagePropertyAPNGLoopCount: @(numberOfLoops), // 0 means loop forever 50 | } 51 | }; 52 | 53 | NSDictionary *frameProperties = @{ 54 | (__bridge id)kCGImagePropertyPNGDictionary: @{ 55 | (__bridge id)kCGImagePropertyAPNGDelayTime: @(frameDelay), // a float (not double!) in seconds, rounded to centiseconds in the GIF data 56 | } 57 | }; 58 | 59 | 60 | CGImageDestinationRef destination = CGImageDestinationCreateWithURL((__bridge CFURLRef)toURL, kUTTypePNG, images.count, NULL); 61 | CGImageDestinationSetProperties(destination, (__bridge CFDictionaryRef)fileProperties); 62 | for (UIImage * image in images) { 63 | CGImageDestinationAddImage(destination, image.CGImage, (__bridge CFDictionaryRef)frameProperties); 64 | } 65 | 66 | if (!CGImageDestinationFinalize(destination)) { 67 | NSLog(@"failed to finalize image destination"); 68 | } 69 | CFRelease(destination); 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/ExampleCollectionViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleCollectionViewCell.swift 3 | // Example 4 | // 5 | // Created by Radif Sharafullin on 8/24/16. 6 | // Copyright © 2016 Radif Sharafullin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Messages 11 | 12 | class ExampleCollectionViewCell: UICollectionViewCell { 13 | static let kReuseIdentifier = "ExampleCollectionViewCell" 14 | @IBOutlet weak var _spinner: UIActivityIndicatorView! 15 | @IBOutlet weak var _stickerHolderView: UIView! 16 | 17 | var _stickerView: MSStickerView? = nil 18 | private var _stickerData : StickerData?=nil 19 | var stickerData : StickerData? {get {return _stickerData}} 20 | 21 | override func prepareForReuse() { 22 | if let v = _stickerView { 23 | v.stopAnimating() 24 | v.sticker=nil 25 | v.removeFromSuperview() 26 | } 27 | _stickerView = nil 28 | _stickerData = nil 29 | 30 | hideSpinner() 31 | } 32 | 33 | func render(stickerData: StickerData){ 34 | _stickerData=stickerData 35 | loadCurrentStickerAsync() 36 | } 37 | 38 | func loadCurrentStickerAsync(){ 39 | if let stickerData = _stickerData { 40 | showSpinner() 41 | 42 | let images = stickerData.images 43 | let localizedDescription = stickerData.name 44 | let frameDelay = CGFloat(stickerData.frameDelay) 45 | 46 | //async... 47 | DispatchQueue.main.async() { [weak self] in 48 | 49 | var imgs = [UIImage]() 50 | for imageName in images{ 51 | let img = UIImage(named: imageName) 52 | if let i = img{ imgs.append(i) } 53 | } 54 | 55 | let urlForImageName = { (_ name:String)->URL in 56 | var url = Bundle.main.resourceURL! 57 | url.appendPathComponent(name + ".png") 58 | return url 59 | } 60 | 61 | let sticker :MSSticker 62 | do { 63 | try sticker=MSSticker(images: imgs, format: .apng, frameDelay: frameDelay, numberOfLoops: 0, localizedDescription: localizedDescription) 64 | 65 | }catch MSStickerAnimationInputError.InvalidDimensions { 66 | try! sticker=MSSticker(contentsOfFileURL: urlForImageName("invalid_image_size"), localizedDescription: "invalid dimensions") 67 | 68 | }catch MSStickerAnimationInputError.InvalidStickerFileSize { 69 | try! sticker=MSSticker(contentsOfFileURL: urlForImageName("invalid_file_size"), localizedDescription: "invalid file size") 70 | 71 | } catch { 72 | fatalError("other error:\(error)") 73 | } 74 | 75 | if let s=self{ 76 | if localizedDescription == s._stickerData?.name{ 77 | let sv = MSStickerView(frame: s._stickerHolderView.bounds, sticker: sticker) 78 | s._stickerHolderView.addSubview(sv) 79 | sv.startAnimating() 80 | s._stickerView = sv 81 | s.hideSpinner() 82 | } 83 | } 84 | } 85 | 86 | } 87 | } 88 | 89 | func showSpinner(){ 90 | _spinner.isHidden = false 91 | _spinner.startAnimating() 92 | } 93 | func hideSpinner(){ 94 | _spinner.stopAnimating() 95 | _spinner.isHidden = true 96 | } 97 | 98 | } 99 | -------------------------------------------------------------------------------- /Classes/MSSticker+Images.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MSSticker+Images.swift 3 | // 4 | // Created by Radif Sharafullin on 6/30/16. 5 | // Copyright © 2016 Radif Sharafullin. All rights reserved. 6 | // 7 | 8 | import UIKit 9 | import Messages 10 | 11 | public enum MSStickerAnimationFormat { 12 | case apng 13 | case gif 14 | } 15 | public enum MSStickerAnimationInputError: Error { 16 | case InvalidDimensions //should be less than 500 kb in order to "stick" to the message 17 | case InvalidStickerFileSize //should be less than 500 kb in order to "stick" to the message 18 | } 19 | 20 | extension MSSticker { 21 | //frame Delay aka frame rate 22 | //number of loops 0 = forever 23 | //localizedDescription will be used for the temporary file name 24 | 25 | //The current limitation imposed by Apple is 500kb file size and the image dimensions varying 300x300 to 618-618 px. The initializer will throw .InvalidDimensions or .InvalidStickerFileSize if the conditions are not met 26 | 27 | //usage: 28 | /* 29 | var images = [UIImage]() 30 | 31 | ...populate 32 | 33 | let sticker :MSSticker 34 | do { 35 | try sticker=MSSticker(images: images, format: .apng, frameDelay: 1.0/14.0, numberOfLoops: 0, localizedDescription: localizedDescription) 36 | 37 | }catch MSStickerAnimationInputError.InvalidDimensions { 38 | try! sticker=MSSticker(contentsOfFileURL: urlForImageName("invalid_image_size"), localizedDescription: "invalid dimensions") 39 | 40 | }catch MSStickerAnimationInputError.InvalidStickerFileSize { 41 | try! sticker=MSSticker(contentsOfFileURL: urlForImageName("invalid_file_size"), localizedDescription: "invalid file size") 42 | 43 | } catch { fatalError("other error:\(error)") } 44 | */ 45 | 46 | public convenience init(images: [UIImage], format:MSStickerAnimationFormat, frameDelay: CGFloat, numberOfLoops: Int, localizedDescription: String) throws{ 47 | 48 | //check if all image dimensions 49 | let isImageDimensionValid = { (_ dimension:CGFloat)->Bool in return dimension >= 300 && dimension <= 618 } 50 | for image in images{ guard isImageDimensionValid(image.size.width) && isImageDimensionValid(image.size.height) else { throw MSStickerAnimationInputError.InvalidDimensions } } 51 | 52 | let cacheURL: URL 53 | let fileManager = FileManager.default 54 | let directoryName = UUID().uuidString 55 | let tempPath = NSTemporaryDirectory() 56 | 57 | cacheURL = URL(fileURLWithPath: tempPath).appendingPathComponent(directoryName) 58 | do { try fileManager.createDirectory(at: cacheURL, withIntermediateDirectories: true, attributes: nil) } catch { fatalError("Unable to create cache URL: \(error)") } 59 | 60 | let fileName = localizedDescription + (format == .apng ? ".png" : ".gif") // ".png" extension is used instead of .apng for backwards compatibility with viewers not supporting apng - they will see it's first frame as static png image 61 | 62 | let url = cacheURL.appendingPathComponent(fileName) 63 | 64 | if format == .apng { 65 | mcbAnimatedImagePersister.shared().persistAnimatedImageSequenceAPNG(images, frameDelay: frameDelay, numberOfLoops: numberOfLoops, to: url) 66 | }else{ 67 | mcbAnimatedImagePersister.shared().persistAnimatedImageSequenceGIF(images, frameDelay: frameDelay, numberOfLoops: numberOfLoops, to: url) 68 | } 69 | 70 | 71 | //check the animated file size 72 | var fileSize: UInt64 = 0 73 | do { 74 | let fileAttributes = try FileManager.default.attributesOfItem(atPath: url.path) 75 | if let fSize = fileAttributes[FileAttributeKey.size] { 76 | fileSize = (fSize as! NSNumber).uint64Value 77 | } else { print("Failed to get a size attribute from path: \(url.path)") } 78 | } catch { print("Error: \(error)") } 79 | 80 | if fileSize/1000 > 500 { throw MSStickerAnimationInputError.InvalidStickerFileSize } 81 | 82 | 83 | do { try self.init(contentsOfFileURL: url, localizedDescription: localizedDescription) } 84 | catch { fatalError("Unable to create sticker: \(error)") } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /Example/Example/Example.xcodeproj/xcuserdata/radif.xcuserdatad/xcschemes/MessagesExtension.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 6 | 9 | 10 | 16 | 22 | 23 | 24 | 30 | 36 | 37 | 38 | 39 | 40 | 45 | 46 | 47 | 48 | 54 | 55 | 56 | 57 | 58 | 59 | 70 | 72 | 78 | 79 | 80 | 81 | 82 | 83 | 90 | 92 | 98 | 99 | 100 | 101 | 103 | 104 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/MessagesViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MessagesViewController.swift 3 | // MessagesExtension 4 | // 5 | // Created by Radif Sharafullin on 8/24/16. 6 | // Copyright © 2016 Radif Sharafullin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Messages 11 | 12 | class MessagesViewController: MSMessagesAppViewController, UICollectionViewDelegate, UICollectionViewDataSource { 13 | @IBOutlet weak var _collectionView: UICollectionView! 14 | var _stickers = [StickerData]() 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | // Do any additional setup after loading the view. 18 | 19 | 20 | //generate stickers 21 | 22 | let generate = { [weak self] (imageName:String, maxFrame:Int, localizedDescription:String) in 23 | var images = [String]() 24 | for i in (1...maxFrame){ 25 | images.append(String.init(format: "%@%02d", imageName, i)) 26 | } 27 | self?._stickers.append(StickerData(images: images, name: localizedDescription, fps:14)) 28 | } 29 | 30 | 31 | generate("elephant", 34, "test_big_filesize") 32 | generate("elephant_big", 6, "test_big_image_frame") 33 | 34 | 35 | for i in (0...100){ 36 | generate("elephant", 18, "test_\(i)") 37 | } 38 | 39 | 40 | } 41 | 42 | override func didReceiveMemoryWarning() { 43 | super.didReceiveMemoryWarning() 44 | // Dispose of any resources that can be recreated. 45 | } 46 | 47 | // MARK: - Conversation Handling 48 | 49 | override func willBecomeActive(with conversation: MSConversation) { 50 | // Called when the extension is about to move from the inactive to active state. 51 | // This will happen when the extension is about to present UI. 52 | 53 | // Use this method to configure the extension and restore previously stored state. 54 | } 55 | 56 | override func didResignActive(with conversation: MSConversation) { 57 | // Called when the extension is about to move from the active to inactive state. 58 | // This will happen when the user dissmises the extension, changes to a different 59 | // conversation or quits Messages. 60 | 61 | // Use this method to release shared resources, save user data, invalidate timers, 62 | // and store enough state information to restore your extension to its current state 63 | // in case it is terminated later. 64 | } 65 | 66 | override func didReceive(_ message: MSMessage, conversation: MSConversation) { 67 | // Called when a message arrives that was generated by another instance of this 68 | // extension on a remote device. 69 | 70 | // Use this method to trigger UI updates in response to the message. 71 | } 72 | 73 | override func didStartSending(_ message: MSMessage, conversation: MSConversation) { 74 | // Called when the user taps the send button. 75 | } 76 | 77 | override func didCancelSending(_ message: MSMessage, conversation: MSConversation) { 78 | // Called when the user deletes the message without sending it. 79 | 80 | // Use this to clean up state related to the deleted message. 81 | } 82 | 83 | override func willTransition(to presentationStyle: MSMessagesAppPresentationStyle) { 84 | // Called before the extension transitions to a new presentation style. 85 | 86 | // Use this method to prepare for the change in presentation style. 87 | } 88 | 89 | override func didTransition(to presentationStyle: MSMessagesAppPresentationStyle) { 90 | // Called after the extension transitions to a new presentation style. 91 | 92 | // Use this method to finalize any behaviors associated with the change in presentation style. 93 | } 94 | 95 | // MARK: - collectionView data source 96 | func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int{ 97 | return _stickers.count 98 | } 99 | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell{ 100 | 101 | let stickerData = _stickers[indexPath.row] 102 | 103 | guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: ExampleCollectionViewCell.kReuseIdentifier, for: indexPath as IndexPath) as? ExampleCollectionViewCell else { fatalError("Unable to dequeue a cell") } 104 | 105 | cell.render(stickerData: stickerData) 106 | 107 | return cell 108 | } 109 | 110 | 111 | } 112 | -------------------------------------------------------------------------------- /Example/Example/MessagesExtension/Base.lproj/MainInterface.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /Example/Example/Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 49F9DE571D6E087C0022C8D2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 49F9DE561D6E087C0022C8D2 /* Assets.xcassets */; }; 11 | 49F9DE5E1D6E087C0022C8D2 /* MessagesExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 49F9DE5D1D6E087C0022C8D2 /* MessagesExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 12 | 49F9DE631D6E087C0022C8D2 /* Messages.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49F9DE621D6E087C0022C8D2 /* Messages.framework */; }; 13 | 49F9DE661D6E087C0022C8D2 /* MessagesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49F9DE651D6E087C0022C8D2 /* MessagesViewController.swift */; }; 14 | 49F9DE691D6E087C0022C8D2 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 49F9DE671D6E087C0022C8D2 /* MainInterface.storyboard */; }; 15 | 49F9DE6B1D6E087C0022C8D2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 49F9DE6A1D6E087C0022C8D2 /* Assets.xcassets */; }; 16 | 49F9DE7A1D6E08920022C8D2 /* mcbAnimatedImagePersister.m in Sources */ = {isa = PBXBuildFile; fileRef = 49F9DE781D6E08920022C8D2 /* mcbAnimatedImagePersister.m */; }; 17 | 49F9DE7B1D6E08920022C8D2 /* MSSticker+Images.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49F9DE791D6E08920022C8D2 /* MSSticker+Images.swift */; }; 18 | 49F9DE7E1D6E1D110022C8D2 /* ExampleCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49F9DE7D1D6E1D110022C8D2 /* ExampleCollectionViewCell.swift */; }; 19 | 49F9DE801D6E1EB00022C8D2 /* StickerData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49F9DE7F1D6E1EB00022C8D2 /* StickerData.swift */; }; 20 | 49F9DE821D6E21F10022C8D2 /* RawImages.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 49F9DE811D6E21F10022C8D2 /* RawImages.xcassets */; }; 21 | 49F9DE861D6E26A00022C8D2 /* invalid_file_size.png in Resources */ = {isa = PBXBuildFile; fileRef = 49F9DE841D6E26A00022C8D2 /* invalid_file_size.png */; }; 22 | 49F9DE871D6E26A00022C8D2 /* invalid_image_size.png in Resources */ = {isa = PBXBuildFile; fileRef = 49F9DE851D6E26A00022C8D2 /* invalid_image_size.png */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXContainerItemProxy section */ 26 | 49F9DE5F1D6E087C0022C8D2 /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = 49F9DE4D1D6E087C0022C8D2 /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = 49F9DE5C1D6E087C0022C8D2; 31 | remoteInfo = MessagesExtension; 32 | }; 33 | /* End PBXContainerItemProxy section */ 34 | 35 | /* Begin PBXCopyFilesBuildPhase section */ 36 | 49F9DE721D6E087C0022C8D2 /* Embed App Extensions */ = { 37 | isa = PBXCopyFilesBuildPhase; 38 | buildActionMask = 2147483647; 39 | dstPath = ""; 40 | dstSubfolderSpec = 13; 41 | files = ( 42 | 49F9DE5E1D6E087C0022C8D2 /* MessagesExtension.appex in Embed App Extensions */, 43 | ); 44 | name = "Embed App Extensions"; 45 | runOnlyForDeploymentPostprocessing = 0; 46 | }; 47 | /* End PBXCopyFilesBuildPhase section */ 48 | 49 | /* Begin PBXFileReference section */ 50 | 49F9DE531D6E087C0022C8D2 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 49F9DE561D6E087C0022C8D2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 52 | 49F9DE581D6E087C0022C8D2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | 49F9DE5D1D6E087C0022C8D2 /* MessagesExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = MessagesExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 49F9DE621D6E087C0022C8D2 /* Messages.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Messages.framework; path = System/Library/Frameworks/Messages.framework; sourceTree = SDKROOT; }; 55 | 49F9DE651D6E087C0022C8D2 /* MessagesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagesViewController.swift; sourceTree = ""; }; 56 | 49F9DE681D6E087C0022C8D2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = ""; }; 57 | 49F9DE6A1D6E087C0022C8D2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 58 | 49F9DE6C1D6E087C0022C8D2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | 49F9DE771D6E08920022C8D2 /* mcbAnimatedImagePersister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mcbAnimatedImagePersister.h; sourceTree = ""; }; 60 | 49F9DE781D6E08920022C8D2 /* mcbAnimatedImagePersister.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = mcbAnimatedImagePersister.m; sourceTree = ""; }; 61 | 49F9DE791D6E08920022C8D2 /* MSSticker+Images.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "MSSticker+Images.swift"; sourceTree = ""; }; 62 | 49F9DE7C1D6E09110022C8D2 /* Example-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Example-Bridging-Header.h"; sourceTree = ""; }; 63 | 49F9DE7D1D6E1D110022C8D2 /* ExampleCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleCollectionViewCell.swift; sourceTree = ""; }; 64 | 49F9DE7F1D6E1EB00022C8D2 /* StickerData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StickerData.swift; sourceTree = ""; }; 65 | 49F9DE811D6E21F10022C8D2 /* RawImages.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = RawImages.xcassets; sourceTree = ""; }; 66 | 49F9DE841D6E26A00022C8D2 /* invalid_file_size.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = invalid_file_size.png; sourceTree = ""; }; 67 | 49F9DE851D6E26A00022C8D2 /* invalid_image_size.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = invalid_image_size.png; sourceTree = ""; }; 68 | /* End PBXFileReference section */ 69 | 70 | /* Begin PBXFrameworksBuildPhase section */ 71 | 49F9DE5A1D6E087C0022C8D2 /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | 49F9DE631D6E087C0022C8D2 /* Messages.framework in Frameworks */, 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | /* End PBXFrameworksBuildPhase section */ 80 | 81 | /* Begin PBXGroup section */ 82 | 49F9DE4C1D6E087C0022C8D2 = { 83 | isa = PBXGroup; 84 | children = ( 85 | 49F9DE551D6E087C0022C8D2 /* Example */, 86 | 49F9DE641D6E087C0022C8D2 /* MessagesExtension */, 87 | 49F9DE611D6E087C0022C8D2 /* Frameworks */, 88 | 49F9DE541D6E087C0022C8D2 /* Products */, 89 | ); 90 | sourceTree = ""; 91 | }; 92 | 49F9DE541D6E087C0022C8D2 /* Products */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 49F9DE531D6E087C0022C8D2 /* Example.app */, 96 | 49F9DE5D1D6E087C0022C8D2 /* MessagesExtension.appex */, 97 | ); 98 | name = Products; 99 | sourceTree = ""; 100 | }; 101 | 49F9DE551D6E087C0022C8D2 /* Example */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 49F9DE561D6E087C0022C8D2 /* Assets.xcassets */, 105 | 49F9DE581D6E087C0022C8D2 /* Info.plist */, 106 | ); 107 | path = Example; 108 | sourceTree = ""; 109 | }; 110 | 49F9DE611D6E087C0022C8D2 /* Frameworks */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 49F9DE621D6E087C0022C8D2 /* Messages.framework */, 114 | ); 115 | name = Frameworks; 116 | sourceTree = ""; 117 | }; 118 | 49F9DE641D6E087C0022C8D2 /* MessagesExtension */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 49F9DE761D6E08920022C8D2 /* Classes */, 122 | 49F9DE651D6E087C0022C8D2 /* MessagesViewController.swift */, 123 | 49F9DE7D1D6E1D110022C8D2 /* ExampleCollectionViewCell.swift */, 124 | 49F9DE7F1D6E1EB00022C8D2 /* StickerData.swift */, 125 | 49F9DE671D6E087C0022C8D2 /* MainInterface.storyboard */, 126 | 49F9DE831D6E26A00022C8D2 /* Resources */, 127 | 49F9DE6A1D6E087C0022C8D2 /* Assets.xcassets */, 128 | 49F9DE811D6E21F10022C8D2 /* RawImages.xcassets */, 129 | 49F9DE6C1D6E087C0022C8D2 /* Info.plist */, 130 | 49F9DE7C1D6E09110022C8D2 /* Example-Bridging-Header.h */, 131 | ); 132 | path = MessagesExtension; 133 | sourceTree = ""; 134 | }; 135 | 49F9DE761D6E08920022C8D2 /* Classes */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 49F9DE771D6E08920022C8D2 /* mcbAnimatedImagePersister.h */, 139 | 49F9DE781D6E08920022C8D2 /* mcbAnimatedImagePersister.m */, 140 | 49F9DE791D6E08920022C8D2 /* MSSticker+Images.swift */, 141 | ); 142 | name = Classes; 143 | path = ../../../Classes; 144 | sourceTree = ""; 145 | }; 146 | 49F9DE831D6E26A00022C8D2 /* Resources */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 49F9DE841D6E26A00022C8D2 /* invalid_file_size.png */, 150 | 49F9DE851D6E26A00022C8D2 /* invalid_image_size.png */, 151 | ); 152 | path = Resources; 153 | sourceTree = ""; 154 | }; 155 | /* End PBXGroup section */ 156 | 157 | /* Begin PBXNativeTarget section */ 158 | 49F9DE521D6E087C0022C8D2 /* Example */ = { 159 | isa = PBXNativeTarget; 160 | buildConfigurationList = 49F9DE731D6E087C0022C8D2 /* Build configuration list for PBXNativeTarget "Example" */; 161 | buildPhases = ( 162 | 49F9DE511D6E087C0022C8D2 /* Resources */, 163 | 49F9DE721D6E087C0022C8D2 /* Embed App Extensions */, 164 | ); 165 | buildRules = ( 166 | ); 167 | dependencies = ( 168 | 49F9DE601D6E087C0022C8D2 /* PBXTargetDependency */, 169 | ); 170 | name = Example; 171 | productName = Example; 172 | productReference = 49F9DE531D6E087C0022C8D2 /* Example.app */; 173 | productType = "com.apple.product-type.application.messages"; 174 | }; 175 | 49F9DE5C1D6E087C0022C8D2 /* MessagesExtension */ = { 176 | isa = PBXNativeTarget; 177 | buildConfigurationList = 49F9DE6F1D6E087C0022C8D2 /* Build configuration list for PBXNativeTarget "MessagesExtension" */; 178 | buildPhases = ( 179 | 49F9DE591D6E087C0022C8D2 /* Sources */, 180 | 49F9DE5A1D6E087C0022C8D2 /* Frameworks */, 181 | 49F9DE5B1D6E087C0022C8D2 /* Resources */, 182 | ); 183 | buildRules = ( 184 | ); 185 | dependencies = ( 186 | ); 187 | name = MessagesExtension; 188 | productName = MessagesExtension; 189 | productReference = 49F9DE5D1D6E087C0022C8D2 /* MessagesExtension.appex */; 190 | productType = "com.apple.product-type.app-extension.messages"; 191 | }; 192 | /* End PBXNativeTarget section */ 193 | 194 | /* Begin PBXProject section */ 195 | 49F9DE4D1D6E087C0022C8D2 /* Project object */ = { 196 | isa = PBXProject; 197 | attributes = { 198 | LastSwiftUpdateCheck = 0800; 199 | LastUpgradeCheck = 0800; 200 | ORGANIZATIONNAME = "Radif Sharafullin"; 201 | TargetAttributes = { 202 | 49F9DE521D6E087C0022C8D2 = { 203 | CreatedOnToolsVersion = 8.0; 204 | DevelopmentTeam = P92KFBGDEK; 205 | ProvisioningStyle = Automatic; 206 | }; 207 | 49F9DE5C1D6E087C0022C8D2 = { 208 | CreatedOnToolsVersion = 8.0; 209 | DevelopmentTeam = P92KFBGDEK; 210 | ProvisioningStyle = Automatic; 211 | }; 212 | }; 213 | }; 214 | buildConfigurationList = 49F9DE501D6E087C0022C8D2 /* Build configuration list for PBXProject "Example" */; 215 | compatibilityVersion = "Xcode 3.2"; 216 | developmentRegion = English; 217 | hasScannedForEncodings = 0; 218 | knownRegions = ( 219 | en, 220 | Base, 221 | ); 222 | mainGroup = 49F9DE4C1D6E087C0022C8D2; 223 | productRefGroup = 49F9DE541D6E087C0022C8D2 /* Products */; 224 | projectDirPath = ""; 225 | projectRoot = ""; 226 | targets = ( 227 | 49F9DE521D6E087C0022C8D2 /* Example */, 228 | 49F9DE5C1D6E087C0022C8D2 /* MessagesExtension */, 229 | ); 230 | }; 231 | /* End PBXProject section */ 232 | 233 | /* Begin PBXResourcesBuildPhase section */ 234 | 49F9DE511D6E087C0022C8D2 /* Resources */ = { 235 | isa = PBXResourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 49F9DE571D6E087C0022C8D2 /* Assets.xcassets in Resources */, 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | }; 242 | 49F9DE5B1D6E087C0022C8D2 /* Resources */ = { 243 | isa = PBXResourcesBuildPhase; 244 | buildActionMask = 2147483647; 245 | files = ( 246 | 49F9DE861D6E26A00022C8D2 /* invalid_file_size.png in Resources */, 247 | 49F9DE6B1D6E087C0022C8D2 /* Assets.xcassets in Resources */, 248 | 49F9DE871D6E26A00022C8D2 /* invalid_image_size.png in Resources */, 249 | 49F9DE821D6E21F10022C8D2 /* RawImages.xcassets in Resources */, 250 | 49F9DE691D6E087C0022C8D2 /* MainInterface.storyboard in Resources */, 251 | ); 252 | runOnlyForDeploymentPostprocessing = 0; 253 | }; 254 | /* End PBXResourcesBuildPhase section */ 255 | 256 | /* Begin PBXSourcesBuildPhase section */ 257 | 49F9DE591D6E087C0022C8D2 /* Sources */ = { 258 | isa = PBXSourcesBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | 49F9DE7B1D6E08920022C8D2 /* MSSticker+Images.swift in Sources */, 262 | 49F9DE7E1D6E1D110022C8D2 /* ExampleCollectionViewCell.swift in Sources */, 263 | 49F9DE801D6E1EB00022C8D2 /* StickerData.swift in Sources */, 264 | 49F9DE661D6E087C0022C8D2 /* MessagesViewController.swift in Sources */, 265 | 49F9DE7A1D6E08920022C8D2 /* mcbAnimatedImagePersister.m in Sources */, 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | }; 269 | /* End PBXSourcesBuildPhase section */ 270 | 271 | /* Begin PBXTargetDependency section */ 272 | 49F9DE601D6E087C0022C8D2 /* PBXTargetDependency */ = { 273 | isa = PBXTargetDependency; 274 | target = 49F9DE5C1D6E087C0022C8D2 /* MessagesExtension */; 275 | targetProxy = 49F9DE5F1D6E087C0022C8D2 /* PBXContainerItemProxy */; 276 | }; 277 | /* End PBXTargetDependency section */ 278 | 279 | /* Begin PBXVariantGroup section */ 280 | 49F9DE671D6E087C0022C8D2 /* MainInterface.storyboard */ = { 281 | isa = PBXVariantGroup; 282 | children = ( 283 | 49F9DE681D6E087C0022C8D2 /* Base */, 284 | ); 285 | name = MainInterface.storyboard; 286 | sourceTree = ""; 287 | }; 288 | /* End PBXVariantGroup section */ 289 | 290 | /* Begin XCBuildConfiguration section */ 291 | 49F9DE6D1D6E087C0022C8D2 /* Debug */ = { 292 | isa = XCBuildConfiguration; 293 | buildSettings = { 294 | ALWAYS_SEARCH_USER_PATHS = NO; 295 | CLANG_ANALYZER_NONNULL = YES; 296 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 297 | CLANG_CXX_LIBRARY = "libc++"; 298 | CLANG_ENABLE_MODULES = YES; 299 | CLANG_ENABLE_OBJC_ARC = YES; 300 | CLANG_WARN_BOOL_CONVERSION = YES; 301 | CLANG_WARN_CONSTANT_CONVERSION = YES; 302 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 303 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 304 | CLANG_WARN_EMPTY_BODY = YES; 305 | CLANG_WARN_ENUM_CONVERSION = YES; 306 | CLANG_WARN_INFINITE_RECURSION = YES; 307 | CLANG_WARN_INT_CONVERSION = YES; 308 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 309 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 310 | CLANG_WARN_UNREACHABLE_CODE = YES; 311 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 312 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 313 | COPY_PHASE_STRIP = NO; 314 | DEBUG_INFORMATION_FORMAT = dwarf; 315 | ENABLE_STRICT_OBJC_MSGSEND = YES; 316 | ENABLE_TESTABILITY = YES; 317 | GCC_C_LANGUAGE_STANDARD = gnu99; 318 | GCC_DYNAMIC_NO_PIC = NO; 319 | GCC_NO_COMMON_BLOCKS = YES; 320 | GCC_OPTIMIZATION_LEVEL = 0; 321 | GCC_PREPROCESSOR_DEFINITIONS = ( 322 | "DEBUG=1", 323 | "$(inherited)", 324 | ); 325 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 326 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 327 | GCC_WARN_UNDECLARED_SELECTOR = YES; 328 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 329 | GCC_WARN_UNUSED_FUNCTION = YES; 330 | GCC_WARN_UNUSED_VARIABLE = YES; 331 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 332 | MTL_ENABLE_DEBUG_INFO = YES; 333 | ONLY_ACTIVE_ARCH = YES; 334 | SDKROOT = iphoneos; 335 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 336 | SWIFT_OBJC_BRIDGING_HEADER = "MessagesExtension/Example-Bridging-Header.h"; 337 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 338 | }; 339 | name = Debug; 340 | }; 341 | 49F9DE6E1D6E087C0022C8D2 /* Release */ = { 342 | isa = XCBuildConfiguration; 343 | buildSettings = { 344 | ALWAYS_SEARCH_USER_PATHS = NO; 345 | CLANG_ANALYZER_NONNULL = YES; 346 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 347 | CLANG_CXX_LIBRARY = "libc++"; 348 | CLANG_ENABLE_MODULES = YES; 349 | CLANG_ENABLE_OBJC_ARC = YES; 350 | CLANG_WARN_BOOL_CONVERSION = YES; 351 | CLANG_WARN_CONSTANT_CONVERSION = YES; 352 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 353 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 354 | CLANG_WARN_EMPTY_BODY = YES; 355 | CLANG_WARN_ENUM_CONVERSION = YES; 356 | CLANG_WARN_INFINITE_RECURSION = YES; 357 | CLANG_WARN_INT_CONVERSION = YES; 358 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 359 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 360 | CLANG_WARN_UNREACHABLE_CODE = YES; 361 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 362 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 363 | COPY_PHASE_STRIP = NO; 364 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 365 | ENABLE_NS_ASSERTIONS = NO; 366 | ENABLE_STRICT_OBJC_MSGSEND = YES; 367 | GCC_C_LANGUAGE_STANDARD = gnu99; 368 | GCC_NO_COMMON_BLOCKS = YES; 369 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 370 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 371 | GCC_WARN_UNDECLARED_SELECTOR = YES; 372 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 373 | GCC_WARN_UNUSED_FUNCTION = YES; 374 | GCC_WARN_UNUSED_VARIABLE = YES; 375 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 376 | MTL_ENABLE_DEBUG_INFO = NO; 377 | SDKROOT = iphoneos; 378 | SWIFT_OBJC_BRIDGING_HEADER = "MessagesExtension/Example-Bridging-Header.h"; 379 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 380 | VALIDATE_PRODUCT = YES; 381 | }; 382 | name = Release; 383 | }; 384 | 49F9DE701D6E087C0022C8D2 /* Debug */ = { 385 | isa = XCBuildConfiguration; 386 | buildSettings = { 387 | ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon"; 388 | DEVELOPMENT_TEAM = P92KFBGDEK; 389 | INFOPLIST_FILE = MessagesExtension/Info.plist; 390 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; 391 | PRODUCT_BUNDLE_IDENTIFIER = com.mocobits.Example.MessagesExtension; 392 | PRODUCT_NAME = "$(TARGET_NAME)"; 393 | SKIP_INSTALL = YES; 394 | SWIFT_VERSION = 3.0; 395 | }; 396 | name = Debug; 397 | }; 398 | 49F9DE711D6E087C0022C8D2 /* Release */ = { 399 | isa = XCBuildConfiguration; 400 | buildSettings = { 401 | ASSETCATALOG_COMPILER_APPICON_NAME = "iMessage App Icon"; 402 | DEVELOPMENT_TEAM = P92KFBGDEK; 403 | INFOPLIST_FILE = MessagesExtension/Info.plist; 404 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; 405 | PRODUCT_BUNDLE_IDENTIFIER = com.mocobits.Example.MessagesExtension; 406 | PRODUCT_NAME = "$(TARGET_NAME)"; 407 | SKIP_INSTALL = YES; 408 | SWIFT_VERSION = 3.0; 409 | }; 410 | name = Release; 411 | }; 412 | 49F9DE741D6E087C0022C8D2 /* Debug */ = { 413 | isa = XCBuildConfiguration; 414 | buildSettings = { 415 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 416 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 417 | DEVELOPMENT_TEAM = P92KFBGDEK; 418 | INFOPLIST_FILE = Example/Info.plist; 419 | PRODUCT_BUNDLE_IDENTIFIER = com.mocobits.Example; 420 | PRODUCT_NAME = "$(TARGET_NAME)"; 421 | SWIFT_VERSION = 3.0; 422 | TARGETED_DEVICE_FAMILY = "1,2"; 423 | }; 424 | name = Debug; 425 | }; 426 | 49F9DE751D6E087C0022C8D2 /* Release */ = { 427 | isa = XCBuildConfiguration; 428 | buildSettings = { 429 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 430 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 431 | DEVELOPMENT_TEAM = P92KFBGDEK; 432 | INFOPLIST_FILE = Example/Info.plist; 433 | PRODUCT_BUNDLE_IDENTIFIER = com.mocobits.Example; 434 | PRODUCT_NAME = "$(TARGET_NAME)"; 435 | SWIFT_VERSION = 3.0; 436 | TARGETED_DEVICE_FAMILY = "1,2"; 437 | }; 438 | name = Release; 439 | }; 440 | /* End XCBuildConfiguration section */ 441 | 442 | /* Begin XCConfigurationList section */ 443 | 49F9DE501D6E087C0022C8D2 /* Build configuration list for PBXProject "Example" */ = { 444 | isa = XCConfigurationList; 445 | buildConfigurations = ( 446 | 49F9DE6D1D6E087C0022C8D2 /* Debug */, 447 | 49F9DE6E1D6E087C0022C8D2 /* Release */, 448 | ); 449 | defaultConfigurationIsVisible = 0; 450 | defaultConfigurationName = Release; 451 | }; 452 | 49F9DE6F1D6E087C0022C8D2 /* Build configuration list for PBXNativeTarget "MessagesExtension" */ = { 453 | isa = XCConfigurationList; 454 | buildConfigurations = ( 455 | 49F9DE701D6E087C0022C8D2 /* Debug */, 456 | 49F9DE711D6E087C0022C8D2 /* Release */, 457 | ); 458 | defaultConfigurationIsVisible = 0; 459 | }; 460 | 49F9DE731D6E087C0022C8D2 /* Build configuration list for PBXNativeTarget "Example" */ = { 461 | isa = XCConfigurationList; 462 | buildConfigurations = ( 463 | 49F9DE741D6E087C0022C8D2 /* Debug */, 464 | 49F9DE751D6E087C0022C8D2 /* Release */, 465 | ); 466 | defaultConfigurationIsVisible = 0; 467 | }; 468 | /* End XCConfigurationList section */ 469 | }; 470 | rootObject = 49F9DE4D1D6E087C0022C8D2 /* Project object */; 471 | } 472 | --------------------------------------------------------------------------------